为什么用LINGO软件求解线性规划和整数规划问题时不会出错,而在求解非线性问题是总是有问题???

2024-11-24 09:56:05
推荐回答(1个)
回答1:

MIN = 200 *D1 + 150 *D2 + 200 *D3 + 300 *D4;
D1 =( ( X - 5 ) ^ 2 + ( Y - 10 ) ^ 2 ) ^ 0.5;
D2 =((X-10)^2+(Y-5)^2)^0.5;
D3 =(X^2+(Y-12)^2)^0.5;
D4 =((X-12)^2+Y^2)^0.5;

运行结果:

Global optimal solution found.
Objective value: 5456.540
Objective bound: 5456.535
Infeasibilities: 0.2220446E-15
Extended solver steps: 140
Total solver iterations: 29710

Variable Value Reduced Cost
D1 6.582233 0.000000
D2 0.6864352 0.000000
D3 11.63411 0.000000
D4 5.701016 0.000000
X 9.314165 0.000000
Y 5.028705 0.2379409E-08

Row Slack or Surplus Dual Price
1 5456.540 -1.000000
2 0.000000 -200.0000
3 0.000000 -150.0000
4 0.000000 -200.0000
5 0.000000 -300.0000