CPXXbranchcallbackbranchasCPLEX and CPXbranchcallbackbranchasCPLEX

The routine CPXXbranchcallbackbranchasCPLEX/CPXbranchcallbackbranchasCPLEX accomplishes two tasks.

int  CPXXbranchcallbackbranchasCPLEX( CPXCENVptr env, void * cbdata, int wherefrom, int num, void * userhandle, CPXCNT * seqnum_p )

int  CPXbranchcallbackbranchasCPLEX( CPXCENVptr env, void * cbdata, int wherefrom, int num, void * userhandle, int * seqnum_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 CPXXbranchcallbackbranchasCPLEX/CPXbranchcallbackbranchasCPLEX accomplishes two tasks. First, it specifies that the branches to be taken from the current node must be the same as the i-th branch CPLEX has selected. Second, it simultaneously attaches the user data object userhandle to the new node. This routine can be called only from within a user-written branch callback function.

For details about the arguments of that user-written branch callback function (such arguments as nodecnt), see the documentation of CPXXsetbranchcallbackfunc/CPXsetbranchcallbackfunc.

Arguments

env
A pointer to the CPLEX environment, as returned by CPXXopenCPLEX/CPXopenCPLEX.
cbdata
A pointer passed to the user-written callback. This argument must be the value of cbdata passed to the user-written callback.
wherefrom
An integer value that reports where the user-written callback was called from. This argument must be the value of wherefrom passed to the user-written callback.
num
An integer specifying which branch to create. Typically, 0 (zero) is less than or equal to num, and num is strictly less than nodecnt, an argument of the user-written callback function. The first branch that CPLEX creates is designated conventionally by 0 (zero) and the second by 1 (one).
userhandle
A pointer to user private data that should be associated with the node created by this branch. Can be NULL.
seqnum_p
A pointer to an integer. On return, that integer contains the sequence number that CPLEX assigns to the node created from this branch. You can use that sequence number to select this node in later calls to the node callback.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs.