Search code examples
simulationanylogic

Free agents every day at 9 AM In AnyLogic


I am using using wait block for stopping agents moving to next block. I want them to get free every day at 9AM.

My approach: I tried to use dynamic event. what I did is when all the agents enter the wait I create dynamic event of 12 hours means after 12 hours the agents will be free. But that is not accurate approach. enter image description here

I also tried event that have the option to occur at 9AM exact but it we can only select specific date of the month.

What I am trying to achieve is every day at 9AM the wait block free all the agents.


Solution

  • Try using "schedule". For instance, in the schedule, you can use moments, assign the duration type as Days/weeks and repeat every day and specify the time as 09:00 AM. In the action bar use wait.freeAll() to free all the agents at 09:00 AM daily.

    enter image description here