Page 1 of 1

Programatically interrupt simulation runtime based on condition testing

Posted: Fri May 14, 2021 12:04 am
by efranco
Hello,

I would like to know if it is possible to stop the simulation runtime based on condition testing.

I searched in Vensim's documentation and the forum but couldn't find any clue.

The model I am working on has as one of its goals the elapsed time to reach a predefined goal.

In some platform (e.g., AnyLogic), it is possible to programmatically interrupt the runtime:

getEngine().getExperiment().stop(); or by using events.

Is it possible to do something similar in Vensim?

Thank you very much, Eduardo.

Re: Programatically interrupt simulation runtime based on condition testing

Posted: Fri May 14, 2021 5:16 am
by Administrator
I've attached a model showing how to do this. All you do is modify FINAL TIME.

Re: Programatically interrupt simulation runtime based on condition testing

Posted: Fri May 14, 2021 11:09 am
by efranco
Thank you very much! It worked perfectly.