Simulation with AnyLogic/Discrete Event Simulation/Ophthalmology Department Model/Step 9. Calling a doctor

Step 9. Calling a Doctor
Now we will complete our model definition by modeling how ophthalmologist is called to perform the examination. Ophthalmologist picks an ophthalmoscope from the storage room on his way to patient, and returns it back after the procedure. Modify the flowchart
 * 1) Modify the properties of the networkSeize object. We want this object to seize a doctor and an ophthalmoscope as well. Type {procRoom, doctor, scope} in the List of resources property. [[File:Step 9. Calling a doctor 1.png]]
 * 2) Modify the flowchart. Insert the objects indicated in the figure below: [[File:Step 9. Calling a doctor 2.png]]
 * 3) Modify the properties of the sendToStorage NetworkSendTo object. NetworkSendTo block sends (moves) network resources from their current location(s) to a new location. In our case we want to send seized doctor to the storage room to take the seized scope. Set the following object properties: [[File:Step 9. Calling a doctor 3.png]]
 * 4) *Specify the list of resources this block will send. Type {doctor} in the Resources to send property.
 * 5) *Specify that resources will move to the Seized resource unit.
 * 6) *Specify the name of the seized resource, which location will play a role of destination node. Type scope in the Resource field.
 * 7) Modify the properties of the sendToPatient NetworkSendTo object. This block moves a doctor with a scope to a patient awaiting for the doctor in the waiting hall. Set the following object properties: [[File:Step 9. Calling a doctor 4.png]]
 * 8) *Specify the list of resources this block will send. Type {doctor, scope} in the Resources to send property.
 * 9) *Specify that resources will move to the Entity.
 * 10) Modify properties of the NetworkAttach object. This block attaches the specified seized network resources to the entity. The result is that they will move together with the entity (escort the entity) until they are detached or released. The resources being attached must be already seized and located in the same node as the entity. We want this block to attach a doctor with a scope to a patient so that patients wil move to the procedure room escorted by doctors. Set the following object properties: [[File:Step 9. Calling a doctor 5.png]]
 * 11) *Choose All seized non-static resources at entity location option.
 * 12) Modify properties of the NetworkDetach object. This block detaches the previously seized and attached network resources from the entity. The detached resource units will still be possessed by the etitity but will not accompany it when the entity moves. Set the following object properties: [[File:Step 9. Calling a doctor 6.png]]
 * 13) *Choose All attached resources option.
 * 14) Modify the properties of the returnScope NetworkSendTo object. We use this block to model how doctors return scopes to the storage room after the examination is completed. Set the following object properties: [[File:Step 9. Calling a doctor 7.png]]
 * 15) *Specify the list of resources this block will send. Type <tt>{doctor, scope}</tt> in the Resources to send property.
 * 16) *Specify that resources will move to the Specified node.
 * 17) *Specify the name of the node where the resources should move. Type <tt>storageRoom</tt> in the Node field.

We have finished creating our model of the ophthalmology department. Run the model. Now you can see the doctors coming with ophthalmoscopes to perform the patient examination.