Scippy

GCG

Branch-and-Price & Column Generation for Everyone

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.h"
#include "branch_generic.h"
#include "cons_masterbranch.h"
#include "cons_origbranch.h"
#include "relax_gcg.h"
#include "pricer_gcg.h"
#include "scip/cons_linear.h"

Go to the source code of this file.

Data Structures

struct  SCIP_ConsData
 
struct  SCIP_ConshdlrData
 

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 initializeConsdata (SCIP *scip, 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 (SCIP *scip)
 
static SCIP_RETCODE applyGlobalBndchgsToPricedMastervars (SCIP *scip, int *propcount)
 
static SCIP_RETCODE resetPricingVarBound (SCIP *scip, SCIP_VAR *pricingvar, SCIP_CONSDATA *consdata, int i, int blocknr)
 
static SCIP_RETCODE tightenPricingVarBound (SCIP *scip, 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 (SCIP *scip, SCIP_CONS *cons)
 
static SCIP_RETCODE undoLocalBndchgsToPricingprobs (SCIP *scip, 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 (SCIP *scip, SCIP_CONS *cons, int *propcount)
 
static SCIP_RETCODE applyLocalBndchgsToCopiedMastervars (SCIP *scip, SCIP_CONS *cons, int *propcount)
 
static SCIP_DECL_CONSFREE (consFreeMasterbranch)
 
static SCIP_DECL_CONSINIT (consInitMasterbranch)
 
static SCIP_DECL_CONSINITSOL (consInitsolMasterbranch)
 
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_EVENTEXEC (eventExecOrigvarbound)
 
SCIP_RETCODE SCIPincludeConshdlrMasterbranch (SCIP *scip)
 
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)
 
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_BRANCHDATAGCGconsMasterbranchGetBranchdata (SCIP_CONS *cons)
 
SCIP_BRANCHRULE * GCGconsMasterbranchGetBranchrule (SCIP_CONS *cons)
 
SCIP_RETCODE GCGconsMasterbranchAddCopiedVarBndchg (SCIP *scip, 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 (SCIP *masterscip, SCIP *origscip, SCIP_CONS *cons)
 
SCIP_CONS * GCGconsMasterbranchGetActiveCons (SCIP *scip)
 
void GCGconsMasterbranchGetStack (SCIP *scip, SCIP_CONS ***stack, int *nstackelements)
 
int GCGconsMasterbranchGetNStackelements (SCIP *scip)
 
SCIP_RETCODE GCGconsMasterbranchAddRootCons (SCIP *scip)
 
SCIP_Bool GCGcurrentNodeIsGeneric (SCIP *scip)
 
void GCGconsMasterbranchCheckConsistency (SCIP *scip)
 

Macro Definition Documentation

◆ CONSHDLR_NAME

#define CONSHDLR_NAME   "masterbranch"

Definition at line 55 of file cons_masterbranch.c.

◆ CONSHDLR_DESC

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

Definition at line 56 of file cons_masterbranch.c.

◆ CONSHDLR_ENFOPRIORITY

#define CONSHDLR_ENFOPRIORITY   0

priority of the constraint handler for constraint enforcing

Definition at line 57 of file cons_masterbranch.c.

◆ CONSHDLR_CHECKPRIORITY

#define CONSHDLR_CHECKPRIORITY   2000000

priority of the constraint handler for checking feasibility

Definition at line 58 of file cons_masterbranch.c.

◆ CONSHDLR_PROPFREQ

#define CONSHDLR_PROPFREQ   1

frequency for propagating domains; zero means only preprocessing propagation

Definition at line 59 of file cons_masterbranch.c.

◆ 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 60 of file cons_masterbranch.c.

◆ CONSHDLR_DELAYPROP

#define CONSHDLR_DELAYPROP   FALSE

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

Definition at line 62 of file cons_masterbranch.c.

◆ CONSHDLR_NEEDSCONS

#define CONSHDLR_NEEDSCONS   TRUE

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

Definition at line 63 of file cons_masterbranch.c.

◆ CONSHDLR_PROPTIMING

#define CONSHDLR_PROPTIMING   SCIP_PROPTIMING_ALWAYS

Definition at line 64 of file cons_masterbranch.c.

◆ EVENTHDLR_NAME

#define EVENTHDLR_NAME   "origvarbound"

Definition at line 66 of file cons_masterbranch.c.

◆ EVENTHDLR_DESC

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

Definition at line 67 of file cons_masterbranch.c.

Function Documentation

◆ initializeConsdata()

static SCIP_RETCODE initializeConsdata ( SCIP *  scip,
SCIP_CONS *  cons 
)
static

initialize the consdata data structure

Parameters
scipSCIP data structure
consconstraint for which the consdata is created

Definition at line 153 of file cons_masterbranch.c.

References CONSHDLR_NAME, GCGconsOrigbranchGetActiveCons(), GCGconsOrigbranchGetNChildconss(), GCGconsOrigbranchGetNode(), GCGconsOrigbranchGetParentcons(), GCGconsOrigbranchSetMastercons(), GCGisMaster(), and GCGmasterGetOrigprob().

Referenced by SCIP_DECL_CONSACTIVE().

◆ addPendingBndChg()

static 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 364 of file cons_masterbranch.c.

References CONSHDLR_NAME.

Referenced by SCIP_DECL_EVENTEXEC().

◆ checkAggregatedGlobalBounds()

static 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 417 of file cons_masterbranch.c.

References GCGpricingVarGetNOrigvars(), GCGpricingVarGetOrigvars(), and GCGvarIsPricing().

Referenced by applyGlobalBndchgsToPricingprobs().

◆ applyGlobalBndchgsToPricingprobs()

static SCIP_RETCODE applyGlobalBndchgsToPricingprobs ( SCIP *  scip)
static

apply global bound changes on original problem variables either to their copies in the master problem and/or to the corresponding pricing problem variables

Definition at line 462 of file cons_masterbranch.c.

References checkAggregatedGlobalBounds(), CONSHDLR_NAME, GCGgetPricingprob(), GCGisMaster(), GCGmasterGetOrigprob(), GCGvarGetBlock(), GCGvarIsMaster(), and GCGvarIsPricing().

Referenced by SCIP_DECL_CONSACTIVE().

◆ applyGlobalBndchgsToPricedMastervars()

static SCIP_RETCODE applyGlobalBndchgsToPricedMastervars ( SCIP *  scip,
int *  propcount 
)
static

◆ resetPricingVarBound()

static SCIP_RETCODE resetPricingVarBound ( SCIP *  scip,
SCIP_VAR *  pricingvar,
SCIP_CONSDATA *  consdata,
int  i,
int  blocknr 
)
static

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

Parameters
scipSCIP 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 686 of file cons_masterbranch.c.

References GCGgetNIdenticalBlocks(), GCGgetNPricingprobs(), GCGgetPricingprob(), and GCGmasterGetOrigprob().

Referenced by undoLocalBndchgsToPricingprobs().

◆ tightenPricingVarBound()

static SCIP_RETCODE tightenPricingVarBound ( SCIP *  scip,
SCIP_VAR *  pricingvar,
SCIP_CONSDATA *  consdata,
int  i,
int  blocknr 
)
static

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

Parameters
scipSCIP 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 774 of file cons_masterbranch.c.

References GCGgetNPricingprobs(), GCGgetPricingprob(), and GCGmasterGetOrigprob().

Referenced by applyLocalBndchgsToPricingprobs().

◆ checkAggregatedLocalBounds()

static 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 837 of file cons_masterbranch.c.

References GCGoriginalVarGetPricingVar(), GCGpricingVarGetNOrigvars(), GCGpricingVarGetOrigvars(), GCGvarGetBlock(), GCGvarIsOriginal(), and GCGvarIsPricing().

Referenced by applyLocalBndchgsToPricingprobs().

◆ applyLocalBndchgsToPricingprobs()

static SCIP_RETCODE applyLocalBndchgsToPricingprobs ( SCIP *  scip,
SCIP_CONS *  cons 
)
static

◆ undoLocalBndchgsToPricingprobs()

static SCIP_RETCODE undoLocalBndchgsToPricingprobs ( SCIP *  scip,
SCIP_CONS *  cons 
)
static

◆ ensureCollectedBndvarsSize()

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

Definition at line 1109 of file cons_masterbranch.c.

Referenced by applyLocalBndchgsToPricedMastervars().

◆ ensureLinkingvarIndxsSize()

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

Definition at line 1129 of file cons_masterbranch.c.

Referenced by applyLocalBndchgsToPricedMastervars().

◆ applyLocalBndchgsToPricedMastervars()

static SCIP_RETCODE applyLocalBndchgsToPricedMastervars ( SCIP *  scip,
SCIP_CONS *  cons,
int *  propcount 
)
static

apply local bound changes on the original variables on newly generated master variables

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

Definition at line 1148 of file cons_masterbranch.c.

References CONSHDLR_NAME, ensureCollectedBndvarsSize(), ensureLinkingvarIndxsSize(), GCGgetNPricingprobs(), GCGisLinkingVarInBlock(), GCGisMaster(), GCGmasterGetNPricedvars(), GCGmasterGetOrigprob(), GCGmasterGetPricedvars(), GCGmasterVarGetOrigvalmap(), GCGoriginalVarIsLinking(), GCGvarGetBlock(), GCGvarIsMaster(), and GCGvarIsOriginal().

Referenced by SCIP_DECL_CONSPROP().

◆ applyLocalBndchgsToCopiedMastervars()

static SCIP_RETCODE applyLocalBndchgsToCopiedMastervars ( SCIP *  scip,
SCIP_CONS *  cons,
int *  propcount 
)
static

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

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

Definition at line 1405 of file cons_masterbranch.c.

References GCGoriginalVarGetMastervars(), GCGoriginalVarGetNMastervars(), GCGvarGetBlock(), and GCGvarIsOriginal().

Referenced by SCIP_DECL_CONSPROP().

◆ SCIP_DECL_CONSFREE()

static SCIP_DECL_CONSFREE ( consFreeMasterbranch  )
static

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

Definition at line 1466 of file cons_masterbranch.c.

References CONSHDLR_NAME.

◆ SCIP_DECL_CONSINIT()

static SCIP_DECL_CONSINIT ( consInitMasterbranch  )
static

initialization method of constraint handler (called after problem was transformed)

Definition at line 1487 of file cons_masterbranch.c.

References CONSHDLR_NAME, GCGgetNPricingprobs(), and GCGmasterGetOrigprob().

◆ SCIP_DECL_CONSINITSOL()

static 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 1532 of file cons_masterbranch.c.

References CONSHDLR_NAME, GCGconsOrigbranchGetActiveCons(), GCGconsOrigbranchSetMastercons(), GCGcreateConsMasterbranch(), and GCGmasterGetOrigprob().

◆ SCIP_DECL_CONSEXIT()

static SCIP_DECL_CONSEXIT ( consExitMasterbranch  )
static

deinitialization method of constraint handler (called before transformed problem is freed)

Definition at line 1557 of file cons_masterbranch.c.

References CONSHDLR_NAME.

◆ SCIP_DECL_CONSACTIVE()

static SCIP_DECL_CONSACTIVE ( consActiveMasterbranch  )
static

◆ SCIP_DECL_CONSDEACTIVE()

static SCIP_DECL_CONSDEACTIVE ( consDeactiveMasterbranch  )
static

constraint deactivation notification method of constraint handler

Definition at line 1700 of file cons_masterbranch.c.

References CONSHDLR_NAME, GCGmasterGetNPricedvars(), GCGmasterGetOrigprob(), GCGrelaxBranchDeactiveMaster(), and undoLocalBndchgsToPricingprobs().

◆ SCIP_DECL_CONSDELETE()

static SCIP_DECL_CONSDELETE ( consDeleteMasterbranch  )
static

◆ SCIP_DECL_CONSPROP()

static SCIP_DECL_CONSPROP ( consPropMasterbranch  )
static

◆ SCIP_DECL_CONSENFOLP()

static SCIP_DECL_CONSENFOLP ( consEnfolpMasterbranch  )
static

enforcement method for LP solutions

Definition at line 1989 of file cons_masterbranch.c.

◆ SCIP_DECL_CONSENFOPS()

static SCIP_DECL_CONSENFOPS ( consEnfopsMasterbranch  )
static

enforcement method for pseudo solutions

Definition at line 1998 of file cons_masterbranch.c.

◆ SCIP_DECL_CONSCHECK()

static SCIP_DECL_CONSCHECK ( consCheckMasterbranch  )
static

check method for solutions

Definition at line 2007 of file cons_masterbranch.c.

◆ SCIP_DECL_CONSLOCK()

static SCIP_DECL_CONSLOCK ( consLockMasterbranch  )
static

variable lock method

Definition at line 2016 of file cons_masterbranch.c.

◆ SCIP_DECL_EVENTINITSOL()

static 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 2028 of file cons_masterbranch.c.

◆ SCIP_DECL_EVENTEXEC()

◆ SCIPincludeConshdlrMasterbranch()

SCIP_RETCODE SCIPincludeConshdlrMasterbranch ( SCIP *  scip)

creates the handler for masterbranch constraints and includes it in SCIP

Parameters
scipSCIP data structure

Definition at line 2223 of file cons_masterbranch.c.

References CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYPROP, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PROPFREQ, CONSHDLR_PROPTIMING, EVENTHDLR_DESC, EVENTHDLR_NAME, and GCGmasterGetOrigprob().

Referenced by GCGincludeMasterPlugins().

◆ GCGcreateConsMasterbranch()

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 
)

creates and captures a masterbranch constraint

Parameters
scipSCIP 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 2278 of file cons_masterbranch.c.

References CONSHDLR_NAME, and GCGmasterGetOrigprob().

Referenced by branchDirectlyOnMastervar(), branchVar(), createChildNodesGeneric(), createChildNodesRyanfoster(), 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 2391 of file cons_masterbranch.c.

Referenced by createOrigbranchConstraint().

◆ 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 2404 of file cons_masterbranch.c.

Referenced by createBranchNodesInOrigprob(), GCGcurrentNodeIsGeneric(), 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 2419 of file cons_masterbranch.c.

Referenced by GCGbranchGenericInitbranch(), 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 2434 of file cons_masterbranch.c.

Referenced by checkchildconsS(), and createBranchNodesInOrigprob().

◆ 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 2449 of file cons_masterbranch.c.

Referenced by checkchildconsS(), and createBranchNodesInOrigprob().

◆ 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

Parameters
consconstraint pointer

Definition at line 2468 of file cons_masterbranch.c.

Referenced by 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 2483 of file cons_masterbranch.c.

Referenced by createOrigbranchConstraint(), 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 2498 of file cons_masterbranch.c.

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

◆ GCGconsMasterbranchGetBranchrule()

SCIP_BRANCHRULE* GCGconsMasterbranchGetBranchrule ( SCIP_CONS *  cons)

returns the branching rule of the constraint

Parameters
consmasterbranch constraint for which the data is requested

Definition at line 2511 of file cons_masterbranch.c.

Referenced by checkchildconsS(), createBranchNodesInOrigprob(), createOrigbranchConstraint(), GCGbranchGenericInitbranch(), GCGcurrentNodeIsGeneric(), ObjPricerGcg::pricingLoop(), pruneChildNodeByDominanceGeneric(), and SCIP_DECL_EVENTEXEC().

◆ GCGconsMasterbranchAddCopiedVarBndchg()

SCIP_RETCODE GCGconsMasterbranchAddCopiedVarBndchg ( SCIP *  scip,
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
scipSCIP 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 2524 of file cons_masterbranch.c.

References GCGisMaster().

Referenced by applyOriginalBranching().

◆ 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 2568 of file cons_masterbranch.c.

Referenced by createOrigbranchConstraint().

◆ 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 2581 of file cons_masterbranch.c.

Referenced by createOrigbranchConstraint().

◆ GCGconsMasterbranchReleaseOrigbranchConss()

SCIP_RETCODE GCGconsMasterbranchReleaseOrigbranchConss ( SCIP *  masterscip,
SCIP *  origscip,
SCIP_CONS *  cons 
)

releases the constraints in the original problem that enforce the branching decision and frees the array holding the constraints

Parameters
masterscipmaster problem SCIP instance
origsciporiginal SCIP instance
consmasterbranch constraint for which the data is freed

Definition at line 2596 of file cons_masterbranch.c.

References GCGisMaster(), and GCGisOriginal().

Referenced by createOrigbranchConstraint(), and SCIP_DECL_CONSDELETE().

◆ GCGconsMasterbranchGetActiveCons()

SCIP_CONS* GCGconsMasterbranchGetActiveCons ( SCIP *  scip)

◆ GCGconsMasterbranchGetStack()

void GCGconsMasterbranchGetStack ( SCIP *  scip,
SCIP_CONS ***  stack,
int *  nstackelements 
)

returns the stack and the number of elements on it

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

Definition at line 2655 of file cons_masterbranch.c.

References CONSHDLR_NAME.

◆ GCGconsMasterbranchGetNStackelements()

int GCGconsMasterbranchGetNStackelements ( SCIP *  scip)

returns the number of elements on the stack

Parameters
scipSCIP data structure

Definition at line 2677 of file cons_masterbranch.c.

References CONSHDLR_NAME.

◆ GCGconsMasterbranchAddRootCons()

SCIP_RETCODE GCGconsMasterbranchAddRootCons ( SCIP *  scip)

adds initial constraint to root node

Parameters
scipSCIP data structure

Definition at line 2696 of file cons_masterbranch.c.

References CONSHDLR_NAME.

Referenced by SCIP_DECL_PRICERFARKAS(), and SCIP_DECL_PRICERREDCOST().

◆ GCGcurrentNodeIsGeneric()

SCIP_Bool GCGcurrentNodeIsGeneric ( SCIP *  scip)

check whether the node was generated by generic branching

Parameters
scipSCIP data structure

Definition at line 2722 of file cons_masterbranch.c.

References GCGconsMasterbranchGetActiveCons(), GCGconsMasterbranchGetBranchrule(), GCGconsMasterbranchGetNode(), and GCGisMaster().

Referenced by SCIP_DECL_BRANCHEXECEXT(), SCIP_DECL_BRANCHEXECLP(), and SCIP_DECL_BRANCHEXECPS().

◆ GCGconsMasterbranchCheckConsistency()

void GCGconsMasterbranchCheckConsistency ( SCIP *  scip)

checks the consistency of the masterbranch constraints in the problem

Parameters
scipSCIP data structure

Definition at line 2747 of file cons_masterbranch.c.

References CONSHDLR_NAME, GCGconsOrigbranchGetMastercons(), and GCGconsOrigbranchGetParentcons().

Referenced by SCIP_DECL_NODESELSELECT().