loop of a set

Dear all,

I want to solve a problem with respective set elements.

for instance,

set
i /1*13/
;

variables
var(i)
objset(i)
objvar
;

parameter
par(i)
;

equations
eq1
eq2

objset(i)
;

objset(i)=e=var(i)*par(i);

The problem is that my objective is formulated into a set. But i wish
I could solve it with different set elements. i.e. when i=1, solve
objset(‘1’); when i=2, solve objset(‘2’).

Thanks!

Best Regards,
YN

\

Can it be done this way?
using a loop and solve the model for each element in set i, the reuslts can be stored in a parameter A

Equation Objset;
objset(i)=e=var(i)*par(i);

Model aa /Objeset, others/;

Prameter A(i);
Loop(i,
solve aa …;
A(i) = objset.l(i);
);

HTH,

Yan

I want to solve a problem with respective set elements.
for instance,
set
i /1*13/
;
objset(i)
;
objset(i)=e=var(i)*par(i);
The problem is that my objective is formulated into a set. But i wish
I could solve it with different set elements. i.e. when i=1, solve
objset(‘1’); when i=2, solve objset(‘2’).

\