anylogic - How can I get a an agent to "teleport" (i.e. jump) to a speficic location? - Stack Overflow

admin2025-04-25  4

When I call "ped.jumpTo(node)" and/or "ped.setLocation(node)" the agents still "move" to the specified location instead of "jumping to" (like in the process modelling library).

I want to "teleport" pedestrians from one location (node) how do I go about doing this? Seems like an obvious question....so I am missing something basic...

When I call "ped.jumpTo(node)" and/or "ped.setLocation(node)" the agents still "move" to the specified location instead of "jumping to" (like in the process modelling library).

I want to "teleport" pedestrians from one location (node) how do I go about doing this? Seems like an obvious question....so I am missing something basic...

Share Improve this question asked Jan 15 at 18:28 JohnJohn 677 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I believe that pedestrians location are managed outside of our control, since they interact with each other based on the engine. This can lead to undefined behavior: what if you try to teleport onde pedestrian on top of another? What is there is a pedestrian moving to the same place that the pedestrian you are trying to jump?

So as long as the pedestrian is inside the Pedestrian Library, I don't think you can control their position. Either you would have to move it, or use a Ped Exit block (where it exits the library, and won't occupy space - according to the settings on the block), and then a Ped Enter block (where it re-enters the library and the position management). You can then set the enter position or location at the pedEnter for re-entrance.

转载请注明原文地址:http://anycun.com/QandA/1745562902a90920.html