GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
cons_masterbranch.c File Reference

Detailed Description

constraint handler for storing the branching decisions at each node of the tree

Author
Gerald Gamrath
Martin Bergner
Christian Puchert
Marcel Schmickerath
Erik Muehmer

Definition in file cons_masterbranch.c.

#include <assert.h>
#include <string.h>
#include "gcg/gcg.h"
#include "gcg/branch_generic.h"
#include "gcg/cons_masterbranch.h"
#include "gcg/cons_origbranch.h"
#include "gcg/relax_gcg.h"
#include "gcg/pricer_gcg.h"
#include "gcg/pub_colpool.h"
#include "gcg/gcgvarhistory.h"
#include "gcg/event_mastersepacut.h"
#include "gcg/mastersepacut.h"

Go to the source code of this file.

Data Structures

struct  SCIP_ConsData
struct  SCIP_ConshdlrData
struct  SCIP_EventhdlrData

Macros

#define CONSHDLR_NAME   "masterbranch"
#define CONSHDLR_DESC   "store branching decision at nodes of the tree constraint handler"
#define CONSHDLR_ENFOPRIORITY   0
#define CONSHDLR_CHECKPRIORITY   2000000
#define CONSHDLR_PROPFREQ   1
#define CONSHDLR_EAGERFREQ   100
#define CONSHDLR_DELAYPROP   FALSE
#define CONSHDLR_NEEDSCONS   TRUE
#define CONSHDLR_PROPTIMING   SCIP_PROPTIMING_ALWAYS
#define EVENTHDLR_NAME   "origvarbound"
#define EVENTHDLR_DESC   "event handler for bound changes on original variables"

Functions

static SCIP_RETCODE addMissedVariables (GCG *gcg, GCG_EXTENDEDMASTERCONSDATA *mastersepacut)
static SCIP_RETCODE removeStoredCutsFromActiveCuts (GCG *gcg, SCIP_CONSDATA *consdata, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_RETCODE addStoredCutsToActiveCuts (GCG *gcg, SCIP_CONSDATA *consdata, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_RETCODE initializeAddedCuts (GCG *gcg, SCIP_CONSDATA *consdata, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_RETCODE initializeConsdata (GCG *gcg, SCIP_CONS *cons)
static SCIP_RETCODE addPendingBndChg (SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_Real oldbound, SCIP_Real newbound)
static SCIP_Bool checkAggregatedGlobalBounds (SCIP *scip, SCIP_VAR *bndvar, SCIP_BOUNDTYPE bndtype, SCIP_Real bound)
static SCIP_RETCODE applyGlobalBndchgsToPricingprobs (GCG *gcg, SCIP_CONSHDLRDATA *conshdlrdata)
static SCIP_RETCODE applyGlobalBndchgsToPricedMastervars (GCG *gcg, SCIP_CONSHDLRDATA *conshdlrdata, int *propcount)
static SCIP_RETCODE resetPricingVarBound (GCG *gcg, SCIP_VAR *pricingvar, SCIP_CONSDATA *consdata, int i, int blocknr)
static SCIP_RETCODE tightenPricingVarBound (GCG *gcg, SCIP_VAR *pricingvar, SCIP_CONSDATA *consdata, int i, int blocknr)
static SCIP_Bool checkAggregatedLocalBounds (SCIP *scip, SCIP_VAR **bndvars, SCIP_Real *bounds, int nbndvars, SCIP_VAR *bndvar, SCIP_BOUNDTYPE bndtype, SCIP_VAR *pricingvar)
static SCIP_RETCODE applyLocalBndchgsToPricingprobs (GCG *gcg, SCIP_CONS *cons)
static SCIP_RETCODE undoLocalBndchgsToPricingprobs (GCG *gcg, SCIP_CONS *cons)
static SCIP_RETCODE ensureCollectedBndvarsSize (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int blocknr, int minsize)
static SCIP_RETCODE ensureLinkingvarIndxsSize (SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, int minsize)
static SCIP_RETCODE applyLocalBndchgsToPricedMastervars (GCG *gcg, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS *cons, int *propcount)
static SCIP_RETCODE applyLocalBndchgsToCopiedMastervars (GCG *gcg, SCIP_CONS *cons, int *propcount)
static SCIP_RETCODE forwardUpdateSeenHistory (GCG *gcg, SCIP_CONSDATA *consdata)
static SCIP_DECL_CONSFREE (consFreeMasterbranch)
static SCIP_DECL_CONSINIT (consInitMasterbranch)
static SCIP_DECL_CONSINITSOL (consInitsolMasterbranch)
static SCIP_DECL_CONSEXITSOL (consExitSolMasterbranch)
static SCIP_DECL_CONSEXIT (consExitMasterbranch)
static SCIP_DECL_CONSACTIVE (consActiveMasterbranch)
static SCIP_DECL_CONSDEACTIVE (consDeactiveMasterbranch)
static SCIP_DECL_CONSDELETE (consDeleteMasterbranch)
static SCIP_DECL_CONSPROP (consPropMasterbranch)
static SCIP_DECL_CONSENFOLP (consEnfolpMasterbranch)
static SCIP_DECL_CONSENFOPS (consEnfopsMasterbranch)
static SCIP_DECL_CONSCHECK (consCheckMasterbranch)
static SCIP_DECL_CONSLOCK (consLockMasterbranch)
static SCIP_DECL_EVENTINITSOL (eventInitsolOrigvarbound)
static SCIP_DECL_EVENTFREE (eventFreeOrigvarbound)
static SCIP_DECL_EVENTEXEC (eventExecOrigvarbound)
SCIP_RETCODE GCGincludeConshdlrMasterbranch (GCG *gcg)
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)
char * GCGconsMasterbranchGetName (SCIP_CONS *cons)
SCIP_NODE * GCGconsMasterbranchGetNode (SCIP_CONS *cons)
SCIP_CONS * GCGconsMasterbranchGetParentcons (SCIP_CONS *cons)
int GCGconsMasterbranchGetNChildconss (SCIP_CONS *cons)
SCIP_CONS * GCGconsMasterbranchGetChildcons (SCIP_CONS *cons, int childnr)
SCIP_CONS * GCGconsMasterbranchGetOrigcons (SCIP_CONS *cons)
void GCGconsMasterbranchSetOrigcons (SCIP_CONS *cons, SCIP_CONS *origcons)
GCG_BRANCHDATA * GCGconsMasterbranchGetBranchdata (SCIP_CONS *cons)
void GCGconsMasterbranchSetBranchdata (SCIP_CONS *cons, GCG_BRANCHDATA *branchdata)
GCG_BRANCHRULE * GCGconsMasterbranchGetBranchrule (SCIP_CONS *cons)
SCIP_RETCODE GCGconsMasterbranchAddCopiedVarBndchg (GCG *gcg, SCIP_CONS *cons, SCIP_VAR *var, GCG_BOUNDTYPE boundtype, SCIP_Real newbound)
SCIP_CONS ** GCGconsMasterbranchGetOrigbranchConss (SCIP_CONS *cons)
int GCGconsMasterbranchGetNOrigbranchConss (SCIP_CONS *cons)
SCIP_RETCODE GCGconsMasterbranchReleaseOrigbranchConss (GCG *gcg, SCIP_CONS *cons)
SCIP_CONS * GCGconsMasterbranchGetActiveCons (GCG *gcg)
void GCGconsMasterbranchGetStack (GCG *gcg, SCIP_CONS ***stack, int *nstackelements)
int GCGconsMasterbranchGetNStackelements (GCG *gcg)
SCIP_RETCODE GCGconsMasterbranchAddRootCons (GCG *gcg)
SCIP_RETCODE GCGconsMasterbranchActiveCutRemoved (GCG *gcg, int removedidx)
SCIP_Bool GCGcurrentNodeIsGeneric (GCG *gcg)
void GCGconsMasterbranchCheckConsistency (GCG *gcg)

Macro Definition Documentation

◆ CONSHDLR_NAME

#define CONSHDLR_NAME   "masterbranch"

Definition at line 58 of file cons_masterbranch.c.

◆ CONSHDLR_DESC

#define CONSHDLR_DESC   "store branching decision at nodes of the tree constraint handler"

Definition at line 59 of file cons_masterbranch.c.

◆ CONSHDLR_ENFOPRIORITY

#define CONSHDLR_ENFOPRIORITY   0

priority of the constraint handler for constraint enforcing

Definition at line 60 of file cons_masterbranch.c.

◆ CONSHDLR_CHECKPRIORITY

#define CONSHDLR_CHECKPRIORITY   2000000

priority of the constraint handler for checking feasibility

Definition at line 61 of file cons_masterbranch.c.

◆ CONSHDLR_PROPFREQ

#define CONSHDLR_PROPFREQ   1

frequency for propagating domains; zero means only preprocessing propagation

Definition at line 62 of file cons_masterbranch.c.

Referenced by GCGincludeConshdlrMasterbranch().

◆ CONSHDLR_EAGERFREQ

#define CONSHDLR_EAGERFREQ   100

frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only

Definition at line 63 of file cons_masterbranch.c.

◆ CONSHDLR_DELAYPROP

#define CONSHDLR_DELAYPROP   FALSE

should propagation method be delayed, if other propagators found reductions?

Definition at line 65 of file cons_masterbranch.c.

Referenced by GCGincludeConshdlrMasterbranch().

◆ CONSHDLR_NEEDSCONS

#define CONSHDLR_NEEDSCONS   TRUE

should the constraint handler be skipped, if no constraints are available?

Definition at line 66 of file cons_masterbranch.c.

◆ CONSHDLR_PROPTIMING

#define CONSHDLR_PROPTIMING   SCIP_PROPTIMING_ALWAYS

Definition at line 67 of file cons_masterbranch.c.

Referenced by GCGincludeConshdlrMasterbranch().

◆ EVENTHDLR_NAME

#define EVENTHDLR_NAME   "origvarbound"

Definition at line 69 of file cons_masterbranch.c.

◆ EVENTHDLR_DESC

#define EVENTHDLR_DESC   "event handler for bound changes on original variables"

Definition at line 70 of file cons_masterbranch.c.

Function Documentation

◆ addMissedVariables()

◆ removeStoredCutsFromActiveCuts()

SCIP_RETCODE removeStoredCutsFromActiveCuts ( GCG * gcg,
SCIP_CONSDATA * consdata,
SCIP_CONSHDLRDATA * conshdlrdata )
static

remove the mastersepacuts generated and applied at this node from activecuts

Parameters
gcgGCG data structure
consdatadata of current constraint
conshdlrdatamasterbranch constraint handler data

Definition at line 253 of file cons_masterbranch.c.

References assert(), SCIP_ConsData::firstnewcut, GCGshrinkActiveMastersepacuts(), removeStoredCutsFromActiveCuts(), and SCIP_CALL().

Referenced by removeStoredCutsFromActiveCuts(), and SCIP_DECL_CONSDEACTIVE().

◆ addStoredCutsToActiveCuts()

SCIP_RETCODE addStoredCutsToActiveCuts ( GCG * gcg,
SCIP_CONSDATA * consdata,
SCIP_CONSHDLRDATA * conshdlrdata )
static

add the mastersepacuts generated and applied at this node to active cuts

Parameters
gcgGCG data structure
consdataconsdata of current constraint
conshdlrdataconstraint handler data

Definition at line 269 of file cons_masterbranch.c.

References SCIP_ConsData::addedcuts, SCIP_ConsData::addedcutsinit, addMissedVariables(), addStoredCutsToActiveCuts(), assert(), SCIP_ConsData::firstnewcut, GCGaddActiveMastersepacut(), GCGextendedmasterconsGetRow(), GCGgetNActiveMastersepacuts(), j, SCIP_ConsData::naddedcuts, SCIP_ConsData::node, SCIP_ConsData::nodestoredcuts, SCIP_CALL(), and SCIPdebugMessage().

Referenced by addStoredCutsToActiveCuts(), and SCIP_DECL_CONSACTIVE().

◆ initializeAddedCuts()

SCIP_RETCODE initializeAddedCuts ( GCG * gcg,
SCIP_CONSDATA * consdata,
SCIP_CONSHDLRDATA * conshdlrdata )
static

stores the mastersepacuts generated and applied at this node to the branchdata

Parameters
gcgGCG data structure
consdataconstraint data of current constraint
conshdlrdataconstraint handler data

Definition at line 321 of file cons_masterbranch.c.

References SCIP_ConsData::addedcuts, SCIP_ConsData::addedcutsinit, assert(), SCIP_ConsData::firstnewcut, GCGcaptureMastersepacut(), GCGgetActiveMastersepacuts(), GCGgetMasterprob(), GCGgetNActiveMastersepacuts(), GCGremoveNewInactiveMastersepacuts(), initializeAddedCuts(), j, SCIP_ConsData::naddedcuts, SCIP_ConsData::node, SCIP_ConsData::nodestoredcuts, SCIP_CALL(), and SCIPdebugMessage().

Referenced by initializeAddedCuts(), initializeConsdata(), and SCIP_DECL_CONSDEACTIVE().

◆ initializeConsdata()

◆ addPendingBndChg()

SCIP_RETCODE addPendingBndChg ( SCIP * scip,
SCIP_VAR * var,
SCIP_BOUNDTYPE boundtype,
SCIP_Real oldbound,
SCIP_Real newbound )
static

add a global bound change on the original problem to the pending bound changes array

Parameters
scipSCIP data structure
varvariable on which the bound change is applied (corresponding master variable copy or pricing variable)
boundtypetype of the bound (lower or upper)
oldboundprevious bound value
newboundnew bound value

Definition at line 608 of file cons_masterbranch.c.

References addPendingBndChg(), assert(), CONSHDLR_NAME, SCIP_ConshdlrData::maxpendingbnds, SCIP_ConshdlrData::npendingbnds, SCIP_ConshdlrData::pendingbndsactivated, SCIP_ConshdlrData::pendingbndtypes, SCIP_ConshdlrData::pendingnewbnds, SCIP_ConshdlrData::pendingvarmaplb, SCIP_ConshdlrData::pendingvarmapub, SCIP_ConshdlrData::pendingvars, SCIP_CALL(), and var.

Referenced by addPendingBndChg(), and SCIP_DECL_EVENTEXEC().

◆ checkAggregatedGlobalBounds()

SCIP_Bool checkAggregatedGlobalBounds ( SCIP * scip,
SCIP_VAR * bndvar,
SCIP_BOUNDTYPE bndtype,
SCIP_Real bound )
static

For a given global bound change on a pricing variable, check if the global bounds on all corresponding original variables are still the same

Returns
TRUE if the variable is in a relevant block AND all variables identical to it have the same bounds
Parameters
scipSCIP data structure
bndvarpricing variable whose new global bound is to be checked
bndtypetype of the new global bound
boundnew global bound

Definition at line 673 of file cons_masterbranch.c.

References assert(), checkAggregatedGlobalBounds(), GCGpricingVarGetNOrigvars(), GCGpricingVarGetOrigvars(), GCGvarIsPricing(), and i.

Referenced by applyGlobalBndchgsToPricingprobs(), and checkAggregatedGlobalBounds().

◆ applyGlobalBndchgsToPricingprobs()

◆ applyGlobalBndchgsToPricedMastervars()

◆ resetPricingVarBound()

SCIP_RETCODE resetPricingVarBound ( GCG * gcg,
SCIP_VAR * pricingvar,
SCIP_CONSDATA * consdata,
int i,
int blocknr )
static

reset bound changes on pricing variables (called when a node is deactivated)

Parameters
gcgGCG data structure
pricingvarvariable on which the bound change should be performed
consdataconstraint data structure
iindex of the information in the constraint data structure
blocknrnumber of the pricing problem

Definition at line 932 of file cons_masterbranch.c.

References assert(), GCGgetMasterprob(), GCGgetNIdenticalBlocks(), GCGgetNPricingprobs(), GCGgetPricingprob(), i, SCIP_ConsData::localbndtypes, SCIP_ConsData::localbndvars, SCIP_ConsData::localnewbnds, SCIP_ConsData::localoldbnds, masterprob, SCIP_ConsData::nactivated, SCIP_ConsData::name, resetPricingVarBound(), SCIP_CALL(), and SCIPdebugMessage().

Referenced by resetPricingVarBound(), and undoLocalBndchgsToPricingprobs().

◆ tightenPricingVarBound()

SCIP_RETCODE tightenPricingVarBound ( GCG * gcg,
SCIP_VAR * pricingvar,
SCIP_CONSDATA * consdata,
int i,
int blocknr )
static

perform bound changes on pricing variables (called when a node is activated)

Parameters
gcgGCG data structure
pricingvarvariable on which the bound change should be performed
consdataconstraint data structure
iindex of the information in the constraint data structure
blocknrnumber of the pricing problem

Definition at line 1015 of file cons_masterbranch.c.

References assert(), GCGgetMasterprob(), GCGgetNPricingprobs(), GCGgetPricingprob(), i, SCIP_ConsData::localbndtypes, SCIP_ConsData::localbndvars, SCIP_ConsData::localnewbnds, SCIP_ConsData::localoldbnds, masterprob, SCIP_ConsData::nactivated, SCIP_CALL(), SCIPdebugMessage(), and tightenPricingVarBound().

Referenced by applyLocalBndchgsToPricingprobs(), and tightenPricingVarBound().

◆ checkAggregatedLocalBounds()

SCIP_Bool checkAggregatedLocalBounds ( SCIP * scip,
SCIP_VAR ** bndvars,
SCIP_Real * bounds,
int nbndvars,
SCIP_VAR * bndvar,
SCIP_BOUNDTYPE bndtype,
SCIP_VAR * pricingvar )
static

For a given local bound change on an original variable, check if the bounds on the variables identical to it are the same

Note
If the variable is represented by another one, we check only the representative; otherwise, we check all variables identical to it
Returns
TRUE if the variable is in a relevant block AND all variables identical to it have the same bounds
Parameters
scipSCIP data structure
bndvarsall variables whose local bounds were changed
boundscorresponding new local bounds
nbndvarsnumber of all variables whose local bounds were changed
bndvaroriginal variable whose local bound was changed and which is to be checked
bndtypetype of the new local bound
pricingvarpricing variable corresponding to the original variable

Definition at line 1076 of file cons_masterbranch.c.

References assert(), checkAggregatedLocalBounds(), GCGoriginalVarGetPricingVar(), GCGpricingVarGetNOrigvars(), GCGpricingVarGetOrigvars(), GCGvarGetBlock(), GCGvarIsOriginal(), GCGvarIsPricing(), i, j, SCIP_CALL(), and SCIPfreeBufferArray().

Referenced by applyLocalBndchgsToPricingprobs(), and checkAggregatedLocalBounds().

◆ applyLocalBndchgsToPricingprobs()

◆ undoLocalBndchgsToPricingprobs()

◆ ensureCollectedBndvarsSize()

◆ ensureLinkingvarIndxsSize()

SCIP_RETCODE ensureLinkingvarIndxsSize ( SCIP * scip,
SCIP_CONSHDLRDATA * conshdlrdata,
int minsize )
static

◆ applyLocalBndchgsToPricedMastervars()

◆ applyLocalBndchgsToCopiedMastervars()

SCIP_RETCODE applyLocalBndchgsToCopiedMastervars ( GCG * gcg,
SCIP_CONS * cons,
int * propcount )
static

apply local bound changes on original variables that have been directly copied to the master problem

Parameters
gcgGCG data structure
conscurrent masterbranch constraint
propcountnumber of applied bound changes

Definition at line 1629 of file cons_masterbranch.c.

References applyLocalBndchgsToCopiedMastervars(), assert(), GCGgetMasterprob(), GCGoriginalVarGetMastervars(), GCGoriginalVarGetNMastervars(), GCGvarGetBlock(), GCGvarIsOriginal(), i, SCIP_ConsData::localbndtypes, SCIP_ConsData::localbndvars, SCIP_ConsData::localnewbnds, masterprob, SCIP_ConsData::nlocalbndchgs, SCIP_CALL(), and SCIPdebugMessage().

Referenced by applyLocalBndchgsToCopiedMastervars(), and SCIP_DECL_CONSPROP().

◆ forwardUpdateSeenHistory()

◆ SCIP_DECL_CONSFREE()

SCIP_DECL_CONSFREE ( consFreeMasterbranch )
static

destructor of constraint handler to free constraint handler data (called when SCIP is exiting)

Definition at line 1730 of file cons_masterbranch.c.

References assert(), CONSHDLR_NAME, SCIP_DECL_CONSFREE(), SCIPfreeMemory(), and SCIP_ConshdlrData::stack.

◆ SCIP_DECL_CONSINIT()

◆ SCIP_DECL_CONSINITSOL()

SCIP_DECL_CONSINITSOL ( consInitsolMasterbranch )
static

solving process initialization method of constraint handler (called when branch and bound process is about to begin)

Definition at line 1797 of file cons_masterbranch.c.

References assert(), CONSHDLR_NAME, SCIP_ConshdlrData::gcg, GCGconsOrigbranchGetActiveCons(), GCGconsOrigbranchSetMastercons(), GCGcreateConsMasterbranch(), SCIP_ConshdlrData::nstack, SCIP_CALL(), SCIP_DECL_CONSINITSOL(), and SCIP_ConshdlrData::stack.

Referenced by SCIP_DECL_CONSINITSOL(), and SCIP_DECL_CONSINITSOL().

◆ SCIP_DECL_CONSEXITSOL()

◆ SCIP_DECL_CONSEXIT()

◆ SCIP_DECL_CONSACTIVE()

◆ SCIP_DECL_CONSDEACTIVE()

◆ SCIP_DECL_CONSDELETE()

◆ SCIP_DECL_CONSPROP()

◆ SCIP_DECL_CONSENFOLP()

SCIP_DECL_CONSENFOLP ( consEnfolpMasterbranch )
static

enforcement method for LP solutions

Definition at line 2354 of file cons_masterbranch.c.

References result.

◆ SCIP_DECL_CONSENFOPS()

SCIP_DECL_CONSENFOPS ( consEnfopsMasterbranch )
static

enforcement method for pseudo solutions

Definition at line 2363 of file cons_masterbranch.c.

References result.

◆ SCIP_DECL_CONSCHECK()

SCIP_DECL_CONSCHECK ( consCheckMasterbranch )
static

check method for solutions

Definition at line 2372 of file cons_masterbranch.c.

References result.

◆ SCIP_DECL_CONSLOCK()

SCIP_DECL_CONSLOCK ( consLockMasterbranch )
static

variable lock method

Definition at line 2381 of file cons_masterbranch.c.

◆ SCIP_DECL_EVENTINITSOL()

SCIP_DECL_EVENTINITSOL ( eventInitsolOrigvarbound )
static

solving process initialization method of event handler (called when branch and bound process is about to begin)

Definition at line 2393 of file cons_masterbranch.c.

References i, nvars, SCIP_CALL(), and vars.

◆ SCIP_DECL_EVENTFREE()

SCIP_DECL_EVENTFREE ( eventFreeOrigvarbound )
static

eventhdlr destructor

Definition at line 2413 of file cons_masterbranch.c.

References assert().

◆ SCIP_DECL_EVENTEXEC()

◆ GCGincludeConshdlrMasterbranch()

◆ GCGcreateConsMasterbranch()

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
gcgGCG data structure
conspointer to hold the created constraint
namename of the constraint
nodenode at which the constraint should be created
parentconsparent constraint
branchrulepointer to the branching rule
branchdatabranching data
origbranchconssoriginal constraints enforcing the branching decision
norigbranchconssnumber of original constraints
maxorigbranchconsscapacity of origbranchconss

Definition at line 2670 of file cons_masterbranch.c.

References SCIP_ConsData::addedcuts, SCIP_ConsData::addedcutsinit, assert(), SCIP_ConsData::branchdata, SCIP_ConsData::branchrule, SCIP_ConsData::childconss, CONSHDLR_NAME, SCIP_ConsData::copiedvarbnds, SCIP_ConsData::copiedvarbndtypes, SCIP_ConsData::copiedvars, SCIP_ConsData::firstnewcut, GCGcreateConsMasterbranch(), GCGgetCurrentVarhistoryReference(), GCGgetMasterprob(), GCGgetOrigprob(), GCGstashLimitSettings(), GCGvarhistoryCopyReference(), SCIP_ConsData::knownvarhistory, SCIP_ConsData::localbndtypes, SCIP_ConsData::localbndvars, SCIP_ConsData::localnewbnds, SCIP_ConsData::localoldbnds, masterprob, 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, SCIP_ConsData::origbranchconss, SCIP_ConsData::origcons, SCIP_ConsData::parentcons, SCIP_ConsData::probingtmpcons, SCIP_CALL(), and SCIPdebugMessage().

Referenced by branchDirectlyOnMastervar(), branchVar(), createChildNodesCompBndSeq(), createChildNodesGeneric(), createChildNodesRyanfoster(), GCGcreateConsMasterbranch(), GCGrelaxNewProbingnodeMaster(), GCGrelaxNewProbingnodeMasterCons(), and SCIP_DECL_CONSINITSOL().

◆ GCGconsMasterbranchGetName()

char * GCGconsMasterbranchGetName ( SCIP_CONS * cons)

returns the name of the constraint

Parameters
consmasterbranch constraint for which the data is requested

Definition at line 2800 of file cons_masterbranch.c.

References assert(), GCGconsMasterbranchGetName(), and SCIP_ConsData::name.

Referenced by createOrigbranchConstraint(), and GCGconsMasterbranchGetName().

◆ GCGconsMasterbranchGetNode()

SCIP_NODE * GCGconsMasterbranchGetNode ( SCIP_CONS * cons)

returns the node in the B&B tree at which the given masterbranch constraint is sticking

Parameters
consconstraint pointer

Definition at line 2813 of file cons_masterbranch.c.

References assert(), GCGconsMasterbranchGetNode(), and SCIP_ConsData::node.

Referenced by applyOriginalBranching(), createBranchNodesInOrigprob(), GCGconsMasterbranchGetNode(), GCGcurrentNodeIsGeneric(), SCIP_DECL_EVENTEXEC(), and SCIP_DECL_NODESELSELECT().

◆ GCGconsMasterbranchGetParentcons()

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
consconstraint pointer

Definition at line 2828 of file cons_masterbranch.c.

References assert(), GCGconsMasterbranchGetParentcons(), and SCIP_ConsData::parentcons.

Referenced by GCGconsMasterbranchGetParentcons(), initBranch(), pruneChildNodeByDominanceGeneric(), and SCIP_DECL_EVENTEXEC().

◆ GCGconsMasterbranchGetNChildconss()

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
consconstraint pointer

Definition at line 2843 of file cons_masterbranch.c.

References assert(), GCGconsMasterbranchGetNChildconss(), and SCIP_ConsData::nchildconss.

Referenced by checkchildconsS(), createBranchNodesInOrigprob(), and GCGconsMasterbranchGetNChildconss().

◆ GCGconsMasterbranchGetChildcons()

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
consconstraint pointer
childnrindex of the child node

Definition at line 2858 of file cons_masterbranch.c.

References assert(), SCIP_ConsData::childconss, GCGconsMasterbranchGetChildcons(), and SCIP_ConsData::nchildconss.

Referenced by checkchildconsS(), createBranchNodesInOrigprob(), and GCGconsMasterbranchGetChildcons().

◆ GCGconsMasterbranchGetOrigcons()

SCIP_CONS * GCGconsMasterbranchGetOrigcons ( SCIP_CONS * cons)

returns the origbranch constraint of the node in the original program corresponding to the node at which the given masterbranch constraint is sticking

returns the origbranch constraint of the node in the original program corresponding to the node which the given masterbranch constraint is sticking

Parameters
consconstraint pointer

Definition at line 2877 of file cons_masterbranch.c.

References assert(), GCGconsMasterbranchGetOrigcons(), and SCIP_ConsData::origcons.

Referenced by GCGconsMasterbranchGetOrigcons(), GCGconsOrigbranchCheckConsistency(), and SCIP_DECL_CONSDELETE().

◆ GCGconsMasterbranchSetOrigcons()

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
consconstraint pointer
origconsoriginal branching constraint

Definition at line 2892 of file cons_masterbranch.c.

References assert(), GCGconsMasterbranchSetOrigcons(), and SCIP_ConsData::origcons.

Referenced by createOrigbranchConstraint(), GCGconsMasterbranchSetOrigcons(), and SCIP_DECL_CONSDELETE().

◆ GCGconsMasterbranchGetBranchdata()

GCG_BRANCHDATA * GCGconsMasterbranchGetBranchdata ( SCIP_CONS * cons)

returns the branching data for a given masterbranch constraint

Parameters
consconstraint pointer

Definition at line 2907 of file cons_masterbranch.c.

References assert(), SCIP_ConsData::branchdata, and GCGconsMasterbranchGetBranchdata().

Referenced by applyOriginalBranching(), checkchildconsS(), createOrigbranchConstraint(), GCGconsMasterbranchGetBranchdata(), initBranch(), pruneChildNodeByDominanceGeneric(), and SCIP_DECL_EVENTEXEC().

◆ GCGconsMasterbranchSetBranchdata()

void GCGconsMasterbranchSetBranchdata ( SCIP_CONS * cons,
GCG_BRANCHDATA * branchdata )

sets the branching data for a given masterbranch constraint

Parameters
consmasterbranch constraint for which the branching data is requested
branchdatabranching data

Definition at line 2919 of file cons_masterbranch.c.

References assert(), SCIP_ConsData::branchdata, and GCGconsMasterbranchSetBranchdata().

Referenced by GCGconsMasterbranchSetBranchdata(), and SCIP_DECL_CONSDELETE().

◆ GCGconsMasterbranchGetBranchrule()

GCG_BRANCHRULE * GCGconsMasterbranchGetBranchrule ( SCIP_CONS * cons)

◆ GCGconsMasterbranchAddCopiedVarBndchg()

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
gcgGCG data structure
consmasterbranch constraint to which the bound change is added
varvariable on which the bound change was performed
boundtypebound type of the bound change
newboundnew bound of the variable after the bound change

Definition at line 2946 of file cons_masterbranch.c.

References assert(), SCIP_ConsData::copiedvarbnds, SCIP_ConsData::copiedvarbndtypes, SCIP_ConsData::copiedvars, GCGconsMasterbranchAddCopiedVarBndchg(), GCGgetMasterprob(), GCGisMaster(), SCIP_ConsData::maxcopiedvarbnds, SCIP_ConsData::ncopiedvarbnds, SCIP_ConsData::node, SCIP_CALL(), SCIPdebugMessage(), and var.

Referenced by applyOriginalBranching(), and GCGconsMasterbranchAddCopiedVarBndchg().

◆ GCGconsMasterbranchGetOrigbranchConss()

SCIP_CONS ** GCGconsMasterbranchGetOrigbranchConss ( SCIP_CONS * cons)

returns the constraints in the original problem that enforce the branching decision

Parameters
consmasterbranch constraint for which the data is requested

Definition at line 2993 of file cons_masterbranch.c.

References assert(), GCGconsMasterbranchGetOrigbranchConss(), and SCIP_ConsData::origbranchconss.

Referenced by createOrigbranchConstraint(), and GCGconsMasterbranchGetOrigbranchConss().

◆ GCGconsMasterbranchGetNOrigbranchConss()

int GCGconsMasterbranchGetNOrigbranchConss ( SCIP_CONS * cons)

returns the number of constraints in the original problem that enforce the branching decision

Parameters
consmasterbranch constraint for which the data is requested

Definition at line 3006 of file cons_masterbranch.c.

References assert(), GCGconsMasterbranchGetNOrigbranchConss(), and SCIP_ConsData::norigbranchconss.

Referenced by createOrigbranchConstraint(), and GCGconsMasterbranchGetNOrigbranchConss().

◆ GCGconsMasterbranchReleaseOrigbranchConss()

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
gcgGCG instance
consmasterbranch constraint for which the data is freed

Definition at line 3021 of file cons_masterbranch.c.

References assert(), c, GCGconsMasterbranchReleaseOrigbranchConss(), GCGgetMasterprob(), GCGgetOrigprob(), GCGisMaster(), GCGisOriginal(), SCIP_ConsData::maxorigbranchconss, SCIP_ConsData::norigbranchconss, SCIP_ConsData::origbranchconss, and SCIP_CALL().

Referenced by createOrigbranchConstraint(), GCGconsMasterbranchReleaseOrigbranchConss(), and SCIP_DECL_CONSDELETE().

◆ GCGconsMasterbranchGetActiveCons()

◆ GCGconsMasterbranchGetStack()

void GCGconsMasterbranchGetStack ( GCG * gcg,
SCIP_CONS *** stack,
int * nstackelements )

returns the stack and the number of elements on it

Parameters
gcgGCG data structure
stackreturn value: pointer to the stack
nstackelementsreturn value: pointer to int, for number of elements on the stack

Definition at line 3086 of file cons_masterbranch.c.

References assert(), CONSHDLR_NAME, GCGconsMasterbranchGetStack(), GCGgetMasterprob(), SCIP_ConshdlrData::nstack, and SCIP_ConshdlrData::stack.

Referenced by GCGconsMasterbranchGetStack().

◆ GCGconsMasterbranchGetNStackelements()

int GCGconsMasterbranchGetNStackelements ( GCG * gcg)

returns the number of elements on the stack

Parameters
gcgGCG data structure

Definition at line 3110 of file cons_masterbranch.c.

References assert(), CONSHDLR_NAME, GCGconsMasterbranchGetNStackelements(), GCGgetMasterprob(), SCIP_ConshdlrData::nstack, and SCIP_ConshdlrData::stack.

Referenced by GCGconsMasterbranchGetNStackelements().

◆ GCGconsMasterbranchAddRootCons()

SCIP_RETCODE GCGconsMasterbranchAddRootCons ( GCG * gcg)

◆ GCGconsMasterbranchActiveCutRemoved()

SCIP_RETCODE GCGconsMasterbranchActiveCutRemoved ( GCG * gcg,
int removedidx )

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

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

Parameters
gcgGCG data structure
removedidxposition the removed cut had in the active cuts

Definition at line 3161 of file cons_masterbranch.c.

References assert(), CONSHDLR_NAME, SCIP_ConsData::firstnewcut, GCGconsMasterbranchActiveCutRemoved(), GCGgetMasterprob(), i, masterprob, SCIP_ConshdlrData::nstack, and SCIP_ConshdlrData::stack.

Referenced by eventRowDeletedFromLP(), and GCGconsMasterbranchActiveCutRemoved().

◆ GCGcurrentNodeIsGeneric()

◆ GCGconsMasterbranchCheckConsistency()

void GCGconsMasterbranchCheckConsistency ( GCG * gcg)