Updating a paremeter value in loop

Hi,

Just want to do the following but do not know how to update the value of the parameter in the loop. When I implement it in GAMS, it seems that the value of Y(i) does not change. Could some one say where is the problem?

parameter Y(i),iter;
variable V(i);

eq1…
V(i) =l= Y(i);


Y(i)=1000000;
loop(iter,
solve model using mip maximizing z
Y(i)=Y(i) - V.l(i);
);


Many thanks,



\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/Wt909nbXymUJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

TE,

you must loop through a set.
For instance:

set iter / Iter1*Iter20 /;
parameter Y(i);
variable V(i);

eq1… V(i) =l= Y(i);

Y(i)=1000000;
loop(iter,
solve model using mip maximizing z
Y(i)=Y(i) - V.l(i);
);


Em quarta-feira, 22 de agosto de 2012 08h57min07s UTC-3, TE escreveu:

Hi,

Just want to do the following but do not know how to update the value of the parameter in the loop. When I implement it in GAMS, it seems that the value of Y(i) does not change. Could some one say where is the problem?

parameter Y(i),iter;
variable V(i);

eq1…
V(i) =l= Y(i);


Y(i)=1000000;
loop(iter,
solve model using mip maximizing z
Y(i)=Y(i) - V.l(i);
);


Many thanks,



\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/cgLg2gMbzesJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.