Get Scenario Probabilities SP multi-stage

Problems with syntax of GAMS
Post Reply
rmmaf
User
User
Posts: 6
Joined: 3 months ago

Get Scenario Probabilities SP multi-stage

Post by rmmaf » 3 months ago

How do I get the scenario probabilities using the ".opt" label in EMP dict?

Code: Select all

* Dictionary
Set scen    S      "scenarios" / 1*243/;
Parameters
     s_Xb(scen,i, t)  "amount bought "
     s_Xs(scen,i, t)  "amount sold "
     s_Xh(scen, i, t) "stocks"
     s_A(scen, t)     "captalization"
     s_c(scen, t)     "tax"
     s_F(scen, t)     "F"
     s_Z(scen, t)     "deficits"
     s_jr(scen,i,t)   "join returns"
     s_L(scen, t)     "Liability"
     s_rep(scen, *)   "Probability per Scenario"
;
Set dict /
   scen .scenario.''
   jr   .randvar .s_jr
   L    .randvar .s_L
   Xb   .level   .s_Xb
   Xs   .level   .s_Xs
   Xh   .level   .s_Xh
   A    .level   .s_A
   c    .level   .s_c
   F    .level   .s_F
   Z    .level   .s_Z
   ''    .opt    .s_rep/
tying this, but getting error

OBS: I'm brazilian, sorry about my english
Dados.xlsx
(10.91 KiB) Downloaded 13 times
programa_teste2-emp.gms
(5.95 KiB) Downloaded 14 times

vbind
User
User
Posts: 5
Joined: 1 month ago

Re: Get Scenario Probabilities SP multi-stage

Post by vbind » 3 weeks ago

I can't run your model, but the probabilities should be stored in s_rep. If not please specify the error and provide a minimal example.

See also the farmsp.gms example in the EMP example library. There the probabilities are displayed.

Post Reply