CPXXhybbaropt and CPXhybbaropt

The routine CPXXhybbaropt/CPXhybbaropt may be used, at any time after a linear program has been created via a call to CPXXcreateprob/CPXcreateprob, to find a solution to that problem.

int  CPXXhybbaropt( CPXCENVptr env, CPXLPptr lp, int method )

int  CPXhybbaropt( CPXCENVptr env, CPXLPptr lp, int method )

Description

The routine CPXXhybbaropt/CPXhybbaropt may be used, at any time after a linear program has been created via a call to CPXXcreateprob/CPXcreateprob, to find a solution to that problem. When this routine is called, CPLEX solves the specified problem by the CPLEX barrier optimizer 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 CPXXprimopt/CPXprimopt or CPXXdualopt/CPXdualopt can force a crossover to occur. The results of the optimization are recorded in the problem object.

Table 1. Methods of CPXhybbaropt
method = 0 use the parameter to choose the barrier crossover algorithm (CPXPARAM_Barrier_Crossover) to choose a crossover method
method = CPX_ALG_PRIMAL primal crossover
method = CPX_ALG_DUAL dual crossover
method = CPX_ALG_NONE no crossover

Arguments

env
A pointer to the CPLEX environment as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp
A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.
method
Crossover method to be implemented, according to the table.

Return

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 CPXXsolninfo/CPXsolninfo, CPXXgetstat/CPXgetstat, and CPXXsolution/CPXsolution to obtain further information about the status of the optimization.

Example


 status = CPXhybbaropt (env, lp, CPX_ALG_PRIMAL);

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