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 may select a different optimizer that may 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 ILOG CPLEX Parameters.
Note: Names of classes, methods, and symbolic constants in the .NET API correspond very closely to those in the Java API with these systematic exceptions:
Ilo
, whereas in .NET they do not.
addCols
,
whereas in the .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(IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Auto) IloCplex.solve |
IloCplex::setParam(IloCplex::RootAlg, IloCplex::AutoAlg) IloCplex::solve |
Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_AUTOMATIC then call CPXlpopt or Set parameter CPX_PARAM_QPMETHOD to CPX_ALG_AUTOMATIC then call CPXqpopt |
Optimizes an LP or QP problem using primal simplex |
IloCplex.setParam(IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Primal) IloCplex.solve |
IloCplex::setParam(IloCplex::RootAlg, IloCplex::Primal) IloCplex::solve |
Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_PRIMAL then call CPXlpopt or Set parameter CPX_PARAM_QPMETHOD to CPX_ALG_PRIMAL then call CPXqpopt or Use CPXprimopt |
Optimizes an LP or QP problem using dual simplex |
IloCplex.setParam(IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Dual) IloCplex.solve |
IloCplex::setParam(IloCplex::RootAlg, IloCplex::Dual) IloCplex::solve |
Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_DUAL then call CPXlpopt or Set parameter CPX_PARAM_QPMETHOD to CPX_ALG_DUAL then call CPXqpopt or Use CPXdualopt |
Optimizes an LP or QP problem using network and simplex |
IloCplex.setParam(IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Network) IloCplex.solve |
IloCplex::setParam(IloCplex::RootAlg, IloCplex::Network) IloCplex::solve |
Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_NETWORK then call CPXlpopt or Set parameter CPX_PARAM_QPMETHOD to CPX_ALG_NETWORK then call CPXqpopt or Use CPXhybnetopt |
Optimizes an LP, QP, or QCP problem using barrier |
IloCplex.setParam(IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Barrier) IloCplex.setParam(IloCplex.IntParam.BarCrossAlg, IloCplex.Algorithm.None) IloCplex.solve |
IloCplex::setParam(IloCplex::RootAlg, IloCplex::Barrier) IloCplex::setParam(IloCplex::BarCrossAlg, IloCplex::NoAlg) IloCplex::solve |
Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_BARRIER and set parameter CPX_PARAM_BARCROSSALG to CPX_ALG_NONE then call CPXlpopt or Set parameter CPX_PARAM_QPMETHOD to CPX_ALG_BARRIER then call CPXqpopt or Use CPXbaropt |
Optimizes an LP or QP problem using barrier and crossover |
IloCplex.setParam(IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Barrier) IloCplex.setParam(IloCplex.IntParam.BarCrossAlg, IloCplex.Algorithm.Primal or Dual or Auto) IloCplex.solve |
IloCplex::setParam(IloCplex::RootAlg, IloCplex::Barrier) IloCplex::setParam(IloCplex::BarCrossAlg, IloCplex::Primal or Dual) IloCplex::solve |
Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_BARRIER and set parameter CPX_PARAM_BARCROSSALG as you want, then call CPXlpopt or CPXqpopt. or Use CPXhybbaropt. |
Optimizes an LP using sifting |
IloCplex.setParam(IloCplex.IntParam.Sifting, IloCplex.Algorithm.Sifting) IloCplex.solve |
IloCplex::setParam(IloCplex::RootAlg, IloCplex::Sifting) IloCplex::solve |
Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_SIFTING then call CPXlpopt or Use CPXsiftopt. |
Optimizes an LP using several algorithms concurrently |
---- |
IloCplex::setParam(IloCplex::RootAlg, IloCplex::Concurrent) IloCplex::solve |
Set parameter CPX_PARAM_LPMETHOD to CPX_ALG_CONCURRENT then call CPXlpopt |
Optimizes a MIP problem |
IloCplex.setParam(IloCplex.IntParam.RootAlg, IloCplex.Algorithm) IloCplex.setParam(IloCplex.IntParam.NodeAlg, IloCplex.Algorithm) IloCplex.solve |
IloCplex::setParam(IloCplex::RootAlg) IloCplex::setParam(IloCplex::NodeAlg) IloCplex::solve |
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 CPXchgprobtype to CPXPROB_FIXEDMILP or CPXPROB_FIXEDMIQP, then call either CPXlpopt or CPXqpopt. |