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 »

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

Re: sensitivity analysis (vensim)

Post by tomfid »

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 »

tomfid wrote: Thu Apr 04, 2019 3:30 am Try loading a new Analysis Toolset?
Where can I do this?
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: sensitivity analysis (vensim)

Post by Administrator »

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: 3804
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid »

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 »

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 11328 times
screenshot.426.jpg
screenshot.426.jpg (37.14 KiB) Viewed 11328 times
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post 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.
wanderbeg
Member
Posts: 20
Joined: Mon Mar 18, 2019 3:21 am
Vensim version: PLE

Re: sensitivity analysis (vensim)

Post by wanderbeg »

I simulate my parameters, but in all graphs the intervals are constant.
Estranged!
Attachments
screenshot.427.jpg
screenshot.427.jpg (35.76 KiB) Viewed 11325 times
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid »

What is shown on this plot? If it's a parameter, it will be constant.
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid »

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 »

Thank you for your help!
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

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

Re: sensitivity analysis (vensim)

Post 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.
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: 3804
Joined: Wed May 24, 2006 4:54 am

Re: sensitivity analysis (vensim)

Post by tomfid »

Sounds like your control file (.vsc) specifies a variable that doesn't exist or isn't constant.
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post 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?
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

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

Re: sensitivity analysis (vensim)

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

Re: sensitivity analysis (vensim)

Post 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.
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post 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?
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post 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.
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

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

Re: sensitivity analysis (vensim)

Post 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.
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: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

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

Re: sensitivity analysis (vensim)

Post 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.
RWTH_FCN
Senior Member
Posts: 148
Joined: Wed Feb 08, 2017 9:10 am
Vensim version: DSS

Re: sensitivity analysis (vensim)

Post 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.
Post Reply