简体   繁体   中英

Anylogic: How to stop timeout in a delay block with condition?

I have a collection that counts the number of passengers that enter on a boat at the port. The max capacity of the boat is 1750 and it's scheduled to leave the port every 120 minutes, I would like to end the timeout and let the boat leave the port if the boat reaches the max capacity earlier than 120 minutes.

I've used a delay block, but if I choose Type -> "Specified time" I cannot stop the delay and if I choose Type -> "Until stopDelay is called" I cannot set a specific timeout.

Is Delay the right block to use? How can I set the condition above?

Thanks a lot in advance.

Click to see passengers and boat flow

Use a Wait block and manually trigger wait.free(myBoat) when either of the conditions is met. The timeout can be done with an event (or better a Dynamic Event). The other condition is driven from your passengers so they would need to call the free() method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM