求个大佬改lingo程序呜呜呜 改不出来错误 救救孩子叭 !!!

model
setS:
S/1..10/:I,D,alpha;
T/1..10/:J;
car/1..3/:W,J;
tel/1..3/:E;
C(S,T):c;
Y(S,T,car):y;
F(S,T,car):f;
M(S,tel):m;
endsets
data:
alpha=40000,20000,35000,50000,20000,50000,20000,20000,20000,35000;
f=0.00,10.64,16.85,21.30,13.74,5.81,10.45,12.83,17.79,21.74,0.00,5.32,8.43,10.65,6.87,2.91,5.22,6.41,8.89,10.87,10.64,0.00,6.30,10.63,4.63,9.23,10.33,6.62,9.84,11.77,10.64,0.00,6.30,10.63,4.63,9.23,10.33,6.62,9.84,11.77,5.32,0.00,3.15,5.31,2.32,4.61,5.17,3.31,4.92,5.89,16.85,6.30,0.00,5.04,4.18,14.17,7.60,6.76,6.80,5.81,16.85,6.30,0.00,5.044.18,14.17,7.60,6.76,6.80,5.81,8.43,3.15,0.00,2.52,2.09,7.08,3.80,3.383.40,2.90,21.30,10.63,5.04,0.009.23,19.12,18.42,12.53,10.44,6.20,21.30,10.63,5.04,0.00,9.23,19.12,18.42,12.53,10.44,6.20,10.65,5.31,2.52,0.00,4.61,9.56,9.21,6.27,5.22,3.10,13.74,4.63,4.18,9.23,0.00,10.27,9.17,3.49,5.20,7.98,13.74,4.63,4.18,9.23,0.00,10.27,9.17,3.49,5.20,7.98,6.87,2.32,2.09,4.61,0.00,5.14,4.58,1.74,2.60,3.99,5.81,9.23,14.17,19.12,10.27,0.00,5.81,8.16,13.19,17.99,5.81,9.23,14.17,19.12,10.27,0.00,5.81,8.16,13.19,17.99,2.91,4.61,7.08,9.56,5.14,0.00,2.90,4.08,6.59,8.99,10.45,10.33,7.60,18.42,9.17,5.81,0.00,5.93,10.25,15.78,10.45,10.33,7.60,18.42,9.17,5.81,0.00,5.93,10.25,15.78,5.22,5.17,3.80,9.21,4.58,2.90,0.00,2.97,5.13,7.89,12.83,6.62,6.76,12.53,3.49,8.16,5.93,0.00,5.08,9.97,12.83,6.62,6.76,12.53,3.49,8.16,5.93,0.00,5.08,9.97,6.41,3.31,3.38,6.27,1.74,4.08,2.97,0.00,2.54,4.98,17.79,9.84,6.80,10.44,5.20,13.19,10.25,5.08,0.00,5.87,17.79,9.84,6.80,10.44,5.20,13.19,10.25,5.08,0.00,5.87,8.89,4.92,3.40,5.22,2.60,6.59,5.13,2.54,0.00,2.94,21.74,11.77,5.81,6.20,7.98,17.99,15.78,9.97 ,5.87 ,0.00,21.74,11.77,5.81,6.20,7.98,17.99,15.78,9.97,5.87,0.00,10.87,5.89,2.90,3.10,3.99,8.99,7.89,4.98,2.94,0.00;
e=15000,200,5000;
c=0.55,1.1,5.48,0.27,0.55,2.47,0.41,0.55,3.29,0.66,0.41,7.12,0.82,0.55,7.67,1.64,0.82,5.48,1.1,0.55,4.38,1.37,0.96,5.48,0.55,0.14,4.93,0.41,0.27,3.56;
enddata
min=(@sum(S(I):@sum(T(J):C(i,1)*Y(i,j,1)*F(i,j,1)*alpha(i)))+@sum(S(I):@sum(T(J):C(i,1)*Y(i,j,2)*F(i,j,2)*alpha(i)))+@sum(S(I):@sum(T(J):C(i,2)*Y(i,j,1)*F(i,j,1)*alpha(i)))+@sum(S(I):@sum(T(J):C(i,2)*Y(i,j,2)*F(i,j,2)*alpha(i)))+@sum(S(I):@sum(S(I):C(i,3)*Y(i,j,3)*F(i,j,3)))+@sum(S(I):@sum(car(J):E(j)*M(i,j))))*365+@sum(S(I):@max(alpha*W(i,1)+alpha*W(i,2)+alpha*W(i,3))*D(i));
@for(@sum(T(J):Y(i,j,k))+M(i,j)=1);
@for(@sum(S(I):@sum(T(j):C(i,j)*Y(i,j,1))));
@for(T(J):@sum(S(i):C(i,j)*Y(i,1)))<=7);
@for(T(J):@sum(S(i):C(i,j)*Y(i,2)))<=5);
@for(T(J):@sum(S(i):C(i,j)*Y(i,3)))<=3);
@for(@sum(S(i):@sum(car(j):W(i,j)))<=2);
@for(S:@bin(I));
@for(T:@bin(J));
@for(car:@bin(w));
@for(T(j):@sum(S(i):y(i,j))=W(i,j));
end

1个回答

我看了一下,眼花撩乱的,我现在看出来的问题就是把model改成model,这是个小问题,然后有个大问题就是lingo是不区分大小写的,所以你模型写的那些大小写要重新区分并用不同的字母代替,比如你的f可以用ff代替。记住lingo不区分大小写。本来想给你改下的,你这个错太多了,看得我眼花缭乱

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐