Evaluating solution quality

These symbolic values or fields represent measures of the quality of a solution.

This table documents the measures of the quality of a solution that CPLEX provides. Some specify characteristics of a solution; some indicate the accuracy of a solution.
  • A new row defines a measure of the quality of a solution.
  • Under that row, the first column offers a link to the reference documentation in the Callable Library (C API). The link in that column leads to a page of documentation for that measure of the quality of a solution. That documentation also shows names of the measure in other APIs. For some measures, that documentation also shows how CPLEX calculates the measure.
  • The second column shows the name in the Python API.
  • The third column shows the name in the C++ API.
  • The fourth column shows the name in the Java API.

For special considerations about the information available from the solution of a mixed integer programming (MIP) model, see the topic Accessing information about the MIP solution in the CPLEX User's Manual. See also the topic MIP kappa: detecting and coping with ill-conditioned MIP models.

For a definition of MIP kappa and documentation of the parameter that tells CPLEX whether to calculate kappa, the condition number of optimal bases that CPLEX encounters during its solution of a mixed integer program (MIP), see MIP kappa computation in the CPLEX Parameters Reference Manual.

For special considerations about the information available from the solution of a model solved by the barrier optimizer, see the topic Understanding solution quality from the barrier LP optimizer in the CPLEX User's Manual.

Python For syntactic details about accessing the quality of a solution in the Python API, see the topic Querying solution information in the Python API.

C++ For syntactic details about accessing the quality of a solution in the C++ API, see the topics Accessing solution information, especially Performing sensitivity analysis in the CPLEX User's Manual.

Java For syntactic details about accessing the quality of a solution in the Java API, see the topics Accessing solution information and More solution information in the CPLEX User's Manual.

.NET Names of classes, methods, and symbolic constants in the C#.NET API correspond very closely to those in the Java API with these systematic exceptions:
  • In the Java API, the names of classes begin with the prefix Ilo, whereas in C#.NET they do not.
  • In the Java API, the names of methods conventionally begin with a lowercase letter, for example, addCols, whereas in the C#.NET API, the names of methods conventionally begin with an uppercase (that is, capital) letter, for example, AddCols according to Microsoft practice.
Interactive Optimizer After CPLEX has found a solution, the display solution command followed by one of these measures as an option shows that solution quality measure for that solved problem. For example:

display solution quality
or

display solution kappa
C API symbol Python API class variable C++ API enumeration Java API field

To access the objective value relative to the dual barrier solution.

This feature is available only for a barrier solution.

CPX_DUAL_OBJ dual_objective IloCplex::Quality::DualObj IloCplex.QualityType.DualObj

To access the exact condition number of the scaled basis matrix.

This feature is available only for a simplex solution.

CPX_EXACT_KAPPA exact_kappa IloCplex::Quality::ExactKappa IloCplex.QualityType.ExactKappa

To access the estimated condition number of the scaled basis matrix.

This feature is available only for a simplex solution.

CPX_KAPPA kappa IloCplex::Quality::Kappa IloCplex.QualityType.Kappa

To access a score of numerical difficulties for a CPLEX MIP solve. The score is an aggregate of the fractions of ill-posed, unstable, and suspicious-looking bases encountered during branch-and-cut.

This feature is available only for simplex-based algorithms when the MIP kappa stats parameter is set and after CPLEX has processed at least one LP-basis during the solve.

CPX_KAPPA_ATTENTION kappa_attention IloCplex::Quality::KappaAttention IloCplex.QualityType.KappaAttention

To access the percentage of numerically ill-posed simplex bases (condition number greater than 1e+14) among simplex bases encountered during a solve.

This feature is available only for simplex-based algorithms when the MIP kappa stats parameter is set and after CPLEX has processed at least one LP-basis during the solve.

CPX_KAPPA_ILLPOSED kappa_illposed IloCplex::Quality::KappaIllposed IloCplex.QualityType.KappaIllposed

To access the highest condition number encountered during a MIP solve.

This feature is available only for simplex-based algorithms when the MIP kappa stats parameter is set and after CPLEX has processed at least one LP-basis during the solve.

CPX_KAPPA_MAX kappa_max IloCplex::Quality::KappaMax IloCplex.QualityType.KappaMax

To access the percentage of numerically stable simplex bases (condition number less than 1e+7) among simplex bases encountered during a MIP solve.

This feature is available only for simplex-based algorithms when the MIP kappa stats parameter is set and after CPLEX has processed at least one LP-basis during the solve.

CPX_KAPPA_STABLE kappa_stable IloCplex::Quality::KappaStable IloCplex.QualityType.KappaStable

To access the percentage of numerically suspicious simplex bases (condition number between 1e+7 and 1e+10) among simplex bases encountered during a MIP solve.

This feature is available only for simplex-based algorithms when the MIP kappa stats parameter is set and after CPLEX has processed at least one LP-basis during the solve.

CPX_KAPPA_SUSPICIOUS kappa_suspicious IloCplex::Quality::KappaSuspicious IloCplex.QualityType.KappaSuspicious

To access the percentage of numerically unstable simplex bases (condition number between 1e+10 and 1e+14) among simplex bases encountered during a MIP solve.

This feature is available only for simplex-based algorithms when the MIP kappa stats parameter is set and after CPLEX has processed at least one LP-basis during the solve.

CPX_KAPPA_UNSTABLE kappa_unstable IloCplex::Quality::KappaUnstable IloCplex.QualityType.KappaUnstable

double: To access the maximum violation of the complementary slackness conditions for the unscaled problem.

integer: To access the lowest index of a row or column with the largest violation of the complementary slackness conditions. An index (such as *quality_p) strictly less than zero denotes row (-i-1) or the slack variable for that row, in the case of columns.

This feature is available only for a barrier solution.

CPX_MAX_COMP_SLACK max_comp_slack IloCplex::Quality::MaxCompSlack IloCplex.QualityType.MaxCompSlack

double: To access the maximum of dual infeasibility or, equivalently, the maximum reduced-cost infeasibility for the unscaled problem

integer: To access the lowest index where the maximum dual infeasibility occurs for the unscaled problem

CPX_MAX_DUAL_INFEAS max_dual_infeasibility IloCplex::Quality::MaxDualInfeas IloCplex.QualityType.MaxDualInfeas

double: To access maximum dual residual value. For a simplex solution, this is the maximum of the vector |c-B'pi|, and for a barrier solution, it is the maximum of the vector |A'pi+rc-c| for the unscaled problem

integer: To access the lowest index where the maximum dual residual occurs for the unscaled problem

CPX_MAX_DUAL_RESIDUAL max_dual_residual IloCplex::Quality::MaxDualResidual IloCplex.QualityType.MaxDualResidual

double: To access the maximum infeasibility of the indicator constraints, or equivalently, the maximum bound violation of the indicator constraint slacks.

integer: To access the lowest index of the indicator constraints where the maximum indicator slack infeasibility occurs.

Can use a supplied primal solution

CPX_MAX_INDSLACK_INFEAS max_indicator_slack_infeasibility not applicable: CPLEX C++ does not distinguish indicator constraints from linear constraints in this respect. not applicable: CPLEX Java does not distinguish indicator constraints from linear constraints in this respect.

double: To access the maximum of integer infeasibility for the unscaled problem.

integer: To access the lowest index where the maximum integer infeasibility occurs for the unscaled problem.

Can use a supplied primal solution

CPX_MAX_INT_INFEAS max_int_infeasibility IloCplex::Quality::MaxIntInfeas IloCplex.QualityType.MaxIntInfeas

double: To access the maximum absolute value in the dual solution vector for the unscaled problem

integer: To access the lowest index where the maximum pi value occurs for the unscaled problem

CPX_MAX_PI max_pi IloCplex::Quality::MaxPi IloCplex.QualityType.MaxPi

double: To access the maximum primal infeasibility or, equivalently, the maximum bound violation including slacks for the unscaled problem.

integer: To access the lowest index of a column or row where the maximum primal infeasibility occurs for the unscaled problem. An index (such as *quality_p) strictly less than zero specifies that the maximum occurs at the slack variable for row (-i-1).

Can use a supplied primal solution

CPX_MAX_PRIMAL_INFEAS max_primal_infeasibility IloCplex::Quality::MaxPrimalInfeas IloCplex.QualityType.MaxPrimalInfeas

double: To access the maximum of the vector |Ax-b| for the unscaled problem.

integer: To access the lowest index where the maximum primal residual occurs for the unscaled problem.

Can use a supplied primal solution

CPX_MAX_PRIMAL_RESIDUAL max_primal_residual IloCplex::Quality::MaxPrimalResidual IloCplex.QualityType.MaxPrimalResidual

double: To access the maximum residual over all the quadratic constraints in the unscaled problem, where the maximum residual is the absolute value of the difference of the lefthand side, including the slack variable, over the righthand side.

integer: To access the lowest index over all the quadratic constraints where the maximum residual occurs in the unscaled problem.

CPX_MAX_QCPRIMAL_RESIDUAL max_quadratic_primal_residual IloCplex::Quality::MaxPrimalResidual does not distinguish quadratic from linear constraints in this respect IloCplex.QualityType.MaxPrimalResidual does not distinguish quadratic from linear constraints in this respect

double: To access the maximum absolute quadratic constraint slack value.

integer: To access the lowest index of the quadratic constraints where the maximum quadratic constraint slack values occurs.

Can use a supplied primal solution.

CPX_MAX_QCSLACK max_quadratic_slack CPLEX C++ does not distinguish quadratic from linear constraints in this respect. CPLEX Java does not distinguish quadratic from linear constraints in this respect.

double: To access the maximum infeasibility of the quadratic constraints, or equivalently, the maximum bound violation of the quadratic constraint slacks.

integer: To access the lowest index of the quadratic constraints where the maximum quadratic slack infeasibility occurs.

Can use a supplied primal solution.

CPX_MAX_QCSLACK_INFEAS max_quadratic_slack_infeasibility CPLEX C++ does not distinguish quadratic from linear constraints in this respect. CPLEX Java does not distinguish quadratic from linear constraints in this respect.

double: To access the maximum absolute reduced cost value for the unscaled problem

integer: To access the lowest index where the maximum reduced cost value occurs for the unscaled problem.

CPX_MAX_RED_COST max_reduced_cost IloCplex::Quality::MaxRedCost IloCplex.QualityType.MaxRedCost

double: To access the maximum of dual infeasibility or, equivalently, the maximum reduced-cost infeasibility for the scaled problem.

integer: To access the lowest index where the maximum dual infeasibility occurs for the scaled problem.

CPX_MAX_SCALED_DUAL_INFEAS max_scaled_dual_infeasibility IloCplex::Quality::MaxScaledDualInfeas IloCplex.QualityType.MaxScaledDualInfeas

double: To access maximum dual residual value for the scaled problem.

integer: To access the lowest index where the maximum dual residual occurs for the scaled problem

CPX_MAX_SCALED_DUAL_RESIDUAL max_scaled_dual_residual IloCplex::Quality::MaxScaledDualResidual IloCplex.QualityType.MaxScaledDualResidual

double: To access the maximum absolute value in the dual solution vector for the scaled problem.

integer: To access the lowest index where the maximum pi value occurs for the scaled problem.

CPX_MAX_SCALED_PI max_scaled_pi IloCplex::Quality::MaxScaledPi IloCplex.QualityType.MaxScaledPi

double: To access the maximum primal infeasibility or, equivalently, the maximum bound violation including slacks for the scaled problem.

integer: To access the lowest index of a column or row where the maximum primal infeasibility occurs for the scaled problem.

Can use a supplied primal solution.

CPX_MAX_SCALED_PRIMAL_INFEAS max_scaled_primal_infeasibility IloCplex::Quality::MaxScaledPrimalInfeas IloCplex.QualityType.MaxScaledPrimalInfeas

double: To access the maximum of the vector |Ax-b| for the scaled problem.

integer: To access the lowest index where the maximum primal residual occurs for the scaled problem.

Can use a supplied primal solution.

CPX_MAX_SCALED_PRIMAL_RESIDUAL max_scaled_primal_residual IloCplex::Quality::MaxScaledPrimalResidual IloCplex.QualityType.MaxScaledPrimalResidual

double: To access the maximum absolute reduced cost value for the scaled problem.

integer: To access the lowest index where the maximum reduced cost value occurs for the scaled problem.

CPX_MAX_SCALED_RED_COST max_scaled_reduced_cost IloCplex::Quality::MaxScaledRedCost IloCplex.QualityType.MaxScaledRedCost

double: To access the maximum absolute slack value for the scaled problem.

integer: To access the lowest index where the maximum slack value occurs for the scaled problem.

Can use a supplied primal solution.

CPX_MAX_SCALED_SLACK max_scaled_slack IloCplex::Quality::MaxScaledSlack IloCplex.QualityType.MaxScaledSlack

double: To access the maximum absolute value in the primal solution vector for the scaled problem.

integer: To access the lowest index where the maximum x value occurs for the scaled problem.

Can use a supplied primal solution.

CPX_MAX_SCALED_X maz_scaled_x IloCplex::Quality::MaxScaledX IloCplex.QualityType.MaxScaledX

double: To access the maximum absolute slack value for the unscaled problem.

integer: To access the lowest index where the maximum slack value occurs for the unscaled problem.

Can use a supplied primal solution.

CPX_MAX_SLACK max_slack IloCplex::Quality::MaxSlack IloCplex.QualityType.MaxSlack

double: To access the maximum absolute value in the primal solution vector for the unscaled problem.

integer: To access the lowest index where the maximum x value occurs for the unscaled problem.

Can use a supplied primal solution.

CPX_MAX_X max_x IloCplex::Quality::MaxX IloCplex.QualityType.MaxX

To access the objective value gap between the primal and dual objective value solution.

This feature is available only for a barrier solution.

CPX_OBJ_GAP objective_gap IloCplex::Quality::ObjGap IloCplex.QualityType.ObjGap

To access the objective value relative to the primal barrier solution.

This feature is available only for a barrier solution.

CPX_PRIMAL_OBJ primal_objective IloCplex::Quality::PrimalObj IloCplex.QualityType.PrimalObj

To access the sum of the violations of the complementary slackness conditions for the unscaled problem.

This feature is available only for a barrier solution.

CPX_SUM_COMP_SLACK sum_comp_slack IloCplex::Quality::SumCompSlack IloCplex.QualityType.SumCompSlack

To access the sum of dual infeasibilities or, equivalently, the sum of reduced-cost bound violations for the unscaled problem.

CPX_SUM_DUAL_INFEAS sum_dual_infeasibilities IloCplex::Quality::SumDualInfeas IloCplex.QualityType.SumDualInfeas

To access the sum of the absolute values of the dual residual vector for the unscaled problem.

CPX_SUM_DUAL_RESIDUAL sum_dual_residual IloCplex::Quality::SumDualResidual IloCplex.QualityType.SumDualResidual

To access the sum of the infeasibilities of the indicator constraints.

Can use a supplied primal solution.

CPX_SUM_INDSLACK_INFEAS sum_indicator_slack_infeasibility CPLEX C++ does not distinguish indicator constraints from linear constraints in this respect. CPLEX Java does not distinguish indicator constraints from linear constraints in this respect.

To access the sum of integer infeasibilities for the unscaled problem.

Can use a supplied primal solution.

CPX_SUM_INT_INFEAS sum_integer_infeasibilities IloCplex::Quality::SumIntInfeas IloCplex.QualityType.SumIntInfeas

To access the sum of the absolute values in the dual solution vector for the unscaled problem.

CPX_SUM_PI sum_pi IloCplex::Quality::SumPi IloCplex.QualityType.SumPi

To access the sum of primal infeasibilities or, equivalently, the sum of bound violations for the unscaled problem.

Can use a supplied primal solution.

CPX_SUM_PRIMAL_INFEAS sum_primal_infeasibilities IloCplex::Quality::SumPrimalInfeas IloCplex.QualityType.SumPrimalInfeas

To access the sum of the elements of vector |Ax-b| for the unscaled problem.

Can use a supplied primal solution.

CPX_SUM_PRIMAL_RESIDUAL sum_primal_residual IloCplex::Quality::SumPrimalResidual IloCplex.QualityType.SumPrimalResidual

To access the sum of the residuals |x'Qx + dx - f| for the unscaled quadratic constraints.

CPX_SUM_QCPRIMAL_RESIDUAL sum_quadratic_primal_residual CPLEX C++ does not distinguish quadratic constraints from linear constraints in this respect. CPLEX Java does not distinguish quadratic constraints from linear constraints in this respect.

To access the sum of the absolute quadratic constraint slack values.

Can use a supplied primal solution.

CPX_SUM_QCSLACK sum_quadratic_slack CPLEX C++ does not distinguish quadratic constraints from linear constraints in this respect. CPLEX Java does not distinguish quadratic constraints from linear constraints in this respect.

To access the sum of the infeasibilities of the quadratic constraints.

Can use a supplied primal solution.

CPX_SUM_QCSLACK_INFEAS sum_quadratic_slack_infeasibility CPLEX C++ does not distinguish quadratic from linear constraints in this respect. CPLEX Java does not distinguish quadratic from linear constraints in this respect.

To access the sum of the absolute reduced cost values for the unscaled problem.

CPX_SUM_RED_COST sum_reduced_cost IloCplex::Quality::SumRedCost IloCplex.QualityType.SumRedCost

To access the sum of dual infeasibilities or, equivalently, the sum of reduced-cost bound violations for the scaled problem.

CPX_SUM_SCALED_DUAL_INFEAS sum_scaled_dual_infeasibilities IloCplex::Quality::SumScaledDualInfeas IloCplex.QualityType.SumScaledDualInfeas

To access the sum of the absolute values of the dual residual vector for the scaled problem.

CPX_SUM_SCALED_DUAL_RESIDUAL sum_scaled_dual_residual IloCplex::Quality::SumScaledDualResidual IloCplex.QualityType.SumScaledDualResidual

To access the sum of the absolute values in the dual solution vector for the scaled problem.

CPX_SUM_SCALED_PI sum_scaled_pi IloCplex::Quality::SumScaledPi IloCplex.QualityType.SumScaledPi

To access the sum of primal infeasibilities or, equivalently, the sum of bound violations for the scaled problem.

Can use a supplied primal solution.

CPX_SUM_SCALED_PRIMAL_INFEAS sum_scaled_primal_infeasibilities IloCplex::Quality::SumScaledPrimalInfeas IloCplex.QualityType.SumScaledPrimalInfeas

To access the sum of the elements of vector |Ax-b| for the scaled problem.

Can use a supplied primal solution.

CPX_SUM_SCALED_PRIMAL_RESIDUAL sum_scaled_primal_residual IloCplex::Quality::SumScaledPrimalResidual IloCplex.QualityType.SumScaledPrimalResidual

To access the sum of the absolute reduced cost values for the scaled problem.

CPX_SUM_SCALED_RED_COST sum_scaled_reduced_cost IloCplex::Quality::SumScaledRedCost IloCplex.QualityType.SumScaledRedCost

To access the sum of the absolute slack values for the scaled problem.

Can use a supplied primal solution.

CPX_SUM_SCALED_SLACK sum_scaled_slack IloCplex::Quality::SumScaledSlack IloCplex.QualityType.SumScaledSlack

To access the sum of the absolute values in the primal solution vector for the scaled problem.

Can use a supplied primal solution.

CPX_SUM_SCALED_X sum_scaled_x IloCplex::Quality::SumScaledX IloCplex.QualityType.SumScaledX

To access the sum of the absolute slack values for the unscaled problem.

Can use a supplied primal solution.

CPX_SUM_SLACK sum_slack IloCplex::Quality::SumSlack IloCplex.QualityType.SumSlack

To access the sum of the absolute values in the primal solution vector for the unscaled problem.

Can use a supplied primal solution.

CPX_SUM_X sum_x IloCplex::Quality::SumX IloCplex.QualityType.SumX