sets:
a/1..6/:k,x;
b/1..5/:m;
c(a,b):d;
endsets
data:
d=75 25 20 15 10
90 35 0 0 30
60 15 15 15 15
30 20 10 30 40
100 25 20 20 20
50 20 10 30 40;
m=250 75 50 50 50;
k=141 187 121 83 265 127;
enddata
max=@sum(a:k*x);
@for(b(j):@sum(a(i):x(i)*d(i,j))<m(j));
@for(b(j):@sum(a(i):x(i))<1);
@for(a(i):@sum(b(j):x(j))=1);
@for(a:@bin(x));
end
a/1..6/:k,x;
b/1..5/:m;
c(a,b):d;
endsets
data:
d=75 25 20 15 10
90 35 0 0 30
60 15 15 15 15
30 20 10 30 40
100 25 20 20 20
50 20 10 30 40;
m=250 75 50 50 50;
k=141 187 121 83 265 127;
enddata
max=@sum(a:k*x);
@for(b(j):@sum(a(i):x(i)*d(i,j))<m(j));
@for(b(j):@sum(a(i):x(i))<1);
@for(a(i):@sum(b(j):x(j))=1);
@for(a:@bin(x));
end