question

Mario García López avatar image
0 Likes"
Mario García López asked jc commented

How to choose travel network path for a taskexecuter

I have a travel network node system in which the taskexecuter goes through the wrong path, I want to choose the correct path that I want. How can I do this?

FlexSim 24.1.0
network nodestravel networksnodes
5 |100000

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

jc avatar image
0 Likes"
jc answered jc commented

Hi, @Mario García López!
I am not sure if this is what you wanted but I changed the "on arrival" code of your node to this:

if (traveler == Model.find("TaskExecuter1") && fromedge == 1) {

return 2;

} else if (traveler == Model.find("TaskExecuter2") && fromedge == 1) {

treenode newDestination = Model.find("NN11");

redirectnetworktraveler(traveler,newDestination);

return 3;

}


I think it works as you wanted it to work but if you have any concern please let us know.
path.fsm



path.fsm (32.2 KiB)
· 2
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
1 Like"
Joerg Vogel answered Mario García López commented

You can edit path option to be not connected. A network node has a connections (edge) to another. You can disconnect it by code or by attribute variable.

alternatively you can add travel tasks to networknodes by which a taskexecuter must go to reach a station. While reaching a destination of a Tasksequence next task will be evaluated to plan next destination by shortest distance. So you don’t need all network nodes being a destination but a few or only one to divert a taskexecuter.

· 2
5 |100000

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