Previous Page: CPXdperwriteFirst PageNext Page: CPXdualwrite

CPXdualopt


Description

At any time after a linear program has been created via a call to CPXcreateprob(), the routine CPXdualopt() may be used to find a solution to that problem using the dual simplex algorithm. When this function is called, the CPLEX dual simplex optimization routines attempt to optimize the specified problem. The results of the optimization are recorded in the LP problem object.

Return Value

The CPXdualopt() routine returns a value of zero if successful (i.e., a solution exists, although not necessarily an optimal solution). If no solution exists, CPXdualopt() returns a non-zero return value. If an optimal solution is found, all results are equivalent to those produced by calling a primal simplex algorithm via CPXprimopt(). If a non-optimal solution is found, the interpretation of results will differ; see the CPLEX User's Manual, Chapter 2, Solving Linear Programming Problems for more information on interpreting dual simplex results. Use the CPXsolution() or CPXgetstat() routine to determine the status of the dual simplex optimization.

The return value CPXERR_PRESLV_INForUNBD means that the CPLEX presolve routines determined that the problem is infeasible or unbounded. In this case, no solution information is available.

Synopsis

int CPXdualopt (CPXENVptr env,
                CPXLPptr lp);

Arguments


CPXENVptr env
The pointer to the CPLEX environment as returned by one of the CPXopenCPLEX routines.

CPXLPptr lp
A pointer to a CPLEX LP problem object as returned by CPXcreateprob().

Example

status = CPXdualopt (env, lp);

See Also

Example lpex2.c in the CPLEX User's Manual.

Previous Page: CPXdperwriteFirst PageNext Page: CPXdualwrite