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)?
How to continue from previous simulation?
How to continue from previous simulation?
- Attachments
-
- sandbox.pdf
- (66.74 KiB) Downloaded 295 times
-
- Super Administrator
- Posts: 4838
- Joined: Wed Mar 05, 2003 3:10 am
Re: How to continue from previous simulation?
Can you upload the model as well?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: How to continue from previous simulation?
Sure thing - here is the mdl and vpm files for the model I was using to test.
- Attachments
-
- coffee_cup.vpm
- (28.58 KiB) Downloaded 274 times
-
- coffee_cup.mdl
- (1.91 KiB) Downloaded 288 times