Page 1 of 2

sensitivity analysis (vensim)

Posted: Thu Apr 04, 2019 2:14 am
by wanderbeg
Hi, guys

I have this difficulty.
I am using the vensim DSS, and I plan to do sensitivity analysis. I can do this in the Monte Carlo function, but when I try generate the graph, I can not, that is, the sensitivity analysis button in the vensim does not appear.
What can it be?

Best regards,

Re: sensitivity analysis (vensim)

Posted: Thu Apr 04, 2019 3:30 am
by tomfid
Try loading a new Analysis Toolset?

Re: sensitivity analysis (vensim)

Posted: Thu Apr 04, 2019 4:05 am
by wanderbeg
tomfid wrote: Thu Apr 04, 2019 3:30 am Try loading a new Analysis Toolset?
Where can I do this?

Re: sensitivity analysis (vensim)

Posted: Thu Apr 04, 2019 8:12 am
by Administrator
Click Tools->Analysis Toolset->Modify.

Re: sensitivity analysis (vensim)

Posted: Thu Apr 04, 2019 12:57 pm
by tomfid
Or just Tools>Analysis>New to reload a new copy of the toolset.

Re: sensitivity analysis (vensim)

Posted: Thu Apr 04, 2019 7:22 pm
by wanderbeg
Thanks, guys!

However, I have another problem. The graphs of the sensitivity analysis were different and did not appear those indicators of sensitivity 50%, 57%, 95% and 100%.
I have annexed!

What do you think?

Re: sensitivity analysis (vensim)

Posted: Thu Apr 04, 2019 7:51 pm
by tomfid
Right-click the sensitivity graph tool and change the options to show confidence bounds rather than individual traces.

From your second graph, it looks like the range of behavior is very narrow.

Re: sensitivity analysis (vensim)

Posted: Thu Apr 04, 2019 9:00 pm
by wanderbeg
I simulate my parameters, but in all graphs the intervals are constant.
Estranged!

Re: sensitivity analysis (vensim)

Posted: Thu Apr 04, 2019 9:05 pm
by tomfid
What is shown on this plot? If it's a parameter, it will be constant.

Re: sensitivity analysis (vensim)

Posted: Thu Apr 04, 2019 9:06 pm
by tomfid
Try the samples in the help system: http://vensim.com/documentation/usr15.htm

Re: sensitivity analysis (vensim)

Posted: Thu Apr 04, 2019 9:31 pm
by wanderbeg
Thank you for your help!

Re: sensitivity analysis (vensim)

Posted: Tue Sep 17, 2019 4:51 pm
by RWTH_FCN
Hi,

I have two questions regarding sensitivity analysis and stochastic programming in Vensim:

1- Can we do these sentivity analysis in a model which has external function? I am asking this becasue I get this errors:

{ERROR: Yearly Depreciation Factor not found or wrong type must be constant.
ERROR: No sensitivity inputs marked in sensitivity file}


2- I have a large-scale model for electricity market, which minimizes the total system cost (I have an external function for this minimization function). I want to include uncertainty in the model and consider some parameters (assume fuel price) uncertain in order to model the system stochastically. I was wondering how could I solve my problem stochastically (if its possible) with facilities of Vensim like Payoff definition or Optimization options when I have some external functions as well?

Best Regards

Re: sensitivity analysis (vensim)

Posted: Tue Sep 17, 2019 4:56 pm
by Administrator
RWTH_FCN wrote: Tue Sep 17, 2019 4:51 pm1- Can we do these sentivity analysis in a model which has external function? I am asking this becasue I get this errors:

{ERROR: Yearly Depreciation Factor not found or wrong type must be constant.
ERROR: No sensitivity inputs marked in sensitivity file}
These errors are nothing to do with external functions. I'd suggest looking in the help system first and trying the example there before trying it on your own model.

Re: sensitivity analysis (vensim)

Posted: Tue Sep 17, 2019 5:03 pm
by tomfid
Sounds like your control file (.vsc) specifies a variable that doesn't exist or isn't constant.

Re: sensitivity analysis (vensim)

Posted: Tue Sep 17, 2019 5:10 pm
by RWTH_FCN
Administrator wrote: Tue Sep 17, 2019 4:56 pm
RWTH_FCN wrote: Tue Sep 17, 2019 4:51 pm1- Can we do these sentivity analysis in a model which has external function? I am asking this becasue I get this errors:

{ERROR: Yearly Depreciation Factor not found or wrong type must be constant.
ERROR: No sensitivity inputs marked in sensitivity file}
These errors are nothing to do with external functions. I'd suggest looking in the help system first and trying the example there before trying it on your own model.
I did it with a sample model W/O external function and it was okay, that's why I was wondering can external functions cause any failure for sensitivity analysis?

Re: sensitivity analysis (vensim)

Posted: Tue Sep 17, 2019 5:14 pm
by RWTH_FCN
tomfid wrote: Tue Sep 17, 2019 5:03 pm Sounds like your control file (.vsc) specifies a variable that doesn't exist or isn't constant.
The variable is constant.
I would be pleased to have your feedback about my second question as well.

Re: sensitivity analysis (vensim)

Posted: Tue Sep 17, 2019 6:01 pm
by tomfid
I think the second error is a consequence of the first. It's not finding Yearly Depreciation Factor, and therefore not adding it as an input. Are there other parameters in the vsc?

Does Yearly Depreciation Factor have an array dimension? It's not set to "Initial" type by accident?

Re: sensitivity analysis (vensim)

Posted: Tue Sep 17, 2019 9:18 pm
by tomfid
I think the "wrong type" error only occurs if a variable is not a constant (the "not found" is misleading). Most likely causes are setting the constant subtype to unchangeable (with ==), setting the type to initial(), or simply specifying a nonnumeric expression for the variable, like x*y or 3/4.

Re: sensitivity analysis (vensim)

Posted: Wed Sep 18, 2019 8:59 am
by RWTH_FCN
I found it. The reason was that the variable had subscripts. So I used another variable W/O subscripts and it worked well.
Can I ask you how can I do sensivity analysis for variables with subscripts and variables with array dimension?

Re: sensitivity analysis (vensim)

Posted: Wed Sep 18, 2019 12:49 pm
by RWTH_FCN
RWTH_FCN wrote: Wed Sep 18, 2019 8:59 am I found it. The reason was that the variable had subscripts. So I used another variable W/O subscripts and it worked well.
Can I ask you how can I do sensivity analysis for variables with subscripts and variables with array dimension?
I solved it too. I should have just included subscripts in the .vsc file.

Re: sensitivity analysis (vensim)

Posted: Thu Oct 03, 2019 4:06 pm
by RWTH_FCN
I have a large-scale model that its simulation time is 7 hours (I am using compiler as well). From computational points of view, is it possible to do a Monte carlo simulation on it? Is there any linear relation between "number of simulation" in Monte carlo tab and "time of simulation" in vensim?

Re: sensitivity analysis (vensim)

Posted: Thu Oct 03, 2019 4:09 pm
by Administrator
You can run monte-carlo, but it will probably take you years to run it if a single run takes 7 hours. Each monte-carlo simulation will take 7 hours.

Re: sensitivity analysis (vensim)

Posted: Thu Oct 03, 2019 4:30 pm
by RWTH_FCN
Administrator wrote: Thu Oct 03, 2019 4:09 pm You can run monte-carlo, but it will probably take you years to run it if a single run takes 7 hours. Each monte-carlo simulation will take 7 hours.
Thanks. Do you have any suggestion for modeling uncertainty in such models which take very long in Vensim? Is there any sample model for simulating uncertainty with feedback-loops in Vensim itself?

Re: sensitivity analysis (vensim)

Posted: Fri Oct 04, 2019 3:23 pm
by tomfid
There's a little advice on speed here: https://metasd.com/2011/01/optimizing-vensim-models/
One item that's not mentioned there is that restricting the savelist helps.

We have an experimental version that does parallel multicore execution, which would reduce your simulation time by a factor of the number of cores you have (I have a server with 60, so it does in a minute what normally takes an hour). We could explore that option, though memory might be a problem. Still, doing 1000 or 1000000 runs would be a little daunting.

Re: sensitivity analysis (vensim)

Posted: Sat Oct 05, 2019 2:12 pm
by RWTH_FCN
tomfid wrote: Fri Oct 04, 2019 3:23 pm
We have an experimental version that does parallel multicore execution, which would reduce your simulation time by a factor of the number of cores you have (I have a server with 60, so it does in a minute what normally takes an hour). We could explore that option, though memory might be a problem. Still, doing 1000 or 1000000 runs would be a little daunting.
Great. Have you released that version or is it possible to have it in the near future? Using such version can speed up simulation of large-scale model noticeably.