Dear Members:
I’m a newbie in gams, there is a problem i can’t solve, i 'm very appreciate for your help!
Here is my code :
set g /g1g10/
s /s0s2/
h /h1*h24/ ;
parameters
l(h)
/h1 1022, h2 963, h3 978, h4 993 , h5 1037 , h6 1066
h7 1095, h8 1124, h9 1138, h10 1154, h11 1182, h12 1197
h13 1242, h14 1271, h15 1314, h16 1372, h17 1314, h18 1271
h19 1285, h20 1290, h21 1372, h22 1459, h23 1459, h24 1081 / ;
table a
s2 s1 s0 pmin pmax
g1 0.000786 0.2700 8.00 30 100
g2 0.000792 0.3000 5.00 20 80
g3 0.000764 0.2800 6.40 25 120
g4 0.000270 0.2657 20.0 50 250
g5 0.000424 0.3080 5.80 50 250
g6 0.001020 0.2800 3.00 15 60
g7 0.000578 0.2529 9.80 120 320
g8 0.000296 0.2427 16.4 75 300
g9 0.000254 0.2791 21.0 250 520
g10 0.000522 0.2700 14.4 75 280
parameters maxg(g,h)
ming(g,h) ;
loop(h,maxg(g,h) = a(g,“pmax”)) ;
loop(h,ming(g,h) = a(g,“pmin”)) ;
display maxg,ming;
variable p(g,h)
z(h) ;
positive variable p ;
equations cost(h)
totalload(h)
constraint1(g,h)
constraint2(g,h) ;
cost(h)… z(h) =e= sum(g,sum(s,a(g,s)*p(g,h)**(ord(s)-1)));
totalload(h)… sum(g,p(g,h)) =e= l(h);
constraint1(g,h)… p(g,h) =l= maxg(g,h);
constraint2(g,h)… p(g,h) =g= ming(g,h);
model burnup /all/;
option nlp=conopt;
solve burnup using nlp minimizing z(h);
display z(h).l;
Here is error :
solve burnup using nlp minimizing z(h);
**** $148,257,409
57
58 display z(h).l;
**** $143,141,409
error 148 dimension different - the symbol is referenced with more/less indices as declared
How can i get 24 different z?
–
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/groups/opt_out.