Yasss Yasss
Yasss Yasss

Reputation: 13

Anylogic : How to stock a particular agent in a variable?

In my model, i work with nodes in which generated agents have to enter. I want to make it so each agent goes into the node its connected to with links. I use a resourcepool to have an agent in every node of the model. My question is, is it possible to gather the agents values of the resourcepool to stock it in different variables ? And if it possible how can i do that ?

i want to use these variables to define the destination of each agent.

Upvotes: 0

Views: 37

Answers (1)

Felipe
Felipe

Reputation: 9421

your question is weirdly presented...

But if your resourcepool has agents of type Resource then you can create a variable in your agents of type Resource, let's call that variable "resource"

then when you seize the resource, on the seize or service block, on the "on seize resource" action you can do:

agent.resource=(Resource)unit;

Upvotes: 0

Related Questions