PedestrianDynamics / jupedsim

JuPedSim is an open source pedestrian dynamics simulator
http://jupedsim.org
Other
37 stars 26 forks source link

Auto-detect if routing can be skipped #1421

Open behrisch opened 1 month ago

behrisch commented 1 month ago

The current routing engine can not only give the shortest path but also a guarantee that the second shortest path is at least x meters longer. If we assume that the underlying geometry has not changed (and of course the target is still the same), we can use this value to determine if routing is actually necessary.

The idea is to store the previous position of the agent and the gap to the second longest walk x. We can then calculate how much the distance to the next point in the current shortest path decreased (let's say s) and we know the absolute distance traveled since the last routing (let's say d). So if s + x > d we don't need to do a routing.

Ozaq commented 1 month ago

Lets discuss this in #1392