question

Jacek Diakun avatar image
0 Likes"
Jacek Diakun asked Phil BoBo edited

Resetting model at the start of each replication

Hello,

I would like to reset my model at the start of each replication. In order to obtain it in the event "Start of Replication" in the "Experimenter" I used resetmodel() function. I expected this function to be run at the start of each replication, but it runs only at first replication (please see the test model attached and the messages in the "Output Console").

How to obtain resetting model at the start of each replication?

Regards,

Jack

reset-model-at-each-replication-test.fsm

FlexSim 16.0.9
replicationsreset trigger
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

·
Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered Phil BoBo edited
@Jacek Diakun

I'm thinking that maybe you don't have a good understanding of how the experimenter works. I would suggest going through the User Manual at the Experimenter/Optimizer>Reference menu option to see how the Experimenter works. The Experimenter should reset the model at the beginning of each replication automatically. You don't have to do anything extra to cause that to happen.

· 3
5 |100000

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

Phil BoBo avatar image Phil BoBo ♦♦ commented ·

Also, experiment replications are run on background flexsim processes, not the main process. You have to view the experiment results to see what was printed in the replication. You don't see the output of replications in FlexSim's main output console.

1 Like 1 ·
Jacek Diakun avatar image Jacek Diakun commented ·

Dear @Jeff Nordgren and @phil.bobo,

Thank you very much for the explanation. I think my doubts were due to the lack of information in the "User Manual" (Version FlexSim 16.2.0, Date Published 05 SEP 2016, page 959), that in case of running replications using "Experimenter", the functions printing to the console (pt(), pf(), pd(), pr()) don't print to the main output console, but print to the output consoles connected with the replication and the messages generated using these functions are visible only under "View results" in the "Experimenter". I was also a bit confused because in my test model the message generated by "OnReset" trigger at first replication was printed to the main output console and the rest not.

Regards,

Jack

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Jacek Diakun commented ·

The message generated by the OnReset trigger was at the reset of the model in the interactive view before being sent to child processes for each replication. That wasn't the first replication. This is evidenced by your own print statement in the Start of Replication trigger that doesn't print "Start of replication" in FlexSim's main output console.

From the 16.2 User Manual section Experimenter / Optimizer > Reference > Performance Measure Results > Console Output Tab:

"FlexSim also saves the text output of the Output Console and the System Console for each replication. This can be used for debugging/analysis of each replication. Choose Output or System Console and the scenario and replication you want to view."

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.