Hi All,
My model has 46 different scenarios, and I would like to write the results to an excel file. basically what I would like to have in my excel is like this one
Scenario 1 Scenario 2 Scenario 3 Scenario 4 ……
Obj Function Results Results Results Results
TCG 1 Results Results Results Results
TCG 2 Results Results Results Results
TCG 3 Results Results Results Results
…
Tgn 1 Results Results Results Results
Tgn 2 Results Results Results Results
Tgn 3 Results Results Results Results
….
fgn 1 Results Results Results Results
fgn 2 Results Results Results Results
fgn 3 Results Results Results Results
The code that I wrote is this but it only gives me one result for one iteration
file results / results1.xls/;
Model netgas /all/;
loop(sc,
sub_scen(sc)=yes;
Solve netgas using mip minimizing z;
display G.l,gn.l,CG.l,y.l,deltax.l,gdeltax.l,x.l,f.l;
put results;
put /‘Scenario’///
put sub_scen.ts:46;
put /@1#4 ‘Objective Function’/
zzz.l/;
put /‘Total cumulative generation’/;
loop(q, put TCG.l(q) /);
put /‘Total generation’/;
loop(q, put tgn.l(q)/);
put /‘Total cumulative generation’/;
loop(q, put fgn.l(q)/);
sub_scen(sc)=no;
);
I would really appreciate for your help and time
Akgun
–
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.