cons_masterbranch.c
Go to the documentation of this file.
38 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
57 #define CONSHDLR_ENFOPRIORITY 0 /**< priority of the constraint handler for constraint enforcing */
58 #define CONSHDLR_CHECKPRIORITY 2000000 /**< priority of the constraint handler for checking feasibility */
59 #define CONSHDLR_PROPFREQ 1 /**< frequency for propagating domains; zero means only preprocessing propagation */
60 #define CONSHDLR_EAGERFREQ 100 /**< frequency for using all instead of only the useful constraints in separation,
62 #define CONSHDLR_DELAYPROP FALSE /**< should propagation method be delayed, if other propagators found reductions? */
63 #define CONSHDLR_NEEDSCONS TRUE /**< should the constraint handler be skipped, if no constraints are available? */
74 int npropvars; /**< number of variables that existed the last time the related node was propagated,
84 SCIP_CONS* probingtmpcons; /**< pointer to save the last child in the childconss array if it is overwritten in probing mode */
87 GCG_BRANCHDATA* branchdata; /**< branching data stored by the branching rule at the corresponding origcons constraint
89 SCIP_BRANCHRULE* branchrule; /**< branching rule that created the corresponding node in the original problem and imposed
98 int* nlocalbndchgstreated; /**< number of bound changes of the nodes on the way from the current node to
105 /* local bound changes on original variables that have been directly copied to the master problem */
107 GCG_BOUNDTYPE* copiedvarbndtypes; /**< types of the new local bounds of the coped original variables */
113 SCIP_CONS** origbranchconss; /**< constraints in the original problem that enforce the branching decision */
114 int norigbranchconss; /**< number of constraints in the original problem that enforce the branching decision */
127 SCIP_VAR** pendingvars; /**< pricing variables or master variable copies corresponding to pending bound changes (global bound changes) */
128 SCIP_BOUNDTYPE* pendingbndtypes; /**< types of the pending bound changes (global bound changes) */
129 SCIP_Real* pendingnewbnds; /**< new bounds corresponding to pending bound changes (global bound changes) */
130 SCIP_Real* pendingoldbnds; /**< old bounds corresponding to pending bound changes (global bound changes) */
137 SCIP_VAR*** collectedbndvars; /**< collected original variables of bound changes stored for each block */
229 SCIPdebugMessage("cons: %s, origcons: %s, parent: %s => %s\n", SCIPconsGetName(cons), consdata->origcons == NULL? "NULL" : SCIPconsGetName( consdata->origcons ),
230 parent_origcons == NULL? "NULL" : SCIPconsGetName(parent_origcons), origcons_parent == NULL? "NULL" : SCIPconsGetName(origcons_parent) );
234 /* assert((SCIPgetNNodesLeft(scip)+SCIPgetNNodes(scip) == 1) == (consdata->node == SCIPgetRootNode(scip))); */
235 assert(SCIPnodeGetDepth(GCGconsOrigbranchGetNode(consdata->origcons)) == SCIPnodeGetDepth(consdata->node));
239 SCIPconsGetData(consdata->parentcons)->origcons == GCGconsOrigbranchGetParentcons(consdata->origcons));
242 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &consdata->nlocalbndchgstreated, (size_t)consdata->maxlocalbndchgstreated) );
253 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &consdata->localbndvars, consdata->maxlocalbndchgs) );
254 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &consdata->localbndtypes, consdata->maxlocalbndchgs) );
255 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &consdata->localnewbnds, consdata->maxlocalbndchgs) );
256 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &consdata->localoldbnds, consdata->maxlocalbndchgs) );
314 SCIP_CALL(SCIPreallocBlockMemoryArray(scip, &consdata->localbndtypes, consdata->maxlocalbndchgs,
366 SCIP_VAR* var, /**< variable on which the bound change is applied (corresponding master variable copy or pricing variable) */
394 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(conshdlrdata->pendingvars), conshdlrdata->maxpendingbnds, newsize) );
395 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(conshdlrdata->pendingbndtypes), conshdlrdata->maxpendingbnds, newsize) );
396 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(conshdlrdata->pendingoldbnds), conshdlrdata->maxpendingbnds, newsize) );
397 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(conshdlrdata->pendingnewbnds), conshdlrdata->maxpendingbnds, newsize) );
412 /** For a given global bound change on a pricing variable, check if the global bounds on all corresponding original variables are still the same
414 * @return TRUE if the variable is in a relevant block AND all variables identical to it have the same bounds
444 SCIP_Real identbound = bndtype == SCIP_BOUNDTYPE_UPPER ? SCIPvarGetUbGlobal(identvars[i]) : SCIPvarGetLbGlobal(identvars[i]);
447 SCIPerrorMessage("Var <%s> has new local %s bound %g, but identical var <%s> has %g -- don't know how to handle!\n",
492 assert(GCGvarIsMaster(conshdlrdata->pendingvars[i]) || GCGvarIsPricing(conshdlrdata->pendingvars[i]));
498 if( SCIPisLT(scip, SCIPvarGetLbGlobal(conshdlrdata->pendingvars[i]), conshdlrdata->pendingnewbnds[i]) )
500 SCIPdebugMessage("Global lower bound of mastervar <%s> set to %g\n", SCIPvarGetName(conshdlrdata->pendingvars[i]),
502 SCIP_CALL( SCIPchgVarLbGlobal(scip, conshdlrdata->pendingvars[i], conshdlrdata->pendingnewbnds[i]) );
507 if( SCIPisGT(scip, SCIPvarGetUbGlobal(conshdlrdata->pendingvars[i]), conshdlrdata->pendingnewbnds[i]) )
509 SCIPdebugMessage("Global upper bound of mastervar <%s> set to %g\n", SCIPvarGetName(conshdlrdata->pendingvars[i]),
511 SCIP_CALL( SCIPchgVarUbGlobal(scip, conshdlrdata->pendingvars[i], conshdlrdata->pendingnewbnds[i]) );
522 if( !checkAggregatedGlobalBounds(origscip, conshdlrdata->pendingvars[i], conshdlrdata->pendingbndtypes[i], conshdlrdata->pendingnewbnds[i]) )
527 SCIP_CALL( SCIPchgVarLbGlobal(GCGgetPricingprob(origscip, GCGvarGetBlock(conshdlrdata->pendingvars[i]) ),
532 SCIP_CALL( SCIPchgVarUbGlobal(GCGgetPricingprob(origscip, GCGvarGetBlock(conshdlrdata->pendingvars[i]) ),
599 ismastervarrelevant = ismastervarrelevant && (blocknr >= 0 || GCGmasterVarIsLinking(vars[i])); /*lint !e613*/
624 SCIPerrorMessage("Variable %s is not pricing nor master.\n", SCIPvarGetName(conshdlrdata->pendingvars[k]));
625 assert(GCGvarIsMaster(conshdlrdata->pendingvars[k]) || GCGvarIsPricing(conshdlrdata->pendingvars[k]));
651 /* @todo: This is the wrong way to treat bound changes on original variable copies in the master problem;
655 assert(GCGvarGetBlock(bndchgorigvars[0]) == blocknr || (GCGisLinkingVarInBlock(bndchgorigvars[0], blocknr))); /*lint !e613*/
678 SCIPdebugMessage("Finished handling of pending global bound changes: %d changed bounds\n", *propcount);
715 if( GCGgetNIdenticalBlocks(origscip, blocknr) > 1 || GCGgetNIdenticalBlocks(origscip, blocknr) == 0 )
719 || SCIPisLE(scip, SCIPvarGetLbLocal(pricingvar), SCIPvarGetLbGlobal(consdata->localbndvars[i])));
729 SCIP_CALL( SCIPchgVarLb(GCGgetPricingprob(origscip, blocknr), pricingvar, SCIPvarGetLbGlobal(consdata->localbndvars[i])) );
731 SCIPvarGetName(pricingvar), consdata->localnewbnds[i], SCIPvarGetLbGlobal(consdata->localbndvars[i]), consdata->name);
735 SCIP_CALL( SCIPchgVarLb(GCGgetPricingprob(origscip, blocknr), pricingvar, consdata->localoldbnds[i]) );
737 SCIPvarGetName(pricingvar), consdata->localnewbnds[i], consdata->localoldbnds[i], consdata->name);
743 if( GCGgetNIdenticalBlocks(origscip, blocknr) > 1 || GCGgetNIdenticalBlocks(origscip, blocknr) == 0 )
747 || SCIPisGE(scip, SCIPvarGetUbLocal(pricingvar), SCIPvarGetUbGlobal(consdata->localbndvars[i])));
757 SCIP_CALL( SCIPchgVarUb(GCGgetPricingprob(origscip, blocknr), pricingvar, SCIPvarGetUbGlobal(consdata->localbndvars[i])) );
759 SCIPvarGetName(pricingvar), consdata->localnewbnds[i], SCIPvarGetUbGlobal(consdata->localbndvars[i]), consdata->name);
763 SCIP_CALL( SCIPchgVarUb(GCGgetPricingprob(origscip, blocknr), pricingvar, consdata->localoldbnds[i]) );
765 SCIPvarGetName(pricingvar), consdata->localnewbnds[i], consdata->localoldbnds[i], consdata->name);
806 SCIP_CALL( SCIPchgVarLb(GCGgetPricingprob(origscip, blocknr), pricingvar, consdata->localnewbnds[i]) );
820 SCIP_CALL( SCIPchgVarUb(GCGgetPricingprob(origscip, blocknr), pricingvar, consdata->localnewbnds[i]) );
829 /** For a given local bound change on an original variable, check if the bounds on the variables identical to it are the same
834 * @return TRUE if the variable is in a relevant block AND all variables identical to it have the same bounds
842 SCIP_VAR* bndvar, /**< original variable whose local bound was changed and which is to be checked */
857 /* First case: The variable is not represented by another one - check the bounds of all variables it represents */
873 /* For all variables on which a bound was changed *and* which are identical to the current variable,
894 SCIPerrorMessage("Var <%s> has new local %s bound %g, but identical var <%s> has %g -- don't know how to handle!\n",
907 /* Second case: The variable is represented by another one due to aggregation; check if its representative has the same bound */
930 SCIPerrorMessage("Var <%s> has new local %s bound %g, but representative <%s> has %g -- don't know how to handle!\n",
970 /* if variable belongs to no block, skip it here because the bound changes are treated in the propagation */
976 if( checkAggregatedLocalBounds(scip, consdata->localbndvars, consdata->localnewbnds, consdata->nlocalbndchgs, consdata->localbndvars[i],
979 SCIPdebugMessage("adjusting bound of pricing var <%s>\n", SCIPvarGetName(consdata->localbndvars[i]));
981 SCIP_CALL( tightenPricingVarBound(scip, GCGoriginalVarGetPricingVar(consdata->localbndvars[i]), consdata, i, blocknr) );
1001 if( !checkAggregatedLocalBounds(scip, consdata->localbndvars, consdata->localnewbnds, consdata->nlocalbndchgs,
1008 SCIPdebugMessage("adjusting bound of linking pricing var <%s>\n", SCIPvarGetName(consdata->localbndvars[i]));
1022 SCIPerrorMessage("blocknr = %d is not valid! This is a serious error!", GCGvarGetBlock(consdata->localbndvars[i]));
1079 /* if the variable is linking, we have to perform the same step as above for every existing block*/
1120 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(conshdlrdata->collectedbndvars[blocknr]), oldsize, newsize) );
1121 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(conshdlrdata->collectedlbnds[blocknr]), oldsize, newsize) );
1122 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(conshdlrdata->collectedubnds[blocknr]), oldsize, newsize) );
1139 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(conshdlrdata->linkingvaridxs), oldsize, newsize) );
1222 hashmapsize += (conshdlrdata->enforceproper ? curconsdata->nlocalbndchgs : curconsdata->nbranchingchgs);
1239 /* propagate all bound changes or only the branching bound changes, depending on the setting for the enforcement of proper variables */
1240 nlocalbndchgs = (conshdlrdata->enforceproper ? curconsdata->nlocalbndchgs : curconsdata->nbranchingchgs);
1242 /* iterate over bound changes performed at the current node's equivalent in the original tree */
1374 assert(GCGvarGetBlock(bndvar) == blocknr || (GCGoriginalVarIsLinking(bndvar) && GCGisLinkingVarInBlock(bndvar, blocknr)));
1398 SCIPdebugMessage("Finished propagation of newly created variables: %d changed bounds\n", *propcount);
1403 /** apply local bound changes on original variables that have been directly copied to the master problem */
1440 SCIPdebugMessage("changed lb of copied original var %s locally to %g\n", SCIPvarGetName(consdata->localbndvars[i]), consdata->localnewbnds[i]);
1449 SCIPdebugMessage("changed ub of copied original var %s locally to %g\n", SCIPvarGetName(consdata->localbndvars[i]), consdata->localnewbnds[i]);
1454 SCIPdebugMessage("Finished propagation of bounds of copied original variables: %d bounds changed.\n", *propcount);
1464 /** destructor of constraint handler to free constraint handler data (called when SCIP is exiting) */
1499 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &conshdlrdata->stack, conshdlrdata->maxstacksize) );
1506 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(conshdlrdata->pendingvars), conshdlrdata->maxpendingbnds) );
1507 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(conshdlrdata->pendingbndtypes), conshdlrdata->maxpendingbnds) );
1508 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(conshdlrdata->pendingoldbnds), conshdlrdata->maxpendingbnds) );
1509 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(conshdlrdata->pendingnewbnds), conshdlrdata->maxpendingbnds) );
1511 conshdlrdata->maxblocknum = SCIPcalcMemGrowSize(scip, GCGgetNPricingprobs(GCGmasterGetOrigprob(scip)));
1512 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(conshdlrdata->collectedbndvars), conshdlrdata->maxblocknum) );
1513 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(conshdlrdata->collectedlbnds), conshdlrdata->maxblocknum) );
1514 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(conshdlrdata->collectedubnds), conshdlrdata->maxblocknum) );
1515 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(conshdlrdata->ncollectedbndvars), conshdlrdata->maxblocknum) );
1516 SCIP_CALL( SCIPallocBlockMemoryArray(scip, &(conshdlrdata->maxcollectedbndvars), conshdlrdata->maxblocknum) );
1530 /** solving process initialization method of constraint handler (called when branch and bound process is about to begin) */
1545 SCIP_CALL( GCGcreateConsMasterbranch(scip, &cons, "root-masterbranch", NULL, NULL, NULL, NULL, NULL, 0, 0) );
1546 GCGconsOrigbranchSetMastercons(GCGconsOrigbranchGetActiveCons(GCGmasterGetOrigprob(scip)), cons);
1555 /** deinitialization method of constraint handler (called before transformed problem is freed) */
1573 SCIPfreeBlockMemoryArray(scip, &(conshdlrdata->pendingbndtypes), conshdlrdata->maxpendingbnds);
1581 SCIPfreeBlockMemoryArray(scip, &(conshdlrdata->collectedbndvars[i]), conshdlrdata->maxcollectedbndvars[i]);
1582 SCIPfreeBlockMemoryArray(scip, &(conshdlrdata->collectedlbnds[i]), conshdlrdata->maxcollectedbndvars[i]);
1583 SCIPfreeBlockMemoryArray(scip, &(conshdlrdata->collectedubnds[i]), conshdlrdata->maxcollectedbndvars[i]);
1590 SCIPfreeBlockMemoryArray(scip, &(conshdlrdata->maxcollectedbndvars), conshdlrdata->maxblocknum);
1599 SCIPfreeBlockMemoryArrayNull(scip, &(conshdlrdata->linkingvaridxs), conshdlrdata->maxlinkingvaridxs);
1654 /* The node has to be repropagated if new variables were created after the node was left the last time
1665 SCIPdebugMessage("added %d boundchanges from previous nodes!\n", consdata->nlocalbndchgs - consdata->nlocalbndchgstreated[conshdlrdata->nstack]);
1671 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(conshdlrdata->stack), conshdlrdata->maxstacksize, newsize) );
1673 SCIPdebugMessage("reallocating Memory for stack! %d --> %d\n", conshdlrdata->maxstacksize, newsize);
1680 SCIPdebugMessage("Activating masterbranch constraint: <%s> [stack size: %d], needprop = %u.\n",
1748 SCIP_CALL( GCGrelaxBranchDeactiveMaster(origscip, consdata->branchrule, consdata->branchdata) );
1781 * (might happen if node is cut off before branching decisions are transferred to the original problem)
1789 SCIPfreeBlockMemoryArrayNull(scip, &((*consdata)->copiedvarbndtypes), (*consdata)->maxcopiedvarbnds);
1790 SCIPfreeBlockMemoryArrayNull(scip, &((*consdata)->copiedvarbnds), (*consdata)->maxcopiedvarbnds);
1794 SCIPfreeBlockMemoryArrayNull(scip, &(*consdata)->nlocalbndchgstreated, (*consdata)->maxlocalbndchgstreated);
1808 SCIP_CALL( GCGrelaxBranchDataDelete(origscip, (*consdata)->branchrule, &(*consdata)->branchdata) );
1816 SCIP_CALL( GCGrelaxBranchDataDelete(origscip, (*consdata)->branchrule, &(*consdata)->branchdata) );
1881 isinprobing = (SCIPgetStage(scip) <= SCIP_STAGE_SOLVING && SCIPinProbing(scip)) || (SCIPgetStage(origscip) <= SCIP_STAGE_SOLVING && SCIPinProbing(origscip));
1954 SCIPdebugMessage("Starting propagation of masterbranch constraint: <%s>, stack size = %d, newvars = %d, npendingbnds = %d, npropbounds = %d.\n",
1955 consdata->name, conshdlrdata->nstack, GCGmasterGetNPricedvars(scip) - consdata->npropvars, conshdlrdata->npendingbnds, consdata->ncopiedvarbnds);
1967 /* apply local bound changes on original variables that have been directly copied to the master problem */
1974 SCIP_CALL( GCGrelaxBranchPropMaster(origscip, consdata->branchrule, consdata->branchdata, result) );
2026 /** solving process initialization method of event handler (called when branch and bound process is about to begin) */
2039 SCIP_CALL( SCIPcatchVarEvent(scip, vars[i], SCIP_EVENTTYPE_GBDCHANGED | SCIP_EVENTTYPE_BOUNDCHANGED,
2075 SCIPdebugMessage("eventexec: eventtype = 0x%x, var = %s, oldbound = %f, newbound = %f\n", (unsigned int) eventtype, SCIPvarGetName(var), oldbound, newbound);
2095 && (((eventtype & SCIP_EVENTTYPE_GLBCHANGED) != 0 && SCIPisFeasLT(scip, SCIPgetRelaxSolVal(scip, var), newbound))
2096 || ((eventtype & SCIP_EVENTTYPE_GUBCHANGED) != 0 && SCIPisFeasGT(scip, SCIPgetRelaxSolVal(scip, var), newbound))) )
2110 SCIP_CALL( addPendingBndChg(masterscip, GCGoriginalVarGetPricingVar(var), SCIP_BOUNDTYPE_LOWER, oldbound, newbound) );
2117 SCIP_CALL( addPendingBndChg(masterscip, GCGoriginalVarGetPricingVar(var), SCIP_BOUNDTYPE_UPPER, oldbound, newbound) );
2133 SCIP_CALL( addPendingBndChg(masterscip, mastervars[0], SCIP_BOUNDTYPE_LOWER, oldbound, newbound) );
2140 SCIP_CALL( addPendingBndChg(masterscip, mastervars[0], SCIP_BOUNDTYPE_UPPER, oldbound, newbound) );
2167 SCIP_CALL( addPendingBndChg(masterscip, mastervars[0], SCIP_BOUNDTYPE_LOWER, oldbound, newbound) );
2178 SCIP_CALL( addPendingBndChg(masterscip, pricingvars[i], SCIP_BOUNDTYPE_LOWER, oldbound, newbound) );
2189 SCIP_CALL( addPendingBndChg(masterscip, mastervars[0], SCIP_BOUNDTYPE_UPPER, oldbound, newbound) );
2200 SCIP_CALL( addPendingBndChg(masterscip, pricingvars[i], SCIP_BOUNDTYPE_UPPER, oldbound, newbound) );
2271 "should propagated bound changes in the original be enforced in the master (only proper vars)?",
2348 SCIP_CALL( SCIPcreateCons(scip, cons, name, conshdlr, consdata, FALSE, FALSE, FALSE, FALSE, TRUE,
2377 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(parentdata->childconss), parentdata->maxchildconss, newmaxsize) );
2465 /** returns the origbranch constraint of the node in the original program corresponding to the node
2523 /** adds a bound change on an original variable that was directly copied to the master problem */
2547 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(consdata->copiedvars), consdata->maxcopiedvarbnds, newsize) );
2548 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(consdata->copiedvarbndtypes), consdata->maxcopiedvarbnds, newsize) );
2549 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(consdata->copiedvarbnds), consdata->maxcopiedvarbnds, newsize) );
2553 SCIPdebugMessage("Bound change on copied original variable stored at masterbranch constraint: <%s>.\n", SCIPconsGetName(cons));
2580 /** returns the number of constraints in the original problem that enforce the branching decision */
2618 SCIPfreeBlockMemoryArray(masterscip, &consdata->origbranchconss, consdata->maxorigbranchconss);
2778 assert(consdata->probingtmpcons == NULL || SCIPconsGetData(consdata->probingtmpcons)->parentcons == conss[i]);
2779 assert(consdata->origcons == NULL || GCGconsOrigbranchGetMastercons(consdata->origcons) == conss[i]);
static SCIP_RETCODE applyLocalBndchgsToCopiedMastervars(SCIP *scip, SCIP_CONS *cons, int *propcount)
Definition: cons_masterbranch.c:1405
SCIP_CONS * GCGconsMasterbranchGetChildcons(SCIP_CONS *cons, int childnr)
Definition: cons_masterbranch.c:2449
SCIP_NODE * GCGconsOrigbranchGetNode(SCIP_CONS *cons)
Definition: cons_origbranch.c:612
static SCIP_DECL_CONSDEACTIVE(consDeactiveMasterbranch)
Definition: cons_masterbranch.c:1700
int GCGconsMasterbranchGetNOrigbranchConss(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2581
static SCIP_Bool checkAggregatedGlobalBounds(SCIP *scip, SCIP_VAR *bndvar, SCIP_BOUNDTYPE bndtype, SCIP_Real bound)
Definition: cons_masterbranch.c:417
GCG interface methods.
static SCIP_RETCODE applyLocalBndchgsToPricedMastervars(SCIP *scip, SCIP_CONS *cons, int *propcount)
Definition: cons_masterbranch.c:1148
static SCIP_DECL_CONSFREE(consFreeMasterbranch)
Definition: cons_masterbranch.c:1466
SCIP_CONS * GCGconsMasterbranchGetOrigcons(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2468
void GCGconsMasterbranchSetOrigcons(SCIP_CONS *cons, SCIP_CONS *origcons)
Definition: cons_masterbranch.c:2483
SCIP_RETCODE GCGrelaxBranchDataDelete(SCIP *scip, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA **branchdata)
Definition: relax_gcg.c:3704
SCIP_CONS ** GCGconsMasterbranchGetOrigbranchConss(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2568
GCG_BRANCHDATA * GCGconsMasterbranchGetBranchdata(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2498
SCIP_RETCODE GCGconsMasterbranchAddCopiedVarBndchg(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, GCG_BOUNDTYPE boundtype, SCIP_Real newbound)
Definition: cons_masterbranch.c:2524
SCIP_VAR ** GCGoriginalVarGetMastervars(SCIP_VAR *var)
Definition: gcgvar.c:587
SCIP_Bool GCGisLinkingVarInBlock(SCIP_VAR *var, int block)
Definition: gcgvar.c:1064
SCIP_HASHMAP * GCGmasterVarGetOrigvalmap(SCIP_VAR *var)
Definition: gcgvar.c:979
SCIP_RETCODE GCGcreateConsMasterbranch(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_NODE *node, SCIP_CONS *parentcons, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, SCIP_CONS **origbranchconss, int norigbranchconss, int maxorigbranchconss)
Definition: cons_masterbranch.c:2278
static SCIP_DECL_EVENTINITSOL(eventInitsolOrigvarbound)
Definition: cons_masterbranch.c:2028
static SCIP_DECL_CONSLOCK(consLockMasterbranch)
Definition: cons_masterbranch.c:2016
SCIP_RETCODE GCGconsMasterbranchAddRootCons(SCIP *scip)
Definition: cons_masterbranch.c:2696
char * GCGconsMasterbranchGetName(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2391
SCIP_RETCODE GCGrelaxBranchActiveMaster(SCIP *scip, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
Definition: relax_gcg.c:3586
static SCIP_RETCODE ensureLinkingvarIndxsSize(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int minsize)
Definition: cons_masterbranch.c:1129
SCIP * GCGgetPricingprob(SCIP *scip, int pricingprobnr)
Definition: relax_gcg.c:3939
int GCGconsMasterbranchGetNStackelements(SCIP *scip)
Definition: cons_masterbranch.c:2677
SCIP_Real * GCGoriginalVarGetMastervals(SCIP_VAR *var)
Definition: gcgvar.c:605
int GCGconsMasterbranchGetNChildconss(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2434
SCIP_VAR * GCGoriginalVarGetPricingVar(SCIP_VAR *var)
Definition: gcgvar.c:216
void GCGconsOrigbranchSetMastercons(SCIP_CONS *cons, SCIP_CONS *mastercons)
Definition: cons_origbranch.c:678
static SCIP_RETCODE ensureCollectedBndvarsSize(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int blocknr, int minsize)
Definition: cons_masterbranch.c:1109
GCG variable pricer.
SCIP_RETCODE GCGrelaxBranchDeactiveMaster(SCIP *scip, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
Definition: relax_gcg.c:3624
SCIP_NODE * GCGconsMasterbranchGetNode(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2404
static SCIP_RETCODE applyGlobalBndchgsToPricedMastervars(SCIP *scip, int *propcount)
Definition: cons_masterbranch.c:545
static SCIP_RETCODE undoLocalBndchgsToPricingprobs(SCIP *scip, SCIP_CONS *cons)
Definition: cons_masterbranch.c:1032
SCIP_CONS * GCGconsOrigbranchGetActiveCons(SCIP *scip)
Definition: cons_origbranch.c:529
SCIP_Bool pendingbndsactivated
Definition: cons_masterbranch.c:132
static SCIP_DECL_CONSPROP(consPropMasterbranch)
Definition: cons_masterbranch.c:1918
Definition: cons_masterbranch.c:71
SCIP_BRANCHRULE * GCGconsMasterbranchGetBranchrule(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2511
constraint handler for storing the branching decisions at each node of the tree
static SCIP_DECL_CONSDELETE(consDeleteMasterbranch)
Definition: cons_masterbranch.c:1757
int GCGconsOrigbranchGetNChildconss(SCIP_CONS *cons)
Definition: cons_origbranch.c:645
branching rule based on vanderbeck's generic branching scheme
SCIP_Bool GCGcurrentNodeIsGeneric(SCIP *scip)
Definition: cons_masterbranch.c:2722
constraint handler for storing the branching decisions at each node of the tree
SCIP_RETCODE SCIPincludeConshdlrMasterbranch(SCIP *scip)
Definition: cons_masterbranch.c:2223
SCIP_CONS * GCGconsOrigbranchGetParentcons(SCIP_CONS *cons)
Definition: cons_origbranch.c:628
SCIP_RETCODE GCGrelaxBranchPropMaster(SCIP *scip, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata, SCIP_RESULT *result)
Definition: relax_gcg.c:3662
int GCGgetNIdenticalBlocks(SCIP *scip, int pricingprobnr)
Definition: relax_gcg.c:4053
static SCIP_DECL_CONSENFOLP(consEnfolpMasterbranch)
Definition: cons_masterbranch.c:1989
static SCIP_RETCODE applyLocalBndchgsToPricingprobs(SCIP *scip, SCIP_CONS *cons)
Definition: cons_masterbranch.c:942
static SCIP_DECL_CONSINIT(consInitMasterbranch)
Definition: cons_masterbranch.c:1487
SCIP_RETCODE GCGconsMasterbranchReleaseOrigbranchConss(SCIP *masterscip, SCIP *origscip, SCIP_CONS *cons)
Definition: cons_masterbranch.c:2596
static SCIP_DECL_CONSACTIVE(consActiveMasterbranch)
Definition: cons_masterbranch.c:1607
void GCGconsOrigbranchSetBranchdata(SCIP_CONS *cons, GCG_BRANCHDATA *branchdata)
Definition: cons_origbranch.c:571
GCG_BOUNDTYPE * copiedvarbndtypes
Definition: cons_masterbranch.c:107
SCIP_CONS * GCGconsMasterbranchGetParentcons(SCIP_CONS *cons)
Definition: cons_masterbranch.c:2419
Definition: cons_decomp.cpp:134
GCG relaxator.
static SCIP_DECL_CONSCHECK(consCheckMasterbranch)
Definition: cons_masterbranch.c:2007
SCIP_CONS * GCGconsMasterbranchGetActiveCons(SCIP *scip)
Definition: cons_masterbranch.c:2628
SCIP_VAR ** GCGpricingVarGetOrigvars(SCIP_VAR *var)
Definition: gcgvar.c:1015
static SCIP_RETCODE tightenPricingVarBound(SCIP *scip, SCIP_VAR *pricingvar, SCIP_CONSDATA *consdata, int i, int blocknr)
Definition: cons_masterbranch.c:774
static SCIP_RETCODE resetPricingVarBound(SCIP *scip, SCIP_VAR *pricingvar, SCIP_CONSDATA *consdata, int i, int blocknr)
Definition: cons_masterbranch.c:686
static SCIP_DECL_CONSINITSOL(consInitsolMasterbranch)
Definition: cons_masterbranch.c:1532
SCIP_BOUNDTYPE * pendingbndtypes
Definition: cons_masterbranch.c:128
Definition: branch_bpstrong.c:109
static SCIP_RETCODE addPendingBndChg(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_Real oldbound, SCIP_Real newbound)
Definition: cons_masterbranch.c:364
void GCGconsMasterbranchGetStack(SCIP *scip, SCIP_CONS ***stack, int *nstackelements)
Definition: cons_masterbranch.c:2655
static SCIP_DECL_CONSENFOPS(consEnfopsMasterbranch)
Definition: cons_masterbranch.c:1998
void GCGconsMasterbranchCheckConsistency(SCIP *scip)
Definition: cons_masterbranch.c:2747
static SCIP_DECL_CONSEXIT(consExitMasterbranch)
Definition: cons_masterbranch.c:1557
SCIP_Bool GCGisPricingprobRelevant(SCIP *scip, int pricingprobnr)
Definition: relax_gcg.c:4000
SCIP_VAR ** GCGlinkingVarGetPricingVars(SCIP_VAR *var)
Definition: gcgvar.c:409
static SCIP_DECL_EVENTEXEC(eventExecOrigvarbound)
Definition: cons_masterbranch.c:2048
SCIP_CONS * GCGconsOrigbranchGetMastercons(SCIP_CONS *cons)
Definition: cons_origbranch.c:695
static SCIP_Bool checkAggregatedLocalBounds(SCIP *scip, SCIP_VAR **bndvars, SCIP_Real *bounds, int nbndvars, SCIP_VAR *bndvar, SCIP_BOUNDTYPE bndtype, SCIP_VAR *pricingvar)
Definition: cons_masterbranch.c:837
static SCIP_RETCODE initializeConsdata(SCIP *scip, SCIP_CONS *cons)
Definition: cons_masterbranch.c:153
static SCIP_RETCODE applyGlobalBndchgsToPricingprobs(SCIP *scip)
Definition: cons_masterbranch.c:462