CPXXgetdblquality and CPXgetdblquality
The routine CPXXgetdblquality/CPXgetdblquality accesses
double-valued information about the quality of the current solution of a
problem.
int CPXXgetdblquality( CPXCENVptr env, CPXCLPptr lp, double * quality_p, int what )
int CPXgetdblquality( CPXCENVptr env, CPXCLPptr lp, double * quality_p, int what )
Description
The routine CPXXgetdblquality/CPXgetdblquality accesses
double-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 maximum bound infeasibility identifies the largest bound violation. Largest bound violation may help determine the cause of an infeasible problem. If the largest bound violation exceeds the feasibility tolerance by only a small amount, it may be possible to obtain a feasible solution to the problem by increasing the feasibility tolerance. If a problem is optimal, the largest bound violation gives insight into the smallest setting for the feasibility tolerance that would not cause the problem to terminate infeasibly.
The quality values are returned in
the double variable 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 the
CPXXopenCPLEX/CPXopenCPLEXroutine. - lp
-
A pointer to a CPLEX problem object as returned by
CPXXcreateprob/CPXcreateprob. - quality_p
-
A pointer to a
doublevariable in which the requested quality value is to be stored. If an error occurs, the quality-value remains unchanged. - what
- A symbolic constant specifying the quality value to be retrieved. The possible quality values for a solution are listed in Solution Quality Symbols the CPLEX Callable Library (C API) in the Callable Library Reference Manual.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs. If an error occurs, the quality-value remains unchanged.
Example
status = CPXgetdblquality (env, lp, &max_x, CPX_MAX_X);