Page 1 of 1

How to continue from previous simulation?

Posted: Tue Sep 06, 2016 6:13 pm
by pbreach
I have been using vensim_get_state and vensim_set_state to resume a simulation from a previous run but I get the same output + 1 time step rather than one that is continued onwards from the state at the end of the first run. Here is a short example (attached) written using the DLL in Python.

What ends up happening is that when trying to run a second simulation by setting the state as the end of the first simulation, the second simulation only adds one timestep while the rest of the results are unchanged. Do I have to also change the initial and final time of the simulation? What is the proper way to do this? Lastly, how would this be done with a gaming simulation (continue from previous simulation)?

Re: How to continue from previous simulation?

Posted: Wed Sep 07, 2016 9:39 am
by Administrator
Can you upload the model as well?

Re: How to continue from previous simulation?

Posted: Thu Sep 08, 2016 2:38 pm
by pbreach
Sure thing - here is the mdl and vpm files for the model I was using to test.