I will use an example from the GAMS documentation for clarification (see below).
The parameter s_rep is used to store the probability for each scenario with the header "prob" and as a default its value is zero (if i understood that code bit correctly):
Code: Select all
Set scen "scenarios" / s1*s3 /;
Parameter
s_d(scen) "demand realization by scenario"
s_x(scen) "units bought by scenario"
s_s(scen) "units sold by scenario"
s_rep(scen,*) "scenario probability" / #scen.prob 0/;
Set dict / scen .scenario.''
d .randvar .s_d
s .level .s_s
x .level .s_x
'' .opt .s_rep /;
Code: Select all
Set scen "scenarios" / s1*s3 /
wo "worlds" /w1*w10/;
Parameter
s_d(scen,wo) "demand realization by scenario"
s_x(scen,wo) "units bought by scenario"
s_s(scen,wo) "units sold by scenario"
s_rep(scen,wo,*) "scenario probability" / #????/;
Set dict / scen .scenario.''
d .randvar .s_d
s .level .s_s
x .level .s_x
'' .opt .s_rep /;
Thanks so much!