Detailed Description
constraint handler for storing the branching decisions at each node of the tree
Definition in file cons_masterbranch.h.
Go to the source code of this file.
Function Documentation
◆ GCGincludeConshdlrMasterbranch()
| GCG_EXPORT SCIP_RETCODE GCGincludeConshdlrMasterbranch | ( | GCG * | gcg | ) |
creates the handler for masterbranch constraints and includes it in SCIP
- Parameters
-
gcg GCG data structure
Definition at line 2607 of file cons_masterbranch.c.
References CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYPROP, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PROPFREQ, CONSHDLR_PROPTIMING, SCIP_ConshdlrData::enforceproper, EVENTHDLR_DESC, EVENTHDLR_NAME, FALSE, SCIP_EventhdlrData::gcg, SCIP_ConshdlrData::gcg, GCGgetMasterprob(), GCGgetOrigprob(), SCIP_ConshdlrData::maxstacksize, SCIP_ConshdlrData::nstack, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPallocBlockMemory, SCIPallocMemory, SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPsetConshdlrActive(), SCIPsetConshdlrDeactive(), SCIPsetConshdlrDelete(), SCIPsetConshdlrExit(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrInit(), SCIPsetConshdlrInitsol(), SCIPsetConshdlrProp(), SCIPsetEventhdlrFree(), SCIPsetEventhdlrInitsol(), SCIP_ConshdlrData::stack, and TRUE.
Referenced by GCGincludeMasterPlugins().
◆ GCGcreateConsMasterbranch()
| GCG_EXPORT SCIP_RETCODE GCGcreateConsMasterbranch | ( | GCG * | gcg, |
| SCIP_CONS ** | cons, | ||
| const char * | name, | ||
| SCIP_NODE * | node, | ||
| SCIP_CONS * | parentcons, | ||
| GCG_BRANCHRULE * | branchrule, | ||
| GCG_BRANCHDATA * | branchdata, | ||
| SCIP_CONS ** | origbranchconss, | ||
| int | norigbranchconss, | ||
| int | maxorigbranchconss | ||
| ) |
creates and captures a masterbranch constraint
- Parameters
-
gcg GCG data structure cons pointer to hold the created constraint name name of the constraint node node at which the constraint should be created parentcons parent constraint branchrule pointer to the branching rule branchdata branching data origbranchconss original constraints enforcing the branching decision norigbranchconss number of original constraints maxorigbranchconss capacity of origbranchconss
Definition at line 2670 of file cons_masterbranch.c.
References SCIP_ConsData::addedcuts, SCIP_ConsData::addedcutsinit, SCIP_ConsData::branchdata, SCIP_ConsData::branchrule, SCIP_ConsData::childconss, CONSHDLR_NAME, SCIP_ConsData::copiedvarbnds, SCIP_ConsData::copiedvarbndtypes, SCIP_ConsData::copiedvars, FALSE, SCIP_ConsData::firstnewcut, GCGgetCurrentVarhistoryReference(), GCGgetMasterprob(), GCGgetOrigprob(), GCGstashLimitSettings(), GCGvarhistoryCopyReference(), SCIP_ConsData::knownvarhistory, SCIP_ConsData::localbndtypes, SCIP_ConsData::localbndvars, SCIP_ConsData::localnewbnds, SCIP_ConsData::localoldbnds, SCIP_ConsData::maxchildconss, SCIP_ConsData::maxcopiedvarbnds, SCIP_ConsData::maxlocalbndchgs, SCIP_ConsData::maxlocalbndchgstreated, SCIP_ConsData::maxorigbranchconss, SCIP_ConsData::nactivated, SCIP_ConsData::naddedcuts, SCIP_ConsData::name, SCIP_ConsData::nbranchingchgs, SCIP_ConsData::nchildconss, SCIP_ConsData::ncopiedvarbnds, SCIP_ConsData::needprop, SCIP_ConsData::nlocalbndchgs, SCIP_ConsData::nlocalbndchgstreated, SCIP_ConsData::node, SCIP_ConsData::nodestoredcuts, SCIP_ConsData::norigbranchconss, SCIP_ConsData::npropvars, NULL, SCIP_ConsData::origbranchconss, SCIP_ConsData::origcons, SCIP_ConsData::parentcons, SCIP_ConsData::probingtmpcons, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPcalcMemGrowSize(), SCIPconsGetData(), SCIPcreateCons(), SCIPdebugMessage, SCIPduplicateBlockMemoryArray, SCIPfindConshdlr(), SCIPgetStage(), SCIPinProbing(), SCIPnodeGetDepth(), SCIPreallocBlockMemoryArray, and TRUE.
Referenced by branchDirectlyOnMastervar(), branchVar(), createChildNodesCompBndSeq(), createChildNodesGeneric(), createChildNodesRyanfoster(), GCGrelaxNewProbingnodeMaster(), GCGrelaxNewProbingnodeMasterCons(), and SCIP_DECL_CONSINITSOL().
◆ GCGconsMasterbranchGetName()
| GCG_EXPORT char * GCGconsMasterbranchGetName | ( | SCIP_CONS * | cons | ) |
returns the name of the constraint
- Parameters
-
cons masterbranch constraint for which the data is requested
Definition at line 2800 of file cons_masterbranch.c.
References SCIP_ConsData::name, NULL, and SCIPconsGetData().
Referenced by createOrigbranchConstraint().
◆ GCGconsMasterbranchGetNode()
| GCG_EXPORT SCIP_NODE * GCGconsMasterbranchGetNode | ( | SCIP_CONS * | cons | ) |
returns the node in the B&B tree at which the given masterbranch constraint is sticking
- Parameters
-
cons constraint pointer
Definition at line 2813 of file cons_masterbranch.c.
References SCIP_ConsData::node, NULL, and SCIPconsGetData().
Referenced by applyOriginalBranching(), createBranchNodesInOrigprob(), GCGcurrentNodeIsGeneric(), SCIP_DECL_EVENTEXEC(), and SCIP_DECL_NODESELSELECT().
◆ GCGconsMasterbranchGetParentcons()
| GCG_EXPORT SCIP_CONS * GCGconsMasterbranchGetParentcons | ( | SCIP_CONS * | cons | ) |
returns the masterbranch constraint of the B&B father of the node at which the given masterbranch constraint is sticking
- Parameters
-
cons constraint pointer
Definition at line 2828 of file cons_masterbranch.c.
References NULL, SCIP_ConsData::parentcons, and SCIPconsGetData().
Referenced by initBranch(), pruneChildNodeByDominanceGeneric(), and SCIP_DECL_EVENTEXEC().
◆ GCGconsMasterbranchGetNChildconss()
| GCG_EXPORT int GCGconsMasterbranchGetNChildconss | ( | SCIP_CONS * | cons | ) |
returns the number of masterbranch constraints of the children of the node at which the given masterbranch constraint is sticking
- Parameters
-
cons constraint pointer
Definition at line 2843 of file cons_masterbranch.c.
References SCIP_ConsData::nchildconss, NULL, and SCIPconsGetData().
Referenced by checkchildconsS(), and createBranchNodesInOrigprob().
◆ GCGconsMasterbranchGetChildcons()
| GCG_EXPORT SCIP_CONS * GCGconsMasterbranchGetChildcons | ( | SCIP_CONS * | cons, |
| int | childnr | ||
| ) |
returns a masterbranch constraint of a child of the node at which the given masterbranch constraint is sticking
- Parameters
-
cons constraint pointer childnr index of the child node
Definition at line 2858 of file cons_masterbranch.c.
References SCIP_ConsData::childconss, SCIP_ConsData::nchildconss, NULL, and SCIPconsGetData().
Referenced by checkchildconsS(), and createBranchNodesInOrigprob().
◆ GCGconsMasterbranchGetOrigcons()
| GCG_EXPORT SCIP_CONS * GCGconsMasterbranchGetOrigcons | ( | SCIP_CONS * | cons | ) |
returns the origbranch constraint of the node in the original program corresponding to the node which the given masterbranch constraint is sticking
returns the origbranch constraint of the node in the original program corresponding to the node at which the given masterbranch constraint is sticking
- Parameters
-
cons constraint pointer
Definition at line 2877 of file cons_masterbranch.c.
References NULL, SCIP_ConsData::origcons, and SCIPconsGetData().
Referenced by GCGconsOrigbranchCheckConsistency(), and SCIP_DECL_CONSDELETE().
◆ GCGconsMasterbranchSetOrigcons()
| GCG_EXPORT void GCGconsMasterbranchSetOrigcons | ( | SCIP_CONS * | cons, |
| SCIP_CONS * | origcons | ||
| ) |
sets the origbranch constraint of the node in the master program corresponding to the node at which the given masterbranchbranch constraint is sticking
- Parameters
-
cons constraint pointer origcons original branching constraint
Definition at line 2892 of file cons_masterbranch.c.
References NULL, SCIP_ConsData::origcons, and SCIPconsGetData().
Referenced by createOrigbranchConstraint(), and SCIP_DECL_CONSDELETE().
◆ GCGconsMasterbranchGetBranchdata()
| GCG_EXPORT GCG_BRANCHDATA * GCGconsMasterbranchGetBranchdata | ( | SCIP_CONS * | cons | ) |
returns the branching data for a given masterbranch constraint
- Parameters
-
cons constraint pointer
Definition at line 2907 of file cons_masterbranch.c.
References SCIP_ConsData::branchdata, NULL, and SCIPconsGetData().
Referenced by applyOriginalBranching(), checkchildconsS(), createOrigbranchConstraint(), initBranch(), pruneChildNodeByDominanceGeneric(), and SCIP_DECL_EVENTEXEC().
◆ GCGconsMasterbranchSetBranchdata()
| GCG_EXPORT void GCGconsMasterbranchSetBranchdata | ( | SCIP_CONS * | cons, |
| GCG_BRANCHDATA * | branchdata | ||
| ) |
sets the branching data for a given masterbranch constraint
- Parameters
-
cons masterbranch constraint for which the branching data is requested branchdata branching data
Definition at line 2919 of file cons_masterbranch.c.
References SCIP_ConsData::branchdata, NULL, and SCIPconsGetData().
Referenced by SCIP_DECL_CONSDELETE().
◆ GCGconsMasterbranchGetBranchrule()
| GCG_EXPORT GCG_BRANCHRULE * GCGconsMasterbranchGetBranchrule | ( | SCIP_CONS * | cons | ) |
returns the branching rule of the constraint
- Parameters
-
cons masterbranch constraint for which the data is requested
Definition at line 2933 of file cons_masterbranch.c.
References SCIP_ConsData::branchrule, NULL, and SCIPconsGetData().
Referenced by checkchildconsS(), createBranchNodesInOrigprob(), createOrigbranchConstraint(), GCGcurrentNodeIsGeneric(), initBranch(), ObjPricerGcg::pricingLoop(), pruneChildNodeByDominanceGeneric(), and SCIP_DECL_EVENTEXEC().
◆ GCGconsMasterbranchAddCopiedVarBndchg()
| GCG_EXPORT SCIP_RETCODE GCGconsMasterbranchAddCopiedVarBndchg | ( | GCG * | gcg, |
| SCIP_CONS * | cons, | ||
| SCIP_VAR * | var, | ||
| GCG_BOUNDTYPE | boundtype, | ||
| SCIP_Real | newbound | ||
| ) |
adds a bound change on an original variable that was directly copied to the master problem
- Parameters
-
gcg GCG data structure cons masterbranch constraint to which the bound change is added var variable on which the bound change was performed boundtype bound type of the bound change newbound new bound of the variable after the bound change
Definition at line 2946 of file cons_masterbranch.c.
References SCIP_ConsData::copiedvarbnds, SCIP_ConsData::copiedvarbndtypes, SCIP_ConsData::copiedvars, GCGgetMasterprob(), GCGisMaster(), SCIP_ConsData::maxcopiedvarbnds, SCIP_ConsData::ncopiedvarbnds, SCIP_ConsData::node, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPreallocBlockMemoryArray, and SCIPrepropagateNode().
Referenced by applyOriginalBranching().
◆ GCGconsMasterbranchGetOrigbranchConss()
| GCG_EXPORT SCIP_CONS ** GCGconsMasterbranchGetOrigbranchConss | ( | SCIP_CONS * | cons | ) |
returns the constraints in the original problem that enforce the branching decision
- Parameters
-
cons masterbranch constraint for which the data is requested
Definition at line 2993 of file cons_masterbranch.c.
References NULL, SCIP_ConsData::origbranchconss, and SCIPconsGetData().
Referenced by createOrigbranchConstraint().
◆ GCGconsMasterbranchGetNOrigbranchConss()
| GCG_EXPORT int GCGconsMasterbranchGetNOrigbranchConss | ( | SCIP_CONS * | cons | ) |
returns the number of constraints in the original problem that enforce the branching decision
- Parameters
-
cons masterbranch constraint for which the data is requested
Definition at line 3006 of file cons_masterbranch.c.
References SCIP_ConsData::norigbranchconss, NULL, and SCIPconsGetData().
Referenced by createOrigbranchConstraint().
◆ GCGconsMasterbranchReleaseOrigbranchConss()
| GCG_EXPORT SCIP_RETCODE GCGconsMasterbranchReleaseOrigbranchConss | ( | GCG * | gcg, |
| SCIP_CONS * | cons | ||
| ) |
releases the constraints in the original problem that enforce the branching decision and frees the array holding the constraints
- Parameters
-
gcg GCG instance cons masterbranch constraint for which the data is freed
Definition at line 3021 of file cons_masterbranch.c.
References GCGgetMasterprob(), GCGgetOrigprob(), GCGisMaster(), GCGisOriginal(), SCIP_ConsData::maxorigbranchconss, SCIP_ConsData::norigbranchconss, NULL, SCIP_ConsData::origbranchconss, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPfreeBlockMemoryArray, and SCIPreleaseCons().
Referenced by createOrigbranchConstraint(), and SCIP_DECL_CONSDELETE().
◆ GCGconsMasterbranchGetActiveCons()
| GCG_EXPORT SCIP_CONS * GCGconsMasterbranchGetActiveCons | ( | GCG * | gcg | ) |
returns the masterbranch constraint of the current node
- Parameters
-
gcg GCG data structure
Definition at line 3056 of file cons_masterbranch.c.
References CONSHDLR_NAME, GCGgetMasterprob(), GCGisMaster(), SCIP_ConshdlrData::nstack, NULL, SCIP_STAGE_SOLVING, SCIPconshdlrGetData(), SCIPfindConshdlr(), SCIPgetStage(), and SCIP_ConshdlrData::stack.
Referenced by branchDirectlyOnMastervar(), branchVar(), createBranchNodesInOrigprob(), createChildNodesCompBndSeq(), createChildNodesGeneric(), createChildNodesRyanfoster(), GCGcurrentNodeIsGeneric(), GCGrelaxNewProbingnodeMaster(), GCGrelaxNewProbingnodeMasterCons(), initBranch(), ObjPricerGcg::pricingLoop(), and SCIP_DECL_EVENTEXEC().
◆ GCGconsMasterbranchGetStack()
| GCG_EXPORT void GCGconsMasterbranchGetStack | ( | GCG * | gcg, |
| SCIP_CONS *** | stack, | ||
| int * | nstackelements | ||
| ) |
returns the stack and the number of elements on it
- Parameters
-
gcg GCG data structure stack return value: pointer to the stack nstackelements return value: pointer to int, for number of elements on the stack
Definition at line 3086 of file cons_masterbranch.c.
References CONSHDLR_NAME, GCGgetMasterprob(), SCIP_ConshdlrData::nstack, NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIP_ConshdlrData::stack.
◆ GCGconsMasterbranchGetNStackelements()
| GCG_EXPORT int GCGconsMasterbranchGetNStackelements | ( | GCG * | gcg | ) |
returns the number of elements on the stack
- Parameters
-
gcg GCG data structure
Definition at line 3110 of file cons_masterbranch.c.
References CONSHDLR_NAME, GCGgetMasterprob(), SCIP_ConshdlrData::nstack, NULL, SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIP_ConshdlrData::stack.
◆ GCGconsMasterbranchAddRootCons()
| GCG_EXPORT SCIP_RETCODE GCGconsMasterbranchAddRootCons | ( | GCG * | gcg | ) |
adds initial constraint to root node
- Parameters
-
gcg GCG data structure
Definition at line 3131 of file cons_masterbranch.c.
References CONSHDLR_NAME, GCGgetMasterprob(), SCIP_ConshdlrData::nstack, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddConsNode(), SCIPconshdlrGetData(), SCIPfindConshdlr(), SCIPgetRootNode(), SCIPreleaseCons(), and SCIP_ConshdlrData::stack.
Referenced by SCIP_DECL_PRICERFARKAS(), and SCIP_DECL_PRICERREDCOST().
◆ GCGconsMasterbranchActiveCutRemoved()
| GCG_EXPORT SCIP_RETCODE GCGconsMasterbranchActiveCutRemoved | ( | GCG * | gcg, |
| int | removedidx | ||
| ) |
adjusts the active-cut bookkeeping of all active masterbranch nodes after a master separator cut has been removed from the active cuts at the given position
adjusts the firstnewcut bookkeeping of all active masterbranch nodes after a master separator cut has been removed from the active cuts at the given position
- Parameters
-
gcg GCG data structure removedidx position the removed cut had in the active cuts
Definition at line 3161 of file cons_masterbranch.c.
References CONSHDLR_NAME, SCIP_ConsData::firstnewcut, GCGgetMasterprob(), SCIP_ConshdlrData::nstack, NULL, SCIP_OKAY, SCIPconsGetData(), SCIPconshdlrGetData(), SCIPfindConshdlr(), and SCIP_ConshdlrData::stack.
Referenced by eventRowDeletedFromLP().
◆ GCGcurrentNodeIsGeneric()
| GCG_EXPORT SCIP_Bool GCGcurrentNodeIsGeneric | ( | GCG * | gcg | ) |
check whether the node was generated by generic branching
- Parameters
-
gcg GCG data structure
Definition at line 3202 of file cons_masterbranch.c.
References FALSE, GCGbranchGetScipBranchrule(), GCGconsMasterbranchGetActiveCons(), GCGconsMasterbranchGetBranchrule(), GCGconsMasterbranchGetNode(), NULL, SCIP_Bool, SCIPbranchruleGetName(), SCIPnodeGetDepth(), and TRUE.
Referenced by SCIP_DECL_BRANCHEXECEXT(), SCIP_DECL_BRANCHEXECLP(), and SCIP_DECL_BRANCHEXECPS().
◆ GCGconsMasterbranchCheckConsistency()
| GCG_EXPORT void GCGconsMasterbranchCheckConsistency | ( | GCG * | gcg | ) |
checks the consistency of the masterbranch constraints in the problem
- Parameters
-
gcg GCG data structure
Definition at line 3226 of file cons_masterbranch.c.
References CONSHDLR_NAME, GCGconsOrigbranchGetMastercons(), GCGconsOrigbranchGetParentcons(), GCGgetMasterprob(), SCIP_ConsData::node, NULL, SCIP_ConsData::origcons, SCIP_ConsData::parentcons, SCIP_ConsData::probingtmpcons, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetConss(), SCIPconshdlrGetNConss(), SCIPdebugMessage, SCIPfindConshdlr(), and SCIPinProbing().
Referenced by SCIP_DECL_NODESELSELECT().