Last modified on 4 August 2009, at 18:35

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

Step 9. Calling a DoctorEdit

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.

Step 1. Creating a new model1.gif 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.
    Step 9. Calling a doctor 1.png
  2. Modify the flowchart. Insert the objects indicated in the figure below:
    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:
    Step 9. Calling a doctor 3.png
    • Specify the list of resources this block will send. Type {doctor} in the Resources to send property.
    • Specify that resources will move to the Seized resource unit.
    • Specify the name of the seized resource, which location will play a role of destination node. Type scope in the Resource field.
  4. 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:
    Step 9. Calling a doctor 4.png
    • Specify the list of resources this block will send. Type {doctor, scope} in the Resources to send property.
    • Specify that resources will move to the Entity.
  5. 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:
    Step 9. Calling a doctor 5.png
    • Choose All seized non-static resources at entity location option.
  6. 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:
    Step 9. Calling a doctor 6.png
    • Choose All attached resources option.
  7. 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:
    Step 9. Calling a doctor 7.png
    • Specify the list of resources this block will send. Type {doctor, scope} in the Resources to send property.
    • Specify that resources will move to the Specified node.
    • Specify the name of the node where the resources should move. Type storageRoom 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.