Search code examples
anylogic

Manual timeout in condition of transition in Anylogic


In an agent based model, I have used a branch which goes to two states. Now, I want the transition which is set to condition to proceed on a timeout of 30 seconds. Please see the image for clarification,

enter image description here

I have used time()>30. But I am not confident about this. I think, the transition will trigger when the model time is greater than 30 here.

But I want the transition to trigger only when the agent is waiting for 30 seconds. How can I achieve this?


Solution

  • Instead of a branch, put another state there. Then you can create two transitions, one timeout-based for unsuccessful missions and one conditional (or whatever suits your logic) for successful missions.

    enter image description here