How to run sensitivity simulations with Vensim DLL

Use this forum to post Vensim related questions.
Post Reply
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

How to run sensitivity simulations with Vensim DLL

Post by pbreach »

I'm trying to run a series of sensitivity simulations with the Vensim DLL. I have defined sensitivty control files (.vsc) and save files (.lst) for each one. I am using the "SIMULATE>SENSITIVITY|vscfile" command to first set the control file to be used for the simulation, and then the "SIMULATE>SENSSAVELIST|lstfile" to specify the save list. After this I've used the "MENU>RUN_SENSITIVITY|o" command to run the sensitivity simulation.

However, when the "MENU>RUN_SENSITIVITY|o" command is called Vensim brings up an error window saying, "Problems encountered in the simulation." And this command gives a return value of 0 indicating that the command was unsuccessful. I'm able to run the sensitivity simulations through Vensim directly without any errors.

My question are:

1. What commands should I be using to run the sensitivity simulation with the Vensim DLL?
2. How can the run name be specified as well for the sensitivity simulation (for the resulting .vdf file)?
3. Is there a way to see a more specific error message?
Administrator
Super Administrator
Posts: 4683
Joined: Wed Mar 05, 2003 3:10 am

Re: How to run sensitivity simulations with Vensim DLL

Post by Administrator »

Try putting those commands into a CMD file and running them as a command script using Vensim DSS. It might show you where the error is.
2. How can the run name be specified as well for the sensitivity simulation (for the resulting .vdf file)?
Use SIMULATE>RUNNAME|filename
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
tomfid
Administrator
Posts: 3877
Joined: Wed May 24, 2006 4:54 am

Re: How to run sensitivity simulations with Vensim DLL

Post by tomfid »

The most likely candidate is a filename mismatch, or file in wrong directory.

Usually the easiest thing is to prototype your commands as a command script.

RUNNAME controls the run name, same as for ordinary simulations.
pbreach
Member
Posts: 29
Joined: Mon Oct 26, 2015 5:23 pm
Vensim version: DSS

Re: How to run sensitivity simulations with Vensim DLL

Post by pbreach »

Thanks for the tip! You are right - from running the CMD file I saw that the .vsc and .lst files weren't being found so I included the full paths and replaced double back slashes with forward slashes. Everything seems to be working now.
Post Reply