NO FRAMES

CPXprimopt

public int CPXprimopt(CPXCENVptr env, CPXLPptr lp)
Definition file: cplex.h

The routine CPXprimopt may be used after a linear program has been created via a call to CPXcreateprob, to find a solution to that problem using the primal simplex method. When this function is called, the CPLEX primal simplex algorithm attempts to optimize the specified problem. The results of the optimization are recorded in the CPLEX problem object.

Example

 status = CPXprimopt (env, lp);
 

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX problem object as returned by CPXcreateprob.

Returns:

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.