question

William Proctor avatar image
0 Likes"
William Proctor asked Phil BoBo edited

endreplication command not stopping an experiment

I have an issue where the EndReplication is not always stopping an individual experiment. I can see that the line item with the command is being executed when running an individual model run but some experiments won't end after completing the model scenario (run to completion when running a single model).

FlexSim 18.0.3
endreplication
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

Phil BoBo avatar image
2 Likes"
Phil BoBo answered Phil BoBo edited

endreplication() destroys all the pending events. In the Experimenter, when the simulation has no more events to process, the replication ends.

If you are calling endreplication() from a trigger that creates a subsequent event after that trigger finishes, it won't actually end the replication immediately.

Try sending a delayed message in 0 time and calling endreplication() from an OnMessage 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.