Example: using populate after MIP optimization
Illustrates contrast between MIP optimization and the populate procedure.
After invoking MIP Optimization, you can generate additional solutions with populate. You can use this possibility to get a few additional solutions quickly if the solutions obtained during MIP Optimization are not satisfactory. However, as explained in Advanced use: interaction of MIP optimization and populate, the sequence MIP Optimization followed by populate is especially useful to control the parameters and the stopping criteria of each phase of populate.
Consider again the model in Example: simple facility location problem.
Suppose that the transportations costs are subject to fluctuations,
and consequently it does not make sense to spend time optimizing the
model exactly to optimality. You can set the MIP gap tolerance (absolute MIP gap tolerance: EpAGap, CPX_PARAM_EPAGAP; relative MIP gap tolerance EpGap, CPX_PARAM_EPGAP)
to a value higher than the default (in this example: 5%) so that the
MIP optimization, which constitutes the first phase of populate, stops
earlier. Then, populate will go immediately into the second phase,
so it can start producing solutions sooner.
The commands to reproduce this situation looks like this in the Interactive Optimizer:
read location.lp
set mip pool intensity 2
set mip tolerances mipgap 0.05
mipopt
populate
MIP optimization (as executed by mipopt
in the Interactive Optimizer) shows these results:
Solution pool: 3 solutions saved.
MIP - Integer optimal, tolerance (0.05/1e-06): Objective = 4.9900000000e+02
Current MIP best bound = 4.7976250000e+02 (gap = 19.2375, 3.86%)
Solution time = 0.05 sec. Iterations = 135 Nodes = 11 (6)
Populate (following mipopt
in the Interactive Optimizer) shows results like these:
Solution pool: 23 solutions saved.
Populate - Populate solution limit exceeded, integer feasible:
Objective = 4.9900000000e+02
Current MIP best bound = 4.9278787879e+02 (gap = 6.21212, 1.24%)
Solution time = 0.05 sec. Iterations = 271 Nodes = 261 (53)
In this example, the solution pool intensity (SolnPoolIntensity, CPX_PARAM_SOLNPOOLINTENSITY)
is set to 2 because the default automatic value of this parameter
for the sequence MIP optimization followed by populate is not the
fastest possible setting for generating a large number of solutions.
If you use this sequence of commands to control precisely the behavior
of the optimizer in the first and second phase of populate, it is
a good idea to reset the pool intensity parameter yourself, rather
than relying on its default value.