Page 1 of 1

How do I run sensitivity Analysis for a stochastic model

Posted: Mon Jan 13, 2020 8:23 pm
by Chinwendu
I am trying to conduct a sensitivity analysis for my model by changing all the parameters and gauging the sensitivity of each change relative to the optimal solution.

Please can anyone help?

I have attached the GAMS model here-in

Re: How do I run sensitivity Analysis for a stochastic model

Posted: Mon Jan 13, 2020 8:24 pm
by Chinwendu
Please can anyone help me with this?

Re: How do I run sensitivity Analysis for a stochastic model

Posted: Tue Jan 14, 2020 9:47 am
by Renger
Hi
You could use a nested loop for every parameter you want to do sensitivity analysis. Assume you use P1 and P2 for this and assume they can take the following three values 0.005, 0.01, and 0.0015.

Code: Select all

set n /1*3/ Set for the number of values;

parameter 
P1s(n) Possible values P1,
P2s(n)  Possible values P2;

* assign the values
P1s("1") = 0.005;
...
alias(n,n2)
loop(n, 
    P1 = P1s(n);
    loop(n2, 
    	P2 = P2s(n);
    	solve your model, grab the solutions and save them,
    );
 );

Hope this helps
Renger



[/code]