Adjusting Parameters

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.)

To adjust parameters:

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.

Memory Management and Problem Growth

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.

How you should set these growth parameters depends on how you build the problem object in a particular application. CPLEX will automatically manage (via a cache) most changes to prevent inefficiency when the changes will require memory re-allocations. If an application builds a large problem in small increments, you still may be able to improve performance by increasing the growth parameters. In particular, if you know reasonably accurate upper bounds on the number of rows, columns, and nonzeros, and you are building a large problem in very small pieces with many calls to the problem modification routines, then setting the growth parameters to the known upper bounds will make ILOG CPLEX perform the fewest allocations and may thus improve performance of the problem modification routines. However, overly generous upper bounds may result in excessive memory use.

Pricing Algorithm and Gradient 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.)

If the number of iterations required to solve your problem is approximately the same as the number of rows, then you are doing well. If the number of iterations is three times greater than the number of rows (or more), then it may very well be possible to improve performance by changing the gradient parameter that determines the pricing algorithm.

Table 4.2 Gradient Parameters

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.

Table 4.3 Primal Simplex Pricing Algorithm Values

Symbolic constant value 
Integer value 
Pricing algorithm 
-1 
reduced-cost pricing 
0 (default) 
hybrid reduced-cost and devex pricing 
1 
devex pricing 
2 
steepest-edge pricing 
3 
steepest-edge pricing with initial slack norms 
4 
full pricing 

For the primal simplex pricing parameter, reduced-cost pricing (-1 or CPX_PPRIIND_PARTIAL) is less computationally expensive, so you may prefer it for small or relatively easy problems. Try reduced-cost pricing, and watch for faster solution times. Also if your problem is dense (say, 20-30 nonzeros per column), reduced-cost pricing may be advantageous.

In contrast, if you have a more difficult problem taking many iterations to complete Phase I and arrive at an initial solution, then you should consider devex pricing (1 or CPX_PPRIIND_DEVEX). Devex pricing benefits more from ILOG CPLEX linear algebra enhancements than does partial pricing, so it may be an attractive alternative to partial pricing in some problems. Do not use devex pricing, however, if your problem has many columns and relatively few rows. In such a case, the number of calculations required per iteration will usually be disadvantageous.

If you observe that devex pricing helps, then you might also consider steepest-edge pricing (2 or CPX_PPRIIND_STEEP). Steepest-edge pricing is computationally more expensive than reduced-cost pricing, but it may produce the best results on difficult problems. One way of reducing the computational intensity of steepest-edge pricing is to choose steepest-edge pricing with initial slack norms (3 or CPX_PPRIIND_STEEPQSTART).

For the dual simplex pricing parameter, the default value selects steepest-edge pricing with unit initial norms. That is, the default (0 or CPX_DPRIIND_AUTO) automatically selects 4 or CPX_DPRIIND_STEEPQSTART. You may also consider starting with exact norms, since ILOG CPLEX has reduced the cost of initializing norms.

Table 4.4 Dual Simplex Pricing Algorithm Values

Symbolic Constant Values 
Integer Value 
Pricing Algorithm 
0 (default) 
ILOG CPLEX determines automatically 
1 
standard dual pricing 
2 
steepest-edge pricing 
3 
steepest-edge pricing in slack space 
4 
steepest-edge pricing with unit initial norms 

Scaling

Poorly conditioned problems (that is, problems in which even minor changes in data result in major changes in solutions) may benefit from an alternative scaling method. Scaling attempts to rectify poorly conditioned problems by multiplying rows or columns by constants without changing the fundamental sense of the problem. If you observe that your problem has difficulty staying feasible during its solution, then you should consider an alternative scaling method.

To set an alternative scaling method:

Refactoring Frequency

ILOG CPLEX dynamically determines the frequency at which the basis of a problem is refactored in order to maximize iteration speed. On very large problems, ILOG CPLEX refactors the basis matrix infrequently. Very rarely should you consider increasing the number of iterations between refactoring. In such cases:

Crash

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.

Table 4.5 Values of the ILOG CPLEX Crash Parameter for the Primal Simplex Optimizer

Value 
Meaning for Primal Simplex Optimizer 
1 
Use coefficients of objective function to select basis 
0 
Ignore coefficients of objective function 
-1 
Select basis contrary to one indicated by coefficients of objective function 

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.

Table 4.6 Values of the ILOG CPLEX Crash Parameter for the Dual Simplex Optimizer

Value 
Meaning for Dual Simplex Optimizer 
1 
Use default starting basis 
0 
Use an aggressive starting basis 
-1 
Use an aggressive starting basis 

To control the way ILOG CPLEX builds an initial basis:


Previous Page: Starting from an Advanced Basis  Return to Top Next Page: Diagnosing Performance Problems