Class Node
java.lang.Object
solvers.queueingnet.treeAlgorithms.Node
-
Field Summary
FieldsModifier and TypeFieldDescriptionIn certain cases when we store multiple Gmaps at a node, backupGmaps can be used to store these extra Gmaps, else this remains unused.This node's set of fully covered classes.The partially covered g-array for this node.protected NodeThis node's left child.booleanThe marked flag.Tree MVA relatedprotected NodeThis node's parent node.This node's set of partially covered classes.protected NodeThis node's right child.The stations this node represents.intThe weight of this node (used during tree planting). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether the backup g-array store contains the population vector.booleanDetermines whether both children of this node are leaves.booleanChecks whether this node's children have a large population overlap in their partially covered classes.booleanChecks whether this node is suitable for feedback filtering.voidClears g-arrays recursively from this node downwards in the tree.clone()Creates a clone of this node.Gets set of both fully and partially covered classes at this node.Returns the first value in the backup g-array for specified population vector (at the root this will be the normalisation constant).Gets a g-array values from the backup g-array store using the specified backup and key population vectors.getG()Returns the first value in the g-array (at the root this will be the normalisation constant).Gets a g-array values from the single g-array store at the specified population vector.Retrieves the stored MVA results for a specified population vector.booleanisLeaf()Determines whether this node is a leaf node.Returns the left child node.Merges this node with another node by combining the stations.parent()Returns the parent node.voidprint()Prints a summary of this node.voidPrints the local g-array.voidRecalculates both the partially and fully covered classes for this node.voidRecalculates this node's weight.Returns the right child node.voidsetLeftChild(Node leftChild) Sets the left child node.voidSets this parent.voidsetRightChild(Node rightChild) Sets the right child node.voidstore(PopulationVector backupVector, PopulationVector key, BigDecimal value, boolean backup) Stores a nromalisation constant locally.
-
Field Details
-
stations
-
weight
public int weightThe weight of this node (used during tree planting). -
marked
public boolean markedThe marked flag. -
parent
This node's parent node. -
leftChild
This node's left child. -
rightChild
This node's right child. -
pcs
-
fcs
-
Gmap
The partially covered g-array for this node. -
backupGmaps
In certain cases when we store multiple Gmaps at a node, backupGmaps can be used to store these extra Gmaps, else this remains unused. -
mvaRes
Tree MVA related
-
-
Constructor Details
-
Node
public Node()Constructor.
-
-
Method Details
-
parent
Returns the parent node. -
leftChild
Returns the left child node. -
rightChild
Returns the right child node. -
setLeftChild
Sets the left child node.- Parameters:
leftChild- The left child node.
-
setRightChild
Sets the right child node.- Parameters:
rightChild- The right child node.
-
setParent
-
recalculateWeight
public void recalculateWeight()Recalculates this node's weight. -
recalculateCoveredClasses
public void recalculateCoveredClasses()Recalculates both the partially and fully covered classes for this node. -
getAllCoveredClasses
-
merge
-
isLeaf
public boolean isLeaf()Determines whether this node is a leaf node.- Returns:
- A boolean indicating whether this node is a leaf node.
-
childrenAreLeaves
public boolean childrenAreLeaves()Determines whether both children of this node are leaves.- Returns:
- A boolean indicating whether both children are leaves.
-
getMVARes
Retrieves the stored MVA results for a specified population vector.- Parameters:
N- The population vector.- Returns:
- The MVA results as an MVAResults object.
-
store
public void store(PopulationVector backupVector, PopulationVector key, BigDecimal value, boolean backup) Stores a nromalisation constant locally.- Parameters:
backupVector- The backup population vector to store the value at.key- The population vector to use as a key.value- The actual value to store.backup- Whether to use the backup store or single g-array store.
-
getGarr
Gets a g-array values from the single g-array store at the specified population vector.- Parameters:
p- The population vector.- Returns:
- The g-array value.
-
getBackupGarr
Gets a g-array values from the backup g-array store using the specified backup and key population vectors.- Parameters:
p1- The backup population vector.p2- The key population vector.- Returns:
- The g-array value.
-
backupContains
Checks whether the backup g-array store contains the population vector.- Parameters:
p- The population vector.- Returns:
- Boolean indicating whether backup g-array store contains the population vector.
-
getG
Returns the first value in the g-array (at the root this will be the normalisation constant).- Returns:
- The normalisation constant.
-
getBackupG
Returns the first value in the backup g-array for specified population vector (at the root this will be the normalisation constant).- Parameters:
p- the p value- Returns:
- The normalisation constant.
-
childrenSuitableForFeedbackFiltering
Checks whether this node is suitable for feedback filtering. This will be true if: 1. Both children are leaf nodes. 2. At least one is a fixed-rate station.- Parameters:
qnm- The queueing network model being solved.- Returns:
- A boolean indicating whether this node is suitable for feedback filtering.
-
childrenOverlappedPcsHaveLargePopulation
Checks whether this node's children have a large population overlap in their partially covered classes. This is defined to be true if the overlap is greater than the FEEDBACK_FILTERING_OVERLAP_POP_THRESHOLD constant defined in Config.- Parameters:
popVec- The full population vector.- Returns:
- A boolean indicating whether the population overlap is large.
-
clearGmap
public void clearGmap()Clears g-arrays recursively from this node downwards in the tree. -
clone
-
print
public void print()Prints a summary of this node. -
printGmap
public void printGmap()Prints the local g-array.
-