pseudo costs branching rule
Definition in file branch_pscost.c.
Go to the source code of this file.
Macros | |
#define | BRANCHRULE_NAME "pscost" |
#define | BRANCHRULE_DESC "branching on pseudo cost values" |
#define | BRANCHRULE_PRIORITY 2000 |
#define | BRANCHRULE_MAXDEPTH -1 |
#define | BRANCHRULE_MAXBOUNDDIST 1.0 |
#define | BRANCHRULE_STRATEGIES "cdsu" |
#define | BRANCHRULE_STRATEGY_DEFAULT 'u' |
#define | BRANCHRULE_SCOREMINWEIGHT_DEFAULT 0.8 |
#define | BRANCHRULE_SCOREMAXWEIGHT_DEFAULT 1.3 |
#define | BRANCHRULE_SCORESUMWEIGHT_DEFAULT 0.1 |
#define | BRANCHRULE_NCHILDREN_DEFAULT 2 |
#define | BRANCHRULE_NARYMAXDEPTH_DEFAULT -1 |
#define | BRANCHRULE_NARYMINWIDTH_DEFAULT 0.001 |
#define | BRANCHRULE_NARYWIDTHFAC_DEFAULT 2.0 |
#define | BRANCHRULE_RANDSEED_DEFAULT 47 |
#define | WEIGHTEDSCORING(data, min, max, sum) ((data)->scoreminweight * (min) + (data)->scoremaxweight * (max) + (data)->scoresumweight * (sum)) |
Functions | |
static SCIP_RETCODE | updateBestCandidate (SCIP *scip, SCIP_BRANCHRULEDATA *branchruledata, SCIP_VAR **bestvar, SCIP_Real *bestbrpoint, SCIP_Real *bestscore, SCIP_Real *bestrndscore, SCIP_VAR *cand, SCIP_Real candscoremin, SCIP_Real candscoremax, SCIP_Real candscoresum, SCIP_Real candrndscore, SCIP_Real candsol) |
static SCIP_RETCODE | selectBranchVar (SCIP *scip, SCIP_BRANCHRULE *branchrule, SCIP_VAR **cands, SCIP_Real *candssol, SCIP_Real *candsscore, int ncands, SCIP_VAR **brvar, SCIP_Real *brpoint) |
static | SCIP_DECL_BRANCHCOPY (branchCopyPscost) |
static | SCIP_DECL_BRANCHFREE (branchFreePscost) |
static | SCIP_DECL_BRANCHINIT (branchInitPscost) |
static | SCIP_DECL_BRANCHEXECLP (branchExeclpPscost) |
static | SCIP_DECL_BRANCHEXECEXT (branchExecextPscost) |
SCIP_RETCODE | SCIPincludeBranchrulePscost (SCIP *scip) |
SCIP_RETCODE | SCIPselectBranchVarPscost (SCIP *scip, SCIP_VAR **branchcands, SCIP_Real *branchcandssol, SCIP_Real *branchcandsscore, int nbranchcands, SCIP_VAR **var, SCIP_Real *brpoint) |
#define BRANCHRULE_NAME "pscost" |
Definition at line 30 of file branch_pscost.c.
Referenced by SCIP_DECL_BRANCHCOPY(), SCIP_DECL_BRANCHEXECEXT(), SCIP_DECL_BRANCHEXECLP(), SCIPincludeBranchrulePscost(), and SCIPselectBranchVarPscost().
#define BRANCHRULE_DESC "branching on pseudo cost values" |
Definition at line 31 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_PRIORITY 2000 |
Definition at line 32 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_MAXDEPTH -1 |
Definition at line 33 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_MAXBOUNDDIST 1.0 |
Definition at line 34 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_STRATEGIES "cdsu" |
possible pseudo cost multiplication strategies for branching on external candidates
Definition at line 36 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_STRATEGY_DEFAULT 'u' |
default pseudo cost multiplication strategy
Definition at line 37 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_SCOREMINWEIGHT_DEFAULT 0.8 |
default weight for minimum of scores of a branching candidate
Definition at line 38 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_SCOREMAXWEIGHT_DEFAULT 1.3 |
default weight for maximum of scores of a branching candidate
Definition at line 39 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_SCORESUMWEIGHT_DEFAULT 0.1 |
default weight for sum of scores of a branching candidate
Definition at line 40 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_NCHILDREN_DEFAULT 2 |
default number of children in n-ary branching
Definition at line 41 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_NARYMAXDEPTH_DEFAULT -1 |
default maximal depth where to do n-ary branching
Definition at line 42 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_NARYMINWIDTH_DEFAULT 0.001 |
default minimal domain width in children when doing n-ary branching
Definition at line 43 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_NARYWIDTHFAC_DEFAULT 2.0 |
default factor of domain width in n-ary branching
Definition at line 44 of file branch_pscost.c.
Referenced by SCIPincludeBranchrulePscost().
#define BRANCHRULE_RANDSEED_DEFAULT 47 |
initial random seed
Definition at line 45 of file branch_pscost.c.
Referenced by SCIP_DECL_BRANCHINIT(), and SCIPincludeBranchrulePscost().
#define WEIGHTEDSCORING | ( | data, | |
min, | |||
max, | |||
sum | |||
) | ((data)->scoreminweight * (min) + (data)->scoremaxweight * (max) + (data)->scoresumweight * (sum)) |
Definition at line 48 of file branch_pscost.c.
Referenced by updateBestCandidate().
|
static |
checks if a given branching candidate is better than a previous one and updates the best branching candidate accordingly
scip | SCIP data structure |
branchruledata | branching rule data |
bestvar | best branching candidate |
bestbrpoint | branching point for best branching candidate |
bestscore | score of best branching candidate |
bestrndscore | random score of the best branching candidate |
cand | branching candidate to consider |
candscoremin | minimal score of branching candidate |
candscoremax | maximal score of branching candidate |
candscoresum | sum of scores of branching candidate |
candrndscore | random score of branching candidate |
candsol | proposed branching point of branching candidate |
Definition at line 75 of file branch_pscost.c.
References FALSE, REALABS, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_MULTAGGR, SCIP_VARTYPE_CONTINUOUS, SCIPABORT, SCIPadjustedVarLb(), SCIPadjustedVarUb(), SCIPcomputeVarLbLocal(), SCIPcomputeVarUbLocal(), SCIPdebugMsg, SCIPerrorMessage, SCIPgetBranchingPoint(), SCIPgetBranchScore(), SCIPgetSolVal(), SCIPgetVarPseudocostVal(), SCIPinfinity(), SCIPisEQ(), SCIPisFeasGE(), SCIPisFeasLE(), SCIPisHugeValue(), SCIPisInfinity(), SCIPisIntegral(), SCIPisNegative(), SCIPisSumEQ(), SCIPisSumGT(), SCIPrandomGetReal(), SCIPrelDiff(), SCIPvarGetLbLocal(), SCIPvarGetMultaggrNVars(), SCIPvarGetMultaggrScalars(), SCIPvarGetMultaggrVars(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarGetStatus(), SCIPvarGetType(), SCIPvarGetUbLocal(), SCIPvarIsActive(), TRUE, and WEIGHTEDSCORING.
Referenced by selectBranchVar().
|
static |
selects the branching variable from given candidate array
scip | SCIP data structure |
branchrule | branching rule |
cands | array of branching candidates |
candssol | array of candidate solution values |
candsscore | array of candidate scores |
ncands | the number of candidates |
brvar | pointer to store the selected branching candidate or NULL if none |
brpoint | pointer to store branching point of selected branching variable |
Definition at line 429 of file branch_pscost.c.
References REALABS, SCIP_BRANCHERROR, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPbranchruleGetData(), SCIPduplicateBufferArray, SCIPerrorMessage, SCIPfreeBufferArray, SCIPisEQ(), SCIPisInfinity(), SCIPrandomGetReal(), SCIPsortPtrInt(), SCIPvarCompare(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and updateBestCandidate().
Referenced by SCIP_DECL_BRANCHEXECEXT(), and SCIPselectBranchVarPscost().
|
static |
copy method for branchrule plugins (called when SCIP copies plugins)
Definition at line 539 of file branch_pscost.c.
References BRANCHRULE_NAME, SCIP_CALL, SCIP_OKAY, SCIPbranchruleGetName(), and SCIPincludeBranchrulePscost().
|
static |
destructor of branching rule to free user data (called when SCIP is exiting)
Definition at line 553 of file branch_pscost.c.
References SCIP_OKAY, SCIPbranchruleGetData(), SCIPbranchruleSetData(), SCIPfreeBlockMemory, and SCIPfreeRandom().
|
static |
initialization method of branching rule (called after problem was transformed)
Definition at line 573 of file branch_pscost.c.
References BRANCHRULE_RANDSEED_DEFAULT, SCIP_OKAY, SCIPbranchruleGetData(), and SCIPsetRandomSeed().
|
static |
branching execution method for fractional LP solutions
Definition at line 588 of file branch_pscost.c.
References BRANCHRULE_NAME, REALABS, SCIP_BRANCHED, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPbranchruleGetName(), SCIPbranchVar(), SCIPdebugMsg, SCIPgetLPBranchCands(), SCIPgetVarPseudocostScore(), SCIPinfinity(), SCIPisFeasIntegral(), SCIPisSumEQ(), SCIPisSumGT(), SCIPvarGetName(), SCIPvarGetRootSol(), SCIPvarGetSol(), and TRUE.
|
static |
branching execution method for external candidates
Definition at line 646 of file branch_pscost.c.
References BRANCHRULE_NAME, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIPadjustedVarLb(), SCIPadjustedVarUb(), SCIPbranchruleGetData(), SCIPbranchruleGetName(), SCIPbranchVarValNary(), SCIPdebugMsg, SCIPgetCharParam(), SCIPgetCurrentNode(), SCIPgetExternBranchCands(), SCIPisEQ(), SCIPisInfinity(), SCIPnodeGetDepth(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetProbvar(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), SCIPvarIsActive(), and selectBranchVar().