CPXXgetstat and CPXgetstat

The routine CPXXgetstat/CPXgetstat accesses the solution status of the problem after an LP, QP, QCP, or MIP optimization, after CPXXfeasopt/CPXfeasopt and its extensions, after CPXXrefineconflict/CPXrefineconflict and its extensions.

int  CPXXgetstat( CPXCENVptr env, CPXCLPptr lp )

int  CPXgetstat( CPXCENVptr env, CPXCLPptr lp )

Description

The routine CPXXgetstat/CPXgetstat accesses the solution status of the problem after an LP, QP, QCP, or MIP optimization, after CPXXfeasopt and CPXfeasopt and its extensions, after CPXXrefineconflict and CPXrefineconflict and its extensions.

Arguments

env
A pointer to the CPLEX environment as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp
A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.

Return

The routine returns the solution status of the most recent optimization performed on the CPLEX problem object.

A return value of 0 (zero) specifies either an error condition or that a change to the most recently optimized problem may have invalidated the solution status.

For status code 6, CPX_STAT_NUM_BEST, the algorithm could not converge to the requested tolerances due to numeric difficulties.

Other return values are shown in Solution Status Symbols in the CPLEX Callable Library (C API).

The best solution found can be retrieved by the routine CPXXsolution and CPXsolution. Similarly, when an abort status is returned, the last solution computed before the algorithm aborted can be retrieved by CPXXsolution/CPXsolution.

Use the query routines CPXXsolninfo and CPXsolninfo and CPXXsolution/CPXsolution to obtain further information about the current solution of an LP, QP, or QCP.

Example


lpstat = CPXgetstat (env, lp);