methods for branching on LP solutions, relaxation solutions, and pseudo solutions
SCIP_RETCODE SCIPgetLPBranchCands | ( | SCIP * | scip, |
SCIP_VAR *** | lpcands, | ||
SCIP_Real ** | lpcandssol, | ||
SCIP_Real ** | lpcandsfrac, | ||
int * | nlpcands, | ||
int * | npriolpcands, | ||
int * | nfracimplvars | ||
) |
gets branching candidates for LP solution branching (fractional variables) along with solution values, fractionalities, and number of branching candidates; The number of branching candidates does NOT account for fractional implicit integer variables which should not be used for branching decisions.
Fractional implicit integer variables are stored at the positions *nlpcands to *nlpcands + *nfracimplvars - 1
branching rules should always select the branching candidate among the first npriolpcands of the candidate list
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
lpcands | pointer to store the array of LP branching candidates, or NULL |
lpcandssol | pointer to store the array of LP candidate solution values, or NULL |
lpcandsfrac | pointer to store the array of LP candidate fractionalities, or NULL |
nlpcands | pointer to store the number of LP branching candidates, or NULL |
npriolpcands | pointer to store the number of candidates with maximal priority, or NULL |
nfracimplvars | pointer to store the number of fractional implicit integer variables, or NULL |
Definition at line 36301 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, Scip::lp, SCIP_CALL, SCIP_INVALIDDATA, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIPbranchcandGetLPCands(), SCIPerrorMessage, SCIPlpGetSolstat(), Scip::set, Scip::stat, and TRUE.
Referenced by performLPRandRounding(), performLPSimpleRounding(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_HEUREXEC(), SCIP_DECL_SEPAEXECLP(), SCIPperformGenericDivingAlgorithm(), SCIPvisualUpdateChild(), and selectVarMultAggrBranching().
int SCIPgetNLPBranchCands | ( | SCIP * | scip | ) |
gets number of branching candidates for LP solution branching (number of fractional variables)
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36334 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, Scip::lp, NULL, SCIP_CALL_ABORT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIPABORT, SCIPbranchcandGetLPCands(), SCIPerrorMessage, SCIPlpGetSolstat(), Scip::set, Scip::stat, and TRUE.
Referenced by SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSSEPALP(), SCIP_DECL_DISPOUTPUT(), SCIP_DECL_HEUREXEC(), SCIP_DECL_SEPAEXECLP(), and SCIPapplyHeurDualval().
int SCIPgetNPrioLPBranchCands | ( | SCIP * | scip | ) |
gets number of branching candidates with maximal priority for LP solution branching
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36372 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, Scip::lp, NULL, SCIP_CALL_ABORT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIPABORT, SCIPbranchcandGetLPCands(), SCIPerrorMessage, SCIPlpGetSolstat(), Scip::set, Scip::stat, and TRUE.
SCIP_RETCODE SCIPgetExternBranchCands | ( | SCIP * | scip, |
SCIP_VAR *** | externcands, | ||
SCIP_Real ** | externcandssol, | ||
SCIP_Real ** | externcandsscore, | ||
int * | nexterncands, | ||
int * | nprioexterncands, | ||
int * | nprioexternbins, | ||
int * | nprioexternints, | ||
int * | nprioexternimpls | ||
) |
gets external branching candidates along with solution values, scores, and number of branching candidates; these branching candidates can be used by relaxations or nonlinear constraint handlers; branching rules should always select the branching candidate among the first nprioexterncands of the candidate list
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
externcands | pointer to store the array of extern branching candidates, or NULL |
externcandssol | pointer to store the array of extern candidate solution values, or NULL |
externcandsscore | pointer to store the array of extern candidate scores, or NULL |
nexterncands | pointer to store the number of extern branching candidates, or NULL |
nprioexterncands | pointer to store the number of candidates with maximal priority, or NULL |
nprioexternbins | pointer to store the number of binary candidates with maximal priority, or NULL |
nprioexternints | pointer to store the number of integer candidates with maximal priority, or NULL |
nprioexternimpls | pointer to store the number of implicit integer candidates with maximal priority, or NULL |
Definition at line 36417 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchcandGetExternCands(), and TRUE.
Referenced by SCIP_DECL_BRANCHEXECEXT().
int SCIPgetNExternBranchCands | ( | SCIP * | scip | ) |
gets number of external branching candidates
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36449 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNExternCands(), and TRUE.
Referenced by SCIP_DECL_DISPOUTPUT().
int SCIPgetNPrioExternBranchCands | ( | SCIP * | scip | ) |
gets number of external branching candidates with maximal branch priority
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36469 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioExternCands(), and TRUE.
int SCIPgetNPrioExternBranchBins | ( | SCIP * | scip | ) |
gets number of binary external branching candidates with maximal branch priority
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36489 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioExternBins(), and TRUE.
int SCIPgetNPrioExternBranchInts | ( | SCIP * | scip | ) |
gets number of integer external branching candidates with maximal branch priority
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36510 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioExternInts(), and TRUE.
int SCIPgetNPrioExternBranchImpls | ( | SCIP * | scip | ) |
gets number of implicit integer external branching candidates with maximal branch priority
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36530 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioExternImpls(), and TRUE.
int SCIPgetNPrioExternBranchConts | ( | SCIP * | scip | ) |
gets number of continuous external branching candidates with maximal branch priority
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36550 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioExternConts(), and TRUE.
SCIP_RETCODE SCIPaddExternBranchCand | ( | SCIP * | scip, |
SCIP_VAR * | var, | ||
SCIP_Real | score, | ||
SCIP_Real | solval | ||
) |
insert variable, its score and its solution value into the external branching candidate storage the relative difference of the current lower and upper bounds of a continuous variable must be at least epsilon
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
var | variable to insert |
score | score of external candidate, e.g. infeasibility |
solval | value of the variable in the current solution |
Definition at line 36572 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, NULL, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIPbranchcandAddExternCand(), Scip::set, and TRUE.
Referenced by collectBranchingCands(), registerBranchingCandidates(), registerBranchingCandidatesCentrality(), registerBranchingCandidatesGap(), registerBranchingCandidatesViolation(), registerBranchingVariables(), registerLargeRelaxValueVariableForBranching(), SCIP_DECL_CONSENFOPS(), and SCIP_DECL_CONSENFORELAX().
void SCIPclearExternBranchCands | ( | SCIP * | scip | ) |
removes all external candidates from the storage for external branching
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36596 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandClearExternCands(), and TRUE.
checks whether the given variable is contained in the candidate storage for external branching
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
var | variable to look for |
Definition at line 36616 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, NULL, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPbranchcandContainsExternCand(), and TRUE.
SCIP_RETCODE SCIPgetPseudoBranchCands | ( | SCIP * | scip, |
SCIP_VAR *** | pseudocands, | ||
int * | npseudocands, | ||
int * | npriopseudocands | ||
) |
gets branching candidates for pseudo solution branching (non-fixed variables) along with the number of candidates
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
pseudocands | pointer to store the array of pseudo branching candidates, or NULL |
npseudocands | pointer to store the number of pseudo branching candidates, or NULL |
npriopseudocands | pointer to store the number of candidates with maximal priority, or NULL |
Definition at line 36640 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, SCIP_CALL, SCIP_OKAY, SCIPbranchcandGetPseudoCands(), Scip::set, Scip::transprob, and TRUE.
Referenced by branch(), countSparseSol(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_BRANCHEXECPS(), and SCIP_DECL_HEUREXEC().
int SCIPgetNPseudoBranchCands | ( | SCIP * | scip | ) |
gets number of branching candidates for pseudo solution branching (non-fixed variables)
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36665 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, SCIP_CALL_ABORT, SCIPbranchcandGetNPseudoCands(), and TRUE.
Referenced by applyBoundHeur(), applyVbounds(), applyVboundsFixings(), checkFeasSubtree(), checkSolution(), countSparseSol(), enforceConstraint(), SCIP_DECL_HEUREXEC(), and SCIPapplyHeurDualval().
int SCIPgetNPrioPseudoBranchCands | ( | SCIP * | scip | ) |
gets number of branching candidates with maximal branch priority for pseudo solution branching
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36684 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioPseudoCands(), and TRUE.
int SCIPgetNPrioPseudoBranchBins | ( | SCIP * | scip | ) |
gets number of binary branching candidates with maximal branch priority for pseudo solution branching
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36702 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioPseudoBins(), and TRUE.
Referenced by fixVariable().
int SCIPgetNPrioPseudoBranchInts | ( | SCIP * | scip | ) |
gets number of integer branching candidates with maximal branch priority for pseudo solution branching
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36720 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioPseudoInts(), and TRUE.
int SCIPgetNPrioPseudoBranchImpls | ( | SCIP * | scip | ) |
gets number of implicit integer branching candidates with maximal branch priority for pseudo solution branching
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
Definition at line 36738 of file scip.c.
References Scip::branchcand, checkStage(), FALSE, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioPseudoImpls(), and TRUE.
calculates the branching score out of the gain predictions for a binary branching
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
var | variable, of which the branching factor should be applied, or NULL |
downgain | prediction of objective gain for rounding downwards |
upgain | prediction of objective gain for rounding upwards |
Definition at line 36756 of file scip.c.
References checkStage(), FALSE, NULL, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPbranchGetScore(), Scip::set, and TRUE.
Referenced by execRelpscost(), getNActiveConsScore(), SCIP_DECL_BRANCHEXECLP(), SCIPselectVarPseudoStrongBranching(), SCIPselectVarStrongBranching(), selectVarMultAggrBranching(), and updateBestCandidate().
SCIP_Real SCIPgetBranchScoreMultiple | ( | SCIP * | scip, |
SCIP_VAR * | var, | ||
int | nchildren, | ||
SCIP_Real * | gains | ||
) |
calculates the branching score out of the gain predictions for a branching with arbitrary many children
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
var | variable, of which the branching factor should be applied, or NULL |
nchildren | number of children that the branching will create |
gains | prediction of objective gain for each child |
Definition at line 36779 of file scip.c.
References checkStage(), FALSE, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPbranchGetScoreMultiple(), Scip::set, and TRUE.
Referenced by SCIPselectVarPseudoStrongBranching().
computes a branching point for a continuous or discrete variable
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
var | variable, of which the branching point should be computed |
suggestion | suggestion for branching point, or SCIP_INVALID if no suggestion |
Definition at line 36804 of file scip.c.
References checkStage(), FALSE, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPbranchGetBranchingPoint(), Scip::set, Scip::tree, and TRUE.
Referenced by performBranching(), SCIP_DECL_BRANCHEXECEXT(), and updateBestCandidate().
SCIP_Real SCIPcalcNodeselPriority | ( | SCIP * | scip, |
SCIP_VAR * | var, | ||
SCIP_BRANCHDIR | branchdir, | ||
SCIP_Real | targetvalue | ||
) |
calculates the node selection priority for moving the given variable's LP value to the given target value; this node selection priority can be given to the SCIPcreateChild() call
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
var | variable on which the branching is applied |
branchdir | type of branching that was performed: upwards, downwards, or fixed; fixed should only be used, when both bounds changed |
targetvalue | new value of the variable in the child node |
Definition at line 36827 of file scip.c.
References checkStage(), FALSE, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPtreeCalcNodeselPriority(), Scip::set, Scip::stat, Scip::tree, and TRUE.
Referenced by branchBalancedCardinality(), branchUnbalancedCardinality(), createNAryBranch(), enforceConflictgraph(), enforceConssSOS1(), and enforceSOS2().
calculates an estimate for the objective of the best feasible solution contained in the subtree after applying the given branching; this estimate can be given to the SCIPcreateChild() call
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
var | variable on which the branching is applied |
targetvalue | new value of the variable in the child node |
Definition at line 36854 of file scip.c.
References checkStage(), FALSE, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPtreeCalcChildEstimate(), Scip::set, Scip::stat, Scip::tree, and TRUE.
Referenced by branchBalancedCardinality(), branchUnbalancedCardinality(), createNAryBranch(), enforceConflictgraph(), enforceConssSOS1(), enforceIndicators(), enforceSOS2(), and performBranching().
SCIP_RETCODE SCIPcreateChild | ( | SCIP * | scip, |
SCIP_NODE ** | node, | ||
SCIP_Real | nodeselprio, | ||
SCIP_Real | estimate | ||
) |
creates a child node of the focus node
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
node | pointer to node data structure |
nodeselprio | node selection priority of new node |
estimate | estimate for(transformed) objective value of best feasible solution in subtree |
Definition at line 36877 of file scip.c.
References checkStage(), FALSE, Scip::mem, NULL, SCIP_Mem::probmem, SCIP_CALL, SCIP_OKAY, SCIPnodeCreateChild(), Scip::set, Scip::stat, Scip::tree, and TRUE.
Referenced by branchBalancedCardinality(), branchCons(), branchUnbalancedCardinality(), createNAryBranch(), enforceConflictgraph(), enforceConssSOS1(), enforceConstraint(), enforceIndicators(), enforceSOS2(), performBranching(), and SCIP_DECL_BRANCHEXECLP().
SCIP_RETCODE SCIPbranchVar | ( | SCIP * | scip, |
SCIP_VAR * | var, | ||
SCIP_NODE ** | downchild, | ||
SCIP_NODE ** | eqchild, | ||
SCIP_NODE ** | upchild | ||
) |
branches on a non-continuous variable v using the current LP or pseudo solution; if solution value x' is fractional, two child nodes will be created (x <= floor(x'), x >= ceil(x')), if solution value is integral, the x' is equal to lower or upper bound of the branching variable and the bounds of v are finite, then two child nodes will be created (x <= x'', x >= x''+1 with x'' = floor((lb + ub)/2)), otherwise (up to) three child nodes will be created (x <= x'-1, x == x', x >= x'+1)
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
var | variable to branch on |
downchild | pointer to return the left child with variable rounded down, or NULL |
eqchild | pointer to return the middle child with variable fixed, or NULL |
upchild | pointer to return the right child with variable rounded up, or NULL |
Definition at line 36910 of file scip.c.
References Scip::branchcand, checkStage(), Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::origprob, SCIP_Mem::probmem, Scip::reopt, SCIP_Var::scip, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPsetIsEQ(), SCIPtreeBranchVar(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbLocal(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.
Referenced by performBranching(), SCIP_DECL_BRANCHEXECLP(), and SCIP_DECL_BRANCHEXECPS().
SCIP_RETCODE SCIPbranchVarHole | ( | SCIP * | scip, |
SCIP_VAR * | var, | ||
SCIP_Real | left, | ||
SCIP_Real | right, | ||
SCIP_NODE ** | downchild, | ||
SCIP_NODE ** | upchild | ||
) |
branches a variable x using a given domain hole; two child nodes (x <= left, x >= right) are created
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
var | variable to branch on |
left | left side of the domain hole |
right | right side of the domain hole |
downchild | pointer to return the left child (x <= left), or NULL |
upchild | pointer to return the right child (x >= right), or NULL |
Definition at line 36951 of file scip.c.
References Scip::branchcand, checkStage(), Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::origprob, SCIP_Mem::probmem, Scip::reopt, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIPtreeBranchVarHole(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.
Referenced by applyAlternativeBoundsBranching().
SCIP_RETCODE SCIPbranchVarVal | ( | SCIP * | scip, |
SCIP_VAR * | var, | ||
SCIP_Real | val, | ||
SCIP_NODE ** | downchild, | ||
SCIP_NODE ** | eqchild, | ||
SCIP_NODE ** | upchild | ||
) |
branches on a variable x using a given value x'; for continuous variables with relative domain width larger epsilon, x' must not be one of the bounds; two child nodes (x <= x', x >= x') are created; for integer variables, if solution value x' is fractional, two child nodes are created (x <= floor(x'), x >= ceil(x')), if x' is integral, three child nodes are created (x <= x'-1, x == x', x >= x'+1)
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
var | variable to branch on |
val | value to branch on |
downchild | pointer to return the left child with variable rounded down, or NULL |
eqchild | pointer to return the middle child with variable fixed, or NULL |
upchild | pointer to return the right child with variable rounded up, or NULL |
Definition at line 36986 of file scip.c.
References Scip::branchcand, checkStage(), Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::origprob, SCIP_Mem::probmem, Scip::reopt, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPisInfinity(), SCIPisLT(), SCIPisRelEQ(), SCIPsetIsEQ(), SCIPtreeBranchVar(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbLocal(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.
Referenced by branch(), execRelpscost(), performBranching(), and SCIP_DECL_BRANCHEXECEXT().
SCIP_RETCODE SCIPbranchVarValNary | ( | SCIP * | scip, |
SCIP_VAR * | var, | ||
SCIP_Real | val, | ||
int | n, | ||
SCIP_Real | minwidth, | ||
SCIP_Real | widthfactor, | ||
int * | nchildren | ||
) |
n-ary branching on a variable x using a given value
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 SCIPbranchVarVal(). 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).
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
var | variable to branch on |
val | value to branch on |
n | attempted number of children to be created, must be >= 2 |
minwidth | minimal domain width in children |
widthfactor | multiplier for children domain width with increasing distance from val, must be >= 1.0 |
nchildren | pointer to store number of created children, or NULL |
Definition at line 37049 of file scip.c.
References Scip::branchcand, checkStage(), Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::origprob, SCIP_Mem::probmem, Scip::reopt, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPerrorMessage, SCIPisInfinity(), SCIPisLT(), SCIPisRelEQ(), SCIPsetIsEQ(), SCIPtreeBranchVarNary(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbLocal(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.
Referenced by SCIP_DECL_BRANCHEXECEXT().
SCIP_RETCODE SCIPbranchLP | ( | SCIP * | scip, |
SCIP_RESULT * | result | ||
) |
calls branching rules to branch on an LP solution; if no fractional variables exist, the result is SCIP_DIDNOTRUN; if the branch priority of an unfixed variable is larger than the maximal branch priority of the fractional variables, pseudo solution branching is applied on the unfixed variables with maximal branch priority
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
result | pointer to store the result of the branching (s. branch.h) |
Definition at line 37094 of file scip.c.
References Scip::branchcand, checkStage(), SCIP_Primal::cutoffbound, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::origprob, Scip::primal, SCIP_Mem::probmem, Scip::reopt, SCIP_CALL, SCIP_OKAY, SCIPbranchExecLP(), Scip::sepastore, Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.
Referenced by SCIP_DECL_CONSENFOLP().
SCIP_RETCODE SCIPbranchExtern | ( | SCIP * | scip, |
SCIP_RESULT * | result | ||
) |
calls branching rules to branch on a external candidates; if no such candidates exist, the result is SCIP_DIDNOTRUN
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
result | pointer to store the result of the branching (s. branch.h) |
Definition at line 37118 of file scip.c.
References Scip::branchcand, checkStage(), SCIP_Primal::cutoffbound, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::origprob, Scip::primal, SCIP_Mem::probmem, Scip::reopt, SCIP_CALL, SCIP_OKAY, SCIPbranchExecExtern(), Scip::sepastore, Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.
Referenced by SCIP_DECL_CONSENFORELAX().
SCIP_RETCODE SCIPbranchPseudo | ( | SCIP * | scip, |
SCIP_RESULT * | result | ||
) |
calls branching rules to branch on a pseudo solution; if no unfixed variables exist, the result is SCIP_DIDNOTRUN
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
scip | SCIP data structure |
result | pointer to store the result of the branching (s. branch.h) |
Definition at line 37142 of file scip.c.
References Scip::branchcand, checkStage(), SCIP_Primal::cutoffbound, Scip::eventqueue, FALSE, Scip::lp, Scip::mem, Scip::origprob, Scip::primal, SCIP_Mem::probmem, Scip::reopt, SCIP_CALL, SCIP_OKAY, SCIPbranchExecPseudo(), Scip::set, Scip::stat, Scip::transprob, Scip::tree, and TRUE.