public class MulticastTree extends NetworkElement
This class contains a representation of a unidirectional multicast tree, an structure used to carry traffic from multicast demands. Multicast trees are characterized
by the Multicast Demand
they carry traffic from, the traversed Links
, the amount of traffic carried (in traffic units) and the
amount of link capacity they occupy in the traversed links (in link capacity units). The links and the demand belong to the same layer, the layer of the multicas tree.
Multicast trees input node and output nodes are that of the associated multicast demand. The set of traversed links must make a tree, originated in the input node, and that reaches all the output nodes. The tree is such that there is a unique form of reaching end nodes from the ingress node. This means that all the nodes in the tree have one input link, but the origin that has none. Also, it means that the number of traversed nodes equals the number of links plus one.
Multicast trees can be rerouted (change in its set of links), and its carried traffic and occupied capacity can change. If a tree traverses a link or node that is down, its carried traffic automatically drops to zero. If the failing links/nodes are set to up state, its carried traffic and occupied link capacity goes back to the value before the failure.
Node
,
Link
,
MulticastDemand
Modifier and Type  Method and Description 

double 
getCarriedTraffic()
Returns the multicast tree carried traffic.

double 
getCarriedTrafficInNoFailureState()
Returns the multicast tree amount of carried traffic, assuming the tree is traversing no failing link or node.

Set<Node> 
getEgressNodesReached()
Returns the subset of the egress nodes of the tree (i.e the ones of the associated multicast demand), that
are actually reached by the tree links, as an unmodifiable set

Link 
getIngressLinkOfNode(Node n)

Node 
getIngressNode()
Returns the tree ingress
Node , that is, the one of the Multicast Demand . 
Set<Link> 
getInitialLinkSet()
Returns the initial
Set of Links of the tree when it was created. 
NetworkLayer 
getLayer()
Returns the
NetworkLayer object this element belongs to. 
Set<Link> 
getLinkSet()
Returns the
Set of Links of the tree 
MulticastDemand 
getMulticastDemand()
Returns the tree associated
Multicast Demand . 
Set<Node> 
getNodeSet()
Returns the set of nodes in the tree: those that are the initial or end node of a
link in the tree.

double 
getOccupiedLinkCapacity()
Returns the multicast tree current amount of capacity occupied in the traversed
Links . 
double 
getOccupiedLinkCapacityInNoFailureState()
Returns the multicast tree capacity occupied in the
Links , assuming the tree is traversing no failing link or node. 
Set<Link> 
getOutputLinkOfNode(Node n)

List<Link> 
getSeqLinksToEgressNode(Node egressNode)
Given an egress node, returns the unique sequence of tree links from the ingress node to it, or null if the egress
node is not part of the tree, or the node passed is not an egress node of the multicast demand.

Set<SharedRiskGroup> 
getSRGs()
Returns the
SharedRiskGroups (SRGs) the multicast tree is affected by. 
double 
getTreeAveragePathLengthInHops()
Returns the average number of hops among the paths from the ingress
Node to the egress nodes. 
double 
getTreeAveragePathLengthInKm()
Returns the average length in kms among the paths from the ingress node to each of the reachable egress nodes.

double 
getTreeAveragePropagationDelayInMs()
Returns the average propagation delay in miliseconds among the paths from the ingress
Node to the egress nodes. 
int 
getTreeMaximumPathLengthInHops()
Returns the number of hops of the longest path (in number of hops) from the ingress
Node to the egress nodes. 
double 
getTreeMaximumPathLengthInKm()
Returns the length in kms of the longest path from the ingress node to the reachable egress nodes.

double 
getTreeMaximumPropagationDelayInMs()
Returns the propagation delay in milliseconds of the longest (in terms of propagation delay) path from the
ingress node to the reachable egress nodes.

int 
getTreeNumberOfLinks()
Returns the number of
Links of the multicast tree. 
double 
getTreeTotalLengthInKm()
Returns the sum of the
Links length in kms of the tree. 
boolean 
isDown()

boolean 
isReachedEgressNode(Node n)
Returns true if the given node is a reached egress node of the multicast tree

boolean 
isReachinAllDemandEgressNodes()
Returns true if the multicast tree is reaching all the egress nodes of the demand

boolean 
isTraversingZeroCapLinks()
Returns true if the tree is traversing a link with zero capacity

boolean 
isUpTheInitialLinkSet()

void 
remove()
Removes this multicast tree.

void 
revertToInitialSetOfLinks()
Changes the set of
Links of the tree to the ones when the tree was created. 
void 
setCarriedTraffic(double newCarriedTraffic,
double newOccupiedLinkCapacity)

void 
setLinks(Set<Link> newLinkSet)
Sets the new set of
Links of the multicast tree. 
String 
toString()
Returns a
String representation of the multicast tree. 
addTag, checkAttachedToNetPlanObject, checkAttachedToNetPlanObject, compareTo, equals, getAttribute, getAttribute, getAttributeAsDouble, getAttributeAsDoubleList, getAttributeAsDoubleMatrix, getAttributeAsDoubleMatrix, getAttributeAsStringList, getAttributeAsStringMatrix, getAttributes, getDescription, getId, getIndex, getName, getNetPlan, getNeType, getTags, hasTag, removeAllAttributes, removeAttribute, removeTag, setAttribute, setAttribute, setAttributeAsNumberList, setAttributeAsNumberMatrix, setAttributeAsNumberMatrix, setAttributeAsStringList, setAttributeAsStringMatrix, setAttributeMap, setDescription, setName, wasRemoved
public double getCarriedTraffic()
Returns the multicast tree carried traffic. If the multicast tree is down, the carried traffic and occupied capacities are zero.
To retrieve the multicast tree carried traffic if all the links and nodes where up, use getCarriedTrafficInNoFailureState()
.
public double getCarriedTrafficInNoFailureState()
Returns the multicast tree amount of carried traffic, assuming the tree is traversing no failing link or node. If the tree traverses faling link/nodes, its carried traffic is automatically set to zero.
public Set<Node> getEgressNodesReached()
Returns the subset of the egress nodes of the tree (i.e the ones of the associated multicast demand), that are actually reached by the tree links, as an unmodifiable set
public Link getIngressLinkOfNode(Node n)
Returns the input Link
in the tree, entering Node
n
. If n
is not in the tree
is the ingress node, returns null
.
n
 The tree noden
is the tree ingress node or does not belong to the tree, it returns null
public Node getIngressNode()
Returns the tree ingress Node
, that is, the one of the Multicast Demand
.
public Set<Link> getInitialLinkSet()
Returns the initial Set
of Links
of the tree when it was created. That is, before any tree rerouting action was made.
Set
of links, as an unmodifiable setpublic NetworkLayer getLayer()
Returns the NetworkLayer
object this element belongs to.
NetworkLayer
public Set<Link> getLinkSet()
Returns the Set
of Links
of the tree
Set
of links of the tree, as an unmodifiable setgetInitialLinkSet()
public MulticastDemand getMulticastDemand()
Returns the tree associated Multicast Demand
.
public Set<Node> getNodeSet()
Returns the set of nodes in the tree: those that are the initial or end node of a link in the tree. The number of traversed nodes in a tree equals the number of travsersed links plus one. Note that the set of reached egress nodes is a subset of this set, but nonreached nodes are not part of this set.
Set
of traversed nodes as an unmodifiable setpublic double getOccupiedLinkCapacity()
Returns the multicast tree current amount of capacity occupied in the traversed Links
. If the multicast tree is down, the
occupied links capacities are zero. To retrieve the multicast tree occupied link capacity if all the links and nodes where up, use getOccupiedLinkCapacityInNoFailureState()
.
public double getOccupiedLinkCapacityInNoFailureState()
Returns the multicast tree capacity occupied in the Links
, assuming the tree is traversing no failing link or node. If the
tree traverses faling link/nodes, its occupied link capacity is automatically set to zero.
public Set<Link> getOutputLinkOfNode(Node n)
Returns the the Set
of egress links of Node
n
in the tree. If the node is not in the tree, returns null
.
n
 The tree nodeSet
of links, or null
if n
is not in the treepublic List<Link> getSeqLinksToEgressNode(Node egressNode)
Given an egress node, returns the unique sequence of tree links from the ingress node to it, or null if the egress node is not part of the tree, or the node passed is not an egress node of the multicast demand.
egressNode
 The egress nodepublic Set<SharedRiskGroup> getSRGs()
Returns the SharedRiskGroups
(SRGs) the multicast tree is affected by.
Set
of affecting SRGs, or an empty Set
if nonepublic double getTreeAveragePathLengthInHops()
Returns the average number of hops among the paths from the ingress Node
to the egress nodes.
public double getTreeAveragePathLengthInKm()
Returns the average length in kms among the paths from the ingress node to each of the reachable egress nodes.
public double getTreeAveragePropagationDelayInMs()
Returns the average propagation delay in miliseconds among the paths from the ingress Node
to the egress nodes.
public int getTreeMaximumPathLengthInHops()
Returns the number of hops of the longest path (in number of hops) from the ingress Node
to the egress nodes.
public double getTreeMaximumPathLengthInKm()
Returns the length in kms of the longest path from the ingress node to the reachable egress nodes.
public double getTreeMaximumPropagationDelayInMs()
Returns the propagation delay in milliseconds of the longest (in terms of propagation delay) path from the ingress node to the reachable egress nodes.
public int getTreeNumberOfLinks()
Returns the number of Links
of the multicast tree.
Links
public double getTreeTotalLengthInKm()
Returns the sum of the Links
length in kms of the tree.
public boolean isDown()
True
if all the links the tree is traversing are up, false
otherwisepublic boolean isReachedEgressNode(Node n)
n
 the nodepublic boolean isReachinAllDemandEgressNodes()
public boolean isTraversingZeroCapLinks()
public boolean isUpTheInitialLinkSet()
Returns true
if the initial set of Links
of the tree when it was created is not subject to any failure: traversed links
and Nodes
exist (were not removed) and are up. Returns false
otherwise.
public void remove()
Removes this multicast tree.
public void revertToInitialSetOfLinks()
Changes the set of Links
of the tree to the ones when the tree was created. That is, before any tree rerouting action was made.
setLinks(getInitialLinkSet())
. Recall that if the new link set traverses failing link or nodes, its carried traffic and occupied link capacities drop to zero, and if not
they will be the base values in the "no failure state". Also, if the original tree now traverses links that were removed, an exception is thrownsetLinks(Set)
,
getInitialLinkSet()
public void setCarriedTraffic(double newCarriedTraffic, double newOccupiedLinkCapacity)
Sets the tree carried traffic and occupied capacity in the traversed Links
(typically the same amount), to be applied if the tree
does not traverse any failing links or Nodes
. If the tree failing links or nodes, its carried traffic and occupied link capacities
are temporary set to zero. Carried traffic and link capacities must be nonnegative.
newCarriedTraffic
 The new carried traffic in the traffic unitsnewOccupiedLinkCapacity
 The new occupied capacity in the traversed link, in link capacity unitspublic void setLinks(Set<Link> newLinkSet)
Sets the new set of Links
of the multicast tree. The set of links must make a valid tree for the associated multicast demand. If the new tree
traverses failing link or nodes, its carried traffic and occupied capacity is set to zero (while the tree traverses failing resources).
newLinkSet
 The new set of linkspublic String toString()
Returns a String
representation of the multicast tree.
toString
in class NetworkElement
String
representation of the multicast treeCopyright © 2018. All rights reserved.