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
How do I run sensitivity Analysis for a stochastic model
How do I run sensitivity Analysis for a stochastic model
- Attachments
-
- Pre and Post Disaster Resource Allocation (Latest).gms
- A two-Stage Stochastic Model
- (3.52 KiB) Downloaded 242 times
Re: How do I run sensitivity Analysis for a stochastic model
Please can anyone help me with this?
Re: How do I run sensitivity Analysis for a stochastic model
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.
Hope this helps
Renger
[/code]
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
Enjoy modeling even more: Read my blog on modeling at The lazy economist