Miriana
Miriana

Reputation: 95

ID of ResourcePool

Is it possible to keep track of the resource used in a specific action? Let me explain better: I have a resourcePool composed of three classrooms, each agent that enters the flow occupies one of the three classrooms for a specific time. Can I track the classroom used by the agent?

Upvotes: 0

Views: 153

Answers (1)

Artem P.
Artem P.

Reputation: 816

Yes, it is possible. The Seize block has a 'on seize unit' event where you get access to both the agent seizing the unit and the unit itself, so it is possible to make a record somewhere of which unit is being seized. Or, alternatively, you can call resourceUnits() method on any agent to get a list of resource units it is currently holding. Please see more here in Agent API help.

Upvotes: 0

Related Questions