Hello
Sorry that use this forum again for a challenge I face. I wanted to Vensim to do several runs by using a command file (see attached).
1) at the moment, for some reason the file is not convertible to a cmd file?
2) If I run the script (before, I converted it to the right format), nothing happens. That is, I have my 11 runs simulated, but they are all the same. This suggests, that vensim does not read my changes. I checked my equations with the equations used in the Vensim help documentation. I can't find any difference... Could you please advice me on this?
Moreover:
3) is it possible to use this commands (using different values for a variable) for endogenously simulated variables?
4) Could I also have a code that is not only a constant, but a time series?
5) is it possible to somehow write a script that creates runs use all values between a certain interval (e.g. 1-10) for every 0.5 change? (and that also saves the runs).
Again, many thanks!
*** for some reason, I can't upload the file: so this is what is in my text-file:
SPECIAL>LOADMODEL|Consumption250218.mdl
SIMULATE>RUNNAME|Run 1
SIMULATE>SETVAL|DDisposable income HH=527216
MENU>RUN|o
SIMULATE>RUNNAME|Run 2
SIMULATE>SETVAL|DDisposable income HH=52000
MENU>RUN|o
SIMULATE>RUNNAME|Run 3
SIMULATE>SETVAL|DDisposable income HH=51500
MENU>RUN|o
.... etc.
Running command files
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Running command files
What do you mean by this? Do you mean you cannot upload a CMD file to the forum? CMD files can contain code to do bad things to machines, so they are blocked on the forum.Sarah8888 wrote:1) at the moment, for some reason the file is not convertible to a cmd file?
If you look at the table of values for "DDisposable income HH", are these different?Sarah8888 wrote:2) If I run the script (before, I converted it to the right format), nothing happens. That is, I have my 11 runs simulated, but they are all the same. This suggests, that vensim does not read my changes. I checked my equations with the equations used in the Vensim help documentation. I can't find any difference... Could you please advice me on this?
Can you give an example of what you want to do here?Sarah8888 wrote:3) is it possible to use this commands (using different values for a variable) for endogenously simulated variables?
You would need to prepare some data files and use SIMULATE>DATA to switch between these.Sarah8888 wrote:4) Could I also have a code that is not only a constant, but a time series?
No, not at present. CMD files will only execute commands in sequence, they are not like a programming language.Sarah8888 wrote:5) is it possible to somehow write a script that creates runs use all values between a certain interval (e.g. 1-10) for every 0.5 change? (and that also saves the runs).
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: Running command files
You could do #5 with a sensitivity file - choose "univariate" and use the VECTOR distribution.
Is DDisposable income HH a constant?
Is DDisposable income HH a constant?
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Running command files
Hello,
No, "DDisposable income" is not a constant - it endogenously simulated (by other variables - that are data-variables). And therefore, I thought the command got executed (hence, I have my 11 runs) , but the variable (DdDisposable income) did not actually change.
Afterwards, I thought that probably the command files work only for constants. When I changed it I couldn't anymore convert my text-file into a cmd-file (I put cmd instead of txt, but it remains according to venim a text-file. So, this is why I cannot test at the moment anything...
With regard to taking different data-time series: I am not entirely sure what you mean, but it sounds as if I need to execute in that case the runs by myself?
Thanks again
Sarah
No, "DDisposable income" is not a constant - it endogenously simulated (by other variables - that are data-variables). And therefore, I thought the command got executed (hence, I have my 11 runs) , but the variable (DdDisposable income) did not actually change.
Afterwards, I thought that probably the command files work only for constants. When I changed it I couldn't anymore convert my text-file into a cmd-file (I put cmd instead of txt, but it remains according to venim a text-file. So, this is why I cannot test at the moment anything...
With regard to taking different data-time series: I am not entirely sure what you mean, but it sounds as if I need to execute in that case the runs by myself?
Thanks again
Sarah
Re: Running command files
- True. You can only override a dynamic variable in Synthesim.command files work only for constants.
- The built-in editor in Vensim can do this, as can open source editors like Notepad++. The OS can do it, if you have file extensions set to visible.When I changed it I couldn't anymore convert my text-file into a cmd-file
- if you need to simulate different time-varying exogenous trajectories in a command script, you can put each scenario in a separate vdf, then use SIMULATE>DATA|scenario.vdf to pick the one you need in each run in the script.With regard to taking different data-time series:
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/