model:
sets:
r/1..10/:d,U,g;
link(r,r):h,Z;
links(r,r,r):x;
endsets
data:
d=8.1, 9, 9.5, 4.7, 6.5, 6.7, 3.7, 3.7, 1, 8;
g=3.32, 4.93, 2.78, 2.69, 1.75, 6.53, 3.31, 3.15, 0.73,3.29;
h=
0, 2.9, 7.7, 6 , 8.2, 8.5, 6.1, 7.1, 7.6, 5.1,
2.9, 0 , 4.5,4.5, 5 , 8.3, 7.8, 8.5, 10.1, 2.2,
7.7, 4.5, 0 , 5.1, 5.1, 8.3, 10.5, 9.9, 9.3, 3.7,
6 , 4.5, 5.1, 0 , 3.3, 3.6, 7.5, 7.5, 4.9, 7.5,
8.2, 5 , 5.1,3.3, 0 , 3.3, 10 , 9.3, 6.7, 4.8,
8.5, 8.3, 8.3, 3.6, 3.3, 0 , 10.1, 9.5, 6.8, 7.6,
6.1, 7.8,10.5, 7.5, 10 , 10.1, 0 ,1.1, 3.3, 9.9,
7.1, 8.5, 9.9, 7.5, 9.3, 9.5, 1.1, 0 , 4.4, 9.4,
7.6, 10.1, 9.3, 4.9, 6.7, 6.8, 3.3, 4.4, 0 , 10.1,
5.1, 2.2, 3.7, 7.5, 4.8, 7.6, 9.9, 9.4, 10.1, 0 ;
enddata
min=28.42*(@sum(links(i,j,k):h(i,j)*x(i,j,k))+@sum(link(i,j):d(i)*Z(i,j)))+2*324.8*@sum(link:Z)+2631.67;
@for(r:U<=8);
@for(links(i,j,k):@bin(x(i,j,k));@bin(Z(i,k)));
@for(link(i,k):x(i,i,k)=0);
@for(r(k):U(k)=@sum(link(i,j)|j#gt#i#and#i#le#@size(r):g(i)*(x(i,j,k)+Z(i,k))));
@for(r(k):@sum(link(i,j):x(i,j,k))=1);
@for(link(j,k):@sum(r(i):x(i,j,k)+Z(i,k))=1);
@for(link(i,k):@sum(r(j):x(i,j,k))=1);
end