求大神解答一下 英语太差 看不懂 这是lingo代码 5
MODEL:min=x1+x2+x3+x4+x5+x6;x1+x6>=60;x1+x2>=70;x2+x3>=60;x3+x4>=50;x4+x5>=20;x5+x6>=...
MODEL:min=x1+x2+x3+x4+x5+x6;x1+x6>=60;x1+x2>=70;x2+x3>=60;x3+x4>=50;x4+x5>=20;x5+x6>=30;x1>=60;END
展开
1个回答
展开全部
输入法有问题,略作更改就能运行:
MODEL:
min=x1+x2+x3+x4+x5+x6;
x1+x6>=60;
x1+x2>=70;
x2+x3>=60;
x3+x4>=50;
x4+x5>=20;
x5+x6>=30;
x1>=60;
END
运行结果:
Global optimal solution found.
Objective value: 150.0000
Infeasibilities: 0.000000
Total solver iterations: 3
Model Class: LP
Total variables: 6
Nonlinear variables: 0
Integer variables: 0
Total constraints: 8
Nonlinear constraints: 0
Total nonzeros: 19
Nonlinear nonzeros: 0
Variable Value Reduced Cost
X1 60.00000 0.000000
X2 10.00000 0.000000
X3 50.00000 0.000000
X4 0.000000 1.000000
X5 30.00000 0.000000
X6 0.000000 0.000000
Row Slack or Surplus Dual Price
1 150.0000 -1.000000
2 0.000000 0.000000
3 0.000000 0.000000
4 0.000000 -1.000000
5 0.000000 0.000000
6 10.00000 0.000000
7 0.000000 -1.000000
8 0.000000 -1.000000
MODEL:
min=x1+x2+x3+x4+x5+x6;
x1+x6>=60;
x1+x2>=70;
x2+x3>=60;
x3+x4>=50;
x4+x5>=20;
x5+x6>=30;
x1>=60;
END
运行结果:
Global optimal solution found.
Objective value: 150.0000
Infeasibilities: 0.000000
Total solver iterations: 3
Model Class: LP
Total variables: 6
Nonlinear variables: 0
Integer variables: 0
Total constraints: 8
Nonlinear constraints: 0
Total nonzeros: 19
Nonlinear nonzeros: 0
Variable Value Reduced Cost
X1 60.00000 0.000000
X2 10.00000 0.000000
X3 50.00000 0.000000
X4 0.000000 1.000000
X5 30.00000 0.000000
X6 0.000000 0.000000
Row Slack or Surplus Dual Price
1 150.0000 -1.000000
2 0.000000 0.000000
3 0.000000 0.000000
4 0.000000 -1.000000
5 0.000000 0.000000
6 10.00000 0.000000
7 0.000000 -1.000000
8 0.000000 -1.000000
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询