lingo 这段那里错了?

问题描述:

lingo 这段那里错了?
model:
sets:
sell/1..7/:p,s,x,m;
need/1..15/:t,w,d;
link(sell,need):c,y;
endsets
data:
p=160 155 155 160 155 150 160;
s=800 800 1000 2000 2000 2000 3000;
d=104 301 750 606 194 205 201 680 480 300 220 210 420 500 0;
c=170.7 160.3 140.2 98.6 38 20.5 3.1 21.2 64.2 92 96 106 121.2 128 142
215.7 205.3 190.2 171.6 111 95.5 86 71.2 114.2 142 146 156 171.2 178 192
230.7 220.3 200.2 181.6 121 105.5 96 86.2 48.2 82 86 96 111.2 118 132
260.7 250.3 235.2 216.6 156 140.5 131 116.2 84.2 62 51 61 76.2 83 97
255.7 245.3 225.2 206.6 146 130.5 121 111.2 79.2 57 33 51 71.2 73 87
265.7 255.3 235.2 216.6 156 140.5 131 121.2 84.2 62 51 45 26.2 11 28
275.7 265.3 245.2 226.6 166 150.5 141 131.2 99.2 76 66 56 38.2 26 2;
enddata
min=@sum(sell(i):p(i)*x(i))+0.1*@sum(need(j):t(j)*(t(j)+1)/2+w(j)*(w(J)+1/2)+@sum(link(i,j):c(i,j)*y(i,j));
@sum(sell(i):m(i))500*m(i));
@for(sell(i):x(i)

是这两处有问题:

min=@sum(sell(i):p(i)*x(i))
+0.1*@sum(need(j):t(j)*(t(j)+1)/2+w(j)*(w(J)+1/2))!少一个右括号;
+@sum(link(i,j):c(i,j)*y(i,j));@for(need(j):@sum(sell(i):y(i,j)=w(j)+t(j)));!少一个右括号;

看见了吗

按你的修改以后 @for(need(j):@sum(sell(i):y(i,j)=w(j)+t(j)));等于号下面又报错了。