CPXXgetintquality and CPXgetintquality
The routine CPXXgetintquality/CPXgetintquality accesses
integer-valued information about the quality of the current solution of a
problem.
int CPXXgetintquality( CPXCENVptr env, CPXCLPptr lp, CPXDIM * quality_p, int what )
int CPXgetintquality( CPXCENVptr env, CPXCLPptr lp, int * quality_p, int what )
Description
The routine CPXXgetintquality/CPXgetintquality accesses
integer-valued information about the quality of the current solution of a
problem.
A solution, though not necessarily a feasible or optimal one, must be available in the CPLEX problem object for any quality measure except kappa statistics. You can query kappa statistics in the absence of a solution, but these conditions must hold:
- The subproblems must be solved with a simplex optimizer.
-
The parameter
MIP kappa computation
(also known as
MIPKappaStatsorCPXPARAM_MIP_Strategy_KappaStats) must be turned on. - CPLEX has already processed at least one LP-basis during branch-and-cut.
Otherwise, CPLEX returns the error CPXERR_NO_KAPPASTATS
specifying that no kappa statistics are available.
The quality values are returned in the variable
int pointed to by the argument
quality_p.
For documentation of the quality symbols, see Solution Quality Symbols the CPLEX Callable Library (C API), which lists the symbols with links to further documentation of each one in the Callable Library (C API) Reference Manual..
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. - quality_p
- A pointer to an integer variable in which the requested quality value is to be stored.
- what
- A symbolic constant specifying the quality value to be retrieved.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.
Example
status = CPXgetintquality (env, lp, &max_x_ind, CPX_MAX_X);