CPXXgetcallbackseqinfo and CPXgetcallbackseqinfo

The routine CPXXgetcallbackseqinfo/CPXgetcallbackseqinfo accesses information about nodes during the MIP optimization from within user-written callbacks.

int  CPXXgetcallbackseqinfo( CPXCENVptr env, void * cbdata, int wherefrom, CPXCNT seqid, int whichinfo, void * result_p )

int  CPXgetcallbackseqinfo( CPXCENVptr env, void * cbdata, int wherefrom, int seqid, int whichinfo, void * result_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 CPXXgetcallbackseqinfo/CPXgetcallbackseqinfo accesses information about nodes during the MIP optimization from within user-written callbacks. This routine can be called only when the value of its wherefrom argument is CPX_CALLBACK_MIP_NODE. The information accessed from this routine can also be accessed with the routine CPXXgetcallbacknodeinfo/CPXgetcallbacknodeinfo. Nodes are not stored by sequence number but by node number, so using the routine CPXXgetcallbackseqinfo/CPXgetcallbackseqinfo can be much more time-consuming than using the routine CPXXgetcallbacknodeinfo/CPXgetcallbacknodeinfo. A typical use of this routine is to obtain the node number of a node for which the sequence number is known, and then to use that node number to select the node with the node callback.

Note: This routine cannot retrieve information about nodes that have been moved to node files. (For more information about node files, see the topic Using node files in the CPLEX User's Manual.) If the argument seqnum refers to a node in a node file, CPXXgetcallbacknodeinfo/CPXgetcallbacknodeinfo returns the value CPXERR_NODE_ON_DISK.

Arguments

env
A pointer to the CPLEX environment, as returned by CPXXopenCPLEX/CPXopenCPLEX.
cbdata
The 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 reporting where the user-written callback was called from. This argument must be the value of wherefrom passed to the user-written callback. The only acceptable value of wherefrom is CPX_CALLBACK_MIP_NODE.
seqid
The sequence number of the node for which information is requested.
whichinfo
An integer specifying which information is requested. For a summary of possible values, refer to the table titled Information Requested for a User-Written Node Callback in the description of CPXXgetcallbacknodeinfo/CPXgetcallbacknodeinfo.
result_p
A generic pointer to a variable of type double or int. The variable represents the value returned by whichinfo. The column C Type in the table titled Information Requested for a User-Written Node Callback shows the type of various values returned by whichinfo.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs. The return value CPXERR_NODE_ON_DISK reports an attempt to access a node currently located in a node file on disk.