Overview | Group | Tree | Graph | Index | Concepts |
This is an advanced routine. Advanced routines typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.
The routine CPXsetdeletenodecallbackfunc
sets and modifies
the user-written callback to be called during MIP optimization when a node
is to be deleted. Nodes are deleted in these circumstances:
Example
status = CPXsetdeletenodecallbackfunc (env, mybranchfunc, mydata);
See also the example admipex1.c
in the standard distribution.
Parameters
env
A pointer to the CPLEX environment,
as returned by CPXopenCPLEX
.
deletecallback
A pointer to a user-written branch callback. If the callback is set to NULL, no callback is called during optimization.
cbhandle
A pointer to user private data. This pointer is passed to the callback.
Callback description
int callback (CPXENVptr env, void *cbdata, int wherefrom, void *cbhandle, int seqnum, void *handle);
The call to the delete node callback routine occurs during MIP optimization when a node is to be deleted.
The main purpose of the callback is to provide an opportunity to free any user data associated with the node, thus preventing memory leaks.
Callback return value
The callback returns zero on success and nonzero if an error occurs.
Callback arguments
env
A pointer to the CPLEX environment, as returned by one of the
CPXopenCPLEX
routines.
cbdata
A pointer passed from the optimization routine to the user-written callback that identifies the problem being optimized. The only purpose of this pointer is to pass it to the callback information routines.
wherefrom
An integer value indicating where in the optimization this function was
called. It will have the value CPX_CALLBACK_MIP_DELETENODE
.
cbhandle
A pointer to user private data.
seqnum
The sequence number of the node that is being deleted.
handle
A pointer to the user private data that was assigned to the node when it was created with one of the callback branching routines:
CPXbranchcallbackbranchbds
, or CPXbranchcallbackbranchconstraints
, or CPXbranchcallbackbranchgeneral
.