Initializing help system before first use

Solver interaction: Setting up solution callbacks

The solvers of FICO® Xpress Optimization offer various entry points for interaction with the solver during optimizations runs. This interaction takes the form of user-defined functions with a fixed format (callback functions) that are invoked by the solver at specific points. Callback functions may be used for logging purposes, but some also allow you to modify the optimization algorithms, e.g., by adding your own cutting plane algorithms or even defining new branching objects and strategies for the MIP branch-and-bound search.

Among the most frequently used functions certainly is the integer solution callback of Xpress Optimizer that provides access to MIP solutions at the point where they are found during the branch-and-bound search.

»Scenario 1 (Mosel)

A unique feature of the Mosel language is the possibility to define subroutines in this high-level modeling language that will be called from the underlying (solver) libraries. It is thus possible to work with Optimizer callback functions directly in your Mosel models.

Open the file examples\getting_started\Mosel\foliocb.mos to see an example of how to define an integer solution callback in Mosel.

»Scenario 2 (BCL)

With BCL you can directly use the callback functionality of the corresponding Xpress Optimizer interface. Depending on your host language, open the file foliocb.[c|cxx|java] located in the corresponding subdirectory examples\bcl\[C|Cxx|Java]\UGExpl for an example of how to use the Optimizer integer solution callback with a BCL model formulation.

Further information

  • Documentation of Xpress Optimizer callbacks: ``Xpress Optimizer Reference Manual'', 5.3 `Using the Callbacks'
  • See the ``Xpress Mosel User Guide'', 11.1 `Cut generation', and the Xpress whitepapers ``Embedding Optimization Algorithms'' and ``Hybrid MIP/CP solving'' for examples of callback definition in Mosel
  • Documentation of Xpress Optimizer callbacks in Mosel: ``Mosel Language Reference Manual'', Chapter 13: `mmxprs'
  • Examples of using Xpress Optimizer callbacks with BCL: ``BCL Reference Manual'', Appendix B `Using BCL with the Optimizer library'