Slightly infeasible integer variables

Describes remedies for slightly infeasible integer variables.

On some models, the integer solution returned by CPLEX at default settings may contain solution values for the discrete variables that violate integrality by a small amount. The integrality tolerance parameter (EpInt, CPX_PARAM_EPINT) has a default value of 1e-5, which means that any discrete variable that violates integrality by no more than this amount will not be branched upon for resolution. For most model formulations, this situation is satisfactory and avoids branching that may be essentially meaningless, only consuming additional computing time.

However, some formulations combine discrete and continuous variables, for example, involving constraint coefficients over a million in magnitude, where even a small integrality violation can be magnified elsewhere in the model. In such situations, you may attempt to address this variation by tightening the simplex feasibility tolerance (EpRHS, CPX_PARAM_EPRHS) from its default value to its minimum; also tighten EpInt to a similar value, and re-run the MIP optimization from the beginning.

Tip:

If you restart CPLEX from a previously optimal or infeasible solution and use reduced tolerance without making any other change to the problem, the previous solution status remains valid. Consequently, no iterations will occur because parameter settings (such as this reduced tolerance) are part of the environment in which CPLEX operates, rather than part of a solution to one of possibly multiple models in that environment. In other words, changing parameters does not alter the solution status, but changing the model does. You can make CPLEX restart the optimization using new tolerances by making a superfluous change in the model, for example, by resetting the bound on a variable to its existing value.

If this adjustment is insufficient to give satisfactory results, you can also try setting EpInt all the way to zero, preferably in conjunction with a tightened EpRHS setting. This very tight integrality tolerance directs CPLEX to attempt to branch on any integer infeasibility, no matter how small. Numeric round-off due to floating-point arithmetic on any computer may make it impossible to achieve this tolerance, but in practice, the setting achieves its aim in many models and reduces the integrality violations in many others. In cases where the integrality violation even after branching remains above EpInt or is above 1e-10 when EpInt has been set to a value smaller than that, a solution status returned will be CPX_STAT_OPTIMAL_INFEAS instead of the usual CPX_STAT_OPTIMAL. In most cases a solution with status CPX_STAT_OPTIMAL_INFEAS will be satisfactory, and reflects only round-off error after presolve uncrush, but extra care in using the solution may be advisable in numerically sensitive formulations.

If these suggestions are not appropriate for your problem, another alternative to consider is reformulation of your model with indicator constraints. Indicator constraints in optimization offers more information about that alternative.