CPLEX Solution Pool

From TomWiki
Jump to navigationJump to search

Notice.png

This page is part of the CPLEX Manual. See CPLEX.

The solution pool is used for storing multiple solutions to a mixed integer programming problem (MILP, MIQP and MIQQ). Typically the feature is used for obtaining multiple solutions to help facilitate a selection based on post-processing criteria.

The parameters of interest are listed in CPLEX Appendix G and start with SOLNPOOL* (also POPULATELIM is relevant). To enable the collection the following code could be used:

% Store up to 20 solutions. 
Prob.MIP.cpxControl.SOLNPOOLCAPACITY = 20;
% Use very aggressive collection
Prob.MIP.cpxControl.SOLNPOOLINTENSITY = 4;
% Build diverse set
Prob.MIP.cpxControl.SOLNPOOLREPLACE = 3;

The effect of SOLNPOOLINTENSITY is to increase the amount of effort spent setting up the branch and cut tree to prepare for the solution generation.

The details about the settings are as follows:

  • Its default value, 0 (zero), lets CPLEX choose which intensity to apply.
  • For value 1 (one), the performance of MIP optimization is not affected. There is no slowdown and no additional consumption of memory due to this setting. However, populate will quickly generate only a small number of solutions. Generating more than a few solutions with this setting will be slow. When you are looking for a larger number of solutions, use a higher value of this parameter.
  • For value 2, some information is stored in the branch and cut tree so that it is easier to generate a larger number of solutions. This storage has an impact on memory used but does not lead to a slowdown in the performance of MIP optimization.
  • For value 3, the algorithm is more aggressive in computing and storing information in order to generate a large number of solutions. Compared to values 1 (one) and 2, this value will generate a larger number of solutions, but it will slow MIP optimization and increase memory consumption. Use this value only if setting this parameter to 2 does not generate enough solutions.
  • For value 4, the algorithm generates all solutions to your model. Even for small models, the number of possible solutions is likely to be huge; thus enumerating all of them will take time and consume a large quantity of memory. In this case, remember to set the populate limit parameter (POPULATELIM) to a value appropriate for your model; otherwise, the populate procedure will stop prematurely because of this stopping criterion instead of enumerating all solutions.

The solutions are stores in Result.x_k column-wise, with corresponding objective functions in Result.f_k.