Dear All,

I am trying to define const 3, 5 and 7 using a subset of a set. I do not know how to write this. For example, for constraint 3, in the parenthesis, I wrote zero which gives an error. There must be a way to write subset of a set. Could you please help me out how to define a constraint with subset?

Thank you

sets

k Type of equipment /k1*k2/
i of equipment type k in year i /0*AK/

j periods in the planning horizon / 0*T/

;

PARAMETERS

a(k) maximum or forced salvage age (WT must be salvaged if this age is reached)

h(i,k) the number of i year old k type equipment available at time zero

;

a(k)= 7;

*h(i,k)=10;

v(j)= v1(j,“cost”);

om(i,k)=om1(i,k,“operation”);

s(i,k)=s1(i,k,“salvage”);

h(i,k)=h1(i,k,“number”);

b(j)= b1(j,“budget”);

Positive Variables

X(i,j,k) the number of i year-old k type equipment in use from the end of year j to the end of year j + 1

Y(i,j,k) the number i year old k type equipment salvaged at the end of year j

P(j,k) the number of k-type equipment purchased at the end of year j;

Equations

## Const3(i,j,k) flow balance for initial equipment

Const4(i,j,k) flow balance existing salvaged and new equipment

*Const5(i,j,k) flow balance for existing equipment

*Const6(i,j,k) flow balance for existing equipment

Const7(i,j,k) flow balance for salvaged and purchased equipment

;

Const3(i,j,k)… X(i,0,k)+Y(i,0,k)=e=h(i,k);

Const4(i,j,k)… X(i-1,j-1,k)=e= X(i,j,k)+Y(i,j,k);

Const4(i,j,k)… X(i-1,j-1,k)=e= X(i,j,k)+P(j,k);

Const5(i,j,k)… X(i,T,k)=e=0;

Const6(ak,j,k)… X(Ak,j,k)=e=0;

Const7(i,j,k)… Y(0,j,k)=e=0;

\

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.