Optimizing problems

The optimizers available for different problem types appear in this table.

After you have specified the problem by populating a CPLEX problem object, the problem can be optimized. A default optimizer is provided for each problem type. In most cases, the default optimizer will solve your problem well, but you can select a different optimizer to suit your needs better for a particular model formulation.

Continuous LP and QP problem objects can be optimized with simplex or barrier optimizers. Continuous QCP problem objects can be optimized with the barrier optimizer only.

For MIP problem objects, any appropriate continuous optimizer may be specified to solve the subproblems. You can also specify a different optimizer for solving the root LP subproblem and for the LP subproblems that occur at the nodes of the branch and cut tree.

For more information about parameters and their settings, see the reference manual, Parameters of CPLEX.

Note:

Names of classes, methods, and symbolic constants in the C#.NET API correspond very closely to those in the Java API with these systematic exceptions:

  • In the Java API, the names of classes begin with the prefix Ilo, whereas in C#.NET they do not.

  • In the Java API, the names of methods conventionally begin with a lowercase letter, for example, addCols, whereas in the C#.NET API, the names of methods conventionally begin with an uppercase (that is, capital) letter, for example, AddCols according to Microsoft practice.

Purpose Java API C++ API C API
Optimizes an LP or QP problem letting CPLEX select the method

IloCplex.setParam(ilog.cplex.IloCplex.IntParam, int) (IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Auto) followed by

IloCplex.solve()

IloCplex:: Dtl(IloCplex::RootAlg, IloCplex::AutoAlg) followed by

IloCplex:: solve

Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_AUTOMATIC then call CPXXlpopt and CPXlpopt

or

Set parameter CPX_PARAM_QPMETHOD to CPX_ALG_AUTOMATIC then call CPXXqpopt and CPXqpopt

Optimizes an LP or QP problem using primal simplex

IloCplex.setParam(ilog.cplex.IloCplex.IntParam, int) (IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Primal) followed by

IloCplex.solve()

IloCplex:: setParam(IloCplex::RootAlg, IloCplex::Primal) followed by

IloCplex:: solve

Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_PRIMAL then call CPXXlpopt and CPXlpopt

or

Set parameter CPX_PARAM_QPMETHOD to CPX_ALG_PRIMAL then call CPXXqpopt and CPXqpopt

or

Use CPXXprimopt and CPXprimopt

Optimizes an LP or QP problem using dual simplex

IloCplex.setParam(ilog.cplex.IloCplex.IntParam, int) (IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Dual) followed by

IloCplex.solve()

IloCplex:: setParam(IloCplex::RootAlg, IloCplex::Dual) followed by

IloCplex:: solve

Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_DUAL then call CPXXlpopt and CPXlpopt

or

Set parameter CPX_PARAM_QPMETHOD to CPX_ALG_DUAL then call CPXXqpopt and CPXqpopt

or

Use CPXXdualopt and CPXdualopt

Optimizes an LP or QP problem using network and simplex

IloCplex.setParam(ilog.cplex.IloCplex.IntParam, int) (IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Network) followed by

IloCplex.solve()

IloCplex:: setParam(IloCplex::RootAlg, IloCplex::Network) followed by

IloCplex:: solve

Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_NETWORK then call CPXXlpopt and CPXlpopt

or

Set parameter CPX_PARAM_QPMETHOD to CPX_ALG_NETWORK then call CPXXqpopt and CPXqpopt

or

Use CPXXhybnetopt and CPXhybnetopt

Optimizes an LP, QP, or QCP problem using barrier

IloCplex.setParam(ilog.cplex.IloCplex.IntParam, int) (IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Barrier) and

IloCplex.setParam (IloCplex.IntParam.BarCrossAlg, IloCplex.Algorithm.None) followed by

IloCplex.solve()

IloCplex:: setParam(IloCplex::RootAlg, IloCplex::Barrier) and

IloCplex:: setParam(IloCplex::BarCrossAlg, IloCplex::NoAlg) followed by

IloCplex:: solve

Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_BARRIER and set parameter CPX_PARAM_BARCROSSALG to CPX_ALG_NONE then call CPXXlpopt and CPXlpopt

or

Set parameter CPX_PARAM_QPMETHOD to CPX_ALG_BARRIER then call CPXXqpopt and CPXqpopt

or

Use CPXXbaropt and CPXbaropt

Optimizes an LP or QP problem using barrier and crossover

IloCplex.setParam(ilog.cplex.IloCplex.IntParam, int) (IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Barrier)

and IloCplex.setParam(ilog.cplex.IloCplex.IntParam,int) (IloCplex.IntParam.BarCrossAlg, IloCplex.Algorithm.Primal or Dual or Auto) followed by

IloCplex. solve

IloCplex:: setParam(IloCplex::RootAlg, IloCplex::Barrier) and

IloCplex:: setParam(IloCplex::BarCrossAlg, IloCplex::Primal or Dual) followed by

IloCplex:: solve

Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_BARRIER,and set parameter CPX_PARAM_BARCROSSALG as you want; then call CPXXlpopt and CPXlpopt or CPXXqpopt and CPXqpopt.

or

Use CPXXhybbaropt and CPXhybbaropt

Optimizes an LP using sifting

IloCplex.setParam(ilog.cplex.IloCplex.IntParam, int) (IloCplex.IntParam. SiftAlg, IloCplex.Algorithm. Sifting) followed by

IloCplex. solve

IloCplex:: setParam(IloCplex::RootAlg, IloCplex::Sifting) followed by

IloCplex:: solve

Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_SIFTING then call CPXXlpopt and CPXlpopt

or

Use CPXXsiftopt and CPXsiftopt

Optimizes an LP using several algorithms concurrently (not available in the presence of an LP callback)

IloCplex.setParam(ilog.cplex.IloCplex.IntParam, int) (IloCplex.IntParam. RootAlg, IloCplex.Algorithm. Concurrent) followed by

IloCplex. solve

IloCplex:: setParam(IloCplex::RootAlg, IloCplex::Concurrent) followed by

IloCplex:: solve

Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_CONCURRENT then call CPXXlpopt and CPXlpopt
Optimizes a MIP problem

IloCplex.setParam(ilog.cplex.IloCplex.IntParam, int) (IloCplex.IntParam. RootAlg, IloCplex.Algorithm) and

IloCplex. setParam (IloCplex.IntParam. NodeAlg, IloCplex.Algorithm) followed by

IloCplex. solve

IloCplex:: setParam(IloCplex::RootAlg) and

IloCplex:: setParam(IloCplex::NodeAlg) followed by

IloCplex:: solve

CPXXmipopt and CPXmipopt , specify root and node algorithms with CPLEX parameters CPX_PARAM_STARTALG and CPX_PARAM_SUBALG
Optimizes the LP or QP resulting from fixing integer variables to their values in the incumbent solution IloCplex. solveFixed IloCplex:: solveFixed Set CPXXchgprobtype and CPXchgprobtype to CPXPROB_FIXEDMILP or CPXPROB_FIXEDMIQP, then call either CPXXlpopt and CPXlpopt or CPXXqpopt and CPXqpopt