> Languages and APIs > ILOG Concert Technology for Java Users > Choosing an Optimizer |
Choosing an Optimizer |
INDEX PREVIOUS NEXT |
The algorithm used in the solve
methods can be controlled and if necessary tailored to the particular needs of the model. The most important control is that of selecting the optimizer. For solving the active model, ILOG CPLEX solves one continuous relaxation or a series of continuous relaxations.
IloCplex.isMIP
, IloCplex.isQO
, and IloCplex.isQC
return false
. This is the case if the active model does not include:
IloCplex
provides several optimizing algorithms to solve LPs. For more about those optimizers, see Chapter 8, Solving LPs: Simplex Optimizers, Chapter 9, Solving LPs: Barrier Optimizer, and Chapter 10, Solving Network-Flow Problems in this manual.
IloCplex.isMIP
and IloCplex.isQC
return false
and IloCplex.isQO
returns true
. This is the case if the active model contains a quadratic (and positive semi-definite) objective but does not contain:
IloCplex
provides several optimizing algorithms to solve QPs. For more about identifying this kind of problem, see Chapter 11, Solving Problems with a Quadratic Objective (QP).
IloCplex.isMIP
returns false
and IloCplex.isQC
returns true
, indicating that it detected a quadratically constrained program (QCP). This is the case if the active model contains one or more quadratic (and positive semi-definite) constraints but does not contain:
IloCplex
solves QCP models using the barrier optimizer. For more about this kind of problem, see Chapter 12, Solving Problems with Quadratic Constraints (QCP).
In short, an LP model has a linear objective function and linear constraints; a QP model has a quadratic objective function and linear constraints; a QCP includes quadratic constraints, and it may have a linear or quadratic objective function. A problem that that can be represented as LP, QP, or QCP is also known collectively as a continuous model or a continuous relaxation.
A series of relaxations is solved if the active model is a MIP, which can be recognized by IloCplex.isMIP
returning true
. This is the case if the model contains any of the objects excluded for single continuous models. If a MIP contains a purely linear objective function, (that is, IloCplex.isQO
returns false
), the problem is more precisely called an MILP. Otherwise it is called an MIQP or MIQCP. MIPs are solved using branch & cut search, explained in more detail in Chapter 13, Solving Mixed Integer Programming Problems (MIP).
To choose the optimizer to solve a single continous model, or the first continuous relaxation in a series, use
IloCplex.setParam(IloCplex.IntParam.RootAlg, alg)
where alg
is an integer specifying the algorithm type. Table 2.3 shows you the available types of algorithms.
You are not obliged to set this parameter. In fact, if you do not explicitly call IloCplex.setParam(IloCplex.IntParam.RootAlg, alg)
, ILOG CPLEX will use the default: IloCplex.Algorithm.Auto
. Any invalid setting will produce an error message.
The IloCplex.Algorithm.Sifting
algorithm is not available for QP. IloCplex
will default to the IloCplex.Algorithm.Auto
setting when the parameter IloCplex.IntParam.RootAlg
is set to IloCplex.Algorithm.Sifting
for a QP.
Only the settings IloCplex.Algorithm.Auto and IloCplex.Algorithm.Barrier
are valid for a QCP.
Parameter IloCplex.IntParam.RootAlg
also controls the algorithm used for solving the first continuous relaxation when solving a MIP. The algorithm for solving all subsequent continous relaxations is then controlled by the parameter IloCplex.IntParam.NodeAlg
. The algorithm choices appear in Table 2.4
Copyright © 1987-2003 ILOG, S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |