Initializing help system before first use

Tuning the Optimizer

Xpress Optimizer solves optimization problems by applying a number of algorithms and techniques, such as cutting planes, heuristics, branch and bound search, etc. These internal algorithms are user customizable through control parameters.

Solver tuning helps the user to identify a favorable set of control parameters that allow the Xpress Optimizer to solve a particular problem (or a set of problems) faster than by using defaults.

Xpress Optimizer has a built-in tuner that can be used through different APIs on all supported platforms.

The Xpress Optimizer built-in tuner

The Xpress Optimizer built-in tuner works with LP and MIP problems, and when Xpress Nonlinear is available it can also work with SLP and MISLP problems. The tuner will solve the problem with its default baseline control settings and then solve the problem mutiple times with each individual control and certain combinations of these controls. As the tuner works by solving a problem mutiple times, it is important and recommended to set time limits. Setting MAXTIME will limit the effort spent on each individual solve and setting TUNERMAXTIME will limit the overall effort of the tuner.

A tuner run produces detailed log files (by default located under the subdirectory tuneroutput of the working directory) and also displays a summary progress log.

The tuner works on an optimization problem loaded into the Optimizer or alternatively it can be launched on a set of matrices in LP or MPS format. The tuning process can be customized by providing pre-defined lists of controls, so-called factory tuner methods, and through various output and tuning target settings—the reader is referred to the section Using the Tuner of the ``Xpress Optimizer Reference Manual'' for further detail.

Applying the tuning results

Copy the control parameter settings of the best strategy into your model or program. Note that any solver parameters need to be set before starting the optimization.

»Scenario 1 (Mosel)

The tuner can be launched for a specific optimization problem directly from within a Mosel model by adding the option XPRS_TUNE to the optimization routine call:

minimize(XPRS_TUNE, MinCost)
maximize(XPRS_TUNE+XPRS_LIN, TotalProfit)

Note that the Optimizer output display (parameter XPRS_VERBOSE) needs to be enabled in order to see the tuner progress log displayed.

Alternatively, within Xpress Workbench select the 'Tools' button Eval/buttools.png to open the Run Options Dialog window where you can configure the run mode Tune the Model to tune the last optimization problem specified within a model (select a time limit greater than 0 to enable the tuner).

Applying the tuning results

Prefix the parameter name with XPRS_ to obtain its Mosel name:

setparam("XPRS_PRESOLVE", 0)
Alternatively, define parameter settings as a system command (requires module mmsystem):
command("PRESOLVE=0")

»Scenario 2 (BCL)

After loading the problem from BCL into the solver, you can use the Xpress Optimizer API functions to set solver controls and start the tuning for this problem.

  • BCL C++:
     XPRSprob optprob;
     XPRBprob bclprob("MyProb");               // Initializes BCL and Optimizer
    
     bclprob.loadMat();
     optprob = bclprob.getXPRSprob();          // Retrieve the Optimizer problem
     XPRSsetintcontrol(optprob, XPRS_MAXTIME, 60);  // Set a time limit
     XPRStune(optprob, "");                    // Start the tuning
  • BCL Java:
     XPRBprob bclprob;
     XPRSprob optprob;
    
     bcl = new XPRB();                         // Initialize BCL
     bclprob = bcl.newProb("MyProb");          // Create a BCL problem
     XPRS.init();                              // Initialize Xpress Optimizer
     optprob = bclprob.getXPRSprob();          // Retrieve the Optimizer problem
     optprob.setIntControl(XPRS.MAXTIME, 60);  // Set a time limit
     optprob.tune("");                         // Start the tuning

Applying the tuning results

You need to retrieve the Xpress Optimizer problem associated with the BCL problem to be able to modify its control parameter settings as shown for the 'MAXTIME' control in the code snippets above.

»Scenarios 3 and 4 (Xpress Optimizer)

With a loaded problem, the built-in tuner can be started by calling TUNE from the Optimizer console, or XPRStune from a user application. The Xpress Optimizer API also provides routines for managing tuner methods.

At the command prompt, the following sequence of commands can be used to tune an LP problem that is provided in the form of an MPS matrix in the file foliolp.mps:

optimizer
foliolp
readprob
chgobjsense max
maxtime=60
tune -l
quit

Applying the tuning results

With the Optimizer console, you can modify control parameter settings as shown for the 'MAXTIME' control in the command listing above. From an application program you need to use one of the Optimizer API routines XPRSsetdblcontrol / XPRSsetintcontrol / XPRSsetstrcontrol depending on the parameter type.

Further information

  • Xpress Optimizer: ``Xpress Optimizer Reference Manual'', Section 5.10 `Using the Tuner'

© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.