Preprocessing: Explicitly Solving the Dual

In some situations, such as a model that has many more rows than columns, it may be advantageous to have ILOG CPLEX treat your model internally as the dual formulation. Then you can call any of the linear optimizers on that formulation, and again CPLEX will report results in terms of your original formulation.

To treat your model internally as the dual formulation and have ILOG CPLEX return results in terms of your original formulation:

In the Interactive Optimizer, follow these steps:

  1. If you have previously turned off the presolver, turn it back on. (The default setting of the presolver is on. Dual preprocessing is ignored when the presolver is off.) Turn the presolver on with the command set preprocessing presolve yes.
  2. Call for dual simplex preprocessing with the command set preprocessing dual 1.
  3. Then solve with any of CPLEX's linear optimizers.

Similarly, when using the Component Libraries, in your own application, you can first turn on the preprocessing presolver, request dual preprocessing and call the default optimizer, like this:

cplex.setParam(IloCplex::PreInd, IloTrue);

cplex.setParam(IloCplex::PreDual, IloTrue);

cplex.solve();

CPXsetintparam(env, CPX_PARAM_PREIND, CPX_ON);

CPXsetintparam(env, CPX_PARAM_PREDUAL, CPX_ON);

CPXlpopt(env, lp);

The default setting of this parameter is 0, meaning "automatic". With this setting, CPLEX examines the problem and decides whether solving the primal or dual problem will be more efficient. Currently, CPLEX performs this assessment only with the barrier optimizer. For all other optimizers the default setting causes CPLEX to solve the primal problem.

It is worth emphasizing, to those versed in linear programming theory, that the decision to solve the dual formulation of your model, via this preprocessing parameter, is entirely separate from the choice of using the dual simplex method versus the primal simplex method to perform the optimization. Although these features have theoretical underpinnings in common, it is not redundant to consider (for example) solving the dual formulation of your model with the dual simplex method; this would not simply result in the same computational path as solving the primal formulation with the primal simplex method. In the case already mentioned of a model with many more rows than columns, either simplex variant may perform much better when solving the dual formulation, due to the smaller basis matrix that is maintained.


Previous Page: Preprocessing: Presolver and Aggregator  Return to Top Next Page: Starting from an Advanced Basis