question

Tomi Kosunen avatar image
0 Likes"
Tomi Kosunen asked Felix Möhlmann answered

AStar reroute

I need to customize AStar behavior. I can add code into OnAStarBlock trigger. But I cannot figure out, how to reroute the traveler on a new path. Would you have example code, how to reroute a People to a new path if he/she is blocked.


FlexSim 24.0.1
astar navigator
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

The general idea is to add whatever is blocking the TE as a dynamic barrier, then dispatch a preempting task sequence to the TE, so that the travel task is restarted afterwards and a new path is calculated. Then the dynamic barrier can be removed again.

astar-reroute.fsm

You can also look at the Kiva example model from Anthony for another example. There, whenever an item is placed in a slot, a check is done whether this blocks the path of active travel tasks and reroutes them as described above in that case.

https://answers.flexsim.com/articles/107103/example-kiva-system-model.html

1737108417980.png


1737108417980.png (18.6 KiB)
astar-reroute.fsm (45.0 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.