public class MulticastDemand extends NetworkElement
This class contains a representation of a multicast demand. Multicast demands are defined by its initial node, a set of different end nodes (all different from the initial node)and end node, the network layer they belong to, and their offered traffic. Multicast demand traffic is carried through multicast trees with the same end nodes.
In multilayer designs, a multicast demand in a lower layer can be coupled to a set of links in the upper layer: one link between the demand initial node, and each demand end node. Then, the demand carried traffic is equal to the upper layer link capacities (thus, upper link capacity and lower layer demand traffic must be measured in the same units).
Modifier and Type | Method and Description |
---|---|
Pair<Set<MulticastTree>,Double> |
computeMinimumCostMulticastTrees(double[] costs)
Returns the multicast tree of this demand with lowest cost (and its cost), using the cost per link array provided.
|
void |
couple(Set<Link> links)
Couples this demand to the given
Set of Links in the upper layer. |
Set<Link> |
coupleToNewLinksCreated(NetworkLayer newLinkLayer)
Creates new links in the given layer, from the demand ingress node to each one of the demand egress nodes, and couples these newly created links to the multicast demand.
|
void |
decouple()
Decouples this mulicast demand from a set of upper layer
Links . |
double |
getBlockedTraffic()
Returns the blocked traffic of the demand (offered minus carried, or 0 if carried is above offered).
|
double |
getCarriedTraffic()
Returns the carried traffic of the demand, summing all the associated
Multicast Trees |
Set<Link> |
getCoupledLinks()
|
Set<Node> |
getEgressNodes()
Returns the
Set of demand egress Nodes . |
Node |
getIngressNode()
Returns the demand ingress Returns the demand ingress
Node |
NetworkLayer |
getLayer()
Returns the
NetworkLayer object this element belongs to |
Set<MulticastTree> |
getMulticastTrees()
Returns the
Multicast Trees associated to this demand. |
double |
getOfferedTraffic()
Returns the offered traffic of the demand, in traffic units.
|
double |
getWorseCasePropagationTimeInMs()
Returns the worse case end-to-end propagation time of the demand traffic.
|
boolean |
isBifurcated()
Returns
true if more than one Multicast Tree is associated to the demand (trees with zero carried traffic, or that are
down also count). |
boolean |
isBlocked()
Returns
true if the carried traffic is strictly less than the offered traffic, up to the Net2Plan
precision factor. |
boolean |
isCoupled()
Returns
true if the demand is coupled. |
boolean |
isTraversingOversubscribedLinks()
Returns
true if the traffic of the demand is traversing an oversubscribed Link . |
void |
remove()
Removes this multicast demand, and any associated multicast trees.
|
void |
setOfferedTraffic(double offeredTraffic)
Sets the offered traffic by a multicast demand.
|
String |
toString()
Returns a
String representation of the multicast demand. |
checkAttachedToNetPlanObject, checkAttachedToNetPlanObject, equals, getAttribute, getAttributes, getId, getIndex, getNetPlan, removeAllAttributes, removeAttribute, setAttribute, setAttributeMap, wasRemoved
public Pair<Set<MulticastTree>,Double> computeMinimumCostMulticastTrees(double[] costs)
Returns the multicast tree of this demand with lowest cost (and its cost), using the cost per link array provided.
If more than one minimum cost tree exists, all of them are returned. If the cost vector provided is null
,
all links are assigned a cost of one.
costs
- Link weightsPair
where the first element is a Set
of minimum cost trees, and the second element is the common minimum costpublic void couple(Set<Link> links)
Couples this demand to the given Set
of Links
in the upper layer. The number of links equals to the number of egress nodes of the
demand. Links must start in the demand ingress node, and end in each of the multicast demand egress nodes.
Important: This demand and the links must not be already coupled.
links
- The set of links to couple topublic Set<Link> coupleToNewLinksCreated(NetworkLayer newLinkLayer)
Creates new links in the given layer, from the demand ingress node to each one of the demand egress nodes, and couples these newly created links to the multicast demand.
newLinkLayer
- The layer where the new links will be createdpublic void decouple()
Decouples this mulicast demand from a set of upper layer Links
. If the demand is not coupled, an exception is thrown
public double getBlockedTraffic()
Returns the blocked traffic of the demand (offered minus carried, or 0 if carried is above offered).
public double getCarriedTraffic()
Returns the carried traffic of the demand, summing all the associated Multicast Trees
public Set<Link> getCoupledLinks()
Returns the Set
of Links
this demand is coupled to, or an empty Set
if this demand is not coupled.
Set
of links (a copy , any changes will not affect the coupling)public Set<Node> getEgressNodes()
Returns the Set
of demand egress Nodes
.
Set
of demand egress nodes as an unmodifiable setpublic Node getIngressNode()
Returns the demand ingress Returns the demand ingress Node
public NetworkLayer getLayer()
Returns the NetworkLayer
object this element belongs to
NetworkLayer
public Set<MulticastTree> getMulticastTrees()
Returns the Multicast Trees
associated to this demand.
Set
of MulticastTree
as an unmodifable set (empty if no trees exist)public double getOfferedTraffic()
Returns the offered traffic of the demand, in traffic units.
public double getWorseCasePropagationTimeInMs()
Returns the worse case end-to-end propagation time of the demand traffic. This is the worse end-to-end propagation time
(summing the Link
latencies) for each of the paths from the origin Node
, to each output node,
among all the Multicast Trees
carrying traffic
of this demand. In multilayer designs, when the traffic of a multicast tree traverses a link that is coupled to a lower layer demand,
the link latency taken is the worse case propagation time of the underlying demand.
public boolean isBifurcated()
Returns true
if more than one Multicast Tree
is associated to the demand (trees with zero carried traffic, or that are
down also count).
True
if traffic is bifurcated between two or more multicast trees (see above), or false
otherwisepublic boolean isBlocked()
Returns true
if the carried traffic is strictly less than the offered traffic, up to the Net2Plan
precision factor.
True
if the demand has blocked traffic, false
otherwiseConfiguration
public boolean isCoupled()
Returns true
if the demand is coupled.
true
if the demand is coupled, false
otherwisepublic boolean isTraversingOversubscribedLinks()
Returns true
if the traffic of the demand is traversing an oversubscribed Link
.
True
if the traffic of the demand is traversing an oversubscribed, false
otherwisepublic void remove()
Removes this multicast demand, and any associated multicast trees. If the demand is coupled, it is first decoupled.
public void setOfferedTraffic(double offeredTraffic)
Sets the offered traffic by a multicast demand. This does not change the carried traffic, which only depends on the associated multicast trees.
offeredTraffic
- Offered trafficpublic String toString()
Returns a String
representation of the multicast demand.
toString
in class NetworkElement
String
representation of the multicast demand