CPXXcallbackmakebranch and CPXcallbackmakebranch
The routine CPXXcallbackmakebranch/CPXcallbackmakebranch
defines the branching constraints that define a branch from the current node
in the MIP search tree, from the context CPX_CALLBACKCONTEXT_BRANCHING.
The branch can include both variable bound changes and additional linear constraints.
int CPXXcallbackmakebranch( CPXCALLBACKCONTEXTptr context, CPXDIM varcnt, CPXDIM const * varind, char const * varlu, double const * varbd, CPXDIM rcnt, CPXNNZ nzcnt, double const * rhs, char const * sense, CPXNNZ const * rmatbeg, CPXDIM const * rmatind, double const * rmatval, double nodeest, CPXCNT * seqnum_p )
int CPXcallbackmakebranch( CPXCALLBACKCONTEXTptr context, int varcnt, int const * varind, char const * varlu, double const * varbd, int rcnt, int nzcnt, double const * rhs, char const * sense, int const * rmatbeg, int const * rmatind, double const * rmatval, double nodeest, int * seqnum_p )
Description
The routine CPXXcallbackmakebranch/CPXcallbackmakebranch
defines the branching constraints that define a branch from the current node
in the MIP search tree, from the context CPX_CALLBACKCONTEXT_BRANCHING.
The branch can include both variable bound changes and additional linear constraints.
Branch constraints are always specified in the original space.
| L | change the lower bound |
| U | change the upper bound |
| B | change both upper and lower bounds |
| L | less than or equal to constraint |
| E | equal to constraint |
| G | greater than or equal to constraint |
Arguments
- context
-
The callback context as passed into the callback function.
- varcnt
-
An integer that specifies the number of bound changes that are specified in the arrays
varind,varlu, andvarbd. - varind
-
Together with var
luand varbd, this array defines the bound changes for the branch. The entryvarind[i]is the index for the variable. - varlu
-
Together with
varindandvarbd, this array defines the bound changes for the branch. The entryvarlu[i]is one of three possible values specifying which bound to change. Those values appear in Table 1. - varbd
-
Together with
varindandvarlu, this array defines the bound changes for the branch. The entryvarbd[i]specifies the new value of the bound. - rcnt
- An integer that specifies the number of constraints for the branch.
- nzcnt
-
An integer that specifies the number of nonzero constraint coefficients for the branch. This specifies the length of the arrays
rmatindandrmatval. - rhs
-
An array of length
rcntcontaining the righthand side term for each constraint for the branch. - sense
-
An array of length
rcntcontaining the sense of each constraint to be added for the branch. Possible values appear in Table 2. - rmatbeg
-
An array that with
rmatbegandrmatinddefines the constraints for the branch. - rmatind
-
An array that with
rmatbegandrmatinddefines the constraints for the branch. - rmatval
-
An array that with
rmatbegandrmatinddefines the constraints for the branch. The format is similar to the format used to describe the constraint matrix in the routineCPXXaddrows/CPXaddrows. Every row must be stored in sequential locations in this array from positionrmatbeg[i]tormatbeg[i+1]-1(or fromrmatbeg[i]tonzcnt-1ifi=rcnt-1). Each entry,rmatind[i], specifies the column index of the corresponding coefficient,rmatval[i]. All rows must be contiguous, andrmatbeg[0]must be0. - nodeest
-
A double that specifies 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-and-cut tree with certain values of the pararameter to control
MIP node selection strategy
(
CPXPARAM_MIP_Strategy_NodeSelect). - seqnum_p
- A pointer to an integer that, on return, will contain the unique identifier number that CPLEX has assigned to the node created from this branch.