We have described how the ILOG CPLEX Barrier Optimizer finds primal and dual solutions from the primal and dual formulations of a model (see the section Identifying LPs for Barrier Optimization) , but you do not have to reformulate the problem yourself. The ILOG CPLEX Barrier Optimizer automatically creates the primal and dual formulations of the problem for you after you enter or read in the problem.
enter
command to type in the problem data interactively, or use the read
command to read a problem from a file in MPS, LP, or SAV format.
pre
; use the write
command to do so.
read
command.
display problem histogram c.
You will be able to identify dense columns at a glance.
stop
tells ILOG CPLEX to stop with a nonbasis barrier solution. (Afterwards, you can apply the command primopt
or tranopt
explicitly to this nonbasis, barrier solution to cross over to a primal or dual basic solution.)
primopt
(or the shortcut p
) tells ILOG CPLEX to cross over automatically to a basic solution using the primal simplex optimizer.
dualopt
(or the shortcut d
) tells ILOG CPLEX to cross over to a basic solution using the dual simplex optimizer.
dualopt
.
Initialize the ILOG CPLEX environment, create the problem object, and populate the problem object, as explained in Creating an Application with CPLEX Concert Technology Library and Using the Callable Library in an Application.
cplex.setRootAlgorithm(IloCplex::Barrier)
to invoke the CPLEX Barrier Optimizer without crossover.
cplex.setRootAlgorithm(IloCplex::BarrierPrimal)
to invoke the CPLEX Barrier Optimizer with primal crossover.
cplex.setRootAlgorithm(IloCplex::BarrierDual)
to invoke the CPLEX Barrier Optimizer with dual crossover.