Search code examples
anylogic

Release of agents at the same time


Helloo to everyone. I really need help at an Anylogic project as i am new to it. I have a population of agents and they arrive at a queue block and after they enter a delay block. The agents enter the queue block at different times. I want to leave from the delay block all together but because they enter at different times some agents leave earlier than others.

I tried to add a hold block between the queue block and the delay block and i tried to create a function that release all the agents from the queue block so that all together to go to the delay block as a result to wait the same time, but i am not so good at creating functions


Solution

  • Replace the Delay block with a Wait block and call myWaitBlock.freeAll() when needed.