Choosing an optimizer

Describes the optimizers available in the C++ API.

Solving the extracted model with CPLEX involves solving one or a series of continuous relaxations:

The optimizer option used for solving the first continuous relaxation (whether it is the only one or just the first in a series of problems) is controlled by the root algorithm parameter:


cplex.setParam(IloCplex::RootAlg, alg);

where alg is a member of the nested enumeration IloCplex_Algorithm.

As a nested enumeration, the fully qualified names that must be used in the program are IloCplex::Primal, IloCplex::Dual, and so on. Table 1 displays the meaning of the optimizer options defined by IloCplex::Algorithm.
Tip:
The choice Sifting is not available for QP models. Only the Barrier option is available for QCP models. Table 2 summarizes these options.
Table 1. Optimizer options in IloCplex::Algorithm
Optimizer Purpose
AutoAlg let CPLEX decide which algorithm to use
Primal use the primal simplex algorithm
Dual use the dual simplex algorithm
Network use the primal network simplex algorithm on an embedded network followed by the dual simplex algorithm for LPs and the primal simplex algorithm for QPs on the entire problem
Barrier use the barrier algorithm. The type of crossover performed after the barrier algorithm is set by the parameter IloCplex::BarCrossAlg .
Sifting use the sifting algorithm
Concurrent use multiple algorithms concurrently on a multiprocessor system
Table 2. Algorithm available at root by problem type
Value Algorithm Type

LP?

MILP?

QP?

MIQP?

QCP?

MIQCP?

0 IloCplex::AutoAlg yes yes yes
1 IloCplex::Primal yes yes not available
2 IloCplex::Dual yes yes not available
3 IloCplex::Network yes yes not available
4 IloCplex::Barrier yes yes yes
5 IloCplex::Sifting yes not available not available
6 IloCplex::Concurrent yes yes not available

If the extracted model requires the solution of more than one continuous relaxation, the algorithm for solving the first one at the root is controlled by the RootAlg parameter. The algorithm at all other nodes except the root is controlled by the NodeAlg parameter:


cplex.setParam(IloCplex::NodeAlg, alg)
Table 3 summarizes the options available at nodes.
Table 3. Algorithm types for NodeAlg
Value Algorithm Type MILP? MIQP? MIQCP?
0 IloCplex::Auto yes yes yes
1 IloCplex::Primal yes yes not available
2 IloCplex::Dual yes yes not available
3 IloCplex::Network yes not available not available
4 IloCplex::Barrier yes yes yes
5 IloCplex::Sifting yes not available not available