lingo程序错在哪里?如何改?

问题描述:

lingo程序错在哪里?如何改?
model:
sets:
yj/1..7/:z;
yi/1..6/:;
yk/1..5/:;
sl1(yi,yj):x,d,s,k;
sl2(yj,yk):a;
sl3(yi,yk):b;
endsets
data:
z=100 60 80 40 110 90 30;
a=0.5 0.1 0.2 0.05 0
0.7 0.2 0 0.03 0
0 0 0.8 0 0.01
0 0.3 0 0.07 0
0.3 0 0 0.1 0.05
0.2 0.6 0 0 0
0.5 0 0.6 0.08 0.05;
b=3 2 3 1 1
4 2 2 1 1
4 2 3 0 1
4 1 3 1 1
3 2 3 1 1
4 2 2 1 0;
d=
500 1000 300 300 800 100 600
500 200 0 400 300 200 150
300 200 600 300 0 400 0
500 500 200 400 0 100 100
0 60 300 500 1000 1100 100
300 500 100 100 500 0 500;
enddata
max=@sum(sl1(i,j):z(j)*s(i,j)+5*k(i,j));
@for(yi(i):@for(yk(k):@sum(sl2(j):a(j,k)*x(i,j)=0);
end

这样改语法就没问题了
model:
sets:
yj/1..7/:z;
yi/1..6/:;
yk/1..5/:;
sl1(yi,yj):x,d,s,k;
sl2(yj,yk):a;
sl3(yi,yk):b;
endsets
data:
z=100 60 80 40 110 90 30;
a=0.50.1 0.2 0.05 0
0.70.2 0 0.03 0
00 0.800.01
00.30 0.070
0.30 0 0.10.05
0.20.6000
0.50 0.6 0.080.05;
b=3 2 3 1 1
4 2 2 1 1
4 2 3 0 1
4 1 3 1 1
3 2 3 1 1
4 2 2 1 0;
d=
500 1000 300 300800100 600
500 200 0 400300 200 150
300 200 600 3000 400 0
500 500200 4000100 100
0 60 300 5001000 1100 100
300 500100 1005000500;
enddata
max=@sum(sl1(i,j):z(j)*s(i,j)+5*k(i,j));
@for(yi(i):@for(yk(l):@sum(yj(j):a(j,l)*x(i,j))=0);
end谢谢你,但为什么我运行的时候,还是报错,运行结果明显不对,这是我表达式逻辑的错误吗?