When you enter a problem, ILOG CPLEX determines the problem type from the available information. If you enter quadratic information about a problem, whether interactively or by reading a formatted file, then ILOG CPLEX assumes that the problem type is qp
for quadratic.
- In the Interactive Optimizer, if you are licensed to use the ILOG CPLEX Barrier Optimizer, then you will see additional
change
options. You can use the command change problem
with its options to change a quadratic problem to these other types:
- When you change the problem type of a QP to
zeroed_qp
, then you can optimize the problem as an LP, using any of the ILOG CPLEX LP optimizers licensed to you (primal simplex, dual simplex, network, or barrier). This change in problem type to zeroed_qp
retains the quadratic information about the problem, so once you have an LP solution to the relaxed LP version of the problem, you can then change the problem type back to qp
and use the original Q matrix.
- In fact, Diagnosing QP Infeasibility, shows you how to use this option to diagnose infeasibilities in QPs.
- From the Callable Library, use the routine
CPXchgprobtype()
to change the problem type. The header file (that is, the include file) cplex.h
contains a section titled Problem Types of the constants that define various problem types.
IloCplex
handles problem types transparently (provided your license supports the required problem types). When extracting a model with a quadratic objective function, it will automatically detect it as a QP and make the required adjustments of data structures. To solve a zeroed_qp
corresponding to an extracted QP, method solveZeroedQP()
must be called instead of method solve()
. With solveZeroedQP()
, the optimizer to be used is controlled by setRootAlgorithm()
.