LINGO9 程序总出错 求告知哪错了~!!!!
发布网友
发布时间:2023-11-23 07:24
我来回答
共1个回答
热心网友
时间:2024-12-03 01:25
你是lindo的程序,若改为lingo程序,即,乘号不能省略,每行以分号结束,min后跟等号。程序为:
min = 5*x1+5*x2+8*x3+2*x4+6*x5+3*x6;
0.45*x1+0.45*x2+1.05*x3+0.4*x4+0.5*x5+0.5*x6>6;
10*x1+28*x2+59*x3+25*x4+22*x5+75*x6>25;
415*x1+9065*x2+2550*x3+75*x4+22*x5+75*x6>17500;
8*x1+3*x2+53*x3+27*x4+5*x5+8*x6>245;
0.3*x1+0.35*x2+0.6*x3+0.15*x4+0.25*x5+0.8*x6>5;
x1+x2+x3+x4+x5+x6=140;
x1<40;
x2<40;
x3<40;
x4<20;
x5<40;
x6<40;
结果是:
Global optimal solution found.
Objective value: 560.0000
Infeasibilities: 0.000000
Total solver iterations: 1
Variable Value Reced Cost
X1 40.00000 0.000000
X2 40.00000 0.000000
X3 0.000000 3.000000
X4 20.00000 0.000000
X5 0.000000 1.000000
X6 40.00000 0.000000
Row Slack or Surplus Dual Price
1 560.0000 -1.000000
2 58.00000 0.000000
3 4995.000 0.000000
4 366200.0 0.000000
5 1055.000 0.000000
6 56.00000 0.000000
7 0.000000 -5.000000
8 0.000000 0.000000
9 0.000000 0.000000
10 40.00000 0.000000
11 0.000000 3.000000
12 40.00000 0.000000
13 0.000000 2.000000