model:
Title Location problem;
sets:
supply/1..2/:x,y,e;
demend/1..13/:a,b,d;
link(supply,demand):c;
endsets
data:
a=0,30.43,52.64,82.61,134.79,68.15,103.03,89.90,60.8,9.00,41.66,15.21,25.09;
b=51.47,39.86,31.37,19.91,0,25.45,12.13,17.16,28.25,48.00,35.59,45.69,23.51;
d=171.9,720.1,594,722,744,648,466,633,1098,716,447,608,358;
e=200,200;
enddata
init:
x,y=30.43,-71.14,104.6,121.71;
endinit
min=@sum(link(i,j):c(i,j)*((x(i)-a(j))^2+(y(i)-b(j))^2)^(1/2));
@for(supply(i):@sum(demand(i):c(i,j))=e(j););
@for(demand(j):@sum(supply(i):c(i,j))=d(j););
@for(supply:@bnd(0,x,134.79);
@bnd(0,Y,51.47););
END
lingo上显示是link()函数报错