CPXXgetusercutcallbackfunc and CPXgetusercutcallbackfunc

The routine CPXXgetusercutcallbackfunc/CPXgetusercutcallbackfunc accesses the user-written callback for adding cuts.

int  CPXXgetusercutcallbackfunc( CPXCENVptr env, int(CPXPUBLIC **cutcallback_p)(CPXX_CALLBACK_CUT_ARGS), void ** cbhandle_p )

int  CPXgetusercutcallbackfunc( CPXCENVptr env, int(CPXPUBLIC **cutcallback_p)(CALLBACK_CUT_ARGS), void ** cbhandle_p )

Description

Warning:

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 CPXXgetusercutcallbackfunc/CPXgetusercutcallbackfunc accesses the user-written callback for adding cuts. The user-written callback is called by CPLEX during MIP branch and cut for every node that has an LP optimal solution with objective value below the cutoff and that is integer infeasible.

Tip:

The routine CPXXgetusercutcallbackfunc/CPXgetusercutcallbackfunc and its analog CPXXgetlazyconstraintcallbackfunc/CPXgetlazyconstraintcallbackfunc replace the deprecated routine CPXgetcutcallbackfunc, which will be removed in a future release. Do not use the deprecated routine in the same application as either of its replacements.

Arguments

env

A pointer to the CPLEX environment, as returned by CPXXopenCPLEX/CPXopenCPLEX.

cutcallback_p

The address of the pointer to the current user-written cut callback. If no callback has been set, the pointer evaluates to NULL.

cbhandle_p

The address of a variable to hold the user's private pointer.

Return

The routine returns 0 (zero) if successful or an error code otherwise.

Example


 CPXgetusercutcallbackfunc(env, &cutcallback_p, &cbhandle_p);
 

See also Advanced MIP Control Interface in the CPLEX User's Manual.