Looping over objective function possible?

Hello everyone,

I want to change a parameter in steps of 0.1 with the objective function giving me the results of every step.
Is it even possible to generate more than one output of the objective function?

Kind regards

You can loop in GAMS. Lets say you want to solve your model over and over again with values for parameter p from 1 to 3 in steps of 0.1, the following code does that:

...
set ps / p1*p30 /;
parameter objrep(ps);
loop(ps,
  p = 1 + (ord(ps)-1)/10;
  solve mymodel min z us lp;
  objrep(ps) = z.l;
);
...

-Michael

Thank you so much.
It worked!