question

ighiri-mehdi avatar image
0 Likes"
ighiri-mehdi asked Felix Möhlmann answered

Updating Event-Triggered Source, Parameters During Simulation

Hello everyone,

I have a question regarding "Event Triggered Source" and "Wait for event". Is it possible to change the parameters of the objects being tracked during a simulation?

I have an Event-Triggered Source that is configured by a code before the simulation starts, using the "On Model Reset" event and tracking variables from a global table. This setup works perfectly. However, at a certain point during the simulation, I want to update my global table, which changes the "Replenishment Trigger" and adds new rows to listen to.

1744186631401.png

With these changes, can I update during the simulation my Event Triggered Source without causing any model bugs? Attached is the code used during the Model Reset.

1744186744200.png


FlexSim 25.0.2
wait for eventevent-triggered source
1744186631401.png (77.6 KiB)
1744186744200.png (126.3 KiB)
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

The Event-Triggered Source updates the events it listens to on reset only.

What you could do instead is use tokens that wait for in a Wait for Event activity. When you add a new row, create a new token to listen for changes to that row's value. If you update a trigger threshold, update the respective token's label and re-release it to the Wait for Event activity to re-initialize the listen.

When the event happens, the listener token creates a new token somewhere else, essentially acting like a source.

table-tr-listening.fsm


5 |100000

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