model:
sets:
cd/1..3/:a;
xd/1..4/:b;
links(cd,xd):c,x;
px/1..13/:d1,d2;
endsets
data:
a=300 200 400;
b=200 100 450 250;
c=5 2 6 7
3 5 4 6
4 5 2 3;
enddata
min=d2(13);
@for(cd(i):@sum(xd(j):x(i,j))=a(i));
@for(xd(j):@sum(cd(i):x(i,j))
model:
sets:
cd/1..3/:a;
xd/1..4/:b;
links(cd,xd):c,x;
px/1..13/:d1,d2;
endsets
data:
a=300 200 400;
b=200 100 450 250;
c=5 2 6 7
3 5 4 6
4 5 2 3;
enddata
min=d2(13);
@for(cd(i):@sum(xd(j):x(i,j))=a(i));
@for(xd(j):@sum(cd(i):x(i,j))