'How to send an agent to a room once it becomes available in Anylogic
I am creating a simulation of a clinic and I currently have patients in a waiting room being sent to an exam room once their wait time is over in the delay block. However, rooms often become available prior to the agent's wait time being finished. How can I trigger the agent movement out of the delay block and to an available room?
Solution 1:[1]
Create an event that runs every second to check if there is available room. If the condition is satisfied, remove the first agent from the Delay block with the command myDelay.remove(myDelay.get(0)).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yashar Ahmadov |
