model:
sets:
gd/1..6/:a,b,d;
lch/A,B/:x,y,e;
links(gd,lch):c;
endsets
min=@sum(links(i,j):c(i,j)*((x(j)-a(i)^2+(y(j)-b(i))^2)^(1/2));
@for(gd(i)=sum(lch(j):c(i,j))=d(i));
@for(lch(j)sum(gd(i):c(i,j))<=e(j));
data:
a=1.25,8.75,0.5,5.75,3,7.25;
b=1.25,0.75,4.75,5,6.5,7.75;
d=3,5,4,7,6,11;
x=5,2;
y=1,7;
e=20,20;
enddata
end
|