question

Bryan Suharik avatar image
1 Like"
Bryan Suharik asked Bryan Suharik commented

Network Node doesn't work

Hi, I keep getting an error with the network nodes. What's strange is I can get it to work when i manually add in objects, but when i preload the objects with flexscript and a GUI, the error comes up as follows:

" A Traveler's requested destination is not reachable from the network. Please recheck your connections and run the model again. Traveler: Tractor 1 Destination: Tractor 1"

See attached image for the connections.flexsim-pic.png

Thanks in advance for your help on sorting out this bug.

FlexSim 16.2.2
networknodes
flexsim-pic.png (92.5 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.

David Seo avatar image David Seo commented ·

@Bryan Suharik

It looks like the destination of tractor to point the tractor itself in your script.

If you will get the exact answer, you need to upload your model in this question.

1 Like 1 ·
Bryan Suharik avatar image Bryan Suharik commented ·

tractor-optimization-v1.fsm

@david.seo

HI David, I attached the model. Note the model builds from the GUI, specifically the code is in the script of the set up model button.

Thanks for your help.

0 Likes 0 ·

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Bryan Suharik commented

In the OnResourceAvailable trigger of Tractor1 you have this line of code:

treenode dest = setloc(current,5,30,0);

It looks like you're using the Travel to a Home Location pickoption, but you're setting the dest to be the tractor which is causing your issue.This is because the setloc command returns the node you pass into it so that you can chain commands together. So you're updating the tractor's location and then telling the tractor to travel to itself.

It seems like what you're trying to do is to tell the tractor to travel to the position (5,30,0). To do that you need to give the tractor a Travel To Loc task with the (5,30,0) location. The easiest way to do this is to choose the Travel to an X,Y,Z Location pickoption from the OnResourceAvailable trigger.

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

Bryan Suharik avatar image Bryan Suharik commented ·

@Matthew Gillespie ahhh that makes perfect sense...thank you!!!

0 Likes 0 ·