MODEL:
sets:
Warehouse /1..12/: w,y,f;
Customer /1..12/: d;
Routes(Warehouse,Customer): c,x;
endsets
data:
w = 18,18,18,18,18,18,18,18,18,18,18,18;
d = 4,6,7,3,8,2,8,2,3,5,4,2;
f = 16,14,13,14,16,20,20,20,14,14,13,13;
c = 0,1,6,7,4,3,4,7,6,9,13,9.
1,0,5,6,5,4,5,8,7,10,14,10.
6,5,0,3,6,9,10,13,12,15,19,15.
7,6,3,0,3,10,11,14,13,16,17,12.
4,5,6,3,0,7,8,11,10,13,14,9.
3,4,9,10,7,0,7,4,9,12,12,6.
4,5,10,11,8,7,0,11,9,5,9,13.
7,8,13,14,11,4,11,0,13,12,8,10.
6,7,12,13,10,9,9,13,0,4,8,13.
9,10,15,16,13,12,5,12,4,0,4,9.
13,14,19,17,14,12,9,8,8,4,0,5.
9,10,15,12,9,6,13,10,13,9,5,0;
enddata
[OBJ]min = @SUM(Routes: c*x)+@SUM(Warehouse: f*y);
@for(Warehouse(i):[SUP]
@sum(Customer(j):x(i,j)) <=w(i)*y(i);
@for(Customer(j):[DEM]
@sum(Warehouse(i):x(i,j)) = d(j);
@sum(Warehouse:y) <= 3;
@for(Warehouse:@bin(y));
END
sets:
Warehouse /1..12/: w,y,f;
Customer /1..12/: d;
Routes(Warehouse,Customer): c,x;
endsets
data:
w = 18,18,18,18,18,18,18,18,18,18,18,18;
d = 4,6,7,3,8,2,8,2,3,5,4,2;
f = 16,14,13,14,16,20,20,20,14,14,13,13;
c = 0,1,6,7,4,3,4,7,6,9,13,9.
1,0,5,6,5,4,5,8,7,10,14,10.
6,5,0,3,6,9,10,13,12,15,19,15.
7,6,3,0,3,10,11,14,13,16,17,12.
4,5,6,3,0,7,8,11,10,13,14,9.
3,4,9,10,7,0,7,4,9,12,12,6.
4,5,10,11,8,7,0,11,9,5,9,13.
7,8,13,14,11,4,11,0,13,12,8,10.
6,7,12,13,10,9,9,13,0,4,8,13.
9,10,15,16,13,12,5,12,4,0,4,9.
13,14,19,17,14,12,9,8,8,4,0,5.
9,10,15,12,9,6,13,10,13,9,5,0;
enddata
[OBJ]min = @SUM(Routes: c*x)+@SUM(Warehouse: f*y);
@for(Warehouse(i):[SUP]
@sum(Customer(j):x(i,j)) <=w(i)*y(i);
@for(Customer(j):[DEM]
@sum(Warehouse(i):x(i,j)) = d(j);
@sum(Warehouse:y) <= 3;
@for(Warehouse:@bin(y));
END