branch_distribution.c File Reference Detailed Descriptionprobability based branching rule based on an article by J. Pryor and J.W. Chinneck The distribution branching rule selects a variable based on its impact on row activity distributions. More formally, let be a row of the LP. Let further denote the (finite) lower and upper bound, respectively, of the -th variable . Viewing every variable as (continuously) uniformly distributed within its bounds, we can approximately understand the row activity as a Gaussian random variate with mean value and variance , with for continuous and for discrete variables. With these two parameters, we can calculate the probability to satisfy the row in terms of the cumulative distribution of the standard normal distribution: . The impact of a variable on the probability to satisfy a constraint after branching can be estimated by altering the variable contribution to the sums described above. In order to keep the tree size small, variables are preferred which decrease the probability to satisfy a row because it is more likely to create infeasible subproblems. The selection of the branching variable is subject to the parameter
If the parameter The original idea of probability based branching schemes appeared in: J. Pryor and J.W. Chinneck: Definition in file branch_distribution.c. Go to the source code of this file.
Macro Definition Documentation
Definition at line 64 of file branch_distribution.c. Referenced by SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_BRANCHEXITSOL(), SCIP_DECL_BRANCHFREE(), and SCIPincludeBranchruleDistribution().
Definition at line 65 of file branch_distribution.c. Referenced by SCIPincludeBranchruleDistribution().
Definition at line 66 of file branch_distribution.c. Referenced by SCIPincludeBranchruleDistribution().
Definition at line 67 of file branch_distribution.c. Referenced by SCIPincludeBranchruleDistribution().
Definition at line 68 of file branch_distribution.c. Referenced by SCIPincludeBranchruleDistribution().
Definition at line 70 of file branch_distribution.c. Referenced by SCIPincludeBranchruleDistribution().
Definition at line 71 of file branch_distribution.c. Referenced by SCIPincludeBranchruleDistribution().
Definition at line 72 of file branch_distribution.c. Referenced by SCIP_DECL_BRANCHEXECLP().
Definition at line 73 of file branch_distribution.c. Referenced by SCIPcalcCumulativeDistribution().
Definition at line 74 of file branch_distribution.c. Referenced by calcBranchScore(), rowCalculateGauss(), SCIPvarCalcDistributionParameters(), and varProcessBoundChanges().
should only rows which are active at the current node be considered? Definition at line 75 of file branch_distribution.c. Referenced by SCIPincludeBranchruleDistribution().
should the branching score weigh up- and down-scores of a variable Definition at line 76 of file branch_distribution.c. Referenced by SCIPincludeBranchruleDistribution().
event handler name Definition at line 79 of file branch_distribution.c. Referenced by SCIPincludeBranchruleDistribution().
the event tyoe to be handled by this event handler Definition at line 80 of file branch_distribution.c. Referenced by branchruledataEnsureArraySize(), and SCIP_DECL_BRANCHEXITSOL(). Function Documentation
ensure that maxindex + 1 rows can be represented in data arrays; memory gets reallocated with 10% extra space to save some time for future allocations
Definition at line 121 of file branch_distribution.c. References EVENT_DISTRIBUTION, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPallocBlockMemoryArray, SCIPcatchVarEvent(), SCIPfeasCeil(), SCIPgetNVars(), SCIPgetStage(), SCIPgetVars(), SCIPreallocBlockMemoryArray, SCIPvarGetProbindex(), and SCIPvarIsActive(). Referenced by calcBranchScore(), SCIP_DECL_BRANCHEXECLP(), and varProcessBoundChanges().
Definition at line 210 of file branch_distribution.c. References NULL, SCIP_Real, SCIPisFeasLE(), SCIPvarGetLbLocal(), SCIPvarGetProbindex(), and SCIPvarGetUbLocal(). Referenced by rowCalculateGauss(), SCIP_DECL_BRANCHEXECLP(), and varProcessBoundChanges().
calculate the variable's distribution parameters (mean and variance) for the bounds specified in the arguments. special treatment of infinite bounds necessary
Definition at line 235 of file branch_distribution.c. References NULL, SCIP_VARTYPE_CONTINUOUS, SCIPisInfinity(), SCIPisNegative(), and SQUARED. Referenced by calcBranchScore(), rowCalculateGauss(), and varProcessBoundChanges().
calculates the cumulative distribution P(-infinity <= x <= value) that a normally distributed random variable x takes a value between -infinity and parameter The distribution is given by the respective mean and deviation. This implementation uses the error function SCIPerf().
Definition at line 280 of file branch_distribution.c. References SCIP_Real, SCIPdebugMessage, SCIPerf(), SCIPisFeasLE(), SCIPisFeasZero(), SCIPisNegative(), sqrt(), and SQRTOFTWO. Referenced by SCIProwCalcProbability().
calculates the probability of satisfying an LP-row under the assumption of uniformly distributed variable values. For inequalities, we use the cumulative distribution function of the standard normal distribution PHI(rhs - mu/sqrt(sigma2)) to calculate the probability for a right hand side row with mean activity mu and variance sigma2 to be satisfied. Similarly, 1 - PHI(lhs - mu/sqrt(sigma2)) is the probability to satisfy a left hand side row. For equations (lhs==rhs), we use the centeredness measure p = min(PHI(lhs'), 1-PHI(lhs'))/max(PHI(lhs'), 1 - PHI(lhs')), where lhs' = lhs - mu / sqrt(sigma2).
Definition at line 344 of file branch_distribution.c. References MAX, MIN, NULL, SCIP_Real, SCIPcalcCumulativeDistribution(), SCIPdebug, SCIPdebugMessage, SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisInfinity(), SCIPprintRow(), SCIProwGetLhs(), SCIProwGetName(), and SCIProwGetRhs(). Referenced by calcBranchScore().
calculates the initial mean and variance of the row activity normal distribution. The mean value is given by where is the number of variables, and are the variable coefficient and bounds, respectively. With the same notation, the variance is given by , with the variance being for integer variables and for continuous variables.
Definition at line 411 of file branch_distribution.c. References branchruledataUpdateCurrentBounds(), NULL, SCIP_INVALID, SCIP_Real, SCIPcolGetVar(), SCIPdebug, SCIPdebugMessage, SCIPisFeasLE(), SCIPisFeasNegative(), SCIPisInfinity(), SCIPprintRow(), SCIProwGetCols(), SCIProwGetConstant(), SCIProwGetName(), SCIProwGetNNonz(), SCIProwGetVals(), SCIPvarCalcDistributionParameters(), SCIPvarGetLbLocal(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbLocal(), and SQUARED. Referenced by calcBranchScore().
update the up- and downscore of a single variable after calculating the impact of branching on a particular row, depending on the chosen score parameter
Definition at line 524 of file branch_distribution.c. References NULL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPerrorMessage, SCIPisFeasGE(), SCIPisFeasLE(), SCIPisGT(), and SCIPisLT(). Referenced by calcBranchScore().
calculate the branching score of a variable, depending on the chosen score parameter
Definition at line 594 of file branch_distribution.c. References branchruledataEnsureArraySize(), MAX, NULL, rowCalculateGauss(), SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPcolGetNNonz(), SCIPcolGetRows(), SCIPcolGetVals(), SCIPdebugMessage, SCIPfeasCeil(), SCIPfeasFloor(), SCIPgetRowLPFeasibility(), SCIPisFeasLT(), SCIPisInfinity(), SCIPisIntegral(), SCIPisNegative(), SCIPisSumPositive(), SCIProwCalcProbability(), SCIProwGetIndex(), SCIProwGetName(), SCIPupdateDistributionScore(), SCIPvarCalcDistributionParameters(), SCIPvarGetCol(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), and SQUARED. Referenced by SCIP_DECL_BRANCHEXECLP().
free branchrule data
Definition at line 787 of file branch_distribution.c. References NULL, SCIP_OKAY, and SCIPfreeBlockMemoryArray. Referenced by SCIP_DECL_BRANCHEXITSOL(), and SCIP_DECL_BRANCHFREE().
add variable to the bound change event queue; skipped if variable is already in there, or if variable has no row currently watched
Definition at line 812 of file branch_distribution.c. References NULL, SCIP_INVALID, and SCIPvarGetProbindex(). Referenced by SCIP_DECL_EVENTEXEC().
returns the next unprocessed variable (last in, first out) with pending bound changes, or NULL
Definition at line 855 of file branch_distribution.c. References NULL, and SCIPvarGetProbindex(). Referenced by SCIP_DECL_BRANCHEXECLP().
process a variable from the queue of changed variables
Definition at line 885 of file branch_distribution.c. References branchruledataEnsureArraySize(), branchruledataUpdateCurrentBounds(), MAX, NULL, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPcolGetNNonz(), SCIPcolGetRows(), SCIPcolGetVals(), SCIPinProbing(), SCIPisFeasEQ(), SCIPisFeasGE(), SCIPisInfinity(), SCIProwGetIndex(), SCIPvarCalcDistributionParameters(), SCIPvarGetCol(), SCIPvarGetLbLocal(), SCIPvarGetProbindex(), SCIPvarGetType(), SCIPvarGetUbLocal(), and SQUARED. Referenced by SCIP_DECL_BRANCHEXECLP().
destructor of event handler to free user data (called when SCIP is exiting) Definition at line 1011 of file branch_distribution.c. References NULL, SCIP_OKAY, SCIPeventhdlrGetData(), SCIPeventhdlrSetData(), and SCIPfreeMemory.
copy method for branchrule plugins (called when SCIP copies plugins) Definition at line 1030 of file branch_distribution.c. References NULL, SCIP_CALL, SCIP_OKAY, and SCIPincludeBranchruleDistribution().
solving process deinitialization method of branching rule (called before branch and bound process data is freed) Definition at line 1041 of file branch_distribution.c. References BRANCHRULE_NAME, branchruledataFreeArrays(), EVENT_DISTRIBUTION, NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleGetData(), SCIPbranchruleGetName(), SCIPdropVarEvent(), SCIPfreeBlockMemoryArray, SCIPgetNVars(), and SCIPgetVars().
destructor of branching rule to free user data (called when SCIP is exiting) Definition at line 1076 of file branch_distribution.c. References BRANCHRULE_NAME, branchruledataFreeArrays(), NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleGetData(), SCIPbranchruleGetName(), SCIPbranchruleSetData(), and SCIPfreeMemory.
branching execution method for fractional LP solutions Definition at line 1096 of file branch_distribution.c. References BRANCHRULE_NAME, branchruledataEnsureArraySize(), branchruledataPopBoundChangeVar(), branchruledataUpdateCurrentBounds(), calcBranchScore(), DEFAULT_PRIORITY, NULL, SCIP_BRANCHDIR_AUTO, SCIP_BRANCHDIR_DOWNWARDS, SCIP_BRANCHDIR_UPWARDS, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPbranchruleGetData(), SCIPbranchruleGetName(), SCIPbranchVar(), SCIPchgChildPrio(), SCIPdebugMessage, SCIPgetBranchScore(), SCIPgetLPBranchCands(), SCIPgetNActivePricers(), SCIPgetNLPRows(), SCIPisFeasEQ(), SCIPisFeasIntegral(), SCIPisFeasLE(), SCIPvarGetLbLocal(), SCIPvarGetLPSol(), SCIPvarGetName(), SCIPvarGetProbindex(), SCIPvarGetSol(), SCIPvarGetUbLocal(), TRUE, and varProcessBoundChanges().
event execution method of distribution branching which handles bound change events of variables Definition at line 1273 of file branch_distribution.c. References branchruledataAddBoundChangeVar(), NULL, SCIP_OKAY, SCIPeventGetVar(), and SCIPeventhdlrGetData().
creates the distribution branching rule and includes it in SCIP
Definition at line 1298 of file branch_distribution.c. References BRANCHRULE_DESC, BRANCHRULE_MAXBOUNDDIST, BRANCHRULE_MAXDEPTH, BRANCHRULE_NAME, BRANCHRULE_PRIORITY, DEFAULT_ONLYACTIVEROWS, DEFAULT_SCOREPARAM, DEFAULT_USEWEIGHTEDSCORE, EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddCharParam(), SCIPallocMemory, SCIPincludeBranchruleBasic(), SCIPincludeEventhdlrBasic(), SCIPsetBranchruleCopy(), SCIPsetBranchruleExecLp(), SCIPsetBranchruleExitsol(), SCIPsetBranchruleFree(), SCIPsetEventhdlrFree(), SCOREPARAM_VALUES, and TRUE. Referenced by SCIP_DECL_BRANCHCOPY(), and SCIPincludeDefaultPlugins(). |