Scippy

SCIP

Solving Constraint Integer Programs

pub_tree.h File Reference

Detailed Description

public methods for branch and bound tree

Author
Tobias Achterberg

Definition in file pub_tree.h.

#include "scip/def.h"
#include "scip/type_misc.h"
#include "scip/type_tree.h"

Go to the source code of this file.

Functions

 SCIP_DECL_SORTPTRCOMP (SCIPnodeCompLowerbound)
 
void SCIPnodeGetParentBranchings (SCIP_NODE *node, SCIP_VAR **branchvars, SCIP_Real *branchbounds, SCIP_BOUNDTYPE *boundtypes, int *nbranchvars, int branchvarssize)
 
void SCIPnodeGetAncestorBranchings (SCIP_NODE *node, SCIP_VAR **branchvars, SCIP_Real *branchbounds, SCIP_BOUNDTYPE *boundtypes, int *nbranchvars, int branchvarssize)
 
SCIP_RETCODE SCIPnodePrintAncestorBranchings (SCIP_NODE *node, FILE *file)
 
void SCIPnodeGetAncestorBranchingPath (SCIP_NODE *node, SCIP_VAR **branchvars, SCIP_Real *branchbounds, SCIP_BOUNDTYPE *boundtypes, int *nbranchvars, int branchvarssize, int *nodeswitches, int *nnodes, int nodeswitchsize)
 
SCIP_Bool SCIPnodesSharePath (SCIP_NODE *node1, SCIP_NODE *node2)
 
SCIP_NODESCIPnodesGetCommonAncestor (SCIP_NODE *node1, SCIP_NODE *node2)
 
SCIP_NODETYPE SCIPnodeGetType (SCIP_NODE *node)
 
SCIP_Longint SCIPnodeGetNumber (SCIP_NODE *node)
 
int SCIPnodeGetDepth (SCIP_NODE *node)
 
SCIP_Real SCIPnodeGetLowerbound (SCIP_NODE *node)
 
SCIP_Real SCIPnodeGetEstimate (SCIP_NODE *node)
 
SCIP_DOMCHGSCIPnodeGetDomchg (SCIP_NODE *node)
 
SCIP_NODESCIPnodeGetParent (SCIP_NODE *node)
 
SCIP_Bool SCIPnodeIsActive (SCIP_NODE *node)
 
SCIP_Bool SCIPnodeIsPropagatedAgain (SCIP_NODE *node)
 

Function Documentation

SCIP_DECL_SORTPTRCOMP ( SCIPnodeCompLowerbound  )

node comparator for best lower bound

Definition at line 140 of file tree.c.

References NULL.

void SCIPnodeGetParentBranchings ( SCIP_NODE node,
SCIP_VAR **  branchvars,
SCIP_Real branchbounds,
SCIP_BOUNDTYPE boundtypes,
int *  nbranchvars,
int  branchvarssize 
)

returns the set of variable branchings that were performed in the parent node to create this node

Parameters
nodenode data
branchvarsarray of variables on which the branching has been performed in the parent node
branchboundsarray of bounds which the branching in the parent node set
boundtypesarray of boundtypes which the branching in the parent node set
nbranchvarsnumber of variables on which branching has been performed in the parent node if this is larger than the array size, arrays should be reallocated and method should be called again
branchvarssizeavailable slots in arrays

Definition at line 6760 of file tree.c.

References SCIP_DomChgBound::boundchgs, SCIP_Node::domchg, SCIP_DomChg::domchgbound, SCIP_DomChgBound::nboundchgs, SCIP_BoundChg::newbound, NULL, SCIP_BOUNDCHGTYPE_BRANCHING, SCIPnodeGetDepth(), and SCIP_BoundChg::var.

Referenced by SCIPnodeGetAncestorBranchingPath(), and SCIPnodeGetAncestorBranchings().

void SCIPnodeGetAncestorBranchings ( SCIP_NODE node,
SCIP_VAR **  branchvars,
SCIP_Real branchbounds,
SCIP_BOUNDTYPE boundtypes,
int *  nbranchvars,
int  branchvarssize 
)

returns the set of variable branchings that were performed in all ancestor nodes (nodes on the path to the root) to create this node

Parameters
nodenode data
branchvarsarray of variables on which the branchings has been performed in all ancestors
branchboundsarray of bounds which the branchings in all ancestors set
boundtypesarray of boundtypes which the branchings in all ancestors set
nbranchvarsnumber of variables on which branchings have been performed in all ancestors if this is larger than the array size, arrays should be reallocated and method should be called again
branchvarssizeavailable slots in arrays

Definition at line 6824 of file tree.c.

References NULL, SCIP_Node::parent, SCIPnodeGetDepth(), and SCIPnodeGetParentBranchings().

SCIP_RETCODE SCIPnodePrintAncestorBranchings ( SCIP_NODE node,
FILE *  file 
)
void SCIPnodeGetAncestorBranchingPath ( SCIP_NODE node,
SCIP_VAR **  branchvars,
SCIP_Real branchbounds,
SCIP_BOUNDTYPE boundtypes,
int *  nbranchvars,
int  branchvarssize,
int *  nodeswitches,
int *  nnodes,
int  nodeswitchsize 
)

returns the set of variable branchings that were performed in all ancestor nodes (nodes on the path to the root) to create this node sorted by the nodes, starting from the current node going up to the root

Parameters
nodenode data
branchvarsarray of variables on which the branchings has been performed in all ancestors
branchboundsarray of bounds which the branchings in all ancestors set
boundtypesarray of boundtypes which the branchings in all ancestors set
nbranchvarsnumber of variables on which branchings have been performed in all ancestors if this is larger than the array size, arrays should be reallocated and method should be called again
branchvarssizeavailable slots in arrays
nodeswitchesmarks, where in the arrays the branching decisions of the next node on the path start; branchings performed at the parent of node always start at position 0. For single variable branching, nodeswitches[i] = i holds
nnodesnumber of nodes in the nodeswitch array
nodeswitchsizeavailable slots in node switch array

Definition at line 6913 of file tree.c.

References NULL, SCIP_Node::parent, SCIPnodeGetDepth(), and SCIPnodeGetParentBranchings().

Referenced by SCIPprintNodeRootPath().

SCIP_Bool SCIPnodesSharePath ( SCIP_NODE node1,
SCIP_NODE node2 
)

checks for two nodes whether they share the same root path, i.e., whether one is an ancestor of the other

Parameters
node1node data
node2node data

Definition at line 6962 of file tree.c.

References NULL, SCIP_Node::parent, and SCIPnodeGetDepth().

SCIP_NODE* SCIPnodesGetCommonAncestor ( SCIP_NODE node1,
SCIP_NODE node2 
)

finds the common ancestor node of two given nodes

Parameters
node1node data
node2node data

Definition at line 6986 of file tree.c.

References NULL, SCIP_Node::parent, and SCIPnodeGetDepth().

SCIP_NODETYPE SCIPnodeGetType ( SCIP_NODE node)

gets the type of the node

Parameters
nodenode

Definition at line 6688 of file tree.c.

References SCIP_Node::nodetype, and NULL.

Referenced by focusnodeCleanupVars(), focusnodeToDeadend(), focusnodeToFork(), focusnodeToJunction(), focusnodeToPseudofork(), forkAddLP(), nodeActivate(), nodeAssignParent(), nodeDeactivate(), nodeReleaseParent(), nodeToLeaf(), priceAndCutLoop(), propagateDomains(), pseudoforkAddLP(), SCIP_DECL_NODESELCOMP(), SCIPchgChildPrio(), SCIPchgVarLbProbing(), SCIPchgVarUbProbing(), SCIPchildChgNodeselPrio(), SCIPendStrongbranch(), SCIPfixVarProbing(), SCIPnodeAddBoundinfer(), SCIPnodeAddCons(), SCIPnodeAddHoleinfer(), SCIPnodeCaptureLPIState(), SCIPnodeCreateChild(), SCIPnodeFocus(), SCIPnodeFree(), SCIPnodepqBound(), SCIPnodepqClear(), SCIPnodePropagateImplics(), SCIPnodeReleaseLPIState(), SCIPprimalHeuristics(), SCIPstartDive(), SCIPtreeBacktrackProbing(), SCIPtreeEndProbing(), SCIPtreeInRepropagation(), SCIPtreeLoadLP(), SCIPtreeLoadLPState(), SCIPtreeLoadProbingLPState(), SCIPtreeMarkProbingNodeHasLP(), SCIPvbcCutoffNode(), SCIPvbcFoundConflict(), SCIPvbcFoundSolution(), SCIPvbcMarkedRepropagateNode(), SCIPvbcNewChild(), SCIPvbcRepropagatedNode(), SCIPvbcSolvedNode(), SCIPvbcUpdateChild(), solveNode(), solveNodeInitialLP(), solveNodeRelax(), subrootConstructLP(), treeAddChild(), treeBacktrackProbing(), treeCheckPath(), treeChildrenToSiblings(), treeCreateProbingNode(), treeFindSwitchForks(), treeRemoveChild(), treeRemoveSibling(), treeSwitchPath(), treeUpdatePathLPSize(), and updatePseudocost().

int SCIPnodeGetDepth ( SCIP_NODE node)

gets the depth of the node

Parameters
nodenode

Definition at line 6708 of file tree.c.

References SCIP_Node::depth, and NULL.

Referenced by applyProbing(), compareNodes(), focusnodeToDeadend(), focusnodeToFork(), focusnodeToJunction(), focusnodeToPseudofork(), generateCut(), generateSecantCut(), generateSecantCutNoCheck(), nodeActivate(), nodeAssignParent(), nodeDeactivate(), nodeReleaseParent(), nodeRepropagate(), nodeToLeaf(), priceAndCutLoop(), propagateDomains(), SCIP_DECL_BRANCHEXECEXT(), SCIP_DECL_NODESELCOMP(), SCIP_DECL_NODESELSELECT(), SCIPaddConsNode(), SCIPaddRowDive(), SCIPanalyzeDeductionsProbing(), SCIPconflicthdlrExec(), SCIPconstructCurrentLP(), SCIPdelConsLocal(), SCIPdelConsNode(), SCIPnodeAddBoundinfer(), SCIPnodeAddCons(), SCIPnodeAddHoleinfer(), SCIPnodeCaptureLPIState(), SCIPnodeCutoff(), SCIPnodeFocus(), SCIPnodeFree(), SCIPnodeGetAncestorBranchingPath(), SCIPnodeGetAncestorBranchings(), SCIPnodeGetParentBranchings(), SCIPnodepqBound(), SCIPnodePrintAncestorBranchings(), SCIPnodePropagateAgain(), SCIPnodePropagateImplics(), SCIPnodeReleaseLPIState(), SCIPnodesGetCommonAncestor(), SCIPnodesSharePath(), SCIPprimalHeuristics(), SCIPprintNodeRootPath(), SCIPsepastoreApplyCuts(), SCIPsolveCIP(), SCIPtreeCreateProbingNode(), SCIPtreeCutoff(), SCIPtreeEndProbing(), SCIPtreeGetProbingDepth(), SCIPtreeGetProbingRoot(), SCIPtreeLoadLP(), SCIPtreeLoadLPState(), SCIPtreeProbing(), SCIPvbcCutoffNode(), SCIPvbcNewChild(), SCIPvbcSolvedNode(), SCIPvbcUpdateChild(), solveNode(), solveNodeInitialLP(), solveNodeLP(), tightenBounds(), treeApplyPendingBdchgs(), treeBacktrackProbing(), treeCreateProbingNode(), updatePseudocost(), and updateVisits().

SCIP_Real SCIPnodeGetEstimate ( SCIP_NODE node)

gets the estimated value of the best feasible solution in subtree of the node

Parameters
nodenode

Definition at line 6728 of file tree.c.

References SCIP_Node::estimate, and NULL.

Referenced by getNodeselScore(), nodeGetUctScore(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_NODESELCOMP(), SCIP_DECL_NODESELSELECT(), SCIPgetLocalOrigEstimate(), SCIPgetLocalTransEstimate(), SCIPtreeBranchVar(), SCIPtreeBranchVarHole(), SCIPtreeBranchVarNary(), and SCIPtreeCalcChildEstimate().

SCIP_DOMCHG* SCIPnodeGetDomchg ( SCIP_NODE node)

gets the domain change information of the node, i.e., the information about the differences in the variables domains to the parent node

Parameters
nodenode

Definition at line 6740 of file tree.c.

References SCIP_Node::domchg, and NULL.

Referenced by SCIPendStrongbranch().

SCIP_NODE* SCIPnodeGetParent ( SCIP_NODE node)

gets the parent node of a node in the branch-and-bound tree, if any

Parameters
nodenode

Definition at line 6750 of file tree.c.

References NULL, and SCIP_Node::parent.

Referenced by compareNodes(), nodeGetUctScore(), and updateVisits().

SCIP_Bool SCIPnodeIsActive ( SCIP_NODE node)

returns whether node is in the path to the current node

Parameters
nodenode

Definition at line 7017 of file tree.c.

References SCIP_Node::active, and NULL.

Referenced by propagateDomains(), SCIPnodePropagateImplics(), and updatePseudocost().

SCIP_Bool SCIPnodeIsPropagatedAgain ( SCIP_NODE node)

returns whether the node is marked to be propagated again

Parameters
nodenode data

Definition at line 7027 of file tree.c.

References NULL, and SCIP_Node::reprop.

Referenced by updateLoopStatus().