Detailed Description
methods for branching on LP solutions, relaxation solutions, and pseudo solutions
- See also
- Public Variable methods contains some typical variable branching score functions
Function Documentation
◆ SCIPgetLPBranchCands()
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
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 395 of file scip_branch.c.
References FALSE, SCIP_CALL, SCIP_INVALIDDATA, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIPbranchcandGetLPCands(), SCIPcheckStage(), SCIPerrorMessage, SCIPlpGetSolstat(), and TRUE.
Referenced by branchingIntegralOrNonlinear(), candidateListGetAllFractionalCandidates(), computeBranchingPriorities(), performLPRandRounding(), performLPSimpleRounding(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PROPEXEC(), SCIP_DECL_SEPAEXECLP(), SCIPperformGenericDivingAlgorithm(), SCIPvisualUpdateChild(), and selectVarMultAggrBranching().
◆ SCIPgetNLPBranchCands()
int SCIPgetNLPBranchCands | ( | SCIP * | scip | ) |
gets number of branching candidates for LP solution branching (number of fractional variables)
- Returns
- the number of branching candidates for LP solution branching (number of fractional variables).
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 428 of file scip_branch.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIPABORT, SCIPbranchcandGetLPCands(), SCIPcheckStage(), SCIPerrorMessage, SCIPlpGetSolstat(), and TRUE.
Referenced by branching(), branchingIntegralFirst(), branchingIntegralOrNonlinear(), consEnfo(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFORELAX(), SCIP_DECL_CONSSEPALP(), SCIP_DECL_DISPOUTPUT(), SCIP_DECL_HEUREXEC(), SCIP_DECL_SEPAEXECLP(), SCIPapplyHeurDualval(), and separateOddCycles().
◆ SCIPgetNPrioLPBranchCands()
int SCIPgetNPrioLPBranchCands | ( | SCIP * | scip | ) |
gets number of branching candidates with maximal priority for LP solution branching
- Returns
- the number of branching candidates with maximal priority for LP solution branching.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 466 of file scip_branch.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIPABORT, SCIPbranchcandGetLPCands(), SCIPcheckStage(), SCIPerrorMessage, SCIPlpGetSolstat(), and TRUE.
◆ SCIPgetExternBranchCands()
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
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Note
- Candidate variables with maximal priority are ordered: binaries first, then integers, implicit integers and continuous last.
- Parameters
-
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 511 of file scip_branch.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchcandGetExternCands(), SCIPcheckStage(), and TRUE.
Referenced by SCIP_DECL_BRANCHEXECEXT().
◆ SCIPgetNExternBranchCands()
int SCIPgetNExternBranchCands | ( | SCIP * | scip | ) |
gets number of external branching candidates
- Returns
- the number of external branching candidates.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 543 of file scip_branch.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNExternCands(), SCIPcheckStage(), and TRUE.
Referenced by SCIP_DECL_DISPOUTPUT().
◆ SCIPgetNPrioExternBranchCands()
int SCIPgetNPrioExternBranchCands | ( | SCIP * | scip | ) |
gets number of external branching candidates with maximal branch priority
- Returns
- the number of external branching candidates with maximal branch priority.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 563 of file scip_branch.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioExternCands(), SCIPcheckStage(), and TRUE.
◆ SCIPgetNPrioExternBranchBins()
int SCIPgetNPrioExternBranchBins | ( | SCIP * | scip | ) |
gets number of binary external branching candidates with maximal branch priority
- Returns
- the number of binary external branching candidates with maximal branch priority.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 583 of file scip_branch.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioExternBins(), SCIPcheckStage(), and TRUE.
◆ SCIPgetNPrioExternBranchInts()
int SCIPgetNPrioExternBranchInts | ( | SCIP * | scip | ) |
gets number of integer external branching candidates with maximal branch priority
- Returns
- the number of integer external branching candidates with maximal branch priority.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 603 of file scip_branch.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioExternInts(), SCIPcheckStage(), and TRUE.
◆ SCIPgetNPrioExternBranchImpls()
int SCIPgetNPrioExternBranchImpls | ( | SCIP * | scip | ) |
gets number of implicit integer external branching candidates with maximal branch priority
- Returns
- the number of implicit integer external branching candidates with maximal branch priority.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 623 of file scip_branch.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioExternImpls(), SCIPcheckStage(), and TRUE.
◆ SCIPgetNPrioExternBranchConts()
int SCIPgetNPrioExternBranchConts | ( | SCIP * | scip | ) |
gets number of continuous external branching candidates with maximal branch priority
- Returns
- the number of continuous external branching candidates with maximal branch priority.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 643 of file scip_branch.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioExternConts(), SCIPcheckStage(), and TRUE.
◆ SCIPaddExternBranchCand()
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
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 665 of file scip_branch.c.
References FALSE, NULL, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIPbranchcandAddExternCand(), SCIPcheckStage(), and TRUE.
Referenced by collectBranchingCands(), registerBranchingCandidates(), registerBranchingCandidatesAllUnfixed(), and SCIP_DECL_CONSENFORELAX().
◆ SCIPclearExternBranchCands()
void SCIPclearExternBranchCands | ( | SCIP * | scip | ) |
removes all external candidates from the storage for external branching
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 689 of file scip_branch.c.
References FALSE, NULL, SCIP_CALL_ABORT, SCIPbranchcandClearExternCands(), SCIPcheckStage(), and TRUE.
◆ SCIPcontainsExternBranchCand()
checks whether the given variable is contained in the candidate storage for external branching
- Returns
- whether the given variable is contained in the candidate storage for external branching.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure var variable to look for
Definition at line 709 of file scip_branch.c.
References FALSE, NULL, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPbranchcandContainsExternCand(), SCIPcheckStage(), and TRUE.
◆ SCIPgetPseudoBranchCands()
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
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 733 of file scip_branch.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPbranchcandGetPseudoCands(), SCIPcheckStage(), and TRUE.
Referenced by branch(), countSparseSol(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_BRANCHEXECPS(), and SCIP_DECL_HEUREXEC().
◆ SCIPgetNPseudoBranchCands()
int SCIPgetNPseudoBranchCands | ( | SCIP * | scip | ) |
gets number of branching candidates for pseudo solution branching (non-fixed variables)
- Returns
- the number branching candidates for pseudo solution branching (non-fixed variables).
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 758 of file scip_branch.c.
References FALSE, SCIP_CALL_ABORT, SCIPbranchcandGetNPseudoCands(), SCIPcheckStage(), and TRUE.
Referenced by applyBoundHeur(), applyOptcumulativeFixings(), applyVbounds(), applyVboundsFixings(), calculateCutoffScore(), calculateRelCutoffScore(), checkFeasSubtree(), checkSolution(), countSparseSol(), enforceConstraint(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PROPEXEC(), and SCIPapplyHeurDualval().
◆ SCIPgetNPrioPseudoBranchCands()
int SCIPgetNPrioPseudoBranchCands | ( | SCIP * | scip | ) |
gets number of branching candidates with maximal branch priority for pseudo solution branching
- Returns
- the number of branching candidates with maximal branch priority for pseudo solution branching.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 777 of file scip_branch.c.
References FALSE, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioPseudoCands(), SCIPcheckStage(), and TRUE.
◆ SCIPgetNPrioPseudoBranchBins()
int SCIPgetNPrioPseudoBranchBins | ( | SCIP * | scip | ) |
gets number of binary branching candidates with maximal branch priority for pseudo solution branching
- Returns
- the number of binary branching candidates with maximal branch priority for pseudo solution branching.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 795 of file scip_branch.c.
References FALSE, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioPseudoBins(), SCIPcheckStage(), and TRUE.
Referenced by fixVariable().
◆ SCIPgetNPrioPseudoBranchInts()
int SCIPgetNPrioPseudoBranchInts | ( | SCIP * | scip | ) |
gets number of integer branching candidates with maximal branch priority for pseudo solution branching
- Returns
- the number of integer branching candidates with maximal branch priority for pseudo solution branching.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 813 of file scip_branch.c.
References FALSE, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioPseudoInts(), SCIPcheckStage(), and TRUE.
◆ SCIPgetNPrioPseudoBranchImpls()
int SCIPgetNPrioPseudoBranchImpls | ( | SCIP * | scip | ) |
gets number of implicit integer branching candidates with maximal branch priority for pseudo solution branching
- Returns
- the number of implicit integer branching candidates with maximal branch priority for pseudo solution branching.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure
Definition at line 831 of file scip_branch.c.
References FALSE, SCIP_CALL_ABORT, SCIPbranchcandGetNPrioPseudoImpls(), SCIPcheckStage(), and TRUE.
◆ SCIPgetBranchScore()
calculates the branching score out of the gain predictions for a binary branching
- Returns
- the branching score out of the gain predictions for a binary branching.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 849 of file scip_branch.c.
References FALSE, NULL, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPbranchGetScore(), SCIPcheckStage(), and TRUE.
Referenced by calculateCutoffScore(), calculateRelCutoffScore(), calculateScoreFromDeeperscore(), calculateScoreFromDeeperscoreAndCutoffs(), calculateScoreFromPseudocosts(), calculateScoreFromResult(), calculateScoreFromResult2(), execRelpscost(), getNActiveConsScore(), SCIP_DECL_BRANCHEXECLP(), SCIPselectVarPseudoStrongBranching(), SCIPselectVarStrongBranching(), scoreBranchingCandidates(), selectVarMultAggrBranching(), and updateBestCandidate().
◆ SCIPgetBranchScoreMultiple()
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
- Returns
- the branching score out of the gain predictions for a branching with arbitrary many children.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 872 of file scip_branch.c.
References FALSE, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPbranchGetScoreMultiple(), SCIPcheckStage(), and TRUE.
Referenced by runVanillaStrongBranching(), and SCIPselectVarPseudoStrongBranching().
◆ SCIPgetBranchingPoint()
computes a branching point for a continuous or discrete variable
- See also
- SCIPbranchGetBranchingPoint
- Returns
- the branching point for a continuous or discrete variable.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 897 of file scip_branch.c.
References FALSE, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPbranchGetBranchingPoint(), SCIPcheckStage(), and TRUE.
Referenced by branching(), performBranchingSol(), SCIP_DECL_BRANCHEXECEXT(), scoreBranchingCandidates(), and updateBestCandidate().
◆ SCIPcalcNodeselPriority()
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
- Returns
- the node selection priority for moving the given variable's LP value to the given target value.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 920 of file scip_branch.c.
References FALSE, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPtreeCalcNodeselPriority(), and TRUE.
Referenced by branchBalancedCardinality(), branchOnBin(), branchUnbalancedCardinality(), createNAryBranch(), enforceConflictgraph(), enforceConssSOS1(), and enforceSOS2().
◆ SCIPcalcChildEstimate()
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
- Returns
- the estimate for the objective of the best feasible solution contained in the subtree after applying the given branching.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 947 of file scip_branch.c.
References FALSE, SCIP_Var::scip, SCIP_CALL_ABORT, SCIPcheckStage(), SCIPtreeCalcChildEstimate(), and TRUE.
Referenced by branchOnBin(), branchUnbalancedCardinality(), createNAryBranch(), enforceConssSOS1(), enforceIndicators(), and performBranchingNoSol().
◆ SCIPcalcChildEstimateIncrease()
SCIP_Real SCIPcalcChildEstimateIncrease | ( | SCIP * | scip, |
SCIP_VAR * | var, | ||
SCIP_Real | varsol, | ||
SCIP_Real | targetvalue | ||
) |
calculates the increase of the estimate for the objective of the best feasible solution contained in the subtree after applying the given branching
- Returns
- the increase of the estimate for the objective of the best feasible solution contained in the subtree after applying the given branching.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure var variable on which the branching is applied varsol solution value of variable targetvalue new value of the variable in the child node
Definition at line 971 of file scip_branch.c.
References MIN, NULL, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPsetFeasCeil(), SCIPsetFeasFloor(), SCIPvarGetPseudocost(), and SCIPvarGetType().
Referenced by branchBalancedCardinality(), branchUnbalancedCardinality(), enforceConflictgraph(), enforceConssSOS1(), and enforceSOS2().
◆ SCIPcreateChild()
SCIP_RETCODE SCIPcreateChild | ( | SCIP * | scip, |
SCIP_NODE ** | node, | ||
SCIP_Real | nodeselprio, | ||
SCIP_Real | estimate | ||
) |
creates a child node of the focus node
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 1017 of file scip_branch.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPnodeCreateChild(), and TRUE.
Referenced by branchBalancedCardinality(), branchCons(), branchOnBin(), branchUnbalancedCardinality(), createNAryBranch(), enforceConflictgraph(), enforceConssSOS1(), enforceIndicators(), enforceSOS2(), performBranchingNoSol(), SCIP_DECL_BRANCHEXECLP(), and SCIP_DECL_BRANCHEXECPS().
◆ SCIPbranchVar()
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)
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 1050 of file scip_branch.c.
References FALSE, SCIP_Var::scip, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPcheckStage(), SCIPerrorMessage, SCIPsetIsEQ(), SCIPtreeBranchVar(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbLocal(), and TRUE.
Referenced by performBranchingNoSol(), SCIP_DECL_BRANCHEXECLP(), and SCIP_DECL_BRANCHEXECPS().
◆ SCIPbranchVarHole()
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
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 1091 of file scip_branch.c.
References FALSE, SCIP_Var::scip, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPtreeBranchVarHole(), and TRUE.
Referenced by applyAlternativeBoundsBranching().
◆ SCIPbranchVarVal()
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)
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 1126 of file scip_branch.c.
References FALSE, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPcheckStage(), SCIPerrorMessage, SCIPisInfinity(), SCIPisLT(), SCIPisRelEQ(), SCIPsetIsEQ(), SCIPtreeBranchVar(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbLocal(), and TRUE.
Referenced by branch(), branching(), branchOnVar(), execRelpscost(), performBranchingSol(), SCIP_DECL_BRANCHEXECEXT(), and SCIP_DECL_BRANCHEXECLP().
◆ SCIPbranchVarValNary()
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).
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
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 1189 of file scip_branch.c.
References FALSE, SCIP_Var::scip, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPcheckStage(), SCIPerrorMessage, SCIPisInfinity(), SCIPisLT(), SCIPisRelEQ(), SCIPsetIsEQ(), SCIPtreeBranchVarNary(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetType(), SCIPvarGetUbLocal(), and TRUE.
Referenced by SCIP_DECL_BRANCHEXECEXT().
◆ SCIPbranchLP()
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
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure result pointer to store the result of the branching (s. branch.h)
Definition at line 1234 of file scip_branch.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPbranchExecLP(), SCIPcheckStage(), and TRUE.
Referenced by SCIP_DECL_CONSENFOLP().
◆ SCIPbranchExtern()
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
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure result pointer to store the result of the branching (s. branch.h)
Definition at line 1258 of file scip_branch.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPbranchExecExtern(), SCIPcheckStage(), and TRUE.
Referenced by SCIP_DECL_CONSENFORELAX().
◆ SCIPbranchPseudo()
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
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if
scip
is in one of the following stages:
See SCIP_STAGE for a complete list of all possible solving stages.
- Parameters
-
scip SCIP data structure result pointer to store the result of the branching (s. branch.h)
Definition at line 1282 of file scip_branch.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPbranchExecPseudo(), SCIPcheckStage(), and TRUE.