Detailed Description
branching rule based on vanderbeck's generic branching scheme
Definition in file branch_generic.c.
#include "gcg/branch_generic.h"#include "gcg/pub_gcgvar.h"#include "gcg/pub_extendedmasterconsdata.h"#include "gcg/relax_gcg.h"#include "gcg/cons_masterbranch.h"#include "gcg/cons_origbranch.h"#include "gcg/pricer_gcg.h"#include "gcg/type_branchgcg.h"#include "gcg/gcg.h"#include "gcg/cons_integralorig.h"#include "gcg/gcgsort.h"#include "scip/cons_linear.h"#include "scip/nodesel_bfs.h"#include "scip/nodesel_dfs.h"#include "scip/nodesel_estimate.h"#include "scip/nodesel_hybridestim.h"#include "scip/nodesel_restartdfs.h"#include "scip/branch_allfullstrong.h"#include "scip/branch_fullstrong.h"#include "scip/branch_inference.h"#include "scip/branch_mostinf.h"#include "scip/branch_leastinf.h"#include "scip/branch_pscost.h"#include "scip/branch_random.h"#include "scip/branch_relpscost.h"#include <assert.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | GCG_BranchData |
| struct | GCG_Record |
| struct | SCIP_BranchruleData |
| struct | SCIP_EventhdlrData |
Macros | |
| #define | BRANCHRULE_NAME "generic" |
| #define | BRANCHRULE_DESC "generic branching rule by Vanderbeck" |
| #define | BRANCHRULE_PRIORITY -100 |
| #define | BRANCHRULE_MAXDEPTH -1 |
| #define | BRANCHRULE_MAXBOUNDDIST 1.0 |
| #define | EVENTHDLR_NAME "genericbranchvaradd" |
| #define | EVENTHDLR_DESC "event handler for adding a new generated mastervar into the right branching constraints by using Vanderbecks generic branching scheme" |
| #define | branchExitGeneric NULL |
| #define | branchInitsolGeneric NULL |
| #define | branchExitsolGeneric NULL |
Typedefs | |
| typedef struct GCG_Record | GCG_RECORD |
Functions | |
| static SCIP_RETCODE | initBranch (GCG *gcg, GCG_BRANCHRULE *branchrule, SCIP_RESULT *result, int **checkedblocks, int *ncheckedblocks, GCG_STRIP ****checkedblockssortstrips, int **checkedblocksnsortstrips) |
| static SCIP_Real | getGeneratorEntry (SCIP_VAR *mastervar, SCIP_VAR *origvar) |
| static SCIP_Real | getColCoefficient (SCIP *scip, GCG_BRANCHDATA *branchdata, SCIP_VAR *mastervar, int probnr) |
| static SCIP_RETCODE | initNodeBranchdata (SCIP *scip, GCG_BRANCHDATA **nodebranchdata, int blocknr) |
| static SCIP_RETCODE | addVarToMasterbranch (SCIP *masterprob, SCIP_VAR *mastervar, GCG_BRANCHDATA *branchdata, SCIP_Bool *added) |
| static SCIP_RETCODE | createDirectBranchingCons (SCIP *scip, SCIP_NODE *node, GCG_BRANCHDATA *branchdata) |
| static SCIP_RETCODE | createBranchingCons (GCG *gcg, SCIP_NODE *node, GCG_BRANCHDATA *branchdata) |
| static | SCIP_DECL_EVENTINITSOL (eventInitsolGenericbranchvaradd) |
| static | SCIP_DECL_EVENTEXITSOL (eventExitsolGenericbranchvaradd) |
| static | SCIP_DECL_EVENTFREE (eventFreeGenericbranchvaradd) |
| static | SCIP_DECL_EVENTEXEC (eventExecGenericbranchvaradd) |
| static SCIP_RETCODE | InitIndexSet (SCIP *scip, SCIP_VAR **F, int Fsize, SCIP_VAR ***IndexSet, int *IndexSetSize) |
| static SCIP_Real | GetMedian (SCIP *scip, SCIP_Real *array, int arraysize, SCIP_Real min) |
| static | GCG_DECL_SORTPTRCOMP (ptrcomp) |
| static SCIP_RETCODE | LexicographicSort (SCIP *scip, GCG_STRIP **array, int arraysize) |
| static int | ILOcomp (SCIP *scip, SCIP_VAR *mastervar1, SCIP_VAR *mastervar2, GCG_COMPSEQUENCE **C, int NBoundsequences, int *sequencesizes, int p) |
| static | SCIP_DECL_SORTPTRCOMP (ptrilocomp) |
| static SCIP_RETCODE | InducedLexicographicSort (SCIP *scip, GCG_STRIP **array, int arraysize, GCG_COMPSEQUENCE **C, int NBoundsequences, int *sequencesizes) |
| static SCIP_RETCODE | partition (SCIP *scip, SCIP_VAR **J, int *Jsize, SCIP_Longint *priority, SCIP_VAR **F, int Fsize, SCIP_VAR **origvar, SCIP_Real *median) |
| static SCIP_RETCODE | addToRecord (SCIP *scip, GCG_RECORD *record, GCG_COMPSEQUENCE *S, int Ssize) |
| static SCIP_RETCODE | Separate (SCIP *origprob, SCIP *masterprob, SCIP_VAR **F, int Fsize, SCIP_VAR **IndexSet, int IndexSetSize, GCG_COMPSEQUENCE *S, int Ssize, GCG_RECORD *record) |
| static SCIP_RETCODE | ChoseS (SCIP *scip, GCG_RECORD **record, GCG_COMPSEQUENCE **S, int *Ssize) |
| static int | computeNewSequence (int Csize, int p, SCIP_VAR *origvar, int *sequencesizes, GCG_COMPSEQUENCE **C, GCG_COMPSEQUENCE **CopyC, int *newsequencesizes, GCG_COMPSENSE sense) |
| static double | computeAlpha (SCIP *origprob, SCIP *masterprob, int Fsize, GCG_COMPSENSE isense, double ivalue, SCIP_VAR *origvar, SCIP_VAR **F) |
| static SCIP_RETCODE | Explore (SCIP *origprob, SCIP *masterprob, GCG_COMPSEQUENCE **C, int Csize, int *sequencesizes, int p, SCIP_VAR **F, int Fsize, SCIP_VAR **IndexSet, int IndexSetSize, GCG_COMPSEQUENCE **S, int *Ssize, GCG_RECORD *record) |
| static SCIP_RETCODE | branchDirectlyOnMastervar (GCG *gcg, SCIP_VAR *mastervar, GCG_BRANCHRULE *branchrule) |
| static SCIP_RETCODE | ChooseSeparateMethod (GCG *gcg, SCIP_VAR **F, int Fsize, GCG_COMPSEQUENCE **S, int *Ssize, GCG_COMPSEQUENCE **C, int Csize, int *CompSizes, int blocknr, GCG_BRANCHRULE *branchrule, SCIP_RESULT *result, int **checkedblocks, int *ncheckedblocks, GCG_STRIP ****checkedblockssortstrips, int **checkedblocksnsortstrips) |
| static | GCG_DECL_BRANCHDATADELETE (branchDataDeleteGeneric) |
| static SCIP_Bool | checkchildconsS (SCIP *scip, SCIP_Real lhs, GCG_COMPSEQUENCE *childS, int childSsize, SCIP_CONS *parentcons, int childBlocknr) |
| static SCIP_Bool | pruneChildNodeByDominanceGeneric (SCIP *scip, SCIP_Real lhs, GCG_COMPSEQUENCE *childS, int childSsize, SCIP_CONS *masterbranchcons, int childBlocknr) |
| static SCIP_RETCODE | createChildNodesGeneric (GCG *gcg, GCG_BRANCHRULE *branchrule, GCG_COMPSEQUENCE *S, int Ssize, int blocknr, SCIP_CONS *masterbranchcons, SCIP_RESULT *result) |
| static SCIP_RETCODE | GCGincludeMasterCopyPlugins (SCIP *scip) |
| static | SCIP_DECL_BRANCHCOPY (branchCopyGeneric) |
| static | GCG_DECL_BRANCHNEWCOL (branchNewColGeneric) |
| static | GCG_DECL_BRANCHPROPMASTER (branchPropMasterGeneric) |
| static | SCIP_DECL_BRANCHEXECLP (branchExeclpGeneric) |
| static | SCIP_DECL_BRANCHEXECEXT (branchExecextGeneric) |
| static | SCIP_DECL_BRANCHEXECPS (branchExecpsGeneric) |
| static | SCIP_DECL_BRANCHINIT (branchInitGeneric) |
| static | SCIP_DECL_BRANCHFREE (branchFreeGeneric) |
| SCIP_RETCODE | GCGincludeBranchruleGeneric (GCG *gcg) |
| GCG_COMPSEQUENCE * | GCGbranchGenericBranchdataGetConsS (GCG_BRANCHDATA *branchdata) |
| int | GCGbranchGenericBranchdataGetConsSsize (GCG_BRANCHDATA *branchdata) |
| int | GCGbranchGenericBranchdataGetConsblocknr (GCG_BRANCHDATA *branchdata) |
| SCIP_CONS * | GCGbranchGenericBranchdataGetMastercons (GCG_BRANCHDATA *branchdata) |
| SCIP_Bool | GCGisBranchruleGeneric (GCG_BRANCHRULE *branchrule) |
Macro Definition Documentation
◆ BRANCHRULE_NAME
| #define BRANCHRULE_NAME "generic" |
Definition at line 72 of file branch_generic.c.
◆ BRANCHRULE_DESC
| #define BRANCHRULE_DESC "generic branching rule by Vanderbeck" |
Definition at line 73 of file branch_generic.c.
◆ BRANCHRULE_PRIORITY
| #define BRANCHRULE_PRIORITY -100 |
Definition at line 74 of file branch_generic.c.
◆ BRANCHRULE_MAXDEPTH
| #define BRANCHRULE_MAXDEPTH -1 |
Definition at line 75 of file branch_generic.c.
◆ BRANCHRULE_MAXBOUNDDIST
| #define BRANCHRULE_MAXBOUNDDIST 1.0 |
Definition at line 76 of file branch_generic.c.
◆ EVENTHDLR_NAME
| #define EVENTHDLR_NAME "genericbranchvaradd" |
Definition at line 79 of file branch_generic.c.
◆ EVENTHDLR_DESC
| #define EVENTHDLR_DESC "event handler for adding a new generated mastervar into the right branching constraints by using Vanderbecks generic branching scheme" |
Definition at line 80 of file branch_generic.c.
◆ branchExitGeneric
| #define branchExitGeneric NULL |
Definition at line 132 of file branch_generic.c.
◆ branchInitsolGeneric
| #define branchInitsolGeneric NULL |
Definition at line 133 of file branch_generic.c.
◆ branchExitsolGeneric
| #define branchExitsolGeneric NULL |
Definition at line 134 of file branch_generic.c.
Typedef Documentation
◆ GCG_RECORD
| typedef struct GCG_Record GCG_RECORD |
Definition at line 103 of file branch_generic.c.
Function Documentation
◆ 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 checkedblocks blocks that have been checked ncheckedblocks number of checked blocks checkedblockssortstrips sorted strips of checked blocks checkedblocksnsortstrips sizes of the strips
Definition at line 2569 of file branch_generic.c.
References ComponentBoundSequence::bound, branchDirectlyOnMastervar(), ChooseSeparateMethod(), ComponentBoundSequence::component, GCG_BranchData::consblocknr, GCG_BranchData::consS, GCG_BranchData::consSsize, createChildNodesGeneric(), FALSE, GCGbranchGetScipBranchrule(), GCGconsMasterbranchGetActiveCons(), GCGconsMasterbranchGetBranchdata(), GCGconsMasterbranchGetBranchrule(), GCGconsMasterbranchGetParentcons(), GCGgetBlockRepresentative(), GCGgetMasterprob(), GCGgetNPricingprobs(), GCGgetOrigprob(), GCGisMasterVarInBlock(), GCGmasterVarIsArtificial(), GCGmasterVarIsLinking(), GCGoriginalVarGetMastervars(), GCGoriginalVarGetNMastervars(), GCGpricerExistRays(), GCGrelaxGetCurrentOrigSol(), GCGvarGetBlock(), GCGvarIsMaster(), NULL, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPbranchruleGetName(), SCIPdebugMessage, SCIPerrorMessage, SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPgetBoolParam(), SCIPgetLPBranchCands(), SCIPgetNContVars(), SCIPgetNVars(), SCIPgetSolVal(), SCIPgetVars(), SCIPgetVarsData(), SCIPisEQ(), SCIPisFeasIntegral(), SCIPisIntegral(), SCIPreallocBufferArray, SCIPvarGetName(), SCIPvarGetType(), ComponentBoundSequence::sense, and TRUE.
Referenced by ChooseSeparateMethod(), and SCIP_DECL_BRANCHEXECLP().
◆ 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 139 of file branch_generic.c.
References GCGmasterVarGetOrigval(), SCIP_INVALID, and SCIP_Real.
Referenced by computeAlpha(), createChildNodesGeneric(), Explore(), GCG_DECL_SORTPTRCOMP(), getColCoefficient(), ILOcomp(), partition(), and Separate().
◆ getColCoefficient()
|
static |
determine the coefficient for a column
- Parameters
-
scip SCIP data structure branchdata branching data structure where the variable should be added mastervar cmaster variable probnr number of the pricing problem
Definition at line 151 of file branch_generic.c.
References FALSE, GCG_COMPSENSE_GE, GCGbranchGenericBranchdataGetConsblocknr(), GCGbranchGenericBranchdataGetConsS(), GCGbranchGenericBranchdataGetConsSsize(), GCGisMaster(), getGeneratorEntry(), GCG_BranchData::mastercons, NULL, SCIP_Bool, SCIP_Real, SCIPdebugMessage, SCIPisGE(), SCIPisLT(), and TRUE.
Referenced by addVarToMasterbranch().
◆ initNodeBranchdata()
|
static |
initialize branchdata at the node
- Parameters
-
scip SCIP data structure nodebranchdata branching data to set blocknr block we are branching in
Definition at line 203 of file branch_generic.c.
References NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocBlockMemory.
Referenced by branchDirectlyOnMastervar(), and createChildNodesGeneric().
◆ addVarToMasterbranch()
|
static |
adds a variable to a branching constraint
- Parameters
-
masterprob SCIP data structure mastervar the variable to add branchdata branching data structure where the variable should be added added whether the variable was added
Definition at line 223 of file branch_generic.c.
References FALSE, GCGbranchGenericBranchdataGetMastercons(), GCGvarGetBlock(), getColCoefficient(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCoefLinear(), SCIPdebugMessage, SCIPisZero(), and TRUE.
Referenced by createBranchingCons(), GCG_DECL_BRANCHNEWCOL(), and SCIP_DECL_EVENTEXEC().
◆ createDirectBranchingCons()
|
static |
creates the constraint for branching directly on a master variable
- Parameters
-
scip SCIP data structure node node to add constraint branchdata branching data structure
Definition at line 253 of file branch_generic.c.
References ComponentBoundSequence::bound, ComponentBoundSequence::component, GCG_BranchData::consblocknr, GCG_BranchData::consS, GCG_BranchData::consSsize, FALSE, GCG_COMPSENSE_GE, GCGvarIsMaster(), GCG_BranchData::mastercons, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddCoefLinear(), SCIPaddConsNode(), SCIPcreateConsLinear(), SCIPinfinity(), SCIPsnprintf(), ComponentBoundSequence::sense, and TRUE.
Referenced by branchDirectlyOnMastervar().
◆ createBranchingCons()
|
static |
creates the constraint for branching directly on a master variable
- Parameters
-
gcg GCG data structure node node to add constraint branchdata branching data structure
Definition at line 287 of file branch_generic.c.
References addVarToMasterbranch(), GCG_BranchData::consSsize, FALSE, GCGgetMasterprob(), GCGmasterGetNPricedvars(), GCGmasterGetPricedvars(), GCG_BranchData::lhs, GCG_BranchData::mastercons, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddConsNode(), SCIPcreateConsLinear(), SCIPinfinity(), SCIPsnprintf(), and TRUE.
Referenced by createChildNodesGeneric().
◆ SCIP_DECL_EVENTINITSOL()
|
static |
solving process initialization method of event handler (called when branch and bound process is about to begin)
Definition at line 324 of file branch_generic.c.
References EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_VARADDED, SCIP_OKAY, SCIPcatchEvent(), and SCIPeventhdlrGetName().
◆ SCIP_DECL_EVENTEXITSOL()
|
static |
solving process deinitialization method of event handler (called before branch and bound process data is freed)
Definition at line 338 of file branch_generic.c.
References EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_VARADDED, SCIP_OKAY, SCIPdropEvent(), and SCIPeventhdlrGetName().
◆ SCIP_DECL_EVENTFREE()
|
static |
destructor method of event handler (called when SCIP is exiting)
Definition at line 352 of file branch_generic.c.
References EVENTHDLR_NAME, NULL, SCIP_OKAY, SCIPeventhdlrGetData(), SCIPeventhdlrGetName(), and SCIPfreeBlockMemory.
◆ SCIP_DECL_EVENTEXEC()
|
static |
execution method of event handler
Definition at line 369 of file branch_generic.c.
References addVarToMasterbranch(), EVENTHDLR_NAME, FALSE, SCIP_EventhdlrData::gcg, GCGbranchGenericBranchdataGetConsblocknr(), GCGbranchGenericBranchdataGetConsS(), GCGbranchGenericBranchdataGetConsSsize(), GCGbranchGetScipBranchrule(), GCGconsMasterbranchGetActiveCons(), GCGconsMasterbranchGetBranchdata(), GCGconsMasterbranchGetBranchrule(), GCGconsMasterbranchGetParentcons(), GCGgetOrigprob(), GCGisBranchruleGeneric(), GCGmasterVarIsLinking(), GCGvarGetBlock(), GCGvarIsMaster(), NULL, SCIP_Bool, SCIP_CALL, SCIP_EVENTTYPE_VARADDED, SCIP_OKAY, SCIPbranchruleGetName(), SCIPdebugMessage, SCIPeventGetType(), SCIPeventGetVar(), SCIPeventhdlrGetData(), SCIPeventhdlrGetName(), SCIPgetVarsData(), and SCIPvarGetName().
◆ InitIndexSet()
|
static |
method for initializing the set of respected indices
- Parameters
-
scip SCIP data structure F array of fractional mastervars Fsize number of fractional mastervars IndexSet set to initialize IndexSetSize size of the index set
Definition at line 454 of file branch_generic.c.
References GCGmasterVarGetNOrigvars(), GCGmasterVarGetOrigvars(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPreallocBufferArray, and SCIPvarGetType().
Referenced by ChooseSeparateMethod().
◆ GetMedian()
method for calculating the median over all fractional components values using the quickselect algorithm (or a variant of it)
This method will change the array
- Returns
- median or if the median is the minimum return ceil(arithm middle)
- Parameters
-
scip SCIP data structure array array to find the median in (will be destroyed) arraysize size of the array min minimum of array
Definition at line 536 of file branch_generic.c.
References min(), NULL, r, SCIP_Real, SCIPceil(), SCIPisEQ(), SCIPisGT(), and SCIPisLT().
Referenced by partition(), and Separate().
◆ GCG_DECL_SORTPTRCOMP()
|
static |
comparefunction for lexicographical sort
Definition at line 605 of file branch_generic.c.
References GCGmasterVarIsLinking(), GCGvarGetBlock(), getGeneratorEntry(), GCG_Strip::mastervar, NULL, SCIP_VARTYPE_INTEGER, SCIPdebugMessage, SCIPgetNVars(), SCIPgetVars(), SCIPisFeasGT(), SCIPisFeasLT(), and SCIPvarGetType().
◆ LexicographicSort()
|
static |
lexicographical sort using scipsort This method will change the array
- Parameters
-
scip SCIP data structure array array to sort (will be changed) arraysize size of the array
Definition at line 658 of file branch_generic.c.
References GCGsortPtr(), NULL, SCIP_OKAY, and SCIPdebugMessage.
Referenced by InducedLexicographicSort().
◆ ILOcomp()
|
static |
compare function for ILO: returns 1 if bd1 < bd2 else -1 with respect to bound sequence
- Parameters
-
scip SCIP data structure mastervar1 first strip mastervar2 second strip C component bound sequence to compare with NBoundsequences size of the bound sequence sequencesizes sizes of the bound sequences p current depth in C
Definition at line 678 of file branch_generic.c.
References ComponentBoundSequence::bound, GCG_Strip::C, ComponentBoundSequence::component, GCG_Strip::Csize, GCG_COMPSENSE_GE, getGeneratorEntry(), ILOcomp(), GCG_Strip::mastervar, NULL, GCG_Strip::scip, SCIP_CALL_ABORT, SCIP_Real, SCIP_VARTYPE_INTEGER, SCIPallocBuffer, SCIPallocBufferArray, SCIPdebugMessage, SCIPfreeBuffer, SCIPfreeBufferArray, SCIPisGE(), SCIPisGT(), SCIPisLT(), SCIPvarGetType(), and GCG_Strip::sequencesizes.
Referenced by ILOcomp(), and SCIP_DECL_SORTPTRCOMP().
◆ SCIP_DECL_SORTPTRCOMP()
|
static |
comparefunction for induced lexicographical sort
Definition at line 857 of file branch_generic.c.
References GCG_Strip::C, GCG_Strip::Csize, ILOcomp(), GCG_Strip::mastervar, GCG_Strip::scip, and GCG_Strip::sequencesizes.
◆ InducedLexicographicSort()
|
static |
induced lexicographical sort
- Parameters
-
scip SCIP ptr array array of strips to sort in ILO arraysize size of the array C current set o comp bound sequences NBoundsequences size of C sequencesizes sizes of the sequences in C
Definition at line 873 of file branch_generic.c.
References GCG_Strip::C, GCG_Strip::Csize, LexicographicSort(), NULL, GCG_Strip::scip, SCIP_OKAY, SCIPdebugMessage, SCIPsortPtr(), and GCG_Strip::sequencesizes.
Referenced by ChooseSeparateMethod().
◆ partition()
|
static |
partitions the strip according to the priority
- Parameters
-
scip SCIP data structure J array of variables which belong to the discriminating components Jsize pointer to the number of discriminating components priority branching priorities F set of fractional solutions satisfying bounds Fsize size of list of fractional solutions satisfying bounds origvar pointer to store the variable which belongs to a discriminating component with maximum priority median pointer to store the median of fractional solutions satisfying bounds
Definition at line 910 of file branch_generic.c.
References getGeneratorEntry(), GetMedian(), min(), SCIP_CALL, SCIP_Longint, SCIP_LONGINT_MIN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPdebugMessage, SCIPfreeBufferArray, SCIPinfinity(), SCIPisEQ(), SCIPisInfinity(), SCIPisLT(), and SCIPvarGetType().
Referenced by gcg::DETPROBDATA::addConsPartition(), gcg::DETPROBDATA::addVarPartition(), gcg::GraphAlgorithms< T >::computekMetric(), gcg::GraphAlgorithms< T >::computeMincut(), gcg::GraphAlgorithms< T >::computeSoed(), gcg::ColumnGraph< T >::createDecompFromPartition(), gcg::HypercolGraph< T >::createDecompFromPartition(), gcg::HyperrowcolGraph< T >::createDecompFromPartition(), gcg::HyperrowGraph< T >::createDecompFromPartition(), gcg::RowGraph< T >::createDecompFromPartition(), gcg::HypercolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowcolGraph< T >::createPartialdecFromPartition(), gcg::HyperrowGraph< T >::createPartialdecFromPartition(), gcg::RowGraph< T >::createPartialdecFromPartition(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_VARCLASSIFY(), GCGconshdlrDecompCalcCandidatesNBlocks(), gcg::DETPROBDATA::printPartitionInformation(), gcg::Graph< T >::readPartition(), gcg::Hypergraph< T >::readPartition(), Separate(), gcg::PARTIALDECOMP::setConsPartitionStatistics(), gcg::Graph< T >::setPartition(), gcg::Hypergraph< T >::setPartition(), gcg::PARTIALDECOMP::setVarPartitionStatistics(), and writeCls().
◆ addToRecord()
|
static |
add identified sequence to record
- Parameters
-
scip SCIP data structure record record of identified sequences S bound restriction sequence Ssize size of bound restriction sequence
Definition at line 986 of file branch_generic.c.
References ComponentBoundSequence::bound, GCG_Record::capacities, ComponentBoundSequence::component, GCG_Record::record, GCG_Record::recordcapacity, GCG_Record::recordsize, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPdebugMessage, SCIPreallocBlockMemoryArray, ComponentBoundSequence::sense, and GCG_Record::sequencesizes.
Referenced by Explore(), and Separate().
◆ Separate()
|
static |
separation at the root node
- Parameters
-
origprob SCIP data structure masterprob master problem F fractional strips respecting bound restrictions Fsize size of the strips IndexSet index set IndexSetSize size of index set S ordered set of bound restrictions Ssize size of the ordered set record identified bound sequences
Definition at line 1026 of file branch_generic.c.
References addToRecord(), ComponentBoundSequence::bound, ComponentBoundSequence::component, FALSE, GCG_COMPSENSE_GE, GCG_COMPSENSE_LT, getGeneratorEntry(), GetMedian(), min(), NULL, partition(), GCG_Record::recordsize, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_LONGINT_MAX, SCIP_LONGINT_MIN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPdebugMessage, SCIPdebugPrintf, SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPgetSolVal(), SCIPinfinity(), SCIPisEQ(), SCIPisFeasIntegral(), SCIPisGE(), SCIPisGT(), SCIPisIntegral(), SCIPisLT(), SCIPvarGetName(), SCIPvarGetType(), ComponentBoundSequence::sense, Separate(), GCG_Record::sequencesizes, and TRUE.
Referenced by ChooseSeparateMethod(), Explore(), and Separate().
◆ ChoseS()
|
static |
choose a component bound sequence to create branching
- Parameters
-
scip SCIP data structure record candidate of bound sequences S pointer to return chosen bound sequence Ssize size of the chosen bound sequence
Definition at line 1331 of file branch_generic.c.
References NULL, SCIP_CALL, SCIP_Longint, SCIP_LONGINT_MIN, SCIP_OKAY, SCIPallocBufferArray, SCIPdebugMessage, and SCIPfreeBlockMemoryArray.
Referenced by ChooseSeparateMethod().
◆ computeNewSequence()
|
static |
updates the new set of sequences C in CopyC and the corresponding size array newsequencesizes returns the size of CopyC
- Parameters
-
Csize size of the sequence p index of node origvar another index generatorentry sequencesizes size of the sequences C original sequence CopyC new sequence newsequencesizes output parameter for the new sequence sense sense of the comparison
Definition at line 1403 of file branch_generic.c.
Referenced by Explore().
◆ computeAlpha()
|
static |
auxilary function to compute alpha for given index
- Parameters
-
origprob SCIP data structure masterprob master problem Fsize size of F isense sense of the bound for origvar ivalue value of the bound for origvar origvar index of the variable F current fractional mastervars
Definition at line 1435 of file branch_generic.c.
References GCG_COMPSENSE_GE, GCG_COMPSENSE_LT, getGeneratorEntry(), NULL, SCIP_Real, SCIPgetSolVal(), SCIPisGE(), and SCIPisLT().
Referenced by Explore().
◆ Explore()
|
static |
separation at a node other than the root node
- Parameters
-
origprob SCIP data structure masterprob master problem C array of component bounds sequences Csize number of component bounds sequences sequencesizes array of sizes of component bounds sequences p depth of recursive call F strip of fractional columns Fsize size of the strips IndexSet array of original variables which belong to the fractional master columns IndexSetSize number of original variables which belong to fractional master columns. Note that IndexSetSize >= Fsize S component sequences Ssize length of component sequences record array of sets of component bounds which we might use for separation
Definition at line 1466 of file branch_generic.c.
References addToRecord(), ComponentBoundSequence::bound, ComponentBoundSequence::component, computeAlpha(), computeNewSequence(), Explore(), FALSE, GCG_COMPSENSE_GE, GCG_COMPSENSE_LT, getGeneratorEntry(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_INTEGER, SCIPallocBufferArray, SCIPdebugMessage, SCIPfreeBufferArrayNull, SCIPgetSolVal(), SCIPisEQ(), SCIPisFeasIntegral(), SCIPisGE(), SCIPisLE(), SCIPisLT(), SCIPreallocBufferArray, SCIPvarGetName(), SCIPvarGetType(), ComponentBoundSequence::sense, Separate(), and TRUE.
Referenced by ChooseSeparateMethod(), and Explore().
◆ branchDirectlyOnMastervar()
|
static |
branching on copied origvar directly in master
- Parameters
-
gcg GCG data structure mastervar master variable branchrule branching rule
Definition at line 1775 of file branch_generic.c.
References ComponentBoundSequence::bound, ComponentBoundSequence::component, GCG_BranchData::consS, GCG_BranchData::consSsize, createDirectBranchingCons(), GCG_COMPSENSE_GE, GCG_COMPSENSE_LT, GCGconsMasterbranchGetActiveCons(), GCGcreateConsMasterbranch(), GCGgetMasterprob(), GCGgetOrigprob(), initNodeBranchdata(), GCG_BranchData::maxconsS, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddConsNode(), SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPceil(), SCIPcreateChild(), SCIPgetLocalTransEstimate(), SCIPgetSolVal(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetName(), and ComponentBoundSequence::sense.
Referenced by initBranch().
◆ ChooseSeparateMethod()
|
static |
callup method for seperate decides whether Separate or Explore should be done
- Parameters
-
gcg GCG data structure F strip of fractional columns Fsize size of the strips S array of existing bound sequences Ssize size of existing bound sequences C array of component bounds sequences Csize number of component bounds sequences CompSizes array of sizes of component bounds sequences blocknr id of the pricing problem (or block) in which we want to branch branchrule branching rule result pointer to store the result of the branching call checkedblocks array to store which blocks have been checked ncheckedblocks number of blocks that have beend checked checkedblockssortstrips sorted strips of checked blocks checkedblocksnsortstrips size of the strips
Definition at line 1852 of file branch_generic.c.
References GCG_Strip::C, GCG_Record::capacities, ChoseS(), GCG_Strip::Csize, Explore(), GCGgetMasterprob(), GCGgetNPricingprobs(), GCGgetOrigprob(), GCGisMasterVarInBlock(), InducedLexicographicSort(), initBranch(), InitIndexSet(), GCG_Strip::mastervar, NULL, GCG_Record::record, GCG_Record::recordcapacity, GCG_Record::recordsize, GCG_Strip::scip, SCIP_CALL, SCIP_OKAY, SCIPallocBuffer, SCIPallocBufferArray, SCIPdebugMessage, SCIPfreeBlockMemoryArrayNull, SCIPfreeBuffer, SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPgetVarsData(), SCIPreallocBufferArray, Separate(), GCG_Record::sequencesizes, and GCG_Strip::sequencesizes.
Referenced by initBranch().
◆ GCG_DECL_BRANCHDATADELETE()
|
static |
callback deletion method for branching data
Definition at line 2036 of file branch_generic.c.
References GCGgetMasterprob(), GCGgetOrigprob(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetName(), SCIPdebugMessage, SCIPfreeBlockMemoryArrayNull, SCIPfreeBlockMemoryNull, and SCIPreleaseCons().
◆ checkchildconsS()
|
static |
check method for pruning ChildS directly on childnodes
- Returns
- TRUE if node is pruned
- Parameters
-
scip SCIP data structure lhs lhs for childnode which is checkes to be pruned childS component bound sequence defining the childnode childSsize size of component bound sequence parentcons constraint of parent node in B&B tree childBlocknr number of the block for the child node
Definition at line 2091 of file branch_generic.c.
References ComponentBoundSequence::bound, ComponentBoundSequence::component, GCG_BranchData::consblocknr, GCG_BranchData::consS, GCG_BranchData::consSsize, FALSE, GCGbranchGetScipBranchrule(), GCGconsMasterbranchGetBranchdata(), GCGconsMasterbranchGetBranchrule(), GCGconsMasterbranchGetChildcons(), GCGconsMasterbranchGetNChildconss(), GCG_BranchData::lhs, NULL, SCIP_Bool, SCIPbranchruleGetName(), SCIPdebugMessage, SCIPisEQ(), ComponentBoundSequence::sense, and TRUE.
Referenced by pruneChildNodeByDominanceGeneric().
◆ pruneChildNodeByDominanceGeneric()
|
static |
check method for pruning ChildS indirectly by parentnodes retrun TRUE if node is pruned
- Parameters
-
scip SCIP data structure lhs lhs for childnode which is checkes to be pruned childS Component Bound Sequence defining the childnode childSsize size of component bound sequence masterbranchcons master branching constraint childBlocknr number of the block for the childnode
Definition at line 2152 of file branch_generic.c.
References checkchildconsS(), FALSE, GCGbranchGetScipBranchrule(), GCGconsMasterbranchGetBranchdata(), GCGconsMasterbranchGetBranchrule(), GCGconsMasterbranchGetParentcons(), NULL, SCIP_Bool, SCIPbranchruleGetName(), SCIPdebugMessage, and TRUE.
Referenced by createChildNodesGeneric().
◆ createChildNodesGeneric()
|
static |
for given component bound sequence S, create |S|+1 Vanderbeck branching nodes
- Parameters
-
gcg GCG data structure branchrule branching rule S Component Bound Sequence defining the nodes Ssize size of S blocknr number of the block masterbranchcons current masterbranchcons result pointer to store the result of the branching call
Definition at line 2201 of file branch_generic.c.
References ComponentBoundSequence::bound, ComponentBoundSequence::component, GCG_BranchData::consS, GCG_BranchData::consSsize, createBranchingCons(), GCG_COMPSENSE_GE, GCG_COMPSENSE_LT, GCGconsMasterbranchGetActiveCons(), GCGcreateConsMasterbranch(), GCGgetMasterprob(), GCGgetNIdenticalBlocks(), GCGgetOrigprob(), GCGisMasterVarInBlock(), getGeneratorEntry(), initNodeBranchdata(), GCG_BranchData::lhs, GCG_BranchData::maxconsS, NULL, pruneChildNodeByDominanceGeneric(), SCIP_CALL, SCIP_CUTOFF, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddConsNode(), SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPceil(), SCIPcreateChild(), SCIPdebugMessage, SCIPduplicateBufferArray, SCIPfreeBlockMemoryArrayNull, SCIPfreeBlockMemoryNull, SCIPfreeBufferArray, SCIPgetLocalTransEstimate(), SCIPgetLPBranchCands(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPisEQ(), SCIPisFeasIntegral(), SCIPisGE(), SCIPisLT(), SCIPreleaseCons(), SCIPsnprintf(), SCIPvarGetName(), and ComponentBoundSequence::sense.
Referenced by initBranch().
◆ GCGincludeMasterCopyPlugins()
|
static |
- Parameters
-
scip SCIP data structure
Definition at line 2446 of file branch_generic.c.
References SCIP_CALL, SCIP_OKAY, SCIPincludeBranchruleAllfullstrong(), SCIPincludeBranchruleFullstrong(), SCIPincludeBranchruleInference(), SCIPincludeBranchruleLeastinf(), SCIPincludeBranchruleMostinf(), SCIPincludeBranchrulePscost(), SCIPincludeBranchruleRandom(), SCIPincludeBranchruleRelpscost(), SCIPincludeNodeselBfs(), SCIPincludeNodeselDfs(), SCIPincludeNodeselEstimate(), SCIPincludeNodeselHybridestim(), and SCIPincludeNodeselRestartdfs().
Referenced by SCIP_DECL_BRANCHCOPY().
◆ SCIP_DECL_BRANCHCOPY()
|
static |
copy method for master branching rule
Definition at line 2467 of file branch_generic.c.
References GCGincludeMasterCopyPlugins(), NULL, SCIP_CALL, and SCIP_OKAY.
◆ GCG_DECL_BRANCHNEWCOL()
|
static |
callback new column method
Definition at line 2477 of file branch_generic.c.
References addVarToMasterbranch(), FALSE, GCGgetMasterprob(), GCGisMaster(), GCGvarIsMaster(), NULL, SCIP_Bool, SCIP_CALL, and SCIP_OKAY.
◆ GCG_DECL_BRANCHPROPMASTER()
|
static |
callback propagation method
Definition at line 2495 of file branch_generic.c.
References NULL, SCIP_DIDNOTFIND, and SCIP_OKAY.
◆ SCIP_DECL_BRANCHEXECLP()
|
static |
branching execution method for fractional LP solutions
Definition at line 2508 of file branch_generic.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 |
branching execution method for relaxation solutions
Definition at line 2937 of file branch_generic.c.
References SCIP_DIDNOTRUN, SCIP_OKAY, and SCIPdebugMessage.
◆ SCIP_DECL_BRANCHEXECPS()
|
static |
branching execution method for not completely fixed pseudo solutions
Definition at line 2951 of file branch_generic.c.
References BRANCHRULE_NAME, NULL, SCIP_DIDNOTRUN, SCIP_ERROR, SCIP_OKAY, SCIPbranchruleGetName(), SCIPdebugMessage, SCIPdialogMessage(), SCIPerrorMessage, SCIPisStopped(), and SCIPwarningMessage().
◆ SCIP_DECL_BRANCHINIT()
|
static |
initialization method of branching rule (called after problem was transformed)
Definition at line 2980 of file branch_generic.c.
References SCIP_OKAY, and SCIPdebugMessage.
◆ SCIP_DECL_BRANCHFREE()
|
static |
destructor method of branching rule (called when SCIP is exiting)
Definition at line 2989 of file branch_generic.c.
References NULL, SCIP_OKAY, SCIPbranchruleGetData(), SCIPdebugMessage, and SCIPfreeBlockMemory.
◆ GCGincludeBranchruleGeneric()
| SCIP_RETCODE GCGincludeBranchruleGeneric | ( | GCG * | gcg | ) |
creates the generic branching rule and includes it in SCIP
- Parameters
-
gcg GCG data structure
Definition at line 3002 of file branch_generic.c.
References BRANCHRULE_DESC, BRANCHRULE_MAXBOUNDDIST, BRANCHRULE_MAXDEPTH, BRANCHRULE_NAME, BRANCHRULE_PRIORITY, EVENTHDLR_DESC, EVENTHDLR_NAME, SCIP_BranchruleData::gcg, SCIP_EventhdlrData::gcg, SCIP_BranchruleData::gcgbranchrule, GCGgetMasterprob(), GCGrelaxIncludeBranchrule(), NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPdebugMessage, SCIPfindBranchrule(), SCIPincludeEventhdlr(), SCIPsetBranchruleCopy(), SCIPsetBranchruleExecExt(), SCIPsetBranchruleExecLp(), SCIPsetBranchruleExecPs(), SCIPsetBranchruleFree(), and SCIPsetBranchruleInit().
Referenced by GCGincludeMasterPlugins().
◆ GCGbranchGenericBranchdataGetConsS()
| GCG_COMPSEQUENCE * GCGbranchGenericBranchdataGetConsS | ( | GCG_BRANCHDATA * | branchdata | ) |
get component bound sequence
- Parameters
-
branchdata branching data
Definition at line 3049 of file branch_generic.c.
References GCG_BranchData::consS, and NULL.
Referenced by getColCoefficient(), and SCIP_DECL_EVENTEXEC().
◆ GCGbranchGenericBranchdataGetConsSsize()
| int GCGbranchGenericBranchdataGetConsSsize | ( | GCG_BRANCHDATA * | branchdata | ) |
get size of component bound sequence
- Parameters
-
branchdata branching data
Definition at line 3058 of file branch_generic.c.
References GCG_BranchData::consSsize, and NULL.
Referenced by getColCoefficient(), and SCIP_DECL_EVENTEXEC().
◆ GCGbranchGenericBranchdataGetConsblocknr()
| int GCGbranchGenericBranchdataGetConsblocknr | ( | GCG_BRANCHDATA * | branchdata | ) |
get id of pricing problem (or block) to which the constraint belongs
- Parameters
-
branchdata branching data
Definition at line 3067 of file branch_generic.c.
References GCG_BranchData::consblocknr, and NULL.
Referenced by getColCoefficient(), and SCIP_DECL_EVENTEXEC().
◆ GCGbranchGenericBranchdataGetMastercons()
| SCIP_CONS * GCGbranchGenericBranchdataGetMastercons | ( | GCG_BRANCHDATA * | branchdata | ) |
get master constraint
- Parameters
-
branchdata branching data
Definition at line 3076 of file branch_generic.c.
References GCG_BranchData::mastercons, and NULL.
Referenced by addVarToMasterbranch().
◆ GCGisBranchruleGeneric()
| SCIP_Bool GCGisBranchruleGeneric | ( | GCG_BRANCHRULE * | branchrule | ) |
returns true when the branch rule is the generic branchrule
- Parameters
-
branchrule branchrule to check
Definition at line 3085 of file branch_generic.c.
References BRANCHRULE_NAME, GCGbranchGetScipBranchrule(), NULL, SCIP_Bool, and SCIPbranchruleGetName().
Referenced by ObjPricerGcg::pricingLoop(), and SCIP_DECL_EVENTEXEC().