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

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
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
SCIP_RETCODE SCIPnodePrintAncestorBranchings ( SCIP_NODE node,
FILE *  file 
)

outputs the path into given file stream in GML format

Parameters
nodenode data
filefile to output the path
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
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
SCIP_NODE* SCIPnodesGetCommonAncestor ( SCIP_NODE node1,
SCIP_NODE node2 
)

finds the common ancestor node of two given nodes

Parameters
node1node data
node2node data
SCIP_NODETYPE SCIPnodeGetType ( SCIP_NODE node)

gets the type of the node

Parameters
nodenode
SCIP_Longint SCIPnodeGetNumber ( SCIP_NODE node)

gets successively assigned number of the node

Parameters
nodenode
int SCIPnodeGetDepth ( SCIP_NODE node)

gets the depth of the node

Parameters
nodenode
SCIP_Real SCIPnodeGetLowerbound ( SCIP_NODE node)

gets the lower bound of the node

Parameters
nodenode
SCIP_Real SCIPnodeGetEstimate ( SCIP_NODE node)

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

Parameters
nodenode
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
SCIP_NODE* SCIPnodeGetParent ( SCIP_NODE node)

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

Parameters
nodenode
SCIP_Bool SCIPnodeIsActive ( SCIP_NODE node)

returns whether node is in the path to the current node

Parameters
nodenode
SCIP_Bool SCIPnodeIsPropagatedAgain ( SCIP_NODE node)

returns whether the node is marked to be propagated again

Parameters
nodenode data