2 Random Variables in stochastic programming using EMP

Problems with modeling
Post Reply
Posts: 3
Joined: 1 year ago

2 Random Variables in stochastic programming using EMP

Post by ujrai1 » 6 months ago

I am wondering if I am using random variables in Stochastic Programming correctly using EMP.
The code in my model looks like this; It doesn't give an error but also doesn't give a proper solution and repeats the values in Scenarios. My question is if I am correctly defining random variables (X and T) in this case. I mean the syntax. Thanks

File emp / '%emp.info%' /; put emp '* problem %gams.i%'/;
randvar X discrete 0.25 1000
0.45 3000
0.30 2000

randvar T discrete 0.5 18
0.3 32
0.2 10

stage 2 A U X d T
stage 2 E1 E2 E3
putclose emp;

Set scen Scenarios / s1*s3 /;
s_d(scen) demand realization by scenario
s_x(scen) generation to offer by scenario
s_z(scen) revenue by scenario
s_T(scen) possibility of grid call by scenario

Set dict / scen .scenario.''
x .randvar .s_x
t .randvar .s_t
d .level .s_d
z .level .s_z/;
solve UC max z use emp scenario dict;
Display s_d, s_x, s_z, s_t;

Post Reply