Accessing solution status
Describes the status of a solution.
Calling solve returns
a Boolean value that specifies whether or not a feasible solution
(but not necessarily the optimal one) has been found. To obtain more
of the information about the model that CPLEX found during the call
to the
solve method, call the method getStatus.
It returns a member of the nested enumeration IloAlgorithm_Status.
The fully qualified names of those symbols have the IloAlgorithm
prefix. The table Table 1 shows what each return status means for the extracted
model.| Return Status | Extracted Model |
|---|---|
Feasible
|
has been proven to be feasible. A feasible solution can be queried. |
Optimal
|
has been solved to optimality. The optimal solution can be queried. |
Infeasible
|
has been proven to be infeasible. |
Unbounded
|
has been proven to be unbounded. The notion of unboundedness
adopted by IloCplex does not include that
the model has been proven to be feasible. Instead, what has been proven
is that if there is a feasible solution with objective value x*, there
exists a feasible solution with objective value x*-1 for a minimization
problem, or x*+1 for a maximization problem. |
InfeasibleOrUnbounded
|
has been proven to be infeasible or unbounded. |
Unknown
|
has not been able to be processed far enough to prove anything about the model. A common reason may be that a time limit was hit. |
Error
|
has not been able to be processed or an error occurred during the optimization. |
As you see, these statuses indicate information about the model that the CPLEX optimizer was able to prove during the most recent call to the method solve.
In addition, the CPLEX optimizer provides information
about how it terminated. For example, it may have terminated with
only a feasible but not optimal solution because it hit a limit or
because a user callback terminated the optimization. Further information
is accessible by calling solution query routines, such as the method getCplexStatus,
which returns a member of the nested enumeration type IloCplex::CplexStatus,
or methods cplex.isPrimalFeasible or cplex.isDualFeasible.
For more information about those status codes, see the CPLEX Reference Manual.