Hi Gams World experts,
I wrote a 2-stage stochastic programming code with 2 random variables. When running the model, it turns to the error processing empinfo file on line 85: Realization expected. Here is the emp code and I can’t figure out what realization is expected?
* EMP Annotations
File emp / '%emp.info%' /;
emp.nd=4;
put emp '* problem %gams.i%'
/ 'ExpectedValue rr evr'
/ 'stage 1 obj defobj evr y supplierGoal'
/ 'stage 2 v x z b ocap rr'
/ 'stage 2 totalCost qualityTolerance deliveryTolerance SumVolume SumOne discLower discUpper meetDemand CapLimit';
put / 'jrandvar'
loop((j,k)$d(j,k), put d.tn(j,k));
loop(s,
put /prob(s); loop((j,k), put ds(s,j,k); ); );
put / 'jrandvar'
loop(i, put cap.tn(i));
loop(s,
put /prob(s); loop(i, put caps(s,i); ); );
putclose emp;
* Dictionary
Parameters
s_d(s,j,k) "demand by scenario"
s_cap(s,i) "capcity by scenario"
s_rr(s) "totalcost by scenario";
s_d(s,j,k)=0;
s_cap(s,i)=0;
Set dict / s .scenario.''
d .randvar .s_d
cap .randvar .s_cap
rr .level .s_rr/;
solve SP using emp min obj scenario dict;
Thank you for any help!
Beichen