1

network with nodes Let's say an agent is located at Node1 and the three resource units from one resource pool are located at Node2, 3, and 4 respectively.

When an agent is to seize one resource unit on nodes and moves to it, I used customize resource choice. An agent has to choose the closest one by the path distance, which is node 3 in this picture.

But the red node represent a bridge which will be broken at some point during simulation.

If the bridge is broken, the agent cannot move to node 3 and 4. Therefore it has to choose node 2.

In the question below,it says that the RouteData API can be used for the any type of agent, not only transporters.

Is there a way to return a list of the nodes along a network between an agent and it's destination?

So I was trying to use RouteData to get the list of nodes in route(agent->unit).

When the bridge is broken, I can change the node color to green then if the route contains any green node the agent does not choose that unit.

But I cannot find Anylogic Help page saying RouteData can be used for any type of agent.

What would be the best way to model my situation?

SHLH
  • 13
  • 3
  • Not sure about the exact problem. Does it work with transporters? Then it would be the same for normal agents... Maybe revise & simplify the original question to get to the root problem you face? Some tips: https://benjamin-schumann.com/blog/anylogic-stackoverflow – Benjamin Aug 09 '23 at 18:38

0 Answers0