Hi
I would like to know if there is a way to add delay time to network node so that transporter arrives to the node waits for certain distribution time before it continues
Thank You
Hi
I would like to know if there is a way to add delay time to network node so that transporter arrives to the node waits for certain distribution time before it continues
Thank You
I was able to create a delay using the following:
Open up the Network Node properties by double clicking on it, and go to the Triggers tab.
Under the OnContinue trigger, add some custom code (the little scroll icon) Enter the following code under the other stuff in there.
stopobject(traveler, STATE_SUSPEND); senddelayedmessage(current,10,traveler);
This tells the node too stop whatever object is travelling through that node in a suspended state. Then it sends a delayed message from the traveler to the node, (with the second parameter being the time delay, 10 time units in this example.)
Then under the OnMessage trigger, add this custom code:
resumeobject(msgsendingobject());
This lets the node know when it receives the delayed message to then allow the travelling object to resume.
This does work visually in my model, but when I put in this code I get this error message every time there is a delay on a node:
createvent: event time is in past: event time changed to present. Object: NN4 advancetime: -21.851197, time: 21.851197 createvent: event time is in past: event time changed to present. Object: NN4 advancetime: -21.851197, time: 21.851197 To NN5
Is there any way to fix this error message, or another way to delay at a node without getting an error message? (The error message eventually crashes my whole model by a "throwing exception" error.)
Maybe I am totally wrong, but I think the command stopobject creates internally a preempting tasksequence. That puts the taskexecuter offset from the network and on resume the traveler goes offset to the next Network Node. He is no longer on the network.
This may or may not apply to your specific model, but another way to manipulate travel and speeds on a network is with the Traffic Control resource. In its properties under the Speeds tab you can specify a change in speed based on an increase in content within the given area (in this image the speed decreases to 80% of normal when the content increases to 2).
This process also facilitates restrictions on number of Task Executers within the specified area.
The approach of @Adrian Haws is a good one, but you can deny the traveler the use of edges by command, too. After a delay, created by a send message, you can grant the use of the edge again. Thread to deny and grant access to traffic controlled area.That is in my opinion the only way to delay a travel for a specific taskexecuter or a taskexecuter class. The stopobject command inherits the preempting tasksequence which places the taskexecuter offset from the network nodes. Generally you can close and open edges in the network, but with this approach you cancel the whole traffic on it.
7 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved