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> 
getEgressNodes()
Returns the
Set of egress Nodes of the tree (i.e the ones of the associated multicast demand). 
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()

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)

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 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 egress nodes. 
double 
getTreeMaximumPropagationDelayInMs()
Returns the propagation delay in miliseconds of the longest (in terms of propagation delay) path from the ingress
Node to the 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 
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. 
checkAttachedToNetPlanObject, checkAttachedToNetPlanObject, equals, getAttribute, getAttributes, getId, getIndex, getNetPlan, removeAllAttributes, removeAttribute, setAttribute, setAttributeMap, 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> getEgressNodes()
Returns the Set
of egress Nodes
of the tree (i.e the ones of the associated multicast demand).
Set
of egress nodes, as an unmodifiable setpublic 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.
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)
egressNode
 The egress nodeList
, or null
if egressNode
is not an egress node of the treepublic 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 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 egress nodes.
public double getTreeMaximumPropagationDelayInMs()
Returns the propagation delay in miliseconds of the longest (in terms of propagation delay) path from the ingress Node
to the 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 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 © 2017. All rights reserved.