Page 1 of 1

How to run sensitivity simulations with Vensim DLL

Posted: Mon Jul 29, 2019 5:35 pm
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?

Re: How to run sensitivity simulations with Vensim DLL

Posted: Mon Jul 29, 2019 5:41 pm
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

Re: How to run sensitivity simulations with Vensim DLL

Posted: Mon Jul 29, 2019 5:48 pm
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.

Re: How to run sensitivity simulations with Vensim DLL

Posted: Mon Jul 29, 2019 6:41 pm
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.