Overview | Group | Index | Concepts |
The routine CPXlpopt
may be used, at any time after a
linear program has been created via a call to CPXcreateprob
,
to find a solution to that problem using one of the
ILOG CPLEX linear optimizers.
The parameter CPX_PARAM_LPMETHOD
controls the choice of
optimizer (dual simplex, primal simplex, barrier, network simplex, sifting,
or concurrent optimization). Currently, with the default parameter
setting of Automatic, CPLEX invokes the dual simplex method when
no advanced basis or starting vector is loaded or when the advanced
indicator is zero.
The behavior of the Automatic setting
may change in the future.
Example
status = CPXlpopt (env, lp);
See also the example lpex1.c
in
Getting Started and in the standard distribution.
See Also:
CPXgetstat, CPXsolninfo, CPXsolution
env | A pointer to the CPLEX environment as returned by |
lp | A pointer to the CPLEX problem object as returned by |
The routine returns zero unless an error occurred during the optimization.
Examples of errors include exhausting available
memory (CPXERR_NO_MEMORY
) or encountering invalid data
in the CPLEX problem object (CPXERR_NO_PROBLEM
).
Exceeding a user-specified CPLEX limit is not considered an error. Proving the problem infeasible or unbounded is not considered an error.
Note that a zero return value does not necessarily mean that a
solution exists. Use the query routines CPXsolninfo
,
CPXgetstat
, and CPXsolution
to obtain
further information about the status of the optimization.