Alexey  Milahin
Alexey Milahin

Reputation: 59

How do I know which agent is released from the Delay block?

I have a this model in AnyLogic 7. How can I know which agent is released from "delayBA" unit using the code in the "function" function that is called when you exit the "delayBA" block?

My model

Upvotes: 1

Views: 167

Answers (1)

Benjamin
Benjamin

Reputation: 12660

Try agent.getIndex() in the onRelease code box.

Also refer to why it is "agent" here: the magic light bulb

Upvotes: 2

Related Questions