Aron T.
Aron T.

Reputation: 448

Random move in a node Anylogic

I've a question, I want to know if there is an option to let an agent move randomly in a node for a specific time (e.g. 30minutes).

So the same as the delay function, only the feature now is that it moves in the node and not just stands still.

Is there an option to do this?

Upvotes: 0

Views: 309

Answers (1)

Felipe
Felipe

Reputation: 9421

here's a fun way to do this (even though there are many ways simpler, but I like this one)

  1. agent moves to the node
  2. exit block sends a message to the agent to transition to the move state
  3. on the statechart (which will be inside the agent) you do moveTo(node); with an arrival triggered transition looping into it
  4. the external state has the timeout (i.e. 30 minutes)
  5. on the final state do enter.take(this); which will move the agent back to the flow

enter image description here

enter image description here

Upvotes: 2

Related Questions