Hello everyone! I have a problem with sets and subsets definitions in a MIP formulation. I have 2 025; the firsts 225 are continue variables and the rest are binary variables.

Because of this I write:

k variables of the instance /k1*k2025/
l(k) binary variables(0 <= x <= 1) /k226*k2025/

And then I write:

VARIABLES

z objetive

x(k) variables;

BINARY VARIABLES

x(l) variables binarias;

But gams give me: Error 184 - Domain list redefined

How I can fix this?

the complete code that I used is the following:

$CALL GDXXRW 10teams.xlsx @teams.txt

$Title 10teams_ca

SETS

i filas matriz A /i1*i95/
j filas matriz M /j1*j135/

k variables de la instania /k1

*k2025/*

l(k) subconjunto de variables binarys (0 <= x <= 1) /k226k2025/

l(k) subconjunto de variables binarys (0 <= x <= 1) /k226

m1(k) subconjunto de variables continuas FX=1 /k1, k51, k105, k165, k225/

m2(k) subconjunto de variables continuas FX=0;

m2(k) = (not l(k)) - m1(k);

PARAMETERS

A(i,k) matriz A

M(j,k) matriz M

b(i) vector b

g(j) vector g

c(k) vector de costos;

$GDXIN 10teams.gdx

$load A

$load M

$load b

$load g

$load c

$GDXIN

VARIABLES

z funcion objetivo

x(k) variables;

BINARY VARIABLES

x(l) variables binarias;

EQUATIONS

fobj funcion objetivo z

res1 restriccion 1

res2 restriccion 2;

fobj… z =e= sum(k,c(k)*x(k));

res1(i)… sum(k,A(i,k)*x(k)) =l= b(i);

res2(j)… sum(k,M(j,k)*x(k)) =e= g(j);

x.fx(m1) = 1;

x.fx(m2) = 0;

Model Centro /all/;

option mip=coincbc,rmip=coincbc;

solve Centro USING MIP MINIMIZING z;

–

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.