Vensim help on simulating a model
Vensim help on simulating a model
Hi,
I have built a complex model and I am trying to simulate it. Everything is fine but I need to simulate the model for a large number of values of different variables. I was wondering if there is method to simulate in a less cumbersome way (Since at present i am changing the values of each variable for each simulation run) like picking the values of variables from excel cells automatically and simulating the model for each set of values.
I know that we can import the values from excel but I assume that we can do that only once per simulation. To make it clear I want an easier method (if at all there is one) to simulate the model for a large number of values for a considerable number of variables. Like having all the data sets in excel and then programming Vensim to automatically take the values from corresponding cells during the simulation.
Questions are welcome in case you need more details of my question.
Thank you to everyone who is helping people like me.
I have built a complex model and I am trying to simulate it. Everything is fine but I need to simulate the model for a large number of values of different variables. I was wondering if there is method to simulate in a less cumbersome way (Since at present i am changing the values of each variable for each simulation run) like picking the values of variables from excel cells automatically and simulating the model for each set of values.
I know that we can import the values from excel but I assume that we can do that only once per simulation. To make it clear I want an easier method (if at all there is one) to simulate the model for a large number of values for a considerable number of variables. Like having all the data sets in excel and then programming Vensim to automatically take the values from corresponding cells during the simulation.
Questions are welcome in case you need more details of my question.
Thank you to everyone who is helping people like me.
-
- Super Administrator
- Posts: 4838
- Joined: Wed Mar 05, 2003 3:10 am
Try using command scripts (you will need to lookk them up in the help system).
An example is below for illustration and uses a series of commands to load a model, load a specific spreadsheet then execute a run. You can then cascade any number of such experiments and run them all with a single click of the mouse.
Hope this helps
Lee
----------------------------------------------
{Command script to run multiple experiments with model}
{IMPORTANT NOTE: do not use a SETVAL command before a SPREADALIAS command as the latter will be ignored}
SPECIAL>NOINTERACTION
{allows the script to be executed without user intervention}
SPECIAL>LOADMODEL|model name.vpm
{Load the model}
SIMULATE>SPREADALIAS|?Data=first dataset for model.xls
SIMULATE>RUNNAME|name for this run.vdf
MENU>RUN
<repeat with different datasets>
An example is below for illustration and uses a series of commands to load a model, load a specific spreadsheet then execute a run. You can then cascade any number of such experiments and run them all with a single click of the mouse.
Hope this helps
Lee
----------------------------------------------
{Command script to run multiple experiments with model}
{IMPORTANT NOTE: do not use a SETVAL command before a SPREADALIAS command as the latter will be ignored}
SPECIAL>NOINTERACTION
{allows the script to be executed without user intervention}
SPECIAL>LOADMODEL|model name.vpm
{Load the model}
SIMULATE>SPREADALIAS|?Data=first dataset for model.xls
SIMULATE>RUNNAME|name for this run.vdf
MENU>RUN
<repeat with different datasets>
A command script is a good option.
Another possibility is to use sensitivity simulations. If you use the File input option, you can specify your distribution of parameter inputs more easily (in some cases) than in a command script.
Tom
Another possibility is to use sensitivity simulations. If you use the File input option, you can specify your distribution of parameter inputs more easily (in some cases) than in a command script.
Tom
/*
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
*/
Tom,
Can you guide me a bit more on how to go about and the options to select or a tutorial for the sensitivity analysis you have advised. I do not want to mess up my model without being sure on how to go about. I could not find the from file option in the reference manual i downloaded. It would be great if you can provide me with a link or the format of the file and other details regarding accessing the storing data sets.
Thanks for you reply
Krishna
[Edited on 11-11-2010 by krreddi]
Can you guide me a bit more on how to go about and the options to select or a tutorial for the sensitivity analysis you have advised. I do not want to mess up my model without being sure on how to go about. I could not find the from file option in the reference manual i downloaded. It would be great if you can provide me with a link or the format of the file and other details regarding accessing the storing data sets.
Thanks for you reply
Krishna
[Edited on 11-11-2010 by krreddi]
Check the help for sensitivity control files, http://www.vensim.com/documentation/ind ... ?23530.htm for the File option,
"• File (use a file to specify parameters), if selected, will use a file to determine what inputs to change, and ignore any constants specified in this dialog. This file must be a tab delimited text file (UTF8 for international characters). The first row should contain a list of model constants (tab delimited), with the values on each successive row. If a value is missing from this file the previously used value is repeated. "
I may have an example that I can post tomorrow.
Tom
"• File (use a file to specify parameters), if selected, will use a file to determine what inputs to change, and ignore any constants specified in this dialog. This file must be a tab delimited text file (UTF8 for international characters). The first row should contain a list of model constants (tab delimited), with the values on each successive row. If a value is missing from this file the previously used value is repeated. "
I may have an example that I can post tomorrow.
Tom
/*
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
*/
Tom,
I have been trying to implement the sensitive analysis, following the limited instructions in the manual using a sample model. Had no success with that. I am attaching both the delimited text file and the model. Please help me with this.
Thanks
[Edited on 11-12-2010 by krreddi]
[Edited on 11-12-2010 by krreddi]
I have been trying to implement the sensitive analysis, following the limited instructions in the manual using a sample model. Had no success with that. I am attaching both the delimited text file and the model. Please help me with this.
Thanks
[Edited on 11-12-2010 by krreddi]
[Edited on 11-12-2010 by krreddi]
- Attachments
-
- Test Data Set 1.zip
- (1.07 KiB) Downloaded 1199 times
Some more additional information regarding my model, which I feel would be helpful to you in helping me. I need to simulate the model for at least 2000 simulation runs, for each set of input values, to get the output. Please help me because it is so difficult to change the values for each simulation attempt.
Thanks to all the "Gurus" helping me with this.
Krishna
Thanks to all the "Gurus" helping me with this.
Krishna
I found that it worked fine for me after I added .vsc and .lst files (see attached).
From your last note, it sounds like you have a two-tiered experiment: you have a set of input values to try, and for each you need to do 2000 simulation runs.
Are the 2000 runs a random sample of some kind?
How many input values do you have?
For each, how are the points distributed?
Tom
From your last note, it sounds like you have a two-tiered experiment: you have a set of input values to try, and for each you need to do 2000 simulation runs.
Are the 2000 runs a random sample of some kind?
How many input values do you have?
For each, how are the points distributed?
Tom
- Attachments
-
- krreddi Test 2.zip
- (3.97 KiB) Downloaded 891 times
/*
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
*/
Vensim help on simulating a model
Hi Krishna
To my opinion, it would be much easier to give you a technical advice if one knew more about your problem.
Without that knowledge there is a risk to propose a technical solution not adapted to the root of your problem.
I think that the technic must be adapted to your problem.
Regards.
JJ
To my opinion, it would be much easier to give you a technical advice if one knew more about your problem.
Without that knowledge there is a risk to propose a technical solution not adapted to the root of your problem.
I think that the technic must be adapted to your problem.
Regards.
JJ
Hi Tom,
Firstly thanks for your correspondence. Answering your questions; My model is a complex process and it has got some 14 variables to vary and check for various combinations. The 2000 runs is a sample number there is no logic behind that, to be clear my model need to be simulated for say 5 years and my simulation unit is a day. I just gave that number to be adequate to my requirement. I have a few points distributed and a few specific values to try. So I guess I have addressed all your questions.
Thanks
Krishna
Firstly thanks for your correspondence. Answering your questions; My model is a complex process and it has got some 14 variables to vary and check for various combinations. The 2000 runs is a sample number there is no logic behind that, to be clear my model need to be simulated for say 5 years and my simulation unit is a day. I just gave that number to be adequate to my requirement. I have a few points distributed and a few specific values to try. So I guess I have addressed all your questions.
Thanks
Krishna
Hi JJ,
My model is a process involving a couple of different organizations working towards a common goal. I have different processing rates and quality coefficients etc. for all these organizations. While I can assign a distribution to some parameters I want to assign some constant to some and see the effect on the results. To make it clear, I am not looking for a direct answer to my problem. I want to know the capability of Vensim, so that I can work around to address my problem. And thanks for you efforts to help me out.
Thanks
Krishna
My model is a process involving a couple of different organizations working towards a common goal. I have different processing rates and quality coefficients etc. for all these organizations. While I can assign a distribution to some parameters I want to assign some constant to some and see the effect on the results. To make it clear, I am not looking for a direct answer to my problem. I want to know the capability of Vensim, so that I can work around to address my problem. And thanks for you efforts to help me out.
Thanks
Krishna
Yes - you can export whatever was saved (per the savelist). Use Model>Export Dataset and say yes when it asks if you want the sensitivity results.
/*
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
*/