CPXXpresolve and CPXpresolve
The routine CPXXpresolve/CPXpresolve performs LP or MIP presolve
depending whether a problem object is an LP or a MIP.
int CPXXpresolve( CPXCENVptr env, CPXLPptr lp, int method )
int CPXpresolve( CPXCENVptr env, CPXLPptr lp, int method )
Description
This is an advanced routine. Advanced routines typically demand a thorough understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.
The routine CPXXpresolve/CPXpresolve performs LP or MIP presolve
depending whether a problem object is an LP or a MIP. If the problem is
already presolved, the existing presolved problem is freed, and a new
presolved problem is created.
Arguments
- env
-
A pointer to the CPLEX environment, as returned by
CPXXopenCPLEX/CPXopenCPLEX. - lp
-
A pointer to a CPLEX LP problem object, as returned by
CPXXcreateprob/CPXcreateprob. - method
-
An integer specifying the optimization algorithm to be used to solve the problem after the presolve is completed. Some presolve reductions are specific to an optimization algorithm, so specifying the algorithm makes sure that the problem is presolved for that algorithm, and that presolve does not have to be repeated when that optimization routine is called. Possible values are
CPX_ALG_NONE,CPX_ALG_PRIMAL,CPX_ALG_DUAL, andCPX_ALG_BARRIERfor LP;CPX_ALG_NONEshould be used for MIP.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXpresolve (env, lp, CPX_ALG_DUAL);