请各位大大看看这个lingo程序哪里出错了?model:sets:I/1..45/:x,y,c,b,t;endsetsdata:c=64,88,193,193,128,120,120,120,110,120,64,247,190,210,70,85,192,195,128,120,120,120,110,160,70,256,190,210,190,205,110,160,70,256,190,210,190,190,210,200
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/25 02:18:00
请各位大大看看这个lingo程序哪里出错了?model:sets:I/1..45/:x,y,c,b,t;endsetsdata:c=64,88,193,193,128,120,120,120,110,120,64,247,190,210,70,85,192,195,128,120,120,120,110,160,70,256,190,210,190,205,110,160,70,256,190,210,190,190,210,200
请各位大大看看这个lingo程序哪里出错了?
model:
sets:
I/1..45/:x,y,c,b,t;
endsets
data:
c=64,88,193,193,128,120,120,120,110,120,64,247,190,210,70,85,192,195,128,120,120,120,110,160,70,256,190,210,190,205,110,160,70,256,190,210,190,190,210,200,150,150,180,70,120;
b=42,42,48,50,36,36,36,36,36,36,27,75,48,50,42,42,48,50,36,36,36,36,36,36,27,75,48,50,48,50,36,36,27,75,48,50,48,48,50,48,50,48,48,25,45;
t=40,40,50,48,45,45,48,45,40,45,40,45,48,50,40,40,50,48,45,45,48,45,40,45,40,45,48,50,48,50,40,45,40,45,48,50,48,48,50,48,50,48,48,50,48;
enddata
min=@sum(I:y*b*t);
@for(I:x>=0.8);
@for(I:x=0.95);
@sum(I:x*c)>=5600;
end
请各位大大看看这个lingo程序哪里出错了?model:sets:I/1..45/:x,y,c,b,t;endsetsdata:c=64,88,193,193,128,120,120,120,110,120,64,247,190,210,70,85,192,195,128,120,120,120,110,160,70,256,190,210,190,205,110,160,70,256,190,210,190,190,210,200
没有语法错误,可以得到结果,你那边有错是什么错误代码?换个版本试试,我空间有下载地址,自个找找.
结果如下:
Global optimal solution found.
Objective value: 70652.13
Extended solver steps: 2
Total solver iterations: 1516
Variable Value Reduced Cost
X( 1) 0.8000000 0.000000
X( 2) 0.8000000 0.000000
X( 3) 0.8000000 0.000000
X( 4) 0.8000000 0.000000
X( 5) 0.8000000 0.000000
X( 6) 0.8000000 0.000000
X( 7) 0.8000000 0.000000
X( 8) 0.8000000 0.000000
X( 9) 0.8000000 0.000000
X( 10) 0.8000000 0.000000
X( 11) 0.8000000 0.000000
X( 12) 0.8000000 0.000000
X( 13) 0.8000000 0.000000
X( 14) 0.8466667 0.000000
X( 15) 0.8000000 0.000000
X( 16) 0.8000000 0.000000
X( 17) 0.8000000 0.000000
X( 18) 0.8000000 0.000000
X( 19) 0.8000000 0.000000
X( 20) 0.8000000 0.000000
X( 21) 0.8000000 0.000000
X( 22) 0.8000000 0.000000
X( 23) 0.8000000 0.000000
X( 24) 0.9000000 0.000000
X( 25) 0.8000000 0.000000
X( 26) 0.8000000 0.000000
X( 27) 0.8000000 0.000000
X( 28) 0.9000000 0.000000
X( 29) 0.8000000 0.000000
X( 30) 0.8000000 0.000000
X( 31) 0.8000000 0.000000
X( 32) 0.9000000 0.000000
X( 33) 0.8000000 0.000000
X( 34) 0.8000000 0.000000
X( 35) 0.8000000 0.000000
X( 36) 0.9000000 0.000000
X( 37) 0.8000000 0.000000
X( 38) 0.8000000 0.000000
X( 39) 0.9000000 0.000000
X( 40) 0.9000000 0.000000
X( 41) 0.8000000 0.000000
X( 42) 0.8000000 0.000000
X( 43) 0.8000000 0.000000
X( 44) 0.8000000 0.000000
X( 45) 0.8000000 0.000000
Y( 1) 0.7600000 0.000000
Y( 2) 0.7600000 0.000000
Y( 3) 0.7600000 0.000000
Y( 4) 0.7600000 0.000000
Y( 5) 0.7600000 0.000000
Y( 6) 0.7600000 0.000000
Y( 7) 0.7600000 0.000000
Y( 8) 0.7600000 0.000000
Y( 9) 0.7600000 0.000000
Y( 10) 0.7600000 0.000000
Y( 11) 0.7600000 0.000000
Y( 12) 0.7600000 0.000000
Y( 13) 0.7600000 0.000000
Y( 14) 0.8043333 0.000000
Y( 15) 0.7600000 0.000000
Y( 16) 0.7600000 0.000000
Y( 17) 0.7600000 0.000000
Y( 18) 0.7600000 0.000000
Y( 19) 0.7600000 0.000000
Y( 20) 0.7600000 0.000000
Y( 21) 0.7600000 0.000000
Y( 22) 0.7600000 0.000000
Y( 23) 0.7600000 0.000000
Y( 24) 0.8550000 0.000000
Y( 25) 0.7600000 0.000000
Y( 26) 0.7600000 0.000000
Y( 27) 0.7600000 0.000000
Y( 28) 0.8550000 0.000000
Y( 29) 0.7600000 0.000000
Y( 30) 0.7600000 0.000000
Y( 31) 0.7600000 0.000000
Y( 32) 0.8550000 0.000000
Y( 33) 0.7600000 0.000000
Y( 34) 0.7600000 0.000000
Y( 35) 0.7600000 0.000000
Y( 36) 0.8550000 0.000000
Y( 37) 0.7600000 0.000000
Y( 38) 0.7600000 0.000000
Y( 39) 0.8550000 0.000000
Y( 40) 0.8550000 0.000000
Y( 41) 0.7600000 0.000000
Y( 42) 0.7600000 0.000000
Y( 43) 0.7600000 0.000000
Y( 44) 0.7600000 0.000000
Y( 45) 0.7600000 0.000000