This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.
This model is a small example how to change the network for a taskexecuter during the simulation run.
The first item gets released in the Source. To release the next item press the Release Item Button on the Control GUI.
Release Item = Releases an item from the Source (Message send to Source).
Init Network = Init the Network to 4 network nodes (User Command).
Add NetNode = Adds Network Node NN5 and makes the connections (User Command).
The idea is to give the taskexecuter the first tasksequence and if he is traveling to the NN2, press the AddNetNode to add an additional Network Node.
The tricky bit is to know, which commands are necessary to update the network sytem.
optimizenetwork() is to cause the model's network navigator to regenerate its distance table.
The while loop is to set the inopen of the new connectionsout of NN5 to one which is necessary to make the model working.
Attention:
Do not delete or rename the object Logo_FlexsimD, because otherwise the model will not work correctly. Also do not rename, delete or rerank other objects.
Hi, Tom,
Thank you for the model!
Just quick question about the code.
If I run the model using v6, it works. If I use v7, it gives me error messages complaining about "PORT_INOPEN".
Flexscript Error MODEL:/Tools/UserCommands/AddNetworkNode_TD/code Line 25 unknown variable "PORT_INOPEN"
Flexscript Error MODEL:/Tools/UserCommands/AddNetworkNode_TD/code Line 27 unknown variable "PORT_INOPEN"
Could not finish parsing because of previous errors.
Is it global macro value? What is the value of it? Should I define it as macro?
Bottom line is, how can I run your model in v7? What should I fix it?
Forgive my ignorance, and thank you for your generous understanding and help in advance.