7.4.3. 优化结果码

7.4.3.1. C/C++

Solution code, solution status, 和状态信息

Solution code

Solution status

Description

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.

7.4.3.2. Python

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

status_code, status_msg = model.get_status()