branch_empty.c
Go to the documentation of this file.
36/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
59#define BRANCHRULE_DESC "branching rule for the original problem while real branching is applied in the master"
73/** copy default SCIP branching rules in order to solve restrictions of the original problem as a subSCIP without
96 * add an original branching constraint that holds the branching decision to the corresponding node in the original problem
134 /* add those constraints to the node that enforce the branching decision in the original problem */
146 SCIPdebugMessage(" link branching conss %s <-> %s\n", SCIPconsGetName(masterbranchchildcons), SCIPconsGetName(origcons));
182 assert(boundtype == GCG_BOUNDTYPE_LOWER || boundtype == GCG_BOUNDTYPE_UPPER || boundtype == GCG_BOUNDTYPE_FIXED);
219 SCIP_CALL( GCGconsMasterbranchAddCopiedVarBndchg(gcg, masterbranchchildcons, boundvar, boundtype, newbound) );
225/** creates branch-and-bound nodes in the original problem corresponding to those in the master problem */
271 if( nchildnodes <= 0 && SCIPgetStage(masterprob) != SCIP_STAGE_SOLVED && SCIPgetNChildren(masterprob) >= 1 )
275 SCIPdebugMessage("create dummy child in origprob, because there is also a child in the master\n");
294 /* for each child, create a corresponding node in the original problem as well as an origbranch constraint */
306 branchrule = GCGbranchGetScipBranchrule(GCGconsMasterbranchGetBranchrule(masterbranchchildcons));
309 if( !enforcebycons && branchrule != NULL && strcmp(SCIPbranchruleGetName(branchrule), "orig") == 0 )
315 if( SCIPnodeGetNumber(GCGconsOrigbranchGetNode(GCGconsOrigbranchGetActiveCons(gcg))) != SCIPnodeGetNumber(GCGconsMasterbranchGetNode(GCGconsMasterbranchGetActiveCons(gcg))) )
371/** solving process initialization method of branching rule (called when branch and bound process is about to begin) */
374/** solving process deinitialization method of branching rule (called before branch and bound process data is freed) */
450 SCIP_CALL( SCIPincludeBranchrule(origprob, BRANCHRULE_NAME, BRANCHRULE_DESC, BRANCHRULE_PRIORITY,
SCIP_RETCODE SCIPincludeBranchruleAllfullstrong(SCIP *scip)
static SCIP_DECL_BRANCHEXECLP(branchExeclpEmpty)
Definition: branch_empty.c:379
static SCIP_DECL_BRANCHEXECEXT(branchExecextEmpty)
Definition: branch_empty.c:397
static SCIP_RETCODE createOrigbranchConstraint(GCG *gcg, SCIP_NODE *childnode, SCIP_CONS *masterbranchchildcons)
Definition: branch_empty.c:99
static SCIP_RETCODE includeSCIPBranchingRules(SCIP *scip)
Definition: branch_empty.c:77
static SCIP_RETCODE applyOriginalBranching(GCG *gcg, SCIP_NODE *childnode, SCIP_CONS *masterbranchchildcons)
Definition: branch_empty.c:158
static SCIP_DECL_BRANCHEXECPS(branchExecpsEmpty)
Definition: branch_empty.c:415
static SCIP_RETCODE createBranchNodesInOrigprob(GCG *gcg, SCIP_RESULT *result)
Definition: branch_empty.c:227
SCIP_RETCODE GCGincludeBranchruleEmpty(GCG *gcg)
Definition: branch_empty.c:437
branching rule for original problem in GCG while real branching is in the master
GCG_BOUNDTYPE GCGbranchOrigGetBoundtype(GCG_BRANCHDATA *branchdata)
Definition: branch_orig.c:1104
SCIP_Real GCGbranchOrigGetNewbound(GCG_BRANCHDATA *branchdata)
Definition: branch_orig.c:1114
SCIP_VAR * GCGbranchOrigGetOrigvar(GCG_BRANCHDATA *branchdata)
Definition: branch_orig.c:1094
branching rule for original problem in GCG
SCIP_BRANCHRULE * GCGbranchGetScipBranchrule(GCG_BRANCHRULE *branchrule)
Definition: branchgcg.c:102
GCG_BRANCHRULE * GCGconsMasterbranchGetBranchrule(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2933
void GCGconsMasterbranchSetOrigcons(SCIP_CONS *cons, SCIP_CONS *origcons)
Definition: cons_masterbranch.c:2892
int GCGconsMasterbranchGetNOrigbranchConss(SCIP_CONS *cons)
Definition: cons_masterbranch.c:3006
GCG_BRANCHDATA * GCGconsMasterbranchGetBranchdata(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2907
char * GCGconsMasterbranchGetName(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2800
SCIP_CONS * GCGconsMasterbranchGetActiveCons(GCG *gcg)
Definition: cons_masterbranch.c:3056
int GCGconsMasterbranchGetNChildconss(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2843
SCIP_CONS * GCGconsMasterbranchGetChildcons(SCIP_CONS *cons, int childnr)
Definition: cons_masterbranch.c:2858
SCIP_RETCODE GCGconsMasterbranchAddCopiedVarBndchg(GCG *gcg, SCIP_CONS *cons, SCIP_VAR *var, GCG_BOUNDTYPE boundtype, SCIP_Real newbound)
Definition: cons_masterbranch.c:2946
SCIP_NODE * GCGconsMasterbranchGetNode(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2813
SCIP_CONS ** GCGconsMasterbranchGetOrigbranchConss(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2993
SCIP_RETCODE GCGconsMasterbranchReleaseOrigbranchConss(GCG *gcg, SCIP_CONS *cons)
Definition: cons_masterbranch.c:3021
constraint handler for storing the branching decisions at each node of the tree
SCIP_NODE * GCGconsOrigbranchGetNode(SCIP_CONS *cons)
Definition: cons_origbranch.c:619
SCIP_CONS * GCGconsOrigbranchGetActiveCons(GCG *gcg)
Definition: cons_origbranch.c:532
void GCGconsOrigbranchSetMastercons(SCIP_CONS *cons, SCIP_CONS *mastercons)
Definition: cons_origbranch.c:685
SCIP_RETCODE GCGcreateConsOrigbranch(GCG *gcg, SCIP_CONS **cons, const char *name, SCIP_NODE *node, SCIP_CONS *parentcons, GCG_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
Definition: cons_origbranch.c:453
constraint handler for storing the branching decisions at each node of the tree
#define SCIP_Bool
#define SCIP_Real
#define SCIP_CALL(x)
GCG interface methods.
SCIP_RETCODE SCIPincludeBranchruleInference(SCIP *scip)
SCIP_RETCODE SCIPincludeBranchruleRandom(SCIP *scip)
SCIP_RETCODE SCIPincludeBranchruleLeastinf(SCIP *scip)
SCIP_RETCODE SCIPincludeBranchruleFullstrong(SCIP *scip)
SCIP_RETCODE SCIPincludeBranchruleMostinf(SCIP *scip)
SCIP_RETCODE SCIPincludeBranchruleRelpscost(SCIP *scip)
SCIP_RETCODE SCIPincludeBranchrulePscost(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPupdateNodeLowerbound(SCIP *scip, SCIP_NODE *node, SCIP_Real newbound)
SCIP_RETCODE SCIPaddConsNode(SCIP *scip, SCIP_NODE *node, SCIP_CONS *cons, SCIP_NODE *validnode)
SCIP_Real SCIPgetLocalTransEstimate(SCIP *scip)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
const char * SCIPbranchruleGetName(SCIP_BRANCHRULE *branchrule)
SCIP_BRANCHRULEDATA * SCIPbranchruleGetData(SCIP_BRANCHRULE *branchrule)
SCIP_RETCODE SCIPincludeBranchrule(SCIP *scip, const char *name, const char *desc, int priority, int maxdepth, SCIP_Real maxbounddist, SCIP_DECL_BRANCHCOPY((*branchcopy)), SCIP_DECL_BRANCHFREE((*branchfree)), SCIP_DECL_BRANCHINIT((*branchinit)), SCIP_DECL_BRANCHEXIT((*branchexit)), SCIP_DECL_BRANCHINITSOL((*branchinitsol)), SCIP_DECL_BRANCHEXITSOL((*branchexitsol)), SCIP_DECL_BRANCHEXECLP((*branchexeclp)), SCIP_DECL_BRANCHEXECEXT((*branchexecext)), SCIP_DECL_BRANCHEXECPS((*branchexecps)), SCIP_BRANCHRULEDATA *branchruledata)
SCIP_RETCODE SCIPcreateChild(SCIP *scip, SCIP_NODE **node, SCIP_Real nodeselprio, SCIP_Real estimate)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
#define SCIPallocMemory(scip, ptr)
#define SCIPfreeMemory(scip, ptr)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetNChildren(SCIP *scip)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
#define NULL
Definition: class_conspartition.cpp:44
#define SCIPdebugMessage
GCG relaxator.
Definition: branch_bpstrong.c:110
Definition: struct_branchgcg.h:56
Definition: struct_gcg.h:55
Definition: branch_bpstrong.c:128
type definitions for branching rules in GCG projects
SCIP_DIDNOTRUN
SCIP_CUTOFF
SCIP_BRANCHED
enum SCIP_Result SCIP_RESULT
SCIP_OKAY
enum SCIP_Retcode SCIP_RETCODE
SCIP_STAGE_SOLVED
SCIP_STAGE_SOLVING