question

michael.smith avatar image
0 Likes"
michael.smith asked michael.smith commented

Experimenter Triggers - Order of Execution

Can somebody please confirm the order of execution for the experimenter and the existing Model Triggers. I'm trying to import data and use the reset trigger to process that import before starting the experiment. I'm aiming to make sure the model can be run from the experimenter and regular flexsim without too much modification.

FlexSim HC 5.0.12
experimentertriggerstriggerexperimenter trigger execution order
5 |100000

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

Ben Wilson avatar image
4 Likes"
Ben Wilson answered michael.smith commented

I created a small test model that on each model trigger and experimenter trigger writes to an external file. In this way, we can get a list of each trigger firing in order.

Here is the result of a 2 replication, 1 scenario experimenter run. I forced the experimenter to use just 1 core so that this list wouldn't be jumbled up:

start of experiment
model reset
model reset, r=1, s=1
start of replication, r=1, s=1
model run start, r=1, s=1
end of warmup, r=1, s=1
model run stop, r=1, s=1
end of replication, r=1, s=1, childexpfolder? no
end of replication, r=1, s=1, childexpfolder? yes
model reset, r=2, s=1
start of replication, r=2, s=1
model run start, r=2, s=1
end of warmup, r=2, s=1
model run stop, r=2, s=1
end of replication, r=2, s=1, childexpfolder? no
end of replication, r=2, s=1, childexpfolder? yes
end of experiment

The test model is attached for your own experimenting. It writes to a test.txt file in the same directory where it is saved.

In case you're wondering why the end of replication trigger is called twice for each replication, see this answer.


test.fsm (64.3 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.

michael.smith avatar image michael.smith commented ·

Thanks Ben, much appriciated

0 Likes 0 ·
Arun Kr avatar image
1 Like"
Arun Kr answered Adrian Haws rolled back

Hi Michael,

The Experimenter trigger order of execution :

Start of Experiment

Start of Replication

End of Warmup Time

End of Replication

End of Experiment

Model Trigger Order of Execution:

On Model Open

On Reset

On Run Start

On Run Stop

Regards,

Arun KR

· 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.

michael.smith avatar image michael.smith commented ·

Thanks for the reply, I was more after how they stack up when combined. Especially where Reset in relation to Start of Experiment and the Start of Replication. I need to do data import and adjustments before Reset is called.

0 Likes 0 ·

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.