sensitivity analysis (vensim)

Use this forum to post Vensim related questions.
wanderbeg
Member
Posts: 20
Joined: Mon Mar 18, 2019 3:21 am
Vensim version: PLE

sensitivity analysis (vensim)

Post by wanderbeg » Thu Apr 04, 2019 2:14 am

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,
Attachments
screenshot.424.jpg
screenshot.424.jpg (9.04 KiB) Viewed 1230 times

tomfid
Administrator
Posts: 2776
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid » Thu Apr 04, 2019 3:30 am

Try loading a new Analysis Toolset?

wanderbeg
Member
Posts: 20
Joined: Mon Mar 18, 2019 3:21 am
Vensim version: PLE

Re: sensitivity analysis (vensim)

Post by wanderbeg » Thu Apr 04, 2019 4:05 am

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

Administrator
Super Administrator
Posts: 3384
Joined: Wed Mar 05, 2003 3:10 am

Re: sensitivity analysis (vensim)

Post by Administrator » Thu Apr 04, 2019 8:12 am

Click Tools->Analysis Toolset->Modify.
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: 2776
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid » Thu Apr 04, 2019 12:57 pm

Or just Tools>Analysis>New to reload a new copy of the toolset.

wanderbeg
Member
Posts: 20
Joined: Mon Mar 18, 2019 3:21 am
Vensim version: PLE

Re: sensitivity analysis (vensim)

Post by wanderbeg » Thu Apr 04, 2019 7:22 pm

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?
Attachments
screenshot.425.jpg
screenshot.425.jpg (35.61 KiB) Viewed 1215 times
screenshot.426.jpg
screenshot.426.jpg (37.14 KiB) Viewed 1215 times

tomfid
Administrator
Posts: 2776
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid » Thu Apr 04, 2019 7:51 pm

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.

wanderbeg
Member
Posts: 20
Joined: Mon Mar 18, 2019 3:21 am
Vensim version: PLE

Re: sensitivity analysis (vensim)

Post by wanderbeg » Thu Apr 04, 2019 9:00 pm

I simulate my parameters, but in all graphs the intervals are constant.
Estranged!
Attachments
screenshot.427.jpg
screenshot.427.jpg (35.76 KiB) Viewed 1212 times

tomfid
Administrator
Posts: 2776
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid » Thu Apr 04, 2019 9:05 pm

What is shown on this plot? If it's a parameter, it will be constant.

tomfid
Administrator
Posts: 2776
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid » Thu Apr 04, 2019 9:06 pm

Try the samples in the help system: http://vensim.com/documentation/usr15.htm

wanderbeg
Member
Posts: 20
Joined: Mon Mar 18, 2019 3:21 am
Vensim version: PLE

Re: sensitivity analysis (vensim)

Post by wanderbeg » Thu Apr 04, 2019 9:31 pm

Thank you for your help!

RWTH_FCN
Senior Member
Posts: 118
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post by RWTH_FCN » Tue Sep 17, 2019 4:51 pm

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

Administrator
Super Administrator
Posts: 3384
Joined: Wed Mar 05, 2003 3:10 am

Re: sensitivity analysis (vensim)

Post by Administrator » Tue Sep 17, 2019 4:56 pm

RWTH_FCN wrote:
Tue Sep 17, 2019 4:51 pm
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}
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.
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: 2776
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid » Tue Sep 17, 2019 5:03 pm

Sounds like your control file (.vsc) specifies a variable that doesn't exist or isn't constant.

RWTH_FCN
Senior Member
Posts: 118
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post by RWTH_FCN » Tue Sep 17, 2019 5:10 pm

Administrator wrote:
Tue Sep 17, 2019 4:56 pm
RWTH_FCN wrote:
Tue Sep 17, 2019 4:51 pm
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}
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?

RWTH_FCN
Senior Member
Posts: 118
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post by RWTH_FCN » Tue Sep 17, 2019 5:14 pm

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.

tomfid
Administrator
Posts: 2776
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid » Tue Sep 17, 2019 6:01 pm

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?

tomfid
Administrator
Posts: 2776
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid » Tue Sep 17, 2019 9:18 pm

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.

RWTH_FCN
Senior Member
Posts: 118
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post by RWTH_FCN » 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?

RWTH_FCN
Senior Member
Posts: 118
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post by RWTH_FCN » Wed Sep 18, 2019 12:49 pm

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.

RWTH_FCN
Senior Member
Posts: 118
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post by RWTH_FCN » Thu Oct 03, 2019 4:06 pm

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?

Administrator
Super Administrator
Posts: 3384
Joined: Wed Mar 05, 2003 3:10 am

Re: sensitivity analysis (vensim)

Post by Administrator » 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.
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

RWTH_FCN
Senior Member
Posts: 118
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post by RWTH_FCN » Thu Oct 03, 2019 4:30 pm

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?

tomfid
Administrator
Posts: 2776
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid » Fri Oct 04, 2019 3:23 pm

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.

RWTH_FCN
Senior Member
Posts: 118
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post by RWTH_FCN » Sat Oct 05, 2019 2:12 pm

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.

Post Reply