8.5.3. 优化结果码

表示优化求解后,求解结果的状态。

8.5.3.1. C/C++

结果码

结果状态

中文说明

英文说明

0

MDO_UNKNOWN

模型的状态无法获取

Model status is not available.

1

MDO_OPTIMAL

模型被证明是原始/对偶可行的,并且有最优解

Model was proven to be primal/dual feasible, and an optimal solution is available.

2

MDO_INFEASIBLE

模型被证明是原始不可行的。

Model was proven to be primal infeasible.

3

MDO_UNBOUNDED

模型被证明是原始无界的。

Model was proven to be primal unbounded.

4

MDO_INF_OR_UBD

模型被证明是原始不可行的或原始无界的。

Model was proven to be either primal infeasible or primal unbounded.

5

MDO_SUB_OPTIMAL

一个次优的解决方案是可用的。

A sub-optimal solution is available.

8.5.3.2. Python

优化结果码及其说明可以通过以下方式获得:

status_code, status_msg = model.get_status()