Simulation with AnyLogic/Discrete Event Simulation/Ophthalmology Department Model/Step 8. Occupying a procedure room

< Simulation with AnyLogic‎ | Discrete Event Simulation‎ | Ophthalmology Department Model

Step 8. Occupying a Procedure RoomEdit

At this point, all patients are examined in the first procedure room only. Moreover, several patients are examined in the same procedure room at the same time. Now we will improve our model by adding room seizing logic. We will model procedure rooms as static resources. Patients will move now to any of three procedure rooms. The room will be occupied for the examination time so that no one else can be examined there at this time.

Modify the flowchart

  1. Add NetworkSeize object. NetworkSeize object seizes a given set of network resources. In our case we want to seize static resources - procedure rooms.
  2. Set the following object properties:
    • Specify the List of resources to be seized. The list of resources is defined in the following way: you list names of NetworkResourcePool objects whose units are being seized. One unit will be seized per pool name. We need to seize one procedure room, so you should type {procRoom}
  3. Modify properties of the moveToProcRoom object. We want this block to move patients not to the first procedure room, but to the one that was previously seized by the patient for the examination.Set the following object properties:
    • Specify that patients will go not to the well-defined destination, but to the location of the seized resource unit (in our case - to the occupied procedure room). Choose Seized resource unit option in the Destination is property.
    • Specify the name of the seized resource unit that will serve as a destination for patients. Type procRoom in the Resource field. procRoom is the name of our NetworkResourcePool object that defines procedure room resources pool.
  4. NetworkRelease object releases previously seized static resources. We need this object to release the procedure room after the procedure.
  5. Set the following object properties:
    • Specify the resources this block releases. Instead of specifying a list of names of seized resources, simply select All seized resources in the Release property since we want to release all seized resources after the procedure will be completed.

Now you can run the model. You can see that patients are examined at any of three procedure rooms and rooms are occupied for the examination time so that no one else is examined there at the same time.