你好!我有一个lingo程序不知道哪里错了,能帮我看一下吗?它老是说我"error161“

model:
sets:
xi/1..11/:x,x1;
yj/1..8/:y,y1;
pk/1..12/:a,b;
link/xi,yj,pk/:e;
endsets
data:
a=0.50,1.41,3.00,3.37,3.40,4.72,4.72,5.43,7.57,8.38,8.98,9.50;
b=2.00,3.50,1.50,3.51,5.50,2.00,6.24,4.10,2.01,4.50,3.41,0.80;
x=0,1,2,3,4,5,6,7,8,9,10;
y=0,1,2,3,4,5,6,7;
enddata
@for(xi(m):x1(m)=x(m)+x0);
@for(yj(n):y1(n)=y(n)+y0);
@for(link(xi,yj,pk):e(i,j,t)=@if(@smax(@abs(x1(m)-a(t)),@abs(y1(n)-b(t)))#le#0.05,1,0);
max=@sum(link:e);
@bnd(0.4,x0,0.5);
@bnd(0.5,x0,0.6);
end

@for(link(xi,yj,pk):e(i,j,t)=@if(@smax(@abs(x1(m)-a(t)),@abs(y1(n)-b(t)))#le#0.05,1,0);
这句有问题追问

哪里有问题呢?可以帮我改一下吗?

追答

model:
sets:
xi/1..11/:x,x1;
yj/1..8/:y,y1;
pk/1..12/:a,b;
link(xi,yj,pk):e;
endsets
data:
a=0.50,1.41,3.00,3.37,3.40,4.72,4.72,5.43,7.57,8.38,8.98,9.50;
b=2.00,3.50,1.50,3.51,5.50,2.00,6.24,4.10,2.01,4.50,3.41,0.80;
x=0,1,2,3,4,5,6,7,8,9,10;
y=0,1,2,3,4,5,6,7;
enddata
@for(xi(m):x1(m)=x(m)+x0);
@for(yj(n):y1(n)=y(n)+y0);
@for(link(i,j,t):e(i,j,t)=@if(@smax(@abs(x1(i)-a(t)),@abs(y1(j)-b(t)))#le#0.05,1,0));
max=@sum(link:e);
@bnd(0.4,x0,0.5);
@bnd(0.5,y0,0.6);
end

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答