cons_origbranch.h File Reference

Detailed Description

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

Author
Gerald Gamrath

Definition in file cons_origbranch.h.

#include "scip/scip.h"
#include "type_branchgcg.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPincludeConshdlrOrigbranch (SCIP *scip)
 
SCIP_RETCODE GCGcreateConsOrigbranch (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_NODE *node, SCIP_CONS *parentcons, SCIP_BRANCHRULE *branchrule, GCG_BRANCHDATA *branchdata)
 
SCIP_CONS * GCGconsOrigbranchGetActiveCons (SCIP *scip)
 
void GCGconsOrigbranchGetStack (SCIP *scip, SCIP_CONS ***stack, int *nstackelements)
 
void GCGconsOrigbranchSetBranchdata (SCIP_CONS *cons, GCG_BRANCHDATA *branchdata)
 
GCG_BRANCHDATAGCGconsOrigbranchGetBranchdata (SCIP_CONS *cons)
 
SCIP_BRANCHRULE * GCGconsOrigbranchGetBranchrule (SCIP_CONS *cons)
 
SCIP_NODE * GCGconsOrigbranchGetNode (SCIP_CONS *cons)
 
SCIP_CONS * GCGconsOrigbranchGetParentcons (SCIP_CONS *cons)
 
int GCGconsOrigbranchGetNChildconss (SCIP_CONS *cons)
 
SCIP_CONS * GCGconsOrigbranchGetChildcons (SCIP_CONS *cons, int childnr)
 
void GCGconsOrigbranchSetMastercons (SCIP_CONS *cons, SCIP_CONS *mastercons)
 
SCIP_CONS * GCGconsOrigbranchGetMastercons (SCIP_CONS *cons)
 
SCIP_RETCODE GCGconsOrigbranchAddRootCons (SCIP *scip)
 
void GCGconsOrigbranchCheckConsistency (SCIP *scip)
 

Function Documentation

SCIP_RETCODE GCGconsOrigbranchAddRootCons ( SCIP *  scip)

adds initial constraint to root node

Parameters
scipSCIP data structure

Definition at line 705 of file cons_origbranch.c.

References CONSHDLR_NAME, GCGconsOrigbranchCheckConsistency(), and GCGcreateConsOrigbranch().

Referenced by GCGconsOrigbranchGetMastercons(), and initializeMasterProblemSolve().

void GCGconsOrigbranchCheckConsistency ( SCIP *  scip)

checks the consistency of the origbranch constraints in the problem

Parameters
scipSCIP data structure

Definition at line 746 of file cons_origbranch.c.

References CONSHDLR_NAME, and GCGconsMasterbranchGetOrigcons().

Referenced by GCGconsOrigbranchAddRootCons(), SCIP_DECL_CONSINITSOL(), and SCIP_DECL_NODESELSELECT().

SCIP_CONS* GCGconsOrigbranchGetActiveCons ( SCIP *  scip)

returns the branch orig constraint of the current node, only needs the pointer to scip

Parameters
scipSCIP data structure

Definition at line 524 of file cons_origbranch.c.

References CONSHDLR_NAME, and GCGconsOrigbranchGetStack().

Referenced by createBranchNodesInOrigprob(), createOrigbranchConstraint(), GCGcreateConsOrigbranch(), GCGrelaxNewProbingnodeOrig(), initializeConsdata(), relaxExecGcgDantzigWolfe(), SCIP_DECL_CONSINITSOL(), and SCIP_DECL_NODESELSELECT().

GCG_BRANCHDATA* GCGconsOrigbranchGetBranchdata ( SCIP_CONS *  cons)

returns the branching data for a given origbranch constraint

Parameters
consorigbranch constraint for which the branching data is requested

Definition at line 580 of file cons_origbranch.c.

References GCGconsOrigbranchGetBranchrule().

Referenced by GCGconsOrigbranchSetBranchdata(), relaxExecGcgDantzigWolfe(), SCIP_DECL_BRANCHEXECPS(), and SCIP_DECL_CONSEXITSOL().

SCIP_BRANCHRULE* GCGconsOrigbranchGetBranchrule ( SCIP_CONS *  cons)

returns the branching rule for a given origbranch constraint

Parameters
consorigbranch constraint for which the branchrule is requested

Definition at line 593 of file cons_origbranch.c.

References GCGconsOrigbranchGetNode().

Referenced by GCGconsOrigbranchGetBranchdata(), relaxExecGcgDantzigWolfe(), and SCIP_DECL_BRANCHEXECPS().

SCIP_CONS* GCGconsOrigbranchGetChildcons ( SCIP_CONS *  cons,
int  childnr 
)

returns an origbranch constraint of a child of the node at which the given origbranch constraint is sticking

Parameters
consconstraint
childnrnumber of child

Definition at line 655 of file cons_origbranch.c.

References GCGconsOrigbranchSetMastercons().

Referenced by GCGconsOrigbranchGetNChildconss().

SCIP_CONS* GCGconsOrigbranchGetMastercons ( SCIP_CONS *  cons)

returns the masterbranch constraint of the node in the master program corresponding to the node at which the given origbranchbranch constraint is sticking

Parameters
consorigbranch constraint for which the corresponding masterbranch constraint is requested

Definition at line 690 of file cons_origbranch.c.

References GCGconsOrigbranchAddRootCons().

Referenced by GCGconsMasterbranchCheckConsistency(), GCGconsOrigbranchSetMastercons(), SCIP_DECL_CONSDELETE(), and SCIP_DECL_NODESELSELECT().

int GCGconsOrigbranchGetNChildconss ( SCIP_CONS *  cons)

returns the number of origbranch constraints of the children of the node at which the given origbranch constraint is sticking

Parameters
consconstraint

Definition at line 640 of file cons_origbranch.c.

References GCGconsOrigbranchGetChildcons().

Referenced by GCGconsOrigbranchGetParentcons(), and initializeConsdata().

SCIP_NODE* GCGconsOrigbranchGetNode ( SCIP_CONS *  cons)

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

Parameters
consorigbranch constraint for which the corresponding node is requested

Definition at line 607 of file cons_origbranch.c.

References GCGconsOrigbranchGetParentcons().

Referenced by createBranchNodesInOrigprob(), GCGconsOrigbranchGetBranchrule(), initializeConsdata(), and SCIP_DECL_NODESELSELECT().

SCIP_CONS* GCGconsOrigbranchGetParentcons ( SCIP_CONS *  cons)

returns the origbranch constraint of the B&B father of the node at which the given origbranch constraint is sticking

Parameters
consorigbranch constraint for which the origbranch constraint of the father node is requested

Definition at line 623 of file cons_origbranch.c.

References GCGconsOrigbranchGetNChildconss().

Referenced by GCGconsMasterbranchCheckConsistency(), GCGconsOrigbranchGetNode(), initializeConsdata(), and SCIP_DECL_NODESELSELECT().

void GCGconsOrigbranchGetStack ( 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 544 of file cons_origbranch.c.

References CONSHDLR_NAME, GCGconsOrigbranchSetBranchdata(), and SCIP_ConshdlrData::stack.

Referenced by GCGconsOrigbranchGetActiveCons(), and SCIP_DECL_BRANCHEXECPS().

void GCGconsOrigbranchSetBranchdata ( SCIP_CONS *  cons,
GCG_BRANCHDATA branchdata 
)

set the branching data for a given origbranch constraint

returns the branching data for a given origbranch constraint

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

Definition at line 566 of file cons_origbranch.c.

References GCGconsOrigbranchGetBranchdata().

Referenced by GCGconsOrigbranchGetStack(), and SCIP_DECL_CONSDELETE().

void GCGconsOrigbranchSetMastercons ( SCIP_CONS *  cons,
SCIP_CONS *  mastercons 
)

sets the masterbranch constraint of the node in the master program corresponding to the node at which the given origbranchbranch constraint is sticking

Parameters
consorigbranch constraint for which the masterbranch constraint should be set
masterconsmasterbranch constraint corresponding to the given origbranch constraint

Definition at line 673 of file cons_origbranch.c.

References GCGconsOrigbranchGetMastercons().

Referenced by createOrigbranchConstraint(), GCGconsOrigbranchGetChildcons(), initializeConsdata(), SCIP_DECL_CONSDELETE(), and SCIP_DECL_CONSINITSOL().

SCIP_RETCODE GCGcreateConsOrigbranch ( SCIP *  scip,
SCIP_CONS **  cons,
const char *  name,
SCIP_NODE *  node,
SCIP_CONS *  parentcons,
SCIP_BRANCHRULE *  branchrule,
GCG_BRANCHDATA branchdata 
)

creates and captures a origbranch constraint

Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nodethe node to which this origbranch constraint belongs
parentconsorigbranch constraint associated with the father node
branchrulethe branching rule that created the b&b node the constraint belongs to
branchdatabranching data storing information about the branching restrictions at the corresponding node

Definition at line 443 of file cons_origbranch.c.

References CONSHDLR_NAME, GCGbranchGenericCreateBranchdata(), and GCGconsOrigbranchGetActiveCons().

Referenced by createOrigbranchConstraint(), GCGconsOrigbranchAddRootCons(), GCGrelaxNewProbingnodeOrig(), and SCIPincludeConshdlrOrigbranch().

SCIP_RETCODE SCIPincludeConshdlrOrigbranch ( SCIP *  scip)

creates the handler for origbranch constraints and includes it in SCIP

Parameters
scipSCIP data structure

Definition at line 409 of file cons_origbranch.c.

References CONSHDLR_CHECKPRIORITY, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, and GCGcreateConsOrigbranch().

Referenced by SCIP_DECL_CONSLOCK(), and SCIPincludeGcgPlugins().