lingo这样写
min=0.4*x1+1.5*x2+1*x3+1.3*x4;
0.3*x1+3*x2 +1.5*x4>=320;
0.5*x1+2*x3+1*x4 >=240;
1.4*x1+0.7*x4>=420;
min 0.4x1+1.5x2+x3+1.3x4
st 0.3x1+3x2 + +1.5x4>=320
0.5x1+ +2x3+x4 >=240
1.4x1+ +0.7x4>=420
这个一定能运行
结果为:
Global optimal solution found.
Objective value: 280.0000
Infeasibilities: 0.000000
Total solver iterations: 3
Variable Value Reduced Cost
X1 300.0000 0.000000
X2 76.66667 0.000000
X3 45.00000 0.000000
X4 0.000000 0.5000000E-01
Row Slack or Surplus Dual Price
1 280.0000 -1.000000
2 0.000000 -0.5000000
3 0.000000 -0.5000000
4 0.000000 0.000000