Vensim help on simulating a model

Use this forum to post Vensim related questions.
Post Reply
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Vensim help on simulating a model

Post by krreddi »

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.
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

What version of Vensim are you using?
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

I am using the professional Version
Lee Jones

Post by Lee Jones »

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>
tomfid
Administrator
Posts: 3995
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

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
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

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]
tomfid
Administrator
Posts: 3995
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

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
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

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]
Attachments
Test Data Set 1.zip
(1.07 KiB) Downloaded 1199 times
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

Lee,

Is Command Scripts option available for Professional version? I think it is available for only DSS. I tried but could not find any and in the manual its in the DSS help tab.

Thanks
Krishna
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

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
tomfid
Administrator
Posts: 3995
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

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
Attachments
krreddi Test 2.zip
(3.97 KiB) Downloaded 891 times
LAUJJL
Senior Member
Posts: 1477
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Vensim help on simulating a model

Post by LAUJJL »

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
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

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
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

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
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

Tom,

Thanks for looking you feedback on my model. I have realized that I was not looking for the sensitivity results at the right place. Anyways can we save and export the sensitivity results to an excel sheet? I can see only a graph but can we save the data and export the data?.

Thanks
Krishna
tomfid
Administrator
Posts: 3995
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

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.
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

Tom and JJ,

Thank you for helping me.

Krishna
Post Reply