NO FRAMES

CPXhybbaropt

int CPXPUBLIC CPXhybbaropt(CPXCENVptr env, CPXLPptr lp, int method)
Definition file: cplex.h
Include files: cplex.h

The routine CPXhybbaropt 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. When this function is called, the specified problem is solved using CPLEX Barrier followed by an automatic crossover to a basic solution if barrier determines that the problem is both primal and dual feasible. Otherwise, crossover is not performed. In this case, a call to CPXprimopt or CPXdualopt can force a crossover to occur. The results of the optimization are recorded in the problem object.

Methods of CPXhybbaropt
method= 0use CPX_PARAM_BARCROSSALG to choose a crossover method
method= CPX_ALG_PRIMALprimal crossover
method= CPX_ALG_DUALdual crossover
method= CPX_ALG_NONEno crossover

Example

 status = CPXhybbaropt (env, lp, CPX_ALG_PRIMAL);

See also the example lpex2.c in the standard distribution.

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

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

method

Crossover method to be implemented, according to the table.

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, or proving the model infeasible or unbounded, are not considered errors. Note that a zero return value does not necessarily mean that a solution exists. Use query routines CPXsolninfo, CPXgetstat, and CPXsolution to obtain further information about the status of the optimization.