Initializing help system before first use

Invoking the Tuner

How to invoke the Tuner in the Xpress Optimizer depends on how the Optimizer is being accessed.

Optimizer Console

In the Xpress Optimizer console, the Tuner is invoked using the TUNE command. This will start the Tuner on the problem currently loaded into the console.

Optimizer Library C API

The Tuner can be invoked on any XPRSprob currently set up in memory, by calling the XPRStune function, which has the following declaration:

int XPRS_CC XPRStune(XPRSprob prob, const char* _sflags);

Xpress Mosel

Invoking the Tuner from within a Mosel model is as simple as adding the XPRS_TUNE flag to any call to minimize or maximize. For example, a MIP model with objective function myObjective using Barrier for the initial relaxation can be tuned by calling:

minimize(XPRS_TUNE+XPRS_BAR, myObjective)

The outcome of the tuning session will be printed in the standard output log. After tuning the model, a final solve will be performed with the discovered control parameters fixed. Model execution can therefore continue as normal and this way it is possible to tune a specific solve within a model that involves multiple, iterative solves.

Builder Component Library (Xpress BCL)

The Tuner is not accessible directly from Xpress BCL. You first need to obtain a handle to the underlying Xpress Optimizer object, on which you can then invoke the Tuner, as mentioned above. This would typically look like:

XPRBprob bcl_prob;
XPRSprob opt_prob;
...
XPRBloadmat(bcl_prob);
opt_prob = XPRBgetXPRSprob(bcl_prob);
XPRStune(opt_prob, "");

Xpress Workbench

The tuner can be invoked directly from workbench via Show Run Dialog... in the Run drop-down menu.

Using Control Settings

Independent of how the Xpress Optimizer is accessed, it is also possible to tell it to automatically tune the next problem being solved. This is done by setting the control parameter TUNERMODE=1. The next time a problem is solved, whether it is through the Console, an API or from Mosel, a tuning session will be run on the problem first. Then the discovered control settings are applied to the problem and a normal solve executed.