Updating Event-Triggered Source, Parameters During Simulation

Updating Event-Triggered Source, Parameters During Simulation

IGHIRI_Mehdi
Explorer Explorer
14 Views
1 Reply
Message 1 of 2

Updating Event-Triggered Source, Parameters During Simulation

IGHIRI_Mehdi
Explorer
Explorer

[ FlexSim 25.0.2 ]

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


0 Likes
15 Views
1 Reply
Reply (1)
Message 2 of 2

moehlmann_fe
Observer
Observer

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

0 Likes