question

Rahul R avatar image
0 Likes"
Rahul R asked Rahul R commented

Bump a Idle traveler blocking another loaded traveler in A star navigator

I am looking to identify the idle task executor that is blocking a loaded traveler and bump it out of its way to another cell. In the Kiva example, https://answers.flexsim.com/articles/107103/example-kiva-system-model.html. @anthony.johnson is sending idle kiva drives to a home location. But I would like to let the drives park at its current location (when idle) and be bumped if and when another drive need to be at that specific cell. My approach would be to listen to travelers being blocked, then search for the drive in the next cell on my travel path and bump it away. But not sure of the events to listen to.

In my example model, you can see at 8:01:50, Task executer3 is idle but occupies destination cell of task executer 1. I would like TE1 to bump TE3 out of its way.

Tagging @Felix Möhlmann

astar-example3.fsm


FlexSim 21.2.4
a star navigationa starkiva
astar-example3.fsm (60.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.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Rahul R commented

The event to listen to should probably be 'OnAStarBlock'. This gives you information about which task executor is blocked. Through the methods/properties of the different AStar classes you can figure out which task executor is causing the block and move it out of the way.

https://docs.flexsim.com/en/21.2/Reference/CodingInFlexSim/FlexScriptAPIReference/AStar/AStar.html

In the attached file I built a simple demonstration for this. TaskExecutor2 is moving upwards. When it gets blocked by TaskExecutor3, it steps out of the way.

In that model, the blocking task executor tries to find an adjacent cell that is not part of the other's path to step to. This could lead to problems when the blocked cell is in a corner of the grid. The code also doesn't take into account if the blocking task executor is idle or not.

astar-example4.fsm


astar-example4.fsm (63.8 KiB)
· 1
5 |100000

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

Rahul R avatar image Rahul R commented ·
Thank you, this is very helpful.
0 Likes 0 ·