Detailed Description
branching rule for the original problem in GCG
Definition in file branch_orig.c.
#include <assert.h>#include <string.h>#include "gcg/branch_orig.h"#include "gcg/gcg.h"#include "gcg/branch_relpsprob.h"#include "gcg/branch_bpstrong.h"#include "gcg/cons_integralorig.h"#include "gcg/cons_masterbranch.h"#include "gcg/cons_origbranch.h"#include "gcg/relax_gcg.h"#include "gcg/pricer_gcg.h"#include "gcg/type_branchgcg.h"#include "scip/cons_linear.h"Go to the source code of this file.
Data Structures | |
| struct | SCIP_BranchruleData |
| struct | GCG_BranchData |
Macros | |
| #define | BRANCHRULE_NAME "orig" |
| #define | BRANCHRULE_DESC "branching for the original program in generic column generation" |
| #define | BRANCHRULE_PRIORITY 100 |
| #define | BRANCHRULE_MAXDEPTH -1 |
| #define | BRANCHRULE_MAXBOUNDDIST 1.0 |
| #define | DEFAULT_ENFORCEBYCONS FALSE |
| #define | DEFAULT_USEPSEUDO TRUE |
| #define | DEFAULT_MOSTFRAC FALSE |
| #define | DEFAULT_USERANDOM FALSE |
| #define | DEFAULT_USEPSSTRONG FALSE |
| #define | DEFAULT_USESTRONG FALSE |
| #define | DEFAULT_MINPHASE0OUTCANDS 10 |
| #define | DEFAULT_MAXPHASE0OUTCANDS 50 |
| #define | DEFAULT_MAXPHASE0OUTCANDSFRAC 0.7 |
| #define | DEFAULT_PHASE1GAPWEIGHT 0.25 |
| #define | DEFAULT_MINPHASE1OUTCANDS 3 |
| #define | DEFAULT_MAXPHASE1OUTCANDS 20 |
| #define | DEFAULT_MAXPHASE1OUTCANDSFRAC 0.7 |
| #define | DEFAULT_PHASE2GAPWEIGHT 1 |
| #define | branchDeactiveMasterOrig NULL |
| #define | branchPropMasterOrig NULL |
Macro Definition Documentation
◆ BRANCHRULE_NAME
| #define BRANCHRULE_NAME "orig" |
Definition at line 57 of file branch_orig.c.
◆ BRANCHRULE_DESC
| #define BRANCHRULE_DESC "branching for the original program in generic column generation" |
Definition at line 58 of file branch_orig.c.
◆ BRANCHRULE_PRIORITY
| #define BRANCHRULE_PRIORITY 100 |
Definition at line 59 of file branch_orig.c.
◆ BRANCHRULE_MAXDEPTH
| #define BRANCHRULE_MAXDEPTH -1 |
Definition at line 60 of file branch_orig.c.
◆ BRANCHRULE_MAXBOUNDDIST
| #define BRANCHRULE_MAXBOUNDDIST 1.0 |
Definition at line 61 of file branch_orig.c.
◆ DEFAULT_ENFORCEBYCONS
| #define DEFAULT_ENFORCEBYCONS FALSE |
Definition at line 63 of file branch_orig.c.
◆ DEFAULT_USEPSEUDO
| #define DEFAULT_USEPSEUDO TRUE |
Definition at line 64 of file branch_orig.c.
◆ DEFAULT_MOSTFRAC
| #define DEFAULT_MOSTFRAC FALSE |
Definition at line 65 of file branch_orig.c.
◆ DEFAULT_USERANDOM
| #define DEFAULT_USERANDOM FALSE |
Definition at line 66 of file branch_orig.c.
Referenced by GCGincludeBranchruleOrig().
◆ DEFAULT_USEPSSTRONG
| #define DEFAULT_USEPSSTRONG FALSE |
Definition at line 67 of file branch_orig.c.
◆ DEFAULT_USESTRONG
| #define DEFAULT_USESTRONG FALSE |
Definition at line 70 of file branch_orig.c.
◆ DEFAULT_MINPHASE0OUTCANDS
| #define DEFAULT_MINPHASE0OUTCANDS 10 |
Definition at line 72 of file branch_orig.c.
Referenced by GCGincludeBranchruleOrig(), and GCGincludeBranchruleRyanfoster().
◆ DEFAULT_MAXPHASE0OUTCANDS
| #define DEFAULT_MAXPHASE0OUTCANDS 50 |
Definition at line 73 of file branch_orig.c.
Referenced by GCGincludeBranchruleOrig(), and GCGincludeBranchruleRyanfoster().
◆ DEFAULT_MAXPHASE0OUTCANDSFRAC
| #define DEFAULT_MAXPHASE0OUTCANDSFRAC 0.7 |
Definition at line 74 of file branch_orig.c.
Referenced by GCGincludeBranchruleOrig(), and GCGincludeBranchruleRyanfoster().
◆ DEFAULT_PHASE1GAPWEIGHT
| #define DEFAULT_PHASE1GAPWEIGHT 0.25 |
Definition at line 75 of file branch_orig.c.
Referenced by GCGincludeBranchruleOrig(), and GCGincludeBranchruleRyanfoster().
◆ DEFAULT_MINPHASE1OUTCANDS
| #define DEFAULT_MINPHASE1OUTCANDS 3 |
Definition at line 77 of file branch_orig.c.
Referenced by GCGincludeBranchruleOrig(), and GCGincludeBranchruleRyanfoster().
◆ DEFAULT_MAXPHASE1OUTCANDS
| #define DEFAULT_MAXPHASE1OUTCANDS 20 |
Definition at line 78 of file branch_orig.c.
Referenced by GCGincludeBranchruleOrig(), and GCGincludeBranchruleRyanfoster().
◆ DEFAULT_MAXPHASE1OUTCANDSFRAC
| #define DEFAULT_MAXPHASE1OUTCANDSFRAC 0.7 |
Definition at line 79 of file branch_orig.c.
Referenced by GCGincludeBranchruleOrig(), and GCGincludeBranchruleRyanfoster().
◆ DEFAULT_PHASE2GAPWEIGHT
| #define DEFAULT_PHASE2GAPWEIGHT 1 |
Definition at line 80 of file branch_orig.c.
Referenced by GCGincludeBranchruleOrig(), and GCGincludeBranchruleRyanfoster().
◆ branchDeactiveMasterOrig
| #define branchDeactiveMasterOrig NULL |
Definition at line 637 of file branch_orig.c.
Referenced by GCGincludeBranchruleOrig().
◆ branchPropMasterOrig
| #define branchPropMasterOrig NULL |
Definition at line 638 of file branch_orig.c.
Referenced by GCGincludeBranchruleOrig().
Function Documentation
◆ getUniqueBlockFlagForIter()
Definition at line 123 of file branch_orig.c.
References assert(), GCGgetNIdenticalBlocks(), GCGgetOrigprob(), GCGlinkingVarGetBlocks(), GCGlinkingVarGetNBlocks(), GCGoriginalVarIsLinking(), GCGvarGetBlock(), GCGvarIsOriginal(), getUniqueBlockFlagForIter(), j, SCIP_CALL(), and SCIPfreeBufferArray().
Referenced by branchExtern(), and getUniqueBlockFlagForIter().
◆ branchVar()
|
static |
branches on a integer variable x if solution value x' is fractional, two child nodes will be created (x <= floor(x'), x >= ceil(x')), if solution value is integral, the bounds of x are finite, then two child nodes will be created (x <= x", x >= x"+1 with x" = floor((lb + ub)/2)), otherwise (up to) three child nodes will be created (x <= x'-1, x == x', x >= x'+1) if solution value is equal to one of the bounds and the other bound is infinite, only two child nodes will be created (the third one would be infeasible anyway)
- Parameters
-
gcg GCG data structure branchrule pointer to the original variable branching rule branchvar variable to branch on solval value of the variable in the current solution upinf have we seen during strong branching that the upbranch is infeasible? downinf have we seen during strong branching that the downbranch is infeasible?
Definition at line 190 of file branch_orig.c.
References assert(), GCG_BranchData::boundtype, BRANCHRULE_NAME, branchVar(), GCG_BranchData::cons, SCIP_BranchruleData::enforcebycons, GCG_BOUNDTYPE_FIXED, GCG_BOUNDTYPE_LOWER, GCG_BOUNDTYPE_UPPER, GCGbranchGetScipBranchrule(), GCGbranchGetScipBranchruledata(), GCGconsMasterbranchGetActiveCons(), GCGcreateConsMasterbranch(), GCGgetMasterprob(), GCGgetOrigprob(), masterprob, GCG_BranchData::newbound, GCG_BranchData::oldbound, GCG_BranchData::olddualbound, GCG_BranchData::oldvalue, origprob, GCG_BranchData::origvar, SCIP_CALL(), SCIPdebugMessage(), and solval.
Referenced by branchExtern(), branchVar(), and SCIP_DECL_BRANCHEXECPS().
◆ score_function()
|
static |
Definition at line 475 of file branch_orig.c.
References assert(), SCIP_BranchruleData::mostfrac, score_function(), solval, SCIP_BranchruleData::usepseudocosts, and var.
◆ branchExtern()
|
static |
branching method for relaxation solutions
- Parameters
-
gcg GCG data structure branchrule pointer to the original variable branching rule result pointer to store the result of the branching call
Definition at line 504 of file branch_orig.c.
References assert(), branchExtern(), BRANCHRULE_NAME, branchVar(), GCGbranchGetScipBranchrule(), GCGbranchGetScipBranchruledata(), GCGbranchSelectCandidateStrongBranchingOrig(), GCGgetOrigprob(), GCGgetRelpsprobBranchVar(), getUniqueBlockFlagForIter(), i, SCIP_BranchruleData::mostfrac, origprob, result, SCIP_CALL(), SCIPdebugMessage(), score_function(), solval, SCIP_BranchruleData::usepseudocosts, SCIP_BranchruleData::usepsstrong, SCIP_BranchruleData::userandom, and SCIP_BranchruleData::usestrong.
Referenced by branchExtern(), SCIP_DECL_BRANCHEXECEXT(), and SCIP_DECL_BRANCHEXECLP().
◆ GCG_DECL_BRANCHACTIVEMASTER()
|
static |
callback activation method
Definition at line 642 of file branch_orig.c.
References assert(), GCG_BOUNDTYPE_LOWER, GCG_BOUNDTYPE_UPPER, GCG_DECL_BRANCHACTIVEMASTER, GCGgetMasterprob(), GCGrelaxTransOrigToMasterCons(), masterprob, SCIP_CALL(), and SCIPdebugMessage().
◆ GCG_DECL_BRANCHMASTERSOLVED()
|
static |
callback solved method
Definition at line 679 of file branch_orig.c.
References assert(), GCG_BOUNDTYPE_LOWER, GCG_BOUNDTYPE_UPPER, GCG_DECL_BRANCHMASTERSOLVED, GCGgetMasterprob(), GCGgetOrigprob(), GCGisOriginal(), masterprob, origprob, SCIP_CALL(), and SCIPdebugMessage().
◆ GCG_DECL_BRANCHDATADELETE()
|
static |
callback deletion method for branching data
Definition at line 705 of file branch_orig.c.
References assert(), GCG_BOUNDTYPE_LOWER, GCG_BOUNDTYPE_UPPER, GCG_DECL_BRANCHDATADELETE, GCGgetOrigprob(), origprob, SCIP_CALL(), and SCIPdebugMessage().
◆ SCIP_DECL_BRANCHFREE()
|
static |
Definition at line 736 of file branch_orig.c.
References SCIP_DECL_BRANCHFREE().
◆ SCIP_DECL_BRANCHEXECLP()
|
static |
branching execution method for fractional LP solutions
Definition at line 754 of file branch_orig.c.
References assert(), branchExtern(), SCIP_BranchruleData::gcg, SCIP_BranchruleData::gcgbranchrule, GCGcurrentNodeIsGeneric(), GCGgetOrigprob(), GCGrelaxIsOrigSolFeasible(), origprob, result, SCIP_CALL(), SCIP_DECL_BRANCHEXECLP(), and SCIPdebugMessage().
◆ SCIP_DECL_BRANCHEXECEXT()
|
static |
branching execution method for relaxation solutions
Definition at line 793 of file branch_orig.c.
References assert(), branchExtern(), SCIP_BranchruleData::gcg, SCIP_BranchruleData::gcgbranchrule, GCGcurrentNodeIsGeneric(), GCGrelaxIsOrigSolFeasible(), result, SCIP_CALL(), SCIP_DECL_BRANCHEXECEXT(), and SCIPdebugMessage().
◆ SCIP_DECL_BRANCHINIT()
|
static |
initialization method of branching rule (called after problem was transformed)
Definition at line 822 of file branch_orig.c.
References SCIP_DECL_BRANCHINIT().
◆ SCIP_DECL_BRANCHEXECPS()
|
static |
branching execution method for not completely fixed pseudo solutions
Definition at line 829 of file branch_orig.c.
References assert(), BRANCHRULE_NAME, branchVar(), SCIP_BranchruleData::gcg, SCIP_BranchruleData::gcgbranchrule, GCGcurrentNodeIsGeneric(), GCGgetNIdenticalBlocks(), GCGgetOrigprob(), GCGlinkingVarGetBlocks(), GCGlinkingVarGetNBlocks(), GCGoriginalVarIsLinking(), GCGvarGetBlock(), GCGvarIsOriginal(), i, j, origprob, result, SCIP_CALL(), SCIP_DECL_BRANCHEXECPS(), SCIPdebugMessage(), SCIPfreeBufferArray(), and solval.
◆ GCGincludeBranchruleOrig()
| SCIP_RETCODE GCGincludeBranchruleOrig | ( | GCG * | gcg | ) |
creates the branching on original variable branching rule and includes it in SCIP
- Parameters
-
gcg GCG data structure
Definition at line 993 of file branch_orig.c.
References assert(), branchDeactiveMasterOrig, branchPropMasterOrig, BRANCHRULE_DESC, BRANCHRULE_MAXBOUNDDIST, BRANCHRULE_MAXDEPTH, BRANCHRULE_NAME, BRANCHRULE_PRIORITY, DEFAULT_ENFORCEBYCONS, DEFAULT_MAXPHASE0OUTCANDS, DEFAULT_MAXPHASE0OUTCANDSFRAC, DEFAULT_MAXPHASE1OUTCANDS, DEFAULT_MAXPHASE1OUTCANDSFRAC, DEFAULT_MINPHASE0OUTCANDS, DEFAULT_MINPHASE1OUTCANDS, DEFAULT_MOSTFRAC, DEFAULT_PHASE1GAPWEIGHT, DEFAULT_PHASE2GAPWEIGHT, DEFAULT_USEPSEUDO, DEFAULT_USEPSSTRONG, DEFAULT_USERANDOM, DEFAULT_USESTRONG, SCIP_BranchruleData::enforcebycons, SCIP_BranchruleData::gcg, SCIP_BranchruleData::gcgbranchrule, GCGgetMasterprob(), GCGgetOrigprob(), GCGincludeBranchruleOrig(), GCGrelaxIncludeBranchrule(), masterprob, SCIP_BranchruleData::mostfrac, origprob, SCIP_CALL(), SCIPdebugMessage(), SCIP_BranchruleData::usepseudocosts, SCIP_BranchruleData::usepsstrong, SCIP_BranchruleData::userandom, and SCIP_BranchruleData::usestrong.
Referenced by GCGincludeBranchruleOrig(), and GCGincludeMasterPlugins().
◆ GCGbranchOrigGetOrigvar()
| SCIP_VAR * GCGbranchOrigGetOrigvar | ( | GCG_BRANCHDATA * | branchdata | ) |
get the original variable on which the branching was performed
- Parameters
-
branchdata branching data
Definition at line 1094 of file branch_orig.c.
References assert(), GCGbranchOrigGetOrigvar(), and GCG_BranchData::origvar.
Referenced by applyOriginalBranching(), and GCGbranchOrigGetOrigvar().
◆ GCGbranchOrigGetBoundtype()
| GCG_BOUNDTYPE GCGbranchOrigGetBoundtype | ( | GCG_BRANCHDATA * | branchdata | ) |
get the type of the new bound which resulted of the performed branching
- Parameters
-
branchdata branching data
Definition at line 1104 of file branch_orig.c.
References assert(), GCG_BranchData::boundtype, and GCGbranchOrigGetBoundtype().
Referenced by applyOriginalBranching(), and GCGbranchOrigGetBoundtype().
◆ GCGbranchOrigGetNewbound()
| SCIP_Real GCGbranchOrigGetNewbound | ( | GCG_BRANCHDATA * | branchdata | ) |
get the new bound which resulted of the performed branching
- Parameters
-
branchdata branching data
Definition at line 1114 of file branch_orig.c.
References assert(), GCGbranchOrigGetNewbound(), and GCG_BranchData::newbound.
Referenced by applyOriginalBranching(), and GCGbranchOrigGetNewbound().
◆ GCGbranchOrigUpdateExternBranchcands()
| SCIP_RETCODE GCGbranchOrigUpdateExternBranchcands | ( | GCG * | gcg | ) |
updates extern branching candidates before branching
- Parameters
-
gcg GCG data structure
Definition at line 1124 of file branch_orig.c.
References assert(), GCGbranchOrigUpdateExternBranchcands(), GCGgetOrigprob(), GCGisOriginal(), i, SCIP_CALL(), and SCIPdebugMessage().
Referenced by GCGbranchOrigUpdateExternBranchcands().