NO FRAMES

CPXbranchcallbackbranchgeneral

int CPXPUBLIC CPXbranchcallbackbranchgeneral(CPXCENVptr env, void * cbdata, int wherefrom, double nodeest, int varcnt, const int * varind, const char * varlu, const int * varbd, int rcnt, int nzcnt, const double * rhs, const char * sense, const int * rmatbeg, const int * rmatind, const double * rmatval, void * userhandle, int * seqnum_p)
Definition file: cplex.h
Include files: cplex.h
Note

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 CPXbranchcallbackbranchgeneral specifies the branches to be taken from the current node when the branch includes variable bound changes and additional constraints. It may be called only from within a user-written branch callback function.

Branch variables are in terms of the original problem if the parameter CPX_PARAM_MIPCBREDLP is set to CPX_OFF before the call to CPXmipopt that calls the callback. Otherwise, branch variables are in terms of the presolved problem.

Table 1: Values of varlu[i]
L change the lower bound
U change the upper bound
B change both uppder and lower bounds
Table 2: Values of sense[i]
L less than or equal to constraint
E equal to constraint
G greater than or equal to constraint

Parameters:

env

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

cbdata

A pointer passed to the user-written callback. This parameter must be the value of cbdata passed to the user-written callback.

wherefrom

An integer value that indicates where the user-written callback was called from. This parameter must be the value of wherefrom passed to the user-written callback.

nodeest

A double that indicates the value of the node estimate for the node to be created with this branch. The node estimate is used to select nodes from the branch & cut tree with certain values of the NodeSel parameter.

varcnt

An integer that indicates the number of bound changes that are specified in the arrays varind, varlu, and varbd.

varind

Together with varlu and varbd, this array defines the bound changes for the branch. The entry varind[i] is the index for the variable.

varlu

Together with varind and varbd, this array defines the bound changes for the branch. The entry varlu[i] is one of three possible values indicating which bound to change. Those values appear in Table 1.

varbd

Together with varind and varlu, this array defines the bound changes for the branch. The entry varbd[i] indicates the new value of the bound.

rcnt

An integer that indicates the number of constraints for the branch.

nzcnt

An integer that indicates the number of nonzero constraint coefficients for the branch. This specifies the length of the arrays rmatind and rmatval.

rhs

An array of length rcnt containing the right-hand side term for each constraint for the branch.

sense

An array of length rcnt containing the sense of each constraint to be added for the branch. Possible values appear in Table 2.

rmatbeg

An array that with rmatbeg and rmatind defines the constraints for the branch.

rmatind

An array that with rmatbeg and rmatind defines the constraints for the branch.

rmatval

An array that with rmatbeg and rmatind defines the constraints for the branch. The format is similar to the format used to describe the constraint matrix in the routine CPXaddrows. Every row must be stored in sequential locations in this array from position rmatbeg[i] to rmatbeg[i+1]-1 (or from rmatbeg[i] to nzcnt -1 if i=rcnt-1). Each entry, rmatind[i], indicates the column index of the corresponding coefficient, rmatval[i]. All rows must be contiguous, and rmatbeg[0] must be 0.

userhandle

A pointer to user private data that should be associated with the node created by this branch. May be NULL.

seqnum_p

A pointer to an integer that, on return, will contain the sequence number that CPLEX has assigned to the node created from this branch. The sequence number may be used to select this node in later calls to the node callback.

Returns:

The routine returns zero on success and nonzero if an error occurs.