question

Raphael S2 avatar image
0 Likes"
Raphael S2 asked Raphael S2 commented

Is there a way to find alternative paths in a Travel Network?

Hi everyone!

My basic intention is that task executers can pass other task exceuters (e.g. who are slower or who are blocking the path) by taking another path (in order to avoid that they just run through each other). That's why I added an OnArrival-Trigger on each node to close all possible entries to this node ("Close Node Edge"). But instead of waiting until the path is open/available again, I want task executers to go an alternative path to their destination.

I attached a very rough example (alternative-travel-path.fsm) to show what I mean: Operator1 arrives first at his destination (Node "_1"). That's why the path between "Beginning" and "_1" is blocked. Meanwhile, Operator3 wants to go to node "_3". The DefaultNetworkNavigator tells him to go there via "_1" and "_2" (which is actually not possible). Alternatively, he could also go there via "_AL1" and "_AL2", but he keeps on waiting until the path is free.

Is there any way to tell the task executer to take another path, if the initially assigned path is blocked?

Unfortunately, I guess that the DefaultNetworkNavigator tells the task exectuer at the very beginning which path to go. Therefore, the Navigator probably cannot react dynamically on changing situations. Is this correct?

If so, do you have other "smart" ideas how to simulate that task exceuters can pass each other?

I would like to simulate a warehouse where the task executers are working in narrow aisles and have picking carts. That's why I do not want them to just run through each other (since this would not reflect the real system. I am already working with collision handling methods, chaning maximum speeds dynamically etc., but I am still looking for something more advanced. :)

Maybe you can give me some inspiration!

Anyway, thanks in advance for your assistance!

Kind regards,

Raphael

FlexSim 18.2.3
travel network
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

The general idea of a simulation is the imitation of the reality. Please look into the definition of the VDI standard. You must consider and estimate how large the error will get if you simplify some situations. A collision isn’t by default an error as long as you can accept a statistical error or you can compensate this error.

0 Likes 0 ·
Steven Hamoen avatar image
1 Like"
Steven Hamoen answered Raphael S2 commented

@Raphael S2 If you return the edge in the onarrival you can control what path the TE will take. I have attached your model with a changed on arrival at beginning and renaming 1 operator so I could distinct between on a name basis.

alternative-travel-talumis.fsm


· 8
5 |100000

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

Raphael S2 avatar image Raphael S2 commented ·

Hello Steven,

thank you very much for help! Your idea is really good, it does work.

But is it also possible to determine which path to go (i.e. to return either "2" or "3") not based on the operator's name, but whether a path is closed? There are commands like closenodeedge(obj object, num edgenum) or opennodeedge(obj networknode, num edgenum), so I am looking for a Boolean function like isnodeedgeclosed(obj networknode, num edgenum) which returns 1 or 0 (to check whether a path is blocked). But there is not a function like this, is it?

Alternatively, I could create a global table and track which paths are closed and check possible paths via a table lookup, but this seems to be quite time consuming in huge travel networks.

Anyway, thank you very much for your assistance!

Kind regards,

Raphael

0 Likes 0 ·
Ralf Gruber avatar image Ralf Gruber ♦ Raphael S2 commented ·

Raphael,

I have not looked at your model but it sounds like you want to take ownership of the travel paths TEs use by yourself. Have you looked at the redirectnetworktraveler() command? That allows you to redirect a TE to any network node in the network.

Let us know if that helped your case.

Ralf

1 Like 1 ·
Raphael S2 avatar image Raphael S2 Ralf Gruber ♦ commented ·

Hello Ralf,

the redirectnetworktraveler() command changes the end destination. In my case, the end destination stays the same, but the path changes since it is blocked by another TE.

Meanwhile, I have found the function I was looking for: opopen(obj object, num outputprtnum). I will check whether my approach is applicable for a bigger network.

Nevertheless, thank you for your idea and your help!

Kind regards,

Raphael

0 Likes 0 ·
Show more comments
Steven Hamoen avatar image Steven Hamoen Raphael S2 commented ·

Hi @Raphael S2

The edges are all output port connections internally so if you close an edge with closenodeedge() you can check by using the command "opopen()". Problem is ofcourse that you first have to continue the operator and only then you can close the edge. You can do this by using senddelaymessage.

Other option is that you use a label on the objects that are connected to the edges so that you set it to 1 of somebody is going there and back to 0 when it leaves that node and then loop through the output ports to see which one is available and determine where you want to go.

1 Like 1 ·
Raphael S2 avatar image Raphael S2 Steven Hamoen commented ·

Hi @steven.hamoen,

thank you for your great ideas! I am trying to implement your approach. It works quite good, but the OnContinue-trigger fires twice:

First, when TE arrives at the NN; second, when TE leaves the NN. In between, there is a Delay-Tasksequence in the ProcessFlow to imitate the work on this station (probably the reason for this behaviour). This makes it much more difficult for me to implement your solution since I cannot really use the OnContinue-trigger properly.

I've adjusted the model (oncontinue-trigger.fsm) you already know to show this behaviour: "Beginning" and "_1" have both OnContinue-triggers which just print "Hello_Beginning!" and "Hello_1!" respectively. As you can see, there is just one "Hello_Beginning!" whereas there are two "Hello_1!" strings in the output console.

Is it possible to avoid this behaviour, i.e. to fire the OnContinue-trigger just once in combination with a Delay-Tasksquence in the ProcessFlow?

Again, thank you for your help!

Kind regards,

Raphael

0 Likes 0 ·
Show more comments
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Raphael S2 commented

Perhaps the command

optimizenetwork

will work for you..

Aisle travel:A try could be the A-star module.

· 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.

Raphael S2 avatar image Raphael S2 commented ·

Hello Jörg,

thank you for your answer! I've already tried the "optimizenetwork()"-command: After I have closed all paths to the network node by an OnArrival-Trigger, I called the "optimizenework()"-command by another OnArrival-Trigger. Unfortunately, it does not work that way.

The A-Star module is okay, but I am facing the same issue here (TE does not follow an alternative path if his preferred path is blocked). Nevertheless, I did some new research after your advise to try A-Star navigation and your comment regarding "limitations of simulation models": It seems that rerouting of TEs in case they are blocked is not "trivial" at all and that several issues come along with it (see here https://answers.flexsim.com/questions/51816/how-to-reroute-in-astar.html and here https://answers.flexsim.com/questions/47127/collision-avoidance-and-traffic-jams.html).

Therefore, I guess I have to figure out what works best for my system: Adjusting maximum speeds when TEs are colliding (in order to imitate the overtaking process) or letting the TE queuing up until the path is free.

Again, thank you very much for your help!

Kind regards,

Raphael

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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