Initializing help system before first use

Multiple solution support

As we have seen in the previous section it is possible to retrieve into your model/application all MIP solutions found by Xpress Optimizer during the branch-and-bound search. Alternatively to defining the integer solution callback and saving the solution in your own structures you can make use of the MIP solution pool and MIP solution enumerator functionality to have solutions stored and made accessible after search has terminated.

»Scenario 1 (Mosel)

As shown in the example file examples\getting_started\Mosel\folioenumsol.mos the solution pool functionality is enabled by using the option XPRS_ENUM of the optimization routines maximize or minimize. Through the control XPRS_ENUMMAXSOL you can set the maximum number of solutions to save (if the search finds more solutions than the specified value, then only the best solutions are retained). The solution enumerator configures the optimization algorithms to generate a large number of feasible solutions, as a consequence, solution times are generally longer than with the default algorithms that are tuned for maximum speed.

»Scenario 2 (BCL)

The BCL program example foliosolpool.[c|cxx|java] in directory examples\bcl\[C|Cxx|Java]\UGExpl shows how to load solutions saved in the MIP solution pool into BCL to use its display functions on the model objects. The solution pool collects all solutions found during the standard search (these are the same solutions as those reported by the MIP solution callback) and its access functions can be configured, for instance, to return solutions in ascending or descending order of the value of the optimization criterion.

If you wish to generate many different feasible solutions you can start the optimization through the solution enumerator, as is shown in the example folioenumsol.[c|cxx|java]. In this case, the optimization algorithms are configured to produce a large number of integer feasible solutions; solving times may be longer than with the default algorithm settings that are tuned for maximum speed. The solutions generated by the solution enumerator are stored in a MIP solution pool associated with the enumerator. After the optimization run the solutions saved in the pool are loaded into BCL.

»Scenario 3 (Optimizer)

The example files foliomatsolpool.[c|java] in directory examples\getting_started\Optimizer show how to use the solution pool functionality when inputting a problem directly into Xpress Optimizer. The solution pool captures and stores all solutions found during the MIP search. The user can query the stored set of solutions for information such as their objective value and their solution values.

In further example files foliomatenumsol.[c|java] the solution pool and solution enumerator functionality is demonstrated showing how to capture the n-best solutions of a MIP problem. The example also shows how to access the information about each of the n solutions found.

Further information

  • ``MIP Solution Pool Reference Manual''
  • Documentation of solution pool functionality in Mosel: ``Mosel Language Reference Manual'', Chapter 13: `mmxprs'
  • Documentation of solution pool functionality in BCL: ``BCL Reference Manual''; ``BCL Reference Manual Javadoc''