Simulation with AnyLogic/Discrete Event Simulation/Ophthalmology Department Model/Step 5. Creating a flowchart

Step 5. Creating a Flowchart
Now we will finish creating the simpliest model where patients arrive to the waiting hall of the department, then go to the first procedure room and after some time leave the department.

It is time to define a flowchart describing this process. In AnyLogic you create flowcharts by adding the objects from the library stencil onto the class diagram, setting custom properties for the objects, and connecting objects together.

Create a flowchart
 * 1) Create a flowchart describing the process. Add Enterprise Library objects on the diagram and connect them as shown in the figure below: [[File:Step 5. Creating a flowchart 1.png]] Now set up the properties of these objects.
 * 2) Set up the Source object. Source object generates entities with the specified interarrival time. In our example, it models patient arrival. Set the following object properties: [[File:Step 5. Creating a flowchart 2.png]]
 * 3) *In the Arrival rate field, specify the patient arrival rate: 0.05.
 * 4) *Set shapePatient as Entity animation shape.
 * 5) Configure NetworkEnter object. NetworkEnter adds entities to the specified location in a network. Set the following object properties: [[File:Step 5. Creating a flowchart 3.png]]
 * 6) *Choose waitingHall as patients Entry node. Patients will arrive at the department waiting room.
 * 7) *Specify the Network object describing the network, to which new entities will be added. Type network (the name of our Network object) in the Network field.
 * 8) Set up the NetworkMoveTo object. This block moves entities from the current location to a new one. We add this object to model how patients move from waiting hall to a procedure room. Set the following object properties: [[File:Step 5. Creating a flowchart 4.png]]
 * 9) *Choose procRoom1 as the Node. Patients will go to the first procedure room. At this point we assume that all patients are examined at this room only.
 * 10) Set up the Delay object. Delay object delays entity for the specified time. In our model this time stands for the ophthalmoscopy procedure. Placing Delay block in our flowchart evidences that network-based modeling objects can be mixed with regular process objects like Queue, Delay, Service, etc. Set up the following object properties: [[File:Step 5. Creating a flowchart 5.png]]
 * 11) *Specify the object's Capacity: 5. This parameter defines how many patients can be examined at the same time.
 * 12) Configure the NetworkMoveTo object. We add this object to model how patients are leaving the department after the ophthalmoscopy procedure. Set the following object properties: [[File:Step 5. Creating a flowchart 6.png]]
 * 13) *Patients will move to the destination you specify. Specify exit as the Node since this rectangle corresponds to the department exit.
 * 14) NetworkExit object removes entities from the network. Leave the default properties of the NetworkExit object unchanged.
 * 15) Sink object indicates the end of the flowchart. Leave the default properties of the Sink object unchanged.