lingo error code 11
发布网友
发布时间:2022-05-29 22:35
我来回答
共1个回答
热心网友
时间:2024-12-02 18:47
添加Model和end进去,
MODEL:
MAX=x1-x2;
a*(x1-x2)+b*x2<=1.1;
b*(x1-x2)+a*x2<=1.1;
(x1-x2)*x2<=1.21;
a=0.3;
b=0.24;
x1>0;
x2>0;
@GIN(x1);
@GIN(x2);
END
运行结果为:
Local optimal solution found.
Objective value: 3.000000
Objective bound: 3.000000
Infeasibilities: 0.000000
Extended solver steps: 0
Total solver iterations: 34
Model Class: PINLP
Total variables: 2
Nonlinear variables: 2
Integer variables: 2
Total constraints: 6
Nonlinear constraints: 1
Total nonzeros: 10
Nonlinear nonzeros: 2
Variable Value Reced Cost
X1 3.000000 -1.000000
X2 0.000000 0.000000
A 0.3000000 0.000000
B 0.2400000 0.000000
Row Slack or Surplus Dual Price
1 3.000000 1.000000
2 0.2000000 0.000000
3 0.3800000 0.000000
4 1.210000 0.000000
5 0.000000 0.000000
6 0.000000 0.000000
7 3.000000 0.000000
8 0.000000 -1.000000