数学建模社区-数学中国
标题:
lingo运行时出了点错误
[打印本页]
作者:
mezhaoyun
时间:
2009-8-15 11:19
标题:
lingo运行时出了点错误
max=(1.25-0.25)*(x11+x12+x13+x14+x15+x16)+(2.00-0.35)*(x21+x22)+(2.80-0.50)*x31-300/6000*(5*(x11+x12+x13)+10*x21)-321/1000*(7*(x14+x15+x16)+9*x22+12*x31)-250/4000*(6*(x11+x14)+8*(x21+x22))-783/7000*(4*(x12+x15)+11*x31)-200/4000*7*(x13+x16);
5*(x11+x12+x13)+10*x21<=6000;
7*(x14+x15+x16)+9*x22+12*x31<=10000;
6*(x11+x14)+8*(x21+x22)<=4000;
4*(x12+x15)+11*x31<=7000;
@gin(x11);@gin(x12);@gin(x13);@gin(x14); @gin(x15);
@gin(x16); @gin(x21); @gin(x22); @gin(x31);
上面是程序
下面是运行结果:
Global optimal solution found.
Objective value: 480.0000
Objective bound: 480.0000
Infeasibilities: 0.000000
Extended solver steps: 0
Total solver iterations: 2
Variable Value Reduced Cost
X11 0.000000 -0.3750000
X12 0.000000 -0.3025714
X13 1200.000 -0.4000000
X14 0.000000 1.622000
X15 0.000000 1.694429
X16 0.000000 1.597000
X21 0.000000 -0.6500000
X22 0.000000 1.739000
X31 0.000000 2.782429
Row Slack or Surplus Dual Price
1 480.0000 1.000000
2 0.000000 0.000000
3 10000.00 0.000000
4 4000.000 0.000000
5 7000.000 0.000000
运行结果与书籍中运行结果得不一样,关于程序我已经仔细检查过。
书中的运行结果(只列出相关非零部分):
variable value Reduced cost
x12 629 -0.3025714
x13 571 -0.4000000
x15 230 -0.3278714
x22 500 -0.8611000
x31 324 -0.6843714
value不一样,Reduced cost 一样
还请高手多多指教,不胜感激。。
x22 500
x31 324
作者:
追梦者
时间:
2009-8-15 11:49
建议您再跟题目校对一下,因为运行时没出错。那些数字一个不一样就千差万别O(∩_∩)O~
作者:
mezhaoyun
时间:
2009-8-17 08:54
2#
追梦者
谢谢关注啊
欢迎光临 数学建模社区-数学中国 (http://www.madio.net/)
Powered by Discuz! X2.5