SCIPtreeBranchVarNary

Function SCIPtreeBranchVarNary 

Source
pub unsafe extern "C" fn SCIPtreeBranchVarNary(
    tree: *mut SCIP_TREE,
    reopt: *mut SCIP_REOPT,
    blkmem: *mut BMS_BLKMEM,
    set: *mut SCIP_SET,
    stat: *mut SCIP_STAT,
    transprob: *mut SCIP_PROB,
    origprob: *mut SCIP_PROB,
    lp: *mut SCIP_LP,
    branchcand: *mut SCIP_BRANCHCAND,
    eventqueue: *mut SCIP_EVENTQUEUE,
    eventfilter: *mut SCIP_EVENTFILTER,
    var: *mut SCIP_VAR,
    val: f64,
    n: c_int,
    minwidth: f64,
    widthfactor: f64,
    nchildren: *mut c_int,
) -> SCIP_RETCODE
Expand description

n-ary branching on a variable x Branches on variable x such that up to n/2 children are created on each side of the usual branching value. The branching value is selected as in SCIPtreeBranchVar(). If n is 2 or the variables local domain is too small for a branching into n pieces, SCIPtreeBranchVar() is called. The parameters minwidth and widthfactor determine the domain width of the branching variable in the child nodes. If n is odd, one child with domain width ‘width’ and having the branching value in the middle is created. Otherwise, two children with domain width ‘width’ and being left and right of the branching value are created. Next further nodes to the left and right are created, where width is multiplied by widthfactor with increasing distance from the first nodes. The initial width is calculated such that n/2 nodes are created to the left and to the right of the branching value. If this value is below minwidth, the initial width is set to minwidth, which may result in creating less than n nodes.

Giving a large value for widthfactor results in creating children with small domain when close to the branching value and large domain when closer to the current variable bounds. That is, setting widthfactor to a very large value and n to 3 results in a ternary branching where the branching variable is mostly fixed in the middle child. Setting widthfactor to 1.0 results in children where the branching variable always has the same domain width (except for one child if the branching value is not in the middle).