#include "gcg/branch_compbnd.h"#include "gcg/cons_integralorig.h"#include "gcg/cons_masterbranch.h"#include "gcg/gcg.h"#include "gcg/pricer_gcg.h"#include "gcg/relax_gcg.h"#include "gcg/pub_extendedmasterconsdata.h"#include "gcg/extendedmasterconsdata.h"#include "gcg/pub_gcgvar.h"#include "gcg/type_extendedmasterconsdata.h"#include "gcg/type_branchgcg.h"#include "scip/cons_linear.h"#include "scip/cons_varbound.h"Go to the source code of this file.
Data Structures | |
| struct | SCIP_BranchruleData |
| struct | GCG_BranchData |
Macros | |
| #define | BRANCHRULE_NAME "compbnd" |
| #define | BRANCHRULE_DESC "component bound branching" |
| #define | BRANCHRULE_PRIORITY -200 |
| #define | BRANCHRULE_MAXDEPTH -1 |
| #define | BRANCHRULE_MAXBOUNDDIST 1.0 |
| #define | CHOOSE_COMPBND(x) SCIP_RETCODE x (GCG* gcg, SCIP_VAR** satisfyingMastervars, int satisfyingMastervarsSize, SCIP_VAR** indexSet, int indexSetSize, GCG_COMPBND* compBndSeq, int compBndSeqSize, int blocknr, SCIP_VAR** selectedOrigvar, SCIP_Real* value) |
| #define | CHOOSE_COMPBNDSEQ(x) SCIP_RETCODE x (GCG* gcg, GCG_COMPBND** compBndSeqList, int* compBndSeqSizeList, int compBndListSize, int blocknr, GCG_COMPBND** selectedCompBndSeq, int* selectedCompBndSeqSize) |
| #define | FLOOR(scip, x) (SCIPconvertRealToInt((scip), SCIPfloor((scip), (x)))) |
| #define | CEIL(scip, x) (SCIPconvertRealToInt((scip), SCIPceil((scip), (x)))) |
| #define | branchExitCompBnd NULL |
| #define | branchInitsolCompBnd NULL |
| #define | branchExitsolCompBnd NULL |
| #define | branchCopyCompBnd NULL |
| #define | branchMasterSolvedCompBnd NULL |
Functions | |
| static void | freeComponentBoundSequence (SCIP *scip, GCG_COMPBND **compBndSeq, int *compBndSeqSize) |
| static SCIP_RETCODE | initNodeBranchdata (SCIP *scip, GCG_BRANCHDATA **nodebranchdata, GCG_BRANCH_TYPE branchtype, int constant, GCG_COMPBND *compBndSeq, int compBndSeqSize, int blocknr) |
| static SCIP_RETCODE | simplifyComponentBoundSequence (SCIP *scip, GCG_COMPBND **compBndSeq, int *compBndSeqSize) |
| static SCIP_Real | getGeneratorEntryCol (SCIP_VAR **solvars, SCIP_Real *solvals, int nsolvars, SCIP_VAR *origvar) |
| static SCIP_Real | getGeneratorEntry (SCIP_VAR *mastervar, SCIP_VAR *origvar) |
| static SCIP_Bool | isColInCompBndSeq (SCIP *scip, SCIP_VAR **solvars, SCIP_Real *solvals, int nsolvars, GCG_COMPBND *compBndSeq, int compBndSeqSize) |
| static SCIP_Bool | isMasterVarInCompBndSeq (SCIP *scip, SCIP_VAR *mastervar, GCG_COMPBND *compBndSeq, int compBndSeqSize, int blocknr) |
| static SCIP_RETCODE | addVarToMasterbranch (GCG *gcg, SCIP_VAR *mastervar, GCG_BRANCHDATA *branchdata) |
| static | GCG_DECL_BRANCHGETEXTENDEDMASTERCONSCOEFF (branchGetExtendedmasterconsCoeffCompBnd) |
| static SCIP_RETCODE | createBranchingCons (GCG *gcg, GCG_BRANCHRULE *branchrule, SCIP_NODE *node, GCG_BRANCHDATA *branchdata) |
| static SCIP_RETCODE | createChildNodesCompBndSeq (GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_COMPBND *compBndSeq, int compBndSeqSize, int blocknr) |
| static SCIP_Real | calcFractionality (SCIP *masterscip, SCIP_VAR **mastervars, int nmastervars) |
| static SCIP_RETCODE | initIndexSet (SCIP *scip, SCIP_VAR ***indexSet, int *indexSetSize, SCIP_VAR **mastervars, int mastervarsSize) |
| static SCIP_Real | getLowerBound (SCIP *scip, SCIP_VAR *origvar, GCG_COMPBND *compBndSeq, int compBndSeqSize) |
| static SCIP_Real | getUpperBound (SCIP *scip, SCIP_VAR *origvar, GCG_COMPBND *compBndSeq, int compBndSeqSize) |
| static SCIP_RETCODE | separation_helper (GCG *gcg, SCIP_VAR **satisfyingMastervars, int satisfyingMastervarsSize, GCG_COMPBND *compBndSeq, int compBndSeqSize, int blocknr, CHOOSE_COMPBND((*chooseCompBnd)), GCG_COMPBND ***foundCompBndSeqList, int **foundCompBndSeqSizeList, int *foundCompBndSeqListSize, SCIP_RESULT *result) |
| static SCIP_RETCODE | findSatisfyingMastervars (SCIP *masterscip, SCIP_VAR ***satisfyingMastervars, int *satisfyingMastervarsSize, int blocknr, GCG_COMPBND *compBndSeq, int compBndSeqSize) |
| static | CHOOSE_COMPBND (chooseMaxMin) |
| static | CHOOSE_COMPBND (chooseMostDistinctValuesMedian) |
| static SCIP_Real | calcSum (SCIP *masterscip, GCG_COMPBND *compBndSeq, int compBndSeqSize, int blocknr) |
| static | CHOOSE_COMPBNDSEQ (chooseClosestToKHalf) |
| static | CHOOSE_COMPBNDSEQ (chooseMostFractional) |
| static | CHOOSE_COMPBNDSEQ (chooseSmallestSize) |
| static SCIP_RETCODE | separation (GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_COMPBND **compBndSeq, int *compBndSeqSize, int blocknr, SCIP_RESULT *result) |
| static SCIP_RETCODE | initBranch (GCG *gcg, GCG_BRANCHRULE *branchrule, SCIP_RESULT *result) |
| static | SCIP_DECL_BRANCHFREE (branchFreeCompBnd) |
| static | SCIP_DECL_BRANCHEXECLP (branchExeclpCompBnd) |
| static | SCIP_DECL_BRANCHEXECEXT (branchExecextCompBnd) |
| static | SCIP_DECL_BRANCHEXECPS (branchExecpsCompBnd) |
| static | GCG_DECL_BRANCHACTIVEMASTER (branchActiveMasterCompBnd) |
| static | GCG_DECL_BRANCHDEACTIVEMASTER (branchDeactiveMasterCompBnd) |
| static | GCG_DECL_BRANCHPROPMASTER (branchPropMasterCompBnd) |
| static | GCG_DECL_BRANCHDATADELETE (branchDataDeleteCompBnd) |
| static | GCG_DECL_BRANCHNEWCOL (branchNewColCompBnd) |
| static | GCG_DECL_BRANCHGETEXTENDEDMASTERCONS (branchGetExtendedmasterconsCompBnd) |
| static | SCIP_DECL_BRANCHINIT (branchInitCompBnd) |
| SCIP_RETCODE | GCGincludeBranchruleCompBnd (GCG *gcg) |
| SCIP_Bool | GCGisBranchruleCompBnd (SCIP_BRANCHRULE *branchrule) |
Macro Definition Documentation
◆ BRANCHRULE_NAME
| #define BRANCHRULE_NAME "compbnd" |
name of branching rule
Definition at line 67 of file branch_compbnd.c.
◆ BRANCHRULE_DESC
short description of branching rule
Definition at line 68 of file branch_compbnd.c.
◆ BRANCHRULE_PRIORITY
| #define BRANCHRULE_PRIORITY -200 |
priority of this branching rule
Definition at line 69 of file branch_compbnd.c.
◆ BRANCHRULE_MAXDEPTH
| #define BRANCHRULE_MAXDEPTH -1 |
maximal depth level of the branching rule
Definition at line 70 of file branch_compbnd.c.
◆ BRANCHRULE_MAXBOUNDDIST
| #define BRANCHRULE_MAXBOUNDDIST 1.0 |
maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying branching
Definition at line 73 of file branch_compbnd.c.
◆ CHOOSE_COMPBND
| #define CHOOSE_COMPBND | ( | x | ) | SCIP_RETCODE x (GCG* gcg, SCIP_VAR** satisfyingMastervars, int satisfyingMastervarsSize, SCIP_VAR** indexSet, int indexSetSize, GCG_COMPBND* compBndSeq, int compBndSeqSize, int blocknr, SCIP_VAR** selectedOrigvar, SCIP_Real* value) |
define the signature of functions to choose the component bound
Definition at line 106 of file branch_compbnd.c.
◆ CHOOSE_COMPBNDSEQ
| #define CHOOSE_COMPBNDSEQ | ( | x | ) | SCIP_RETCODE x (GCG* gcg, GCG_COMPBND** compBndSeqList, int* compBndSeqSizeList, int compBndListSize, int blocknr, GCG_COMPBND** selectedCompBndSeq, int* selectedCompBndSeqSize) |
define the signature of functions that chose one component bound sequence out of many
Definition at line 109 of file branch_compbnd.c.
◆ FLOOR
| #define FLOOR | ( | scip, | |
| x | |||
| ) | (SCIPconvertRealToInt((scip), SCIPfloor((scip), (x)))) |
Definition at line 116 of file branch_compbnd.c.
◆ CEIL
| #define CEIL | ( | scip, | |
| x | |||
| ) | (SCIPconvertRealToInt((scip), SCIPceil((scip), (x)))) |
Definition at line 117 of file branch_compbnd.c.
◆ branchExitCompBnd
| #define branchExitCompBnd NULL |
deinitialization method of branching rule (called before transformed problem is freed)
Definition at line 1825 of file branch_compbnd.c.
◆ branchInitsolCompBnd
| #define branchInitsolCompBnd NULL |
solving process initialization method of branching rule (called when branch and bound process is about to begin)
Definition at line 1829 of file branch_compbnd.c.
◆ branchExitsolCompBnd
| #define branchExitsolCompBnd NULL |
solving process deinitialization method of branching rule (called before branch and bound process data is freed)
Definition at line 1833 of file branch_compbnd.c.
◆ branchCopyCompBnd
| #define branchCopyCompBnd NULL |
copy method for branchrule plugins (called when SCIP copies plugins)
Definition at line 1903 of file branch_compbnd.c.
◆ branchMasterSolvedCompBnd
| #define branchMasterSolvedCompBnd NULL |
method for branchrule, called when the master LP is solved at one node, can store pseudocosts for the branching decisions
Definition at line 1991 of file branch_compbnd.c.
Function Documentation
◆ freeComponentBoundSequence()
|
static |
set components of componentbound sequence to NULL
- Parameters
-
scip SCIP data structure compBndSeq component bound sequence to set to NULL compBndSeqSize size of the component bound sequence compBndSeq
Definition at line 121 of file branch_compbnd.c.
References GCGisMaster(), NULL, and SCIPfreeBlockMemoryArrayNull.
Referenced by createChildNodesCompBndSeq(), initBranch(), separation(), separation_helper(), and simplifyComponentBoundSequence().
◆ initNodeBranchdata()
|
static |
initialize branchdata at the node
- Parameters
-
scip SCIP data structure nodebranchdata branching data to set branchtype type of branch to generate constant constant value of the branching constraint in the master problem - either lhs or rhs, depending on branchtype compBndSeq component bound sequence which induce the current branching constraint compBndSeqSize size of the component bound sequence compBndSeq blocknr block we are branching in
Definition at line 137 of file branch_compbnd.c.
References GCGisMaster(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, and SCIPduplicateBlockMemoryArray.
Referenced by createChildNodesCompBndSeq().
◆ simplifyComponentBoundSequence()
|
static |
simplify a component bound sequence by strengthening bounds of the same sense on the same component
- Parameters
-
scip SCIP data structure compBndSeq Component Bound Sequence defining the nodes compBndSeqSize size of compBndSeq
Definition at line 165 of file branch_compbnd.c.
References ComponentBound::bound, ComponentBound::component, FALSE, freeComponentBoundSequence(), GCG_COMPBND_SENSE_GE, GCG_COMPBND_SENSE_LE, GCGisMaster(), MAX, MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPdebugMessage, SCIPfreeBlockMemoryArray, SCIPreallocBlockMemoryArray, SCIPvarGetName(), ComponentBound::sense, and TRUE.
Referenced by initBranch().
◆ getGeneratorEntryCol()
|
static |
computes the generator of mastervar for the entry in origvar
- Returns
- entry of the generator corresponding to origvar
- Parameters
-
solvars column solution variables solvals column solution values nsolvars number of column solution variables origvar corresponding origvar
Definition at line 257 of file branch_compbnd.c.
References GCGoriginalVarGetPricingVar(), GCGvarIsOriginal(), NULL, and SCIP_Real.
Referenced by isColInCompBndSeq().
◆ getGeneratorEntry()
computes the generator of mastervar for the entry in origvar
- Returns
- entry of the generator corresponding to origvar
- Parameters
-
mastervar current mastervariable origvar corresponding origvar
Definition at line 292 of file branch_compbnd.c.
References GCGmasterVarGetOrigval(), SCIP_INVALID, and SCIP_Real.
Referenced by CHOOSE_COMPBND(), and isMasterVarInCompBndSeq().
◆ isColInCompBndSeq()
|
static |
whether a master variable is in the component bound sequence or not
- Parameters
-
scip SCIP data structure solvars column solution variables solvals column solution values nsolvars number of column solution variables compBndSeq component bound sequence to check compBndSeqSize size of compBndSeq
Definition at line 304 of file branch_compbnd.c.
References FALSE, GCG_COMPBND_SENSE_GE, GCG_COMPBND_SENSE_LE, getGeneratorEntryCol(), NULL, SCIP_Bool, SCIP_Real, SCIPisGE(), SCIPisLE(), and TRUE.
Referenced by GCG_DECL_BRANCHGETEXTENDEDMASTERCONSCOEFF().
◆ isMasterVarInCompBndSeq()
|
static |
whether a master variable is in compBndSeq or not
- Parameters
-
scip SCIP data structure mastervar master variable to check compBndSeq component bound sequence to check compBndSeqSize size of compBndSeq blocknr block we are branching in
Definition at line 334 of file branch_compbnd.c.
References FALSE, GCG_COMPBND_SENSE_GE, GCG_COMPBND_SENSE_LE, GCGisMasterVarInBlock(), getGeneratorEntry(), NULL, SCIP_Bool, SCIP_Real, SCIPisGE(), SCIPisLE(), and TRUE.
Referenced by createChildNodesCompBndSeq(), findSatisfyingMastervars(), and separation_helper().
◆ addVarToMasterbranch()
|
static |
adds a variable to a branching constraint
- Parameters
-
gcg GCG data structure mastervar the variable to add branchdata branching data structure where the variable should be added
Definition at line 367 of file branch_compbnd.c.
References GCG_BranchData::branchtype, GCG_BranchData::constant, GCG_BRANCH_DOWN, GCGbranchGetExtendedmasterconsCoeff(), GCGextendedmasterconsAddMasterVar(), GCGgetMasterprob(), GCGmasterVarGetNOrigvars(), GCGmasterVarGetOrigvals(), GCGmasterVarGetOrigvars(), GCGvarGetBlock(), GCG_BranchData::mastercons, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPisZero(), and SCIPvarGetName().
Referenced by createBranchingCons(), and GCG_DECL_BRANCHNEWCOL().
◆ GCG_DECL_BRANCHGETEXTENDEDMASTERCONSCOEFF()
|
static |
callback new column method
Definition at line 400 of file branch_compbnd.c.
References GCGgetMasterprob(), GCGisMaster(), isColInCompBndSeq(), NULL, and SCIP_OKAY.
◆ createBranchingCons()
|
static |
creates the constraint for branching directly on a master variable
- Parameters
-
gcg GCG data structure branchrule branch rule structure node node to add constraint branchdata branching data structure
Definition at line 427 of file branch_compbnd.c.
References addVarToMasterbranch(), GCG_BranchData::blocknr, ComponentBound::bound, GCG_BranchData::branchtype, GCG_BranchData::compBndSeq, GCG_BranchData::compBndSeqSize, ComponentBound::component, GCG_BranchData::constant, FALSE, GCG_BRANCH_DOWN, GCG_COMPBND_SENSE_GE, GCG_COMPBND_SENSE_LE, GCGbranchCreateExtendedmastercons(), GCGbranchGetScipBranchruledata(), SCIP_BranchruleData::gcgbranchrule, GCGcreateInferredPricingVar(), GCGgetMasterprob(), GCGgetPricingprob(), GCGisMaster(), GCGoriginalVarGetPricingVar(), GCGpricingmodificationCreate(), GCG_BranchData::mastercons, NULL, SCIP_CALL, SCIP_Longint, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_BINARY, SCIPaddCoefLinear(), SCIPaddConsNode(), SCIPallocBlockMemoryArray, SCIPcreateConsLinear(), SCIPcreateConsVarbound(), SCIPgetNVars(), SCIPgetVars(), SCIPinfinity(), SCIPisPositive(), SCIPnodeGetNumber(), SCIPsnprintf(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), ComponentBound::sense, and TRUE.
Referenced by createChildNodesCompBndSeq().
◆ createChildNodesCompBndSeq()
|
static |
for given component bound sequence create the 2 child nodes
- Parameters
-
gcg GCG data structure branchrule branching rule compBndSeq Component Bound Sequence defining the nodes compBndSeqSize size of compBndSeq blocknr number of the block
Definition at line 647 of file branch_compbnd.c.
References ComponentBound::bound, CEIL, GCG_BranchData::compBndSeq, GCG_BranchData::compBndSeqSize, ComponentBound::component, GCG_BranchData::constant, createBranchingCons(), FLOOR, freeComponentBoundSequence(), GCG_BRANCH_DOWN, GCG_BRANCH_UP, GCG_COMPBND_SENSE_GE, GCGconsMasterbranchGetActiveCons(), GCGcreateConsMasterbranch(), GCGgetBlockRepresentative(), GCGgetMasterprob(), GCGgetNIdenticalBlocks(), GCGgetOrigprob(), GCGisMasterVarInBlock(), initNodeBranchdata(), isMasterVarInCompBndSeq(), NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddConsNode(), SCIPcreateChild(), SCIPdebugMessage, SCIPgetLocalTransEstimate(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPisFeasIntegral(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetName(), and ComponentBound::sense.
Referenced by initBranch().
◆ calcFractionality()
|
static |
determine fractionality of a set of mastervariables
- Parameters
-
masterscip SCIP data structure mastervars mastervariables nmastervars number of mastervariables
Definition at line 744 of file branch_compbnd.c.
References GCGisMaster(), NULL, SCIP_Real, SCIPfrac(), and SCIPgetSolVal().
Referenced by initBranch(), and separation_helper().
◆ initIndexSet()
|
static |
method for initializing the indexSet for a given set of master variables
the index set denotes the set of all integral original variables contained in the provided master variables
- Parameters
-
scip SCIP data structure indexSet set to initialize indexSetSize size of the index set mastervars mastervariables currently satisfying the component bound sequence in the specified block mastervarsSize size of mastervars
Definition at line 777 of file branch_compbnd.c.
References GCGisMaster(), GCGmasterVarGetNOrigvars(), GCGmasterVarGetOrigvars(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_INTEGER, SCIPallocBlockMemoryArray, SCIPreallocBlockMemoryArray, and SCIPvarGetType().
Referenced by separation_helper().
◆ getLowerBound()
|
static |
get the lower bound of a original variable from the component bound sequence, or the lb
- Parameters
-
scip SCIP data structure origvar original variable compBndSeq component bound sequence compBndSeqSize size of compBndSeq
Definition at line 859 of file branch_compbnd.c.
References GCG_COMPBND_SENSE_GE, NULL, SCIP_Real, SCIPisLT(), and SCIPvarGetLbGlobal().
Referenced by CHOOSE_COMPBND().
◆ getUpperBound()
|
static |
get the upper bound of a original variable from the component bound sequence, or the ub
- Parameters
-
scip SCIP data structure origvar original variable compBndSeq component bound sequence compBndSeqSize size of compBndSeq
Definition at line 891 of file branch_compbnd.c.
References GCG_COMPBND_SENSE_LE, NULL, SCIP_Real, SCIPisLT(), and SCIPvarGetUbGlobal().
Referenced by CHOOSE_COMPBND().
◆ separation_helper()
|
static |
separation algorithm determining multiple component bound sequences one could branch on
- Parameters
-
gcg GCG data structure satisfyingMastervars mastervariables currently satisfying the component bound sequence in the specified block satisfyingMastervarsSize size of mastervars compBndSeq current Component Bound Sequence defining the nodes compBndSeqSize size of compBndSeq blocknr number of the block foundCompBndSeqList list of component bound sequences foundCompBndSeqSizeList sizes of the component bound sequences foundCompBndSeqListSize size of Blist result pointer to store the result of the branching call
Definition at line 924 of file branch_compbnd.c.
References calcFractionality(), FALSE, FLOOR, freeComponentBoundSequence(), GCG_COMPBND_SENSE_GE, GCG_COMPBND_SENSE_LE, GCGgetMasterprob(), GCGisMaster(), initIndexSet(), isMasterVarInCompBndSeq(), NULL, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPdebugMessage, SCIPfreeBlockMemoryArray, SCIPisEQ(), SCIPisFeasIntegral(), SCIPisLE(), SCIPisPositive(), SCIPreallocBlockMemoryArray, SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), separation_helper(), and TRUE.
Referenced by separation(), and separation_helper().
◆ findSatisfyingMastervars()
|
static |
collects all currently mastervariables in the given block that satisfy the given component bound sequence
- Parameters
-
masterscip SCIP data structure satisfyingMastervars mastervariables in the given block satisfying the compBndSeq satisfyingMastervarsSize size of mastervars blocknr number of the block compBndSeq Component Bound Sequence defining the nodes compBndSeqSize size of compBndSeq
Definition at line 1120 of file branch_compbnd.c.
References GCGisMaster(), GCGisMasterVarInBlock(), isMasterVarInCompBndSeq(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPfreeBlockMemoryArray, SCIPgetVarsData(), and SCIPreallocBlockMemoryArray.
Referenced by calcSum(), initBranch(), and separation().
◆ CHOOSE_COMPBND() [1/2]
|
static |
choose to separate on original variable where max-min is maximal
Definition at line 1181 of file branch_compbnd.c.
References FALSE, GCGgetMasterprob(), getGeneratorEntry(), getLowerBound(), getUpperBound(), NULL, SCIP_Bool, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPgetSolVal(), SCIPinfinity(), SCIPisFeasIntegral(), SCIPisFeasLE(), SCIPisFeasPositive(), SCIPisGT(), SCIPisInfinity(), SCIPisLT(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), and TRUE.
◆ CHOOSE_COMPBND() [2/2]
|
static |
choose to separate on original variable which has the largest number of distinct numbers, and find the median value
Definition at line 1277 of file branch_compbnd.c.
References FALSE, GCGgetMasterprob(), getGeneratorEntry(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPfreeBlockMemoryArrayNull, SCIPgetSolVal(), SCIPisEQ(), SCIPisFeasIntegral(), SCIPisFeasPositive(), SCIPisLT(), SCIPreallocBlockMemoryArray, and TRUE.
◆ calcSum()
|
static |
calculate sum of component bound sequence
- Parameters
-
masterscip SCIP data structure compBndSeq Component Bound Sequence defining the nodes compBndSeqSize size of compBndSeq blocknr number of the block
Definition at line 1404 of file branch_compbnd.c.
References findSatisfyingMastervars(), GCGisMaster(), NULL, SCIP_Real, SCIPfreeBlockMemoryArrayNull, and SCIPgetSolVal().
Referenced by CHOOSE_COMPBNDSEQ(), and initBranch().
◆ CHOOSE_COMPBNDSEQ() [1/3]
|
static |
choose the component bound of which the sum is closest to K/2, where K is the number of identical subproblems in the current block
Definition at line 1436 of file branch_compbnd.c.
References ABS, calcSum(), GCGgetMasterprob(), GCGgetNIdenticalBlocks(), GCGisMaster(), NULL, SCIP_OKAY, SCIP_Real, and SCIPinfinity().
◆ CHOOSE_COMPBNDSEQ() [2/3]
|
static |
choose the component bound of which the sum is most fractional
Definition at line 1478 of file branch_compbnd.c.
References calcSum(), GCGgetMasterprob(), GCGisMaster(), MIN, NULL, SCIP_OKAY, SCIP_Real, and SCIPfrac().
◆ CHOOSE_COMPBNDSEQ() [3/3]
|
static |
choose the component bound sequence with the smallest size
Definition at line 1519 of file branch_compbnd.c.
References GCGgetMasterprob(), GCGisMaster(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPfreeBlockMemoryArray, and SCIPreallocBlockMemoryArray.
◆ separation()
|
static |
separation algorithm determining a component bound sequence to branch on
- Parameters
-
gcg GCG data structure branchrule branching rule compBndSeq Component Bound Sequence defining the nodes compBndSeqSize size of compBndSeq blocknr number of the block result pointer to store the result of the branching call
Definition at line 1583 of file branch_compbnd.c.
References findSatisfyingMastervars(), freeComponentBoundSequence(), GCGbranchGetScipBranchrule(), GCGgetMasterprob(), NULL, SCIP_CALL, SCIP_OKAY, SCIPbranchruleGetData(), SCIPfreeBlockMemoryArray, separation_helper(), SCIP_BranchruleData::useMaxRangeMidrangeHeuristic, and SCIP_BranchruleData::useMostDistinctMedianHeuristic.
Referenced by initBranch().
◆ initBranch()
|
static |
prepares information for using the generic branching scheme
- Parameters
-
gcg GCG data structure branchrule branching rule result pointer to store the result of the branching call
Definition at line 1673 of file branch_compbnd.c.
References calcFractionality(), calcSum(), createChildNodesCompBndSeq(), FALSE, findSatisfyingMastervars(), freeComponentBoundSequence(), GCG_COMPBND_SENSE_LE, GCGgetMasterprob(), GCGgetNIdenticalBlocks(), GCGgetNPricingprobs(), GCGisPricingprobRelevant(), NULL, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_CUTOFF, SCIP_OKAY, SCIP_Real, SCIPbranchruleGetData(), SCIPdebugMessage, SCIPfreeBlockMemoryArray, SCIPgetDepth(), SCIPgetLPBranchCands(), SCIPisFeasIntegral(), SCIPisZero(), SCIPvarGetName(), separation(), simplifyComponentBoundSequence(), and TRUE.
Referenced by SCIP_DECL_BRANCHEXECLP().
◆ SCIP_DECL_BRANCHFREE()
|
static |
destructor of branching rule to free user data (called when SCIP is exiting)
Definition at line 1803 of file branch_compbnd.c.
References NULL, SCIP_OKAY, SCIPbranchruleGetData(), SCIPbranchruleSetData(), and SCIPfreeBlockMemory.
◆ SCIP_DECL_BRANCHEXECLP()
|
static |
branching execution method for fractional LP solutions
Definition at line 1838 of file branch_compbnd.c.
References BRANCHRULE_NAME, SCIP_BranchruleData::gcg, SCIP_BranchruleData::gcgbranchrule, GCGgetOrigprob(), GCGisMasterSetCovering(), GCGisMasterSetPartitioning(), GCGrelaxGetCurrentOrigSol(), GCGrelaxIsOrigSolFeasible(), initBranch(), NULL, SCIP_Bool, SCIP_BRANCHED, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_OKAY, SCIPbranchruleGetData(), SCIPbranchruleGetName(), SCIPdebugMessage, SCIPgetBoolParam(), and SCIPgetSolOrigObj().
◆ SCIP_DECL_BRANCHEXECEXT()
|
static |
Definition at line 1892 of file branch_compbnd.c.
References SCIP_DIDNOTRUN, SCIP_OKAY, and SCIPdebugMessage.
◆ SCIP_DECL_BRANCHEXECPS()
|
static |
branching execution method for not completely fixed pseudo solutions
Definition at line 1908 of file branch_compbnd.c.
References BRANCHRULE_NAME, NULL, SCIP_DIDNOTRUN, SCIP_ERROR, SCIP_OKAY, SCIPbranchruleGetName(), SCIPdebugMessage, SCIPdialogMessage(), SCIPerrorMessage, SCIPisStopped(), and SCIPwarningMessage().
◆ GCG_DECL_BRANCHACTIVEMASTER()
|
static |
activation method for branchrule, called when a node in the master problem is activated, should perform changes to the current node's problem due to the branchdata
Definition at line 1944 of file branch_compbnd.c.
References NULL, SCIP_OKAY, and SCIPdebugMessage.
◆ GCG_DECL_BRANCHDEACTIVEMASTER()
|
static |
deactivation method for branchrule, called when a node in the master problem is deactivated, should undo changes to the current node's problem due to the branchdata
Definition at line 1961 of file branch_compbnd.c.
References NULL, SCIP_OKAY, and SCIPdebugMessage.
◆ GCG_DECL_BRANCHPROPMASTER()
|
static |
propagation method for branchrule, called when a node in the master problem is propagated, should perform propagation at the current node due to the branchdata
Definition at line 1977 of file branch_compbnd.c.
References NULL, SCIP_DIDNOTFIND, and SCIP_OKAY.
◆ GCG_DECL_BRANCHDATADELETE()
|
static |
frees branching data of an origbranch constraint (called when the origbranch constraint is deleted)
Definition at line 1995 of file branch_compbnd.c.
References GCGbranchFreeExtendedmasterconsBranchData(), GCGgetMasterprob(), NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPfreeBlockMemory, and SCIPfreeBlockMemoryArray.
◆ GCG_DECL_BRANCHNEWCOL()
|
static |
callback new column method
Definition at line 2030 of file branch_compbnd.c.
References addVarToMasterbranch(), GCGvarIsMaster(), NULL, SCIP_CALL, and SCIP_OKAY.
◆ GCG_DECL_BRANCHGETEXTENDEDMASTERCONS()
|
static |
Definition at line 2045 of file branch_compbnd.c.
◆ SCIP_DECL_BRANCHINIT()
|
static |
initialization method of branching rule (called after problem was transformed)
Definition at line 2060 of file branch_compbnd.c.
References NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPbranchruleGetData(), SCIPdebugMessage, SCIPgetBoolParam(), SCIPsnprintf(), SCIP_BranchruleData::useMaxRangeMidrangeHeuristic, and SCIP_BranchruleData::useMostDistinctMedianHeuristic.
◆ GCGincludeBranchruleCompBnd()
| SCIP_RETCODE GCGincludeBranchruleCompBnd | ( | GCG * | gcg | ) |
creates the compbnd branching rule and includes it in SCIP
- Parameters
-
gcg GCG data structure
Definition at line 2111 of file branch_compbnd.c.
References branchMasterSolvedCompBnd, BRANCHRULE_DESC, BRANCHRULE_MAXBOUNDDIST, BRANCHRULE_MAXDEPTH, BRANCHRULE_NAME, BRANCHRULE_PRIORITY, FALSE, SCIP_BranchruleData::gcg, SCIP_BranchruleData::gcgbranchrule, GCGgetMasterprob(), GCGgetOrigprob(), GCGrelaxIncludeBranchrule(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_UNUSED, SCIPaddBoolParam(), SCIPallocBlockMemory, SCIPdebugMessage, SCIPfindBranchrule(), SCIPsetBranchruleExecExt(), SCIPsetBranchruleExecLp(), SCIPsetBranchruleExecPs(), SCIPsetBranchruleFree(), SCIPsetBranchruleInit(), TRUE, SCIP_BranchruleData::useMaxRangeMidrangeHeuristic, and SCIP_BranchruleData::useMostDistinctMedianHeuristic.
Referenced by GCGincludeMasterPlugins().
◆ GCGisBranchruleCompBnd()
| SCIP_Bool GCGisBranchruleCompBnd | ( | SCIP_BRANCHRULE * | branchrule | ) |
returns true when the branch rule is the component bound branching rule
- Parameters
-
branchrule branchrule to check
Definition at line 2158 of file branch_compbnd.c.
References BRANCHRULE_NAME, NULL, SCIP_Bool, and SCIPbranchruleGetName().