question

London MT avatar image
1 Like"
London MT asked London MT commented

Is there a way to force the termination of an experiment?

Hi,

Issue: I'm doing an experiment, but 1 replication got stuck somewhere and doesn't finish. Therefore, my "End Of Experiment trigger" is not being fired. Is there a way where I can force this to be fired?

Cheers

Jarek

RHDHV

FlexSim 19.0.2
experimenter
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

·
Joshua S avatar image
0 Likes"
Joshua S answered London MT commented

Is there a way you can use this code

endreplication(1);

where you know the model might be failing, some sort of trigger? This would allow the Experimenter to display the data for all the replications, and be able to draw data from the failed replication as well.

· 4
5 |100000

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

London MT avatar image London MT commented ·

Hi @Joshua S,

Thanks for your reply. No, unfortunately the model doesn't know when it is failing (it goes into an eternal loop I believe, because the processor keeps on running but the replication never finishes). It is also not reproducable but happens every now and then ad random. I was hoping to have an internal command like:

Applicationcommand("EndExperiment");

I could try to catch the replication to finish maybe if it took too long to terminate. Is there a way where I can access the system time from Flexsim?

Thanks

jarek

RHDHV

0 Likes 0 ·
Joshua S avatar image Joshua S ♦ London MT commented ·

Unfortunately there is no way to end the experiment and dump the bad replication, or gain data from the replication without using the command I mentioned previously. time(); returns the simulation time, but again you would have to incorporate it into something that would return that value if it got stuck in a loop.

0 Likes 0 ·
London MT avatar image London MT Joshua S ♦ commented ·

Hi @Joshua S,

Understood. I thought I could maybe implement a check in the model with system time (not model time), that if the run is taking longer than x amount of time, the run will terminate itself. But I actually realized that wouldn't work because the run got stuck in a loop, so it wouldn't execute the check in that case.

Maybe a forced endexperiment command would be useful in future releases?

Cheers

Jarek

RHDHV

0 Likes 0 ·
Show more comments

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.