After you have chosen the right optimizer and, if appropriate, you have started from an advanced basis, you may want to experiment with different parameter settings to improve performance. This section describes parameters that are most likely to affect performance of linear optimizers. (Managing Parameters from the Callable Library, discusses parameter settings in general.)
set
command.
cplex.setParam()
.
CPXsetintparam
() adjusts integer-valued parameters, and the routine
CPXsetdblparam()
adjusts parameters that take values of type double
.
For more performance tuning suggestions, refer to the following sections:
If you find better parameter settings for your problem, save them in a parameter specification file, as explained in Saving a Parameter Specification File.
As it works, ILOG CPLEX automatically handles memory allocations to accommodate the increasing size of a problem object as you modify the object through calls to modification routines in the Callable Library. The sequence of Callable Library routines that you invoke can influence the efficiency of memory management. As we show in Table 2.2, you can control how ILOG CPLEX allocates memory through its growth parameters.
The gradient parameters in Table 4.2 determine the pricing algorithms that ILOG CPLEX uses. Consequently, these are the algorithmic parameters most likely to affect simplex linear programming performance. The default setting of these gradient parameters choose the pricing algorithms that are best for most problems. Moreover, the enhancements of the linear algebra routines that the ILOG CPLEX Simplex Optimizers use affect the various gradient options differently. When you are selecting alternate pricing algorithms, look at these values as guides:
ILOG CPLEX records those values in the log file as it works. (By default, ILOG CPLEX creates the log file in the directory where it is executing, and it names the log file cplex.log
. Managing Log Files: the Log File Parameter tells you how to rename and relocate this log file.)
Parameter | Primal Simplex | Dual Simplex |
---|---|---|
In Interactive Optimizer | ||
In Concert Technology Library | ||
In Callable Library |
Table 4.3 lists acceptable values for the primal simplex pricing parameter. Table 4.4 lists values for dual simplex pricing parameter. The following paragraphs explain those values and offer advice about them.
To set an alternative scaling method:
set read scale i
, substituting 0 (zero) for i
to achieve equilibration scaling or 1 (one) for i
to achieve more aggressive scaling. In certain cases, it may be advantageous to turn off scaling. To do so in the Interactive Optimizer, use the command set read scale -1
.
IloCplex::ScaInd
or CPX_PARAM_SCAIND
. to the appropriate value.
set simplex refactor i
(substituting a positive integer for i
) to change the refactoring frequency.
IloCplex::ReInv
or CPX_PARAM_REINV
.
It is possible to control the way ILOG CPLEX builds an initial basis through the crash parameter.
In the primal simplex optimizer, the crash setting determines how ILOG CPLEX uses the coefficients of the objective function to select the starting basis. If its value is 1
(one), ILOG CPLEX uses the coefficients to guide its selection; if its value is 0
(zero), ILOG CPLEX ignores the coefficients; if its value is -1
, ILOG CPLEX does the opposite of what the coefficients normally suggest. These values are summarized in Table 4.5.
In the dual simplex optimizer, the crash setting determines whether ILOG CPLEX aggressively uses primal variables instead of slack variables while it still tries to preserve as much dual feasibility as possible. If its value is 1
(one), it indicates the default starting basis; if its value is 0
(zero) or -1
, it indicates an aggressive starting basis. These values are summarized in Table 4.6.
To control the way ILOG CPLEX builds an initial basis:
set
simplex crash
i
(substituting 1, 0, or -1 for i
) .
IloCplex::CraInd
or CPX_PARAM_CRAIND
.