Working with the fixed MIP problem
Documents working with a fixed MIP.
Integer variables often represent major structural decisions in a model, and many continuous variables of the model can be related to these major decisions. With that observation in mind, if you take the integer variable solution values as given, then you can obtain useful post-solution information that applies only to the continuous variables, in the usual way. This observation about the information available only for continuous variables in a MIP is the idea behind the so-called "fixed MIP" problem. The fixed MIP is a form of the MIP problem where as many as possible of the discrete variables are fixed at values corresponding to a MIP solution; that is, the discrete variables are fixed in the sense of "set at a given value." Thus a fixed MIP is a continuous problem that is not strictly a relaxation of the MIP, but rather a restriction to its continuous part.
What does CPLEX fix?
CPLEX typically constructs a fixed MIP problem from the current model and a solution. To do so, CPLEX sets as many variables as possible to the value of that variable in that solution such that the resulting remaining model is continuous. In particular, that convention means the following fixes occur:
- CPLEX fixes all Boolean variables at their solution value and relaxes the variable to continuous.
- CPLEX fixes all integer variables at their solution value and relaxes the variable to continuous.
- CPLEX fixes all semi-integer variables at their solution value and relaxes the variable to continuous.
- If a semi-continuous variable has a solution value of 0 (zero), then CPLEX fixes the semi-continuous variable to that value; otherwise, the semi-continuous variable is relaxed to continuous with the semi-continuous lower bound as the lower bound of the relaxed continuous variable.
- In a special ordered set of type 1 (SOS1) consisting of N members, CPLEX fixes N-1 of the variables in the SOS1 to the solution value. Only the variable with the value most different from 0 (zero) remains unfixed. CPLEX discards the SOS1.
- In a special ordered set of type 2 (SOS2) consisting of N members, CPLEX fixes N-2 of the variables to the solution value. Only two consecutive variables with values most different from 0 (zero) are left unfixed. CPLEX discards the SOS2.
- If the lefthand side (lhs) of an indicator constraint is satisfied by the solution, CPLEX installs the righthand side (rhs) as a constraint. In any case, CPLEX discards the indicator constraints.
Accessing dual information in a fixed MIP problem
If you wish to access dual information in such a problem, first optimize your MILP problem to create the fixed MILP problem; then re-optimize it, like this:
In Concert Technology, call the method
solveFixed. (There is no explicit problem type in Concert Technology, so there is no need to change the problem type as in other components.)
In the Callable Library (C API), call the routine
CPXchgprobtypewith the argument
CPXPROB_FIXEDMILPas the problem type and then call
In the Interactive Optimizer, use these commands to change the problem type and re-optimize:
change problem fixed_milp
As explained in Managing a MIP start with the advanced start switch,
setting 2 of the advanced start switch (
CPX_PARAM_ADVIND in the Callable
Library) can be particularly useful for solving fixed MIP models,
where a start vector but no corresponding basis is available.