question

Patrick Zweekhorst avatar image
0 Likes"
Patrick Zweekhorst asked Jordan Johnson answered

Kinetic tracked variable creates a strange event

Hi,

Attached is an example model of the problem we see in a much larger model. There is a kinetic tracked variable that has a certain rate. At some point a token enters a wait for event activity. The token wait till a level is reached or if the value is updated. At the same time the token enters the wait for event (but after the entering the wait for event) the value of the tracked variable is updated.

This means that the token leaves the wait for event, which is correct. The problem is that we get a strange event on the event list:

If we stop the model when this event is the first event on the event list (like with the current stop time) and press run again the model starts from time 0, instead of continuing the simulation.

This looks like a bug to us.
Is there any advise for now to work around this?
In this example model we could first set the value of the tracked variable before the token enters the wait for event, but in the actual model that would be quite complicated.

Thank you for your time,

Patrick

KinTrackedVar.fsm

FlexSim 20.1.3
flexsim 20.1.3wait for eventkinetic tracked variablemodel stops runningevent list
1593155851155.png (10.3 KiB)
kintrackedvar.fsm (35.8 KiB)
· 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.

1 Answer

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered

I will add this to the dev list. This is a bug. The issue is the KineticLevelCrossEvent. This event is created when you wait for a Kinetic tracked variable to cross a certain value; it is scheduled for when the level you wanted would be crossed. It looks like it isn't getting cleaned up when it should. At model time 1.5, there are no tokens on the Wait for Event, yet the KineticLevelCrossEvent is still present.

The reason the model starts over is that if the first event in the event list doesn't have a reference to some other object, then the event is considered invalid, so the model restarts. That part is not a bug. The bug is that we are creating an event that causes this behavior, so you get a reset, depending on when you stop the model.

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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