question

dan ruffatto avatar image
1 Like"
dan ruffatto asked Arun Kr commented

Getting error. Simulation does not run more than 10000 seconds

I am getting this error when I run the Model and also the model stops at 9799 seconds and reset itself automatically

I have custom code on some nodes where I Stop the transporter for 10 seconds. NN58,NN14,NN117 an NN122

Please help. error below and also I have attached the model

reatevent: event time is in past: event time changed to present. Object: NN117 advancetime: -119.973489, time: 119.973489 createvent: event time is in past: event time changed to present. Object: NN122 advancetime: -214.086740, time: 214.086740

FlexSim 16.0.1
network nodes
sna6-avg.fsm (3.1 MiB)
5 |100000

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

1 Answer

Ben Wilson avatar image
6 Likes"
Ben Wilson answered Arun Kr commented

OnContinue is a problematic place to stopobject() on the traveler. I'm not sure all the details, maybe someone on the dev team can fill in the reasons behind it, but it probably comes down to the fact that the network node is in the middle of doing something with the traveler, when the traveler changes state in the middle of that. Instead, by stopping the traveler after a delay of 0, we allow the onContinue trigger to do what it needs to do without a traveler changing state in the middle of its logic.

Rather than call stopobject() directly within your onContinue logic, better to senddelayedmessage() in zero time, then handle both the stopobject() and resumeobject() in the message trigger.

In the attached model I've updated each of your "delaying" network nodes to use delayed messages for both stopping and resuming. This clears up the exceptions in the system console and allows the model to continue running.


sna6-avg-fs01.fsm (3.0 MiB)
· 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.

Arun Kr avatar image Arun Kr commented ·

Hi Ben,

I think the same logic when applied to the on arrival trigger of the node, it will work.

Regards,

Arun KR

1 Like 1 ·