Scippy

GCG

Branch-and-Price & Column Generation for Everyone

branch_compbnd.c File Reference

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

#define BRANCHRULE_DESC   "component bound branching"

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 void freeComponentBoundSequence ( SCIP *  scip,
GCG_COMPBND **  compBndSeq,
int *  compBndSeqSize 
)
static

set components of componentbound sequence to NULL

Parameters
scipSCIP data structure
compBndSeqcomponent bound sequence to set to NULL
compBndSeqSizesize 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 SCIP_RETCODE initNodeBranchdata ( SCIP *  scip,
GCG_BRANCHDATA **  nodebranchdata,
GCG_BRANCH_TYPE  branchtype,
int  constant,
GCG_COMPBND *  compBndSeq,
int  compBndSeqSize,
int  blocknr 
)
static

initialize branchdata at the node

Parameters
scipSCIP data structure
nodebranchdatabranching data to set
branchtypetype of branch to generate
constantconstant value of the branching constraint in the master problem - either lhs or rhs, depending on branchtype
compBndSeqcomponent bound sequence which induce the current branching constraint
compBndSeqSizesize of the component bound sequence compBndSeq
blocknrblock 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 SCIP_RETCODE simplifyComponentBoundSequence ( SCIP *  scip,
GCG_COMPBND **  compBndSeq,
int *  compBndSeqSize 
)
static

simplify a component bound sequence by strengthening bounds of the same sense on the same component

Parameters
scipSCIP data structure
compBndSeqComponent Bound Sequence defining the nodes
compBndSeqSizesize 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 SCIP_Real getGeneratorEntryCol ( SCIP_VAR **  solvars,
SCIP_Real *  solvals,
int  nsolvars,
SCIP_VAR *  origvar 
)
static

computes the generator of mastervar for the entry in origvar

Returns
entry of the generator corresponding to origvar
Parameters
solvarscolumn solution variables
solvalscolumn solution values
nsolvarsnumber of column solution variables
origvarcorresponding origvar

Definition at line 257 of file branch_compbnd.c.

References GCGoriginalVarGetPricingVar(), GCGvarIsOriginal(), NULL, and SCIP_Real.

Referenced by isColInCompBndSeq().

◆ getGeneratorEntry()

static SCIP_Real getGeneratorEntry ( SCIP_VAR *  mastervar,
SCIP_VAR *  origvar 
)
static

computes the generator of mastervar for the entry in origvar

Returns
entry of the generator corresponding to origvar
Parameters
mastervarcurrent mastervariable
origvarcorresponding 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 SCIP_Bool isColInCompBndSeq ( SCIP *  scip,
SCIP_VAR **  solvars,
SCIP_Real *  solvals,
int  nsolvars,
GCG_COMPBND *  compBndSeq,
int  compBndSeqSize 
)
static

whether a master variable is in the component bound sequence or not

Parameters
scipSCIP data structure
solvarscolumn solution variables
solvalscolumn solution values
nsolvarsnumber of column solution variables
compBndSeqcomponent bound sequence to check
compBndSeqSizesize 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 SCIP_Bool isMasterVarInCompBndSeq ( SCIP *  scip,
SCIP_VAR *  mastervar,
GCG_COMPBND *  compBndSeq,
int  compBndSeqSize,
int  blocknr 
)
static

whether a master variable is in compBndSeq or not

Parameters
scipSCIP data structure
mastervarmaster variable to check
compBndSeqcomponent bound sequence to check
compBndSeqSizesize of compBndSeq
blocknrblock 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 SCIP_RETCODE addVarToMasterbranch ( GCG *  gcg,
SCIP_VAR *  mastervar,
GCG_BRANCHDATA *  branchdata 
)
static

adds a variable to a branching constraint

Parameters
gcgGCG data structure
mastervarthe variable to add
branchdatabranching 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 GCG_DECL_BRANCHGETEXTENDEDMASTERCONSCOEFF ( branchGetExtendedmasterconsCoeffCompBnd  )
static

callback new column method

Definition at line 400 of file branch_compbnd.c.

References GCGgetMasterprob(), GCGisMaster(), isColInCompBndSeq(), NULL, and SCIP_OKAY.

◆ createBranchingCons()

◆ createChildNodesCompBndSeq()

◆ calcFractionality()

static SCIP_Real calcFractionality ( SCIP *  masterscip,
SCIP_VAR **  mastervars,
int  nmastervars 
)
static

determine fractionality of a set of mastervariables

Parameters
masterscipSCIP data structure
mastervarsmastervariables
nmastervarsnumber 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 SCIP_RETCODE initIndexSet ( SCIP *  scip,
SCIP_VAR ***  indexSet,
int *  indexSetSize,
SCIP_VAR **  mastervars,
int  mastervarsSize 
)
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
scipSCIP data structure
indexSetset to initialize
indexSetSizesize of the index set
mastervarsmastervariables currently satisfying the component bound sequence in the specified block
mastervarsSizesize 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 SCIP_Real getLowerBound ( SCIP *  scip,
SCIP_VAR *  origvar,
GCG_COMPBND *  compBndSeq,
int  compBndSeqSize 
)
static

get the lower bound of a original variable from the component bound sequence, or the lb

Parameters
scipSCIP data structure
origvaroriginal variable
compBndSeqcomponent bound sequence
compBndSeqSizesize 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 SCIP_Real getUpperBound ( SCIP *  scip,
SCIP_VAR *  origvar,
GCG_COMPBND *  compBndSeq,
int  compBndSeqSize 
)
static

get the upper bound of a original variable from the component bound sequence, or the ub

Parameters
scipSCIP data structure
origvaroriginal variable
compBndSeqcomponent bound sequence
compBndSeqSizesize 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 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

separation algorithm determining multiple component bound sequences one could branch on

Parameters
gcgGCG data structure
satisfyingMastervarsmastervariables currently satisfying the component bound sequence in the specified block
satisfyingMastervarsSizesize of mastervars
compBndSeqcurrent Component Bound Sequence defining the nodes
compBndSeqSizesize of compBndSeq
blocknrnumber of the block
foundCompBndSeqListlist of component bound sequences
foundCompBndSeqSizeListsizes of the component bound sequences
foundCompBndSeqListSizesize of Blist
resultpointer 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 SCIP_RETCODE findSatisfyingMastervars ( SCIP *  masterscip,
SCIP_VAR ***  satisfyingMastervars,
int *  satisfyingMastervarsSize,
int  blocknr,
GCG_COMPBND *  compBndSeq,
int  compBndSeqSize 
)
static

collects all currently mastervariables in the given block that satisfy the given component bound sequence

Parameters
masterscipSCIP data structure
satisfyingMastervarsmastervariables in the given block satisfying the compBndSeq
satisfyingMastervarsSizesize of mastervars
blocknrnumber of the block
compBndSeqComponent Bound Sequence defining the nodes
compBndSeqSizesize 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]

◆ CHOOSE_COMPBND() [2/2]

static CHOOSE_COMPBND ( chooseMostDistinctValuesMedian  )
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 SCIP_Real calcSum ( SCIP *  masterscip,
GCG_COMPBND *  compBndSeq,
int  compBndSeqSize,
int  blocknr 
)
static

calculate sum of component bound sequence

Parameters
masterscipSCIP data structure
compBndSeqComponent Bound Sequence defining the nodes
compBndSeqSizesize of compBndSeq
blocknrnumber 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_COMPBNDSEQ ( chooseClosestToKHalf  )
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_COMPBNDSEQ ( chooseMostFractional  )
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_COMPBNDSEQ ( chooseSmallestSize  )
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 SCIP_RETCODE separation ( GCG *  gcg,
GCG_BRANCHRULE *  branchrule,
GCG_COMPBND **  compBndSeq,
int *  compBndSeqSize,
int  blocknr,
SCIP_RESULT *  result 
)
static

separation algorithm determining a component bound sequence to branch on

Parameters
gcgGCG data structure
branchrulebranching rule
compBndSeqComponent Bound Sequence defining the nodes
compBndSeqSizesize of compBndSeq
blocknrnumber of the block
resultpointer 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()

◆ SCIP_DECL_BRANCHFREE()

static SCIP_DECL_BRANCHFREE ( branchFreeCompBnd  )
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()

◆ SCIP_DECL_BRANCHEXECEXT()

static SCIP_DECL_BRANCHEXECEXT ( branchExecextCompBnd  )
static

Definition at line 1892 of file branch_compbnd.c.

References SCIP_DIDNOTRUN, SCIP_OKAY, and SCIPdebugMessage.

◆ SCIP_DECL_BRANCHEXECPS()

static SCIP_DECL_BRANCHEXECPS ( branchExecpsCompBnd  )
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 GCG_DECL_BRANCHACTIVEMASTER ( branchActiveMasterCompBnd  )
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 GCG_DECL_BRANCHDEACTIVEMASTER ( branchDeactiveMasterCompBnd  )
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 GCG_DECL_BRANCHPROPMASTER ( branchPropMasterCompBnd  )
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 GCG_DECL_BRANCHDATADELETE ( branchDataDeleteCompBnd  )
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 GCG_DECL_BRANCHNEWCOL ( branchNewColCompBnd  )
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 GCG_DECL_BRANCHGETEXTENDEDMASTERCONS ( branchGetExtendedmasterconsCompBnd  )
static

Definition at line 2045 of file branch_compbnd.c.

References NULL, and SCIP_OKAY.

◆ SCIP_DECL_BRANCHINIT()

static SCIP_DECL_BRANCHINIT ( branchInitCompBnd  )
static

◆ GCGincludeBranchruleCompBnd()

◆ GCGisBranchruleCompBnd()

SCIP_Bool GCGisBranchruleCompBnd ( SCIP_BRANCHRULE *  branchrule)

returns true when the branch rule is the component bound branching rule

Parameters
branchrulebranchrule to check

Definition at line 2158 of file branch_compbnd.c.

References BRANCHRULE_NAME, NULL, SCIP_Bool, and SCIPbranchruleGetName().