How do I run sensitivity Analysis for a stochastic model

Problems with modeling
Post Reply
Chinwendu
User
User
Posts: 2
Joined: 4 years ago

How do I run sensitivity Analysis for a stochastic model

Post 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
Attachments
Pre and Post Disaster Resource Allocation (Latest).gms
A two-Stage Stochastic Model
(3.52 KiB) Downloaded 223 times
Chinwendu
User
User
Posts: 2
Joined: 4 years ago

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

Post by Chinwendu »

Please can anyone help me with this?
User avatar
Renger
Posts: 639
Joined: 7 years ago

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

Post 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]
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Post Reply