Hi,
I’m using Augmented Epsilon Constraint method based on the provided code on GAMS site http://www.gams.com/modlib/libhtml/epscm.htm .
My problem is that this code only saves the objective functions while I want my variable values X and Y be also saved.
The instructions for saving variables is as follows but I can’t understand it:
“Line 214: In the output building section of the code, beside the values of the objective functions the
user may add any other decision variable that wish to record for every efficient solution. In this case it
is recommended to appropriately add labels to the label row in line 195.”
193 * Walk the grid points and take shortcuts if the model becomes infeasible
194 posg(km1) = 0;
195 repeat
196 rhs(km1) = sum(grid(km1,g)(numg(g)=posg(km1)), gridrhs(km1,g));
197 solve mod_epsmethod maximizing a_objval using lp;
198 if (mod_epsmethod.modelstat1, // not optimal is in this case infeasib
le
199 lastZero = 0; loop(km1(posg(km1)>0 and lastZero=0), lastZero=numk(km1
));
214 loop(k, put ‘,’ k.tl:0); putclose ‘\n"); }’ / ‘{ print NR,$0 }’ / ‘END { p
rint “;” }’;
216 execute ‘cd "C:\Users\LOTUSLAPTOP.COM\Documents\gamsdir\projdir\225c" &&
gsort p.dat | uniq | awk -f awk.dat > g.dat && gams g.dat o=gx.dat lo=0 gd
x=soleps’;
217 execute ‘mv -f “C:\Users\LOTUSLAPTOP.COM\Documents\gamsdir\projdir\225c\so
leps.gdx” .’;
Anyone knows how to save variables??
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.