CPXXgetnodecallbackfunc and CPXgetnodecallbackfunc

The routine CPXXgetnodecallbackfunc/CPXgetnodecallbackfunc accesses the user-written callback to be called during MIP optimization after CPLEX has selected a node to explore, but before this exploration is carried out.

int  CPXXgetnodecallbackfunc( CPXCENVptr env, int(CPXPUBLIC **nodecallback_p)(CPXX_CALLBACK_NODE_ARGS), void ** cbhandle_p )

int  CPXgetnodecallbackfunc( CPXCENVptr env, int(CPXPUBLIC **nodecallback_p)(CALLBACK_NODE_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 CPXXgetnodecallbackfunc/CPXgetnodecallbackfunc accesses the user-written callback to be called during MIP optimization after CPLEX has selected a node to explore, but before this exploration is carried out. The callback routine can change the node selected by CPLEX to a node selected by the user.

For documentation of callback arguments, see the routine CPXXsetnodecallbackfunc/CPXsetnodecallbackfunc.

Arguments

env

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

nodecallback_p

The address of the pointer to the current user-written node callback. If no callback has been set, the pointer will evaluate 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


 CPXgetnodecallbackfunc(env, &current_callback, &current_handle);
 

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