public class NetPlan
extends Object
Class defining a complete multi-layer network structure. Layers may
contain links, demands, routes and protection segments or forwarding rules,
while nodes and SRGs are defined with a network-wide scope, that is, they
appear in all layers. To simplify handling of single-layer designs, methods that may refer to
layer-specific elements are replicated to include a 'layer identifier' input parameter.
In case of using the method with no 'layer identifier' parameter, the action
will be applied to the default layer (by default it is first defined layer),
which can be modified using the setLayerDefaultId()
method.
Internal representation of the NetPlan
object is based on maps,
aiming to maximize the performance in read/write operations. For this reason,
identifiers for network elements (i.e., nodes, links...) are represented as long
,
and they are also incremental, that is, e.g. after removal identifiers are not renumbered.
In order to improve the speed of algorithms, some methods return directly
the information from the internal representation of the Net2Plan
object,
so that data is backed there. Also, some metrics such as link/demand carried traffic,
incoming/outgoing links/demands to/from a node... are cached, and internally
updated by the kernel (transparently to users). Therefore, users should copy
the output (in general a Set
or a Map
, so users are encouraged
to make copies using LinkedHashSet
and LinkedHashMap
, respectively,
to preserve ordering) in case they want to modify it. Each method returning
data directly from the internals is advertised in its description.
An unmodifiable version of NetPlan object can be obtained through the
unmodifiableView
method. Instances work
transparently as NetPlan
object unless you try to change it. Calling
any method that can potentially change the network (e.g. add/set/remove methods)
throws an UnsupportedOperationException
.
Constructor and Description |
---|
NetPlan()
Default constructor.
|
NetPlan(File file)
Generates a new network design from a given
.n2p file. |
NetPlan(InputStream inputStream)
Generates a new network design from an input stream.
|
Modifier and Type | Method and Description |
---|---|
void |
activateActionMonitoring()
Activate monitoring of actions.
|
long |
addDemand(long ingressNodeId,
long egressNodeId,
double offeredTraffic,
Map<String,String> attributes)
Adds a new traffic demand.
|
long |
addDemand(long layerId,
long ingressNodeId,
long egressNodeId,
double offeredTraffic,
Map<String,String> attributes)
Adds a new traffic demand.
|
Pair<Long,Long> |
addDemandBidirectional(long ingressNodeId,
long egressNodeId,
double offeredTraffic,
Map<String,String> attributes)
Adds a new bidirectional traffic demand, that is, a demand on each direction.
|
Pair<Long,Long> |
addDemandBidirectional(long layerId,
long ingressNodeId,
long egressNodeId,
double offeredTraffic,
Map<String,String> attributes)
Adds a new bidirectional traffic demand, that is, a demand on each direction.
|
Pair<Long,Long> |
addForwardingRule(long demandId,
long linkId,
double splittingRatio,
Map<String,String> attributes)
Adds a new forwarding rule (or override an existing one).
|
Pair<Long,Long> |
addForwardingRule(long layerId,
long demandId,
long linkId,
double splittingRatio,
Map<String,String> attributes)
Adds a new forwarding rule (or override an existing one).
|
void |
addForwardingRules(long layerId,
Map<Pair<Long,Long>,Double> splittingRatioMap,
boolean includeUnusedRules)
Adds a set of forwarding rules (or override existing ones).
|
void |
addForwardingRules(Map<Pair<Long,Long>,Double> splittingRatioMap,
boolean includeUnusedRules)
Adds a set of forwarding rules (or override existing ones).
|
long |
addLayer(String name,
String description,
String linkCapacityUnitsName,
String demandTrafficUnitsName,
Map<String,String> attributes)
Adds a new layer.
|
long |
addLink(long originNodeId,
long destinationNodeId,
double capacity,
double lengthInKm,
double propagationSpeedInKmPerSecond,
Map<String,String> attributes)
Adds a new link.
|
long |
addLink(long originNodeId,
long destinationNodeId,
double capacity,
double lengthInKm,
Map<String,String> attributes)
Adds a new link.
|
long |
addLink(long layerId,
long originNodeId,
long destinationNodeId,
double capacity,
double lengthInKm,
double propagationSpeedInKmPerSecond,
Map<String,String> attributes)
Adds a new link.
|
long |
addLink(long layerId,
long originNodeId,
long destinationNodeId,
double capacity,
double lengthInKm,
Map<String,String> attributes)
Adds a new link.
|
Pair<Long,Long> |
addLinkBidirectional(long originNodeId,
long destinationNodeId,
double capacity,
double lengthInKm,
double propagationSpeedInKmPerSecond,
Map<String,String> attributes)
Adds a new bidirectional link, that is, a link on each direction.
|
Pair<Long,Long> |
addLinkBidirectional(long originNodeId,
long destinationNodeId,
double capacity,
double lengthInKm,
Map<String,String> attributes)
Adds a new bidirectional link, that is, a link on each direction.
|
Pair<Long,Long> |
addLinkBidirectional(long layerId,
long originNodeId,
long destinationNodeId,
double capacity,
double lengthInKm,
double propagationSpeedInKmPerSecond,
Map<String,String> attributes)
Adds a new bidirectional link, that is, a link on each direction.
|
Pair<Long,Long> |
addLinkBidirectional(long layerId,
long originNodeId,
long destinationNodeId,
double capacity,
double lengthInKm,
Map<String,String> attributes)
Adds a new bidirectional link, that is, a link on each direction.
|
void |
addLinkToSRG(long linkId,
long srgId)
Adds a link to a given SRG.
|
void |
addLinkToSRG(long layerId,
long linkId,
long srgId)
Adds a link to a given SRG.
|
long |
addNode(double xCoord,
double yCoord,
String name,
Map<String,String> attributes)
Adds a new node to the network.
|
void |
addNodeToSRG(long nodeId,
long srgId)
Adds a node to a given SRG.
|
long |
addProtectionSegment(List<Long> sequenceOfLinks,
double reservedCapacity,
Map<String,String> attributes)
Adds a new protection segment.
|
long |
addProtectionSegment(long layerId,
List<Long> sequenceOfLinks,
double reservedCapacity,
Map<String,String> attributes)
Adds a new protection segment.
|
void |
addProtectionSegmentToRouteBackupSegmentList(long segmentId,
long routeId)
Adds a protection segment in the default layer to the list of backup protection segments of a route.
|
void |
addProtectionSegmentToRouteBackupSegmentList(long layerId,
long segmentId,
long routeId)
Adds a protection segment in the given layer to the list of backup protection segments of a route.
|
long |
addRoute(long demandId,
double carriedTraffic,
double occupiedLinkCapacity,
List<Long> sequenceOfLinks,
Map<String,String> attributes)
Adds a new traffic route.
|
long |
addRoute(long demandId,
double carriedTraffic,
List<Long> sequenceOfLinks,
Map<String,String> attributes)
Adds a new traffic route.
|
long |
addRoute(long layerId,
long demandId,
double carriedTraffic,
double occupiedLinkCapacity,
List<Long> sequenceOfLinks,
Map<String,String> attributes)
Adds a new traffic route.
|
long |
addRoute(long layerId,
long demandId,
double carriedTraffic,
List<Long> sequenceOfLinks,
Map<String,String> attributes)
Adds a new traffic route.
|
void |
addRoutes(CandidatePathList cpl)
Adds traffic routes from a candidate path list.
|
void |
addRoutes(CandidatePathList cpl,
double[] x_p,
boolean includeUnusedRoutes)
Adds traffic routes from a candidate path list.
|
void |
addRoutes(CandidatePathList cpl,
double[] x_p,
double[] y_p,
boolean includeUnusedRoutes)
Adds traffic routes from a candidate path list.
|
void |
addRoutes(long layerId,
CandidatePathList cpl)
Adds traffic routes from a candidate path list.
|
void |
addRoutes(long layerId,
CandidatePathList cpl,
double[] x_p,
boolean includeUnusedRoutes)
Adds traffic routes from a candidate path list.
|
void |
addRoutes(long layerId,
CandidatePathList cpl,
double[] x_p,
double[] y_p,
boolean includeUnusedRoutes)
Adds traffic routes from a candidate path list.
|
void |
addRoutesFromDemandLinkCarriedTraffic(cern.colt.matrix.tdouble.DoubleMatrix2D x_de)
Adds traffic routes from demand-link routing.
|
void |
addRoutesFromDemandLinkCarriedTraffic(long layerId,
cern.colt.matrix.tdouble.DoubleMatrix2D x_de)
Adds traffic routes from demand-link routing.
|
void |
addRoutesFromDestinationLinkCarriedTraffic(cern.colt.matrix.tdouble.DoubleMatrix2D x_te)
Adds traffic routes from destination-link routing.
|
void |
addRoutesFromDestinationLinkCarriedTraffic(long layerId,
cern.colt.matrix.tdouble.DoubleMatrix2D x_te)
Adds traffic routes from destination-link routing.
|
long |
addSRG(double mttfInHours,
double mttrInHours,
Map<String,String> attributes)
Adds a new SRG.
|
void |
assignFrom(NetPlan netPlan)
Assigns the information from the input
NetPlan . |
void |
checkDemandIsActive(long demandId)
Checks whether a demand is active.
|
void |
checkDemandIsActive(long layerId,
long demandId)
Checks whether a demand is active.
|
void |
checkForwardingRuleIsActive(long layerId,
Pair<Long,Long> demandLinkPair)
Checks whether a forwarding rule is active.
|
void |
checkForwardingRuleIsActive(Pair<Long,Long> demandLinkPair)
Checks whether a forwarding rule is active.
|
void |
checkLayerIsActive(long layerId)
Checks whether a layer is active.
|
void |
checkLinkIsActive(long linkId)
Checks whether a link is active.
|
void |
checkLinkIsActive(long layerId,
long linkId)
Checks whether a link is active.
|
void |
checkNodeIsActive(long nodeId)
Checks whether a node is active.
|
void |
checkPathValidityForDemand(List<Long> path,
long demandId)
Checks whether a sequence of links (and maybe protection segments) is valid for a given demand.
|
void |
checkPathValidityForDemand(long layerId,
List<Long> path,
long demandId)
Checks whether a sequence of links (and maybe protection segments) is valid for a given demand.
|
void |
checkProtectionSegmentIsActive(long segmentId)
Checks whether a protection segment is active.
|
void |
checkProtectionSegmentIsActive(long layerId,
long segmentId)
Checks whether a protection segment is active.
|
void |
checkRouteIsActive(long routeId)
Checks whether a route is active.
|
void |
checkRouteIsActive(long layerId,
long routeId)
Checks whether a route is active.
|
void |
checkRoutingType(Constants.RoutingType routingType)
Checks whether routing type is the expected one.
|
void |
checkRoutingType(long layerId,
Constants.RoutingType routingType)
Checks whether routing type is the expected one.
|
void |
checkSRGIsActive(long srgId)
Checks whether an SRG is active.
|
void |
checkValidity(long layerId,
Map<String,String> net2planParameters,
boolean allowLinkOversubscription,
boolean allowExcessCarriedTraffic)
Checks the current state.
|
void |
checkValidity(Map<String,String> net2planParameters,
boolean allowLinkOversubscription,
boolean allowExcessCarriedTraffic)
Checks the current state.
|
List<Long> |
convertSequenceOfLinksAndProtectionSegmentsToSequenceOfLinks(List<Long> path)
Converts a sequence of links and protection segments to the actual sequence of links.
|
List<Long> |
convertSequenceOfLinksAndProtectionSegmentsToSequenceOfLinks(long layerId,
List<Long> path)
Converts a sequence of links and protection segments to the actual sequence of links.
|
NetPlan |
copy()
Returns a deep copy of the current design.
|
void |
copyFrom(NetPlan netPlan)
Removes all the current information from the current
NetPlan and copy the
information from the input NetPlan . |
void |
copyFrom(NetPlan netPlan,
Set<Long> layerIds)
Removes all the current information from the
NetPlan and copy the
information all the specified layers from the input NetPlan . |
long |
copyLayer()
Copies the default layer as a new layer.
|
long |
copyLayer(long layerId)
Copies a given layer as a new layer.
|
long |
copyLayerFrom(NetPlan netPlan)
Copies the default layer from a given network design as a new layer.
|
long |
copyLayerFrom(NetPlan netPlan,
long layerId)
Copies a given layer from a given network as a new layer.
|
void |
coupleDemandWithUpperLayerLink(long demandId,
long upperLayerId,
long linkId)
Couples a demand in the default layer to a link in an upper layer.
|
void |
coupleDemandWithUpperLayerLink(long lowerLayerId,
long demandId,
long upperLayerId,
long linkId)
Couples a demand in the given layer to a link in an upper layer.
|
void |
coupleLinkWithLowerLayerDemand(long linkId,
long lowerLayerId,
long demandId)
Couples a link in the default layer to a demand in a lower layer.
|
void |
coupleLinkWithLowerLayerDemand(long upperLayerId,
long linkId,
long lowerLayerId,
long demandId)
Couples a link in the given layer to a demand in a lower layer.
|
long |
createLowerLayerDemandFromLink(long linkId,
long lowerLayerId)
Creates a lower layer demand from a given link.
|
long |
createLowerLayerDemandFromLink(long upperLayerId,
long linkId,
long lowerLayerId)
Creates a lower layer demand from a given link.
|
Map<Long,Long> |
createLowerLayerDemandsFromLinks(long lowerLayerId)
Creates lower layer demands from existing links.
|
Map<Long,Long> |
createLowerLayerDemandsFromLinks(long upperLayerId,
long lowerLayerId)
Creates lower layer demands from existing links.
|
long |
createUpperLayerLinkFromDemand(long demandId,
long upperLayerId)
Creates an upper layer link from a given demand.
|
long |
createUpperLayerLinkFromDemand(long lowerLayerId,
long demandId,
long upperLayerId)
Creates an upper layer link from a given demand.
|
Map<Long,Long> |
createUpperLayerLinksFromDemands(long upperLayerId)
Creates upper layer links from existing demands.
|
Map<Long,Long> |
createUpperLayerLinksFromDemands(long lowerLayerId,
long upperLayerId)
Creates upper layer links from existing demands.
|
void |
deactivateActionMonitoring()
Deactivates action monitoring.
|
void |
decoupleDemand(long demandId)
Decouples a demand from an upper layer link.
|
void |
decoupleDemand(long layerId,
long demandId)
Decouples a demand from an upper layer link.
|
void |
decoupleLink(long linkId)
Decouples a link from a lower layer demand.
|
void |
decoupleLink(long layerId,
long linkId)
Decouples a link from a lower layer demand.
|
List<SimAction> |
getActionsPerformed()
Returns the list of monitored actions since
activateActionMonitoring() was called. |
Set<Long> |
getAvailableNodesFromNode(long nodeId,
List<Long> path)
Returns the set of consecutive reachable nodes from a given one to the last node in the path.
|
Set<Long> |
getAvailableNodesFromNode(long layerId,
long nodeId,
List<Long> path)
Returns the set of consecutive reachable nodes from a given one to the last node in the path.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getDemand2LinkAssignmentMatrix()
Returns the demand-link incidence matrix (a DxE matrix in
which an element δde is equal to the number of
times which traffic routes carrying traffic from demand d traverse
link e).
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getDemand2LinkAssignmentMatrix(long layerId)
Returns the demand-link incidence matrix (a DxE matrix in
which an element δde is equal to the number of
times which traffic routes carrying traffic from demand d traverse
link e).
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getDemand2RouteAssignmentMatrix()
Returns the demand-route incidence matrix (a DxR matrix in
which an element δdr is equal to 1 if traffic
route r is able to carry traffic from demand d).
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getDemand2RouteAssignmentMatrix(long layerId)
Returns the demand-route incidence matrix (a DxR matrix in
which an element δdr is equal to 1 if traffic
route r is able to carry traffic from demand d).
|
String |
getDemandAttribute(long layerId,
long demandId,
String key)
Returns the value of a given attribute for a demand.
|
String |
getDemandAttribute(long demandId,
String key)
Returns the value of a given attribute for a demand.
|
Map<String,String> |
getDemandAttributeMap(long demandId)
Returns the attributes defined for a given demand.
|
Map<String,String> |
getDemandAttributeMap(long layerId,
long demandId)
Returns the attributes defined for a given demand.
|
int |
getDemandBifurcationDegree(long demandId)
Returns the number of routes, in up state, carrying traffic for a given demand.
|
int |
getDemandBifurcationDegree(long layerId,
long demandId)
Returns the number of routes, in up state, carrying traffic for a given demand.
|
Map<Long,Integer> |
getDemandBifurcationDegreeMap()
Returns the bifurcation degree per demand.
|
Map<Long,Integer> |
getDemandBifurcationDegreeMap(long layerId)
Returns the bifurcation degree per demand.
|
int[] |
getDemandBifurcationDegreeVector()
Returns the bifurcation degree per demand, in increasing order of demand identifier.
|
int[] |
getDemandBifurcationDegreeVector(long layerId)
Returns the bifurcation degree per demand, in increasing order of demand identifier.
|
double |
getDemandBlockedTraffic(long demandId)
Returns the blocked traffic of a demand.
|
double |
getDemandBlockedTraffic(long layerId,
long demandId)
Returns the blocked traffic of a demand.
|
Map<Long,Double> |
getDemandBlockedTrafficMap()
Returns the blocked traffic per demand.
|
Map<Long,Double> |
getDemandBlockedTrafficMap(long layerId)
Returns the blocked traffic per demand.
|
double[] |
getDemandBlockedTrafficVector()
Returns the blocked traffic per demand, in increasing order of demand identifier.
|
double[] |
getDemandBlockedTrafficVector(long layerId)
Returns the blocked traffic per demand, in increasing order of demand identifier.
|
long |
getDemandByAttribute(long layerId,
String attribute,
String value)
Returns the identifier of the first demand with a given value in a
certain attribute, or -1 if not found.
|
long |
getDemandByAttribute(String attribute,
String value)
Returns the identifier of the first demand with a given value in a
certain attribute, or -1 if not found.
|
double |
getDemandCarriedTraffic(long demandId)
Returns the carried traffic for a given demand.
|
double |
getDemandCarriedTraffic(long layerId,
long demandId)
Returns the carried traffic for a given demand.
|
Map<Long,Double> |
getDemandCarriedTrafficMap()
Returns the carried traffic per demand.
|
Map<Long,Double> |
getDemandCarriedTrafficMap(long layerId)
Returns the carried traffic per demand.
|
double[] |
getDemandCarriedTrafficVector()
Returns the carried traffic per demand, in increasing order of demand identifier.
|
double[] |
getDemandCarriedTrafficVector(long layerId)
Returns the carried traffic per demand, in increasing order of demand identifier.
|
Pair<Long,Long> |
getDemandCoupledUpperLayerLink(long demandId)
Returns the upper layer link coupled to the demand.
|
Pair<Long,Long> |
getDemandCoupledUpperLayerLink(long layerId,
long demandId)
Returns the upper layer link coupled to the demand.
|
long |
getDemandEgressNode(long demandId)
Returns the identifier of the egress node of the given demand.
|
long |
getDemandEgressNode(long layerId,
long demandId)
Returns the identifier of the egress node of the given demand.
|
Set<Pair<Long,Long>> |
getDemandForwardingRules(long demandId)
Returns the set of forwarding rules associated to a demand.
|
Set<Pair<Long,Long>> |
getDemandForwardingRules(long layerId,
long demandId)
Returns the set of forwarding rules associated to a demand.
|
Map<Pair<Long,Long>,Double> |
getDemandForwardingRuleSplittingRatioMap(long demandId)
Returns the forwarding rules and splitting ratios associated to a given demand.
|
Map<Pair<Long,Long>,Double> |
getDemandForwardingRuleSplittingRatioMap(long layerId,
long demandId)
Returns the forwarding rules and splitting ratios associated to a given demand.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getDemandForwardingRuleSplittingRatioMatrix(long demandId)
Returns the splitting ratio vector (fractions of traffic entering a node from
the given demand, leaving that node through link 'e'), in increasing order of link identifier.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getDemandForwardingRuleSplittingRatioMatrix(long layerId,
long demandId)
Returns the splitting ratio vector (fractions of traffic entering a node from
the given demand, leaving that node through link 'e'), in increasing order of link identifier.
|
Set<Long> |
getDemandIds()
Returns the set of identifiers of the demands.
|
Set<Long> |
getDemandIds(long layerId)
Returns the set of identifiers of the demands.
|
long[] |
getDemandIdsVector()
Returns the set of identifiers of the demands, in increasing order of identifier.
|
long[] |
getDemandIdsVector(long layerId)
Returns the set of identifiers of the demands, in increasing order of identifier.
|
Pair<Long,Long> |
getDemandIngressEgressNodePair(long demandId)
Returns the identifiers of the ingress and egress nodes.
|
Pair<Long,Long> |
getDemandIngressEgressNodePair(long layerId,
long demandId)
Returns the identifiers of the ingress and egress nodes.
|
long |
getDemandIngressNode(long demandId)
Returns the identifier of the ingress node of the given demand.
|
long |
getDemandIngressNode(long layerId,
long demandId)
Returns the identifier of the ingress node of the given demand.
|
Map<Long,Pair<Long,Long>> |
getDemandMap()
Returns the ingress-egress node pair per demand.
|
Map<Long,Pair<Long,Long>> |
getDemandMap(long layerId)
Returns the ingress-egress node pair per demand.
|
long |
getDemandNextId()
Returns the next identifier for a new demand.
|
long |
getDemandNextId(long layerId)
Returns the next identifier for a new demand.
|
double |
getDemandOfferedTraffic(long demandId)
Returns the offered traffic for a given demand.
|
double |
getDemandOfferedTraffic(long layerId,
long demandId)
Returns the offered traffic for a given demand.
|
Map<Long,Double> |
getDemandOfferedTrafficMap()
Returns the offered traffic per demand.
|
Map<Long,Double> |
getDemandOfferedTrafficMap(long layerId)
Returns the offered traffic per demand.
|
double[] |
getDemandOfferedTrafficVector()
Returns the offered traffic per demand, in increasing order of demand identifier.
|
double[] |
getDemandOfferedTrafficVector(long layerId)
Returns the offered traffic per demand, in increasing order of demand identifier.
|
Set<Long> |
getDemandRoutes(long demandId)
Returns the routes which can carry traffic from a given demand.
|
Set<Long> |
getDemandRoutes(long layerId,
long demandId)
Returns the routes which can carry traffic from a given demand.
|
Constants.RoutingCycleType |
getDemandRoutingCycleType(long demandId)
Returns the routing cycle type for a given demand.
|
Constants.RoutingCycleType |
getDemandRoutingCycleType(long layerId,
long demandId)
Returns the routing cycle type for a given demand.
|
Map<Long,String> |
getDemandsAttributeMap(long layerId,
String key)
Returns the value of the same attribute for each demand.
|
Map<Long,String> |
getDemandsAttributeMap(String key)
Returns the value of the same attribute for each demand.
|
Set<Long> |
getDemandsBlocked()
Returns the set of demands with some blocked traffic.
|
Set<Long> |
getDemandsBlocked(long layerId)
Returns the set of demands with some blocked traffic.
|
long[] |
getDemandsBlockedVector()
Returns the demands with some blocked traffic, in increasing order of demand identifier.
|
long[] |
getDemandsBlockedVector(long layerId)
Returns the demands with some blocked traffic, in increasing order of demand identifier.
|
Set<Long> |
getDemandsByAttribute(long layerId,
String attribute,
String value)
Returns the identifiers of the demands with a given value in a certain attribute.
|
Set<Long> |
getDemandsByAttribute(String attribute,
String value)
Returns the identifiers of the demands with a given value in a certain attribute.
|
Map<Long,Pair<Long,Long>> |
getDemandsCoupledLinkMap()
Returns the upper layer link coupled to each demand (among the coupled ones).
|
Map<Long,Pair<Long,Long>> |
getDemandsCoupledLinkMap(long layerId)
Returns the upper layer link coupled to each demand (among the coupled ones).
|
double |
getDemandTotalBlockedTraffic()
Returns the total blocked traffic, summing up for all demands.
|
double |
getDemandTotalBlockedTraffic(long layerId)
Returns the total blocked traffic, summing up for all demands.
|
double |
getDemandTotalCarriedTraffic()
Returns the total carried traffic, summing up for all demands.
|
double |
getDemandTotalCarriedTraffic(long layerId)
Returns the total carried traffic, summing up for all demands.
|
double |
getDemandTotalOfferedTraffic()
Returns the total offered traffic, summing up for all demands.
|
double |
getDemandTotalOfferedTraffic(long layerId)
Returns the total offered traffic, summing up for all demands.
|
String |
getDemandTrafficUnitsName()
Returns the demand traffic units name.
|
String |
getDemandTrafficUnitsName(long layerId)
Returns the demand traffic units name.
|
long |
getFirstAvailableNodeAfterFailures(List<Long> path)
Returns the first node that is in up state after all failures in a path.
|
long |
getFirstAvailableNodeAfterFailures(long layerId,
List<Long> path)
Returns the first node that is in up state after all failures in a path.
|
long |
getFirstAvailableNodeBeforeFailures(List<Long> path)
Returns the first node that is in up state before any failed resource.
|
long |
getFirstAvailableNodeBeforeFailures(long layerId,
List<Long> path)
Returns the first node that is in up state before any failed resource.
|
String |
getForwardingRuleAttribute(long layerId,
Pair<Long,Long> demandLinkPair,
String key)
Returns the value of a given attribute for a forwarding rule.
|
String |
getForwardingRuleAttribute(Pair<Long,Long> demandLinkPair,
String key)
Returns the value of a given attribute for a forwarding rule.
|
Map<String,String> |
getForwardingRuleAttributeMap(long layerId,
Pair<Long,Long> demandLinkPair)
Returns the attributes defined for a given forwarding rule.
|
Map<String,String> |
getForwardingRuleAttributeMap(Pair<Long,Long> demandLinkPair)
Returns the attributes defined for a given forwarding rule.
|
double |
getForwardingRuleCarriedTraffic(long layerId,
Pair<Long,Long> demandLinkPair)
Returns the carried traffic using a forwarding rule.
|
double |
getForwardingRuleCarriedTraffic(Pair<Long,Long> demandLinkPair)
Returns the carried traffic using a forwarding rule.
|
Map<Pair<Long,Long>,Double> |
getForwardingRuleCarriedTrafficMap()
Returns the carried traffic per forwarding rule.
|
Map<Pair<Long,Long>,Double> |
getForwardingRuleCarriedTrafficMap(long layerId)
Returns the carried traffic per forwarding rule.
|
Set<Pair<Long,Long>> |
getForwardingRules()
Returns the identifiers of active forwarding rules.
|
Set<Pair<Long,Long>> |
getForwardingRules(long layerId)
Returns the identifiers of active forwarding rules.
|
Map<Pair<Long,Long>,String> |
getForwardingRulesAttributeMap(long layerId,
String key)
Returns the value of the same attribute for each forwarding rule.
|
Map<Pair<Long,Long>,String> |
getForwardingRulesAttributeMap(String key)
Returns the value of the same attribute for each forwarding rule.
|
Set<Pair<Long,Long>> |
getForwardingRulesDown()
Returns the set of forwarding rules that are down.
|
Set<Pair<Long,Long>> |
getForwardingRulesDown(long layerId)
Returns the set of forwarding rules that are down.
|
double |
getForwardingRuleSplittingRatio(long layerId,
Pair<Long,Long> demandLinkPair)
Returns the splitting ratio associated to a forwarding rule (fractions of
traffic entering a node from demand 'd', leaving that node through link 'e').
|
double |
getForwardingRuleSplittingRatio(Pair<Long,Long> demandLinkPair)
Returns the splitting ratio associated to a forwarding rule (fractions of
traffic entering a node from demand 'd', leaving that node through link 'e').
|
Map<Pair<Long,Long>,Double> |
getForwardingRuleSplittingRatioMap()
Returns the splitting ratio associated to each forwarding rule (fractions of
traffic entering a node from demand 'd', leaving that node through link 'e').
|
Map<Pair<Long,Long>,Double> |
getForwardingRuleSplittingRatioMap(long layerId)
Returns the splitting ratio associated to each forwarding rule (fractions of
traffic entering a node from demand 'd', leaving that node through link 'e').
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getForwardingRuleSplittingRatioMatrix()
Returns the splitting ratio matrix (fractions of traffic entering a node from
demand 'd', leaving that node through link 'e').
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getForwardingRuleSplittingRatioMatrix(long layerId)
Returns the splitting ratio matrix (fractions of traffic entering a node from
demand 'd', leaving that node through link 'e').
|
NetPlan |
getLayer(long layerId)
Returns a copy of the current network design where only the given layer
is present.
|
String |
getLayerAttribute(long layerId,
String key)
Returns the value of a layer attribute.
|
Map<String,String> |
getLayerAttributeMap(long layerId)
Returns the layer attributes.
|
long |
getLayerByAttribute(String attribute,
String value)
Returns the identifier of the first layer with a given value in a
certain attribute, or -1 if not found.
|
long |
getLayerByName(String name)
Returns the identifier of the first layer matching the given name, or -1 if
not found.
|
long |
getLayerDefaultId()
Returns the identifier of the default layer.
|
String |
getLayerDescription(long layerId)
Returns the layer description.
|
Set<Long> |
getLayerIds()
Returns the set of identifiers of the active layers.
|
long[] |
getLayerIdsVector()
Returns the set of identifiers of the active layers, in increasing order of identifier.
|
String |
getLayerName(long layerId)
Returns the name of the given layer.
|
Map<Long,String> |
getLayerNameMap()
Returns the name for each layer.
|
String[] |
getLayerNameVector()
Returns the name for each layer, in increasing order of identifier.
|
long |
getLayerNextId()
Returns the next identifier for a new layer.
|
Map<Long,String> |
getLayersAttributeMap(String key)
Returns the value of the same attribute for each layer.
|
Set<Long> |
getLayersByAttribute(String attribute,
String value)
Returns the identifiers of the layers with a given value in a certain
attribute.
|
Set<Long> |
getLayerTopologicalSortIds()
Returns layer identifiers in bottom-up order, that is, starting from the
lower layers to the upper layers following coupling relationships.
|
long[] |
getLayerTopologicalSortIdsVector()
Returns layer identifiers in bottom-up order, that is, starting from the
lower layers to the upper layers following coupling relationships.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getLink2RouteAssignmentMatrix()
Returns the link-route incidence matrix (an ExR matrix in
which an element δep is equal to the number of
times which traffic route r traverses link e).
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getLink2RouteAssignmentMatrix(long layerId)
Returns the link-route incidence matrix (an ExR matrix in
which an element δep is equal to the number of
times which traffic route r traverses link e).
|
Set<Long> |
getLinkAssociatedProtectionSegments(long linkId)
Returns the protection segments traversing a given link.
|
Set<Long> |
getLinkAssociatedProtectionSegments(long layerId,
long linkId)
Returns the protection segments traversing a given link.
|
Set<Long> |
getLinkAssociatedRoutes(long linkId)
Returns the routes traversing a given link.
|
Set<Long> |
getLinkAssociatedRoutes(long layerId,
long linkId)
Returns the routes traversing a given link.
|
String |
getLinkAttribute(long layerId,
long linkId,
String key)
Returns the value of a given attribute for a link.
|
String |
getLinkAttribute(long linkId,
String key)
Returns the value of a given attribute for a link.
|
Map<String,String> |
getLinkAttributeMap(long linkId)
Returns the attributes defined for a given link.
|
Map<String,String> |
getLinkAttributeMap(long layerId,
long linkId)
Returns the attributes defined for a given link.
|
long |
getLinkByAttribute(long layerId,
String attribute,
String value)
Returns the identifier of the first link with a given value in a
certain attribute, or -1 if not found.
|
long |
getLinkByAttribute(String attribute,
String value)
Returns the identifier of the first link with a given value in a
certain attribute, or -1 if not found.
|
double |
getLinkCapacity(long linkId)
Returns the capacity of the given link.
|
double |
getLinkCapacity(long layerId,
long linkId)
Returns the capacity of the given link.
|
Map<Long,Double> |
getLinkCapacityMap()
Returns the link capacity per link.
|
Map<Long,Double> |
getLinkCapacityMap(long layerId)
Returns the capacity per link.
|
double |
getLinkCapacityNotReservedForProtection(long linkId)
Returns the capacity not reserved for protection of a given link.
|
double |
getLinkCapacityNotReservedForProtection(long layerId,
long linkId)
Returns the capacity not reserved for protection of a given link.
|
Map<Long,Double> |
getLinkCapacityNotReservedForProtectionMap()
Returns the capacity not reserved for protection per link.
|
Map<Long,Double> |
getLinkCapacityNotReservedForProtectionMap(long layerId)
Returns the capacity not reserved for protection per link.
|
double[] |
getLinkCapacityNotReservedForProtectionVector()
Returns the capacity not reserved for protection per link, in increasing order of identifier.
|
double[] |
getLinkCapacityNotReservedForProtectionVector(long layerId)
Returns the capacity not reserved for protection per link, in increasing order of identifier.
|
double |
getLinkCapacityReservedForProtection(long linkId)
Returns the capacity reserved for protection of a link.
|
double |
getLinkCapacityReservedForProtection(long layerId,
long linkId)
Returns the capacity reserved for protection of a link.
|
Map<Long,Double> |
getLinkCapacityReservedForProtectionMap()
Returns the capacity reserved for protection per link.
|
Map<Long,Double> |
getLinkCapacityReservedForProtectionMap(long layerId)
Returns the capacity reserved for protection per link.
|
double[] |
getLinkCapacityReservedForProtectionVector()
Returns the capacity reserved for protection per link, in increasing order of identifier.
|
double[] |
getLinkCapacityReservedForProtectionVector(long layerId)
Returns the capacity reserved for protection per link, in increasing order of identifier.
|
String |
getLinkCapacityUnitsName()
Returns the link capacity units name.
|
String |
getLinkCapacityUnitsName(long layerId)
Returns the link capacity units name.
|
double[] |
getLinkCapacityVector()
Returns the capacity for each link, in increasing order of identifier.
|
double[] |
getLinkCapacityVector(long layerId)
Returns the capacity for each link, in increasing order of identifier.
|
double |
getLinkCarriedTraffic(long linkId)
Returns the carried traffic by a given link.
|
double |
getLinkCarriedTraffic(long layerId,
long linkId)
Returns the carried traffic by a given link.
|
Map<Long,Double> |
getLinkCarriedTrafficMap()
Returns the carried traffic per link.
|
Map<Long,Double> |
getLinkCarriedTrafficMap(long layerId)
Returns the carried traffic per link.
|
double[] |
getLinkCarriedTrafficVector()
Returns the carried traffic per link, in increasing order of identifier.
|
double[] |
getLinkCarriedTrafficVector(long layerId)
Returns the carried traffic per link, in increasing order of identifier.
|
Pair<Long,Long> |
getLinkCoupledLowerLayerDemand(long linkId)
Returns the lower layer demand coupled to the link.
|
Pair<Long,Long> |
getLinkCoupledLowerLayerDemand(long layerId,
long linkId)
Returns the lower layer demand coupled to the link.
|
long |
getLinkDestinationNode(long linkId)
Returns the identifier of the destination node of the given link.
|
long |
getLinkDestinationNode(long layerId,
long linkId)
Returns the identifier of the destination node of the given link.
|
Set<Pair<Long,Long>> |
getLinkForwardingRules(long linkId)
Returns the set of forwarding rules associated to a link.
|
Set<Pair<Long,Long>> |
getLinkForwardingRules(long layerId,
long linkId)
Returns the set of forwarding rules associated to a link.
|
Set<Long> |
getLinkIds()
Returns the set of identifiers of the links.
|
Set<Long> |
getLinkIds(long layerId)
Returns the set of identifiers of the links.
|
long[] |
getLinkIdsVector()
Returns the set of identifiers of the links, in increasing order of identifier.
|
long[] |
getLinkIdsVector(long layerId)
Returns the set of identifiers of the links, in increasing order of identifier.
|
double |
getLinkLengthInKm(long linkId)
Returns the length in km of a link.
|
double |
getLinkLengthInKm(long layerId,
long linkId)
Returns the length in km of a link.
|
Map<Long,Double> |
getLinkLengthInKmMap()
Returns the length in km per link.
|
Map<Long,Double> |
getLinkLengthInKmMap(long layerId)
Returns the length in km per link.
|
double[] |
getLinkLengthInKmVector()
Returns the length in km for each link, in increasing order of identifier.
|
double[] |
getLinkLengthInKmVector(long layerId)
Returns the length in km for each link, in increasing order of identifier.
|
Map<Long,Pair<Long,Long>> |
getLinkMap()
Returns the origin-destination node pair per link.
|
Map<Long,Pair<Long,Long>> |
getLinkMap(long layerId)
Returns the origin-destination node pair per link.
|
double |
getLinkMaximumCapacity()
Returns the maximum capacity among all links.
|
double |
getLinkMaximumCapacity(long layerId)
Returns the maximum capacity among all links.
|
double |
getLinkMaximumUtilization()
Returns the maximum link utilization among all the links.
|
double |
getLinkMaximumUtilization(long layerId)
Returns the maximum link utilization among all the links.
|
double |
getLinkMaximumUtilizationWithoutConsiderReservedCapacityForProtection()
Returns the maximum link utilization among all links (excluding reserved
capacity for protection).
|
double |
getLinkMaximumUtilizationWithoutConsiderReservedCapacityForProtection(long layerId)
Returns the maximum link utilization among all links (excluding reserved
capacity for protection).
|
long |
getLinkNextId()
Returns the next identifier for a new link.
|
long |
getLinkNextId(long layerId)
Returns the next identifier for a new link.
|
double |
getLinkOccupiedCapacity(long linkId)
Returns the occupied capacity for each link (excluding protection segments).
|
double |
getLinkOccupiedCapacity(long layerId,
long linkId)
Returns the occupied capacity for each link (excluding protection segments).
|
Map<Long,Double> |
getLinkOccupiedCapacityMap()
Returns the occupied capacity per link.
|
Map<Long,Double> |
getLinkOccupiedCapacityMap(long layerId)
Returns the occupied capacity per link.
|
double[] |
getLinkOccupiedCapacityVector()
Returns the occupied capacity per link, in increasing order of identifier.
|
double[] |
getLinkOccupiedCapacityVector(long layerId)
Returns the occupied capacity per link, in increasing order of identifier.
|
Pair<Long,Long> |
getLinkOriginDestinationNodePair(long linkId)
Returns the origin-destination node pair for a given link.
|
Pair<Long,Long> |
getLinkOriginDestinationNodePair(long layerId,
long linkId)
Returns the origin-destination node pair for a given link.
|
long |
getLinkOriginNode(long linkId)
Returns the identifier of the origin node of a given link.
|
long |
getLinkOriginNode(long layerId,
long linkId)
Returns the identifier of the origin node of a given link.
|
double |
getLinkPropagationDelayInSeconds(long linkId)
Returns the propagation delay in seconds of a given link.
|
double |
getLinkPropagationDelayInSeconds(long layerId,
long linkId)
Returns the propagation delay in seconds of a given link.
|
Map<Long,Double> |
getLinkPropagationDelayInSecondsMap()
Returns the propagation delay in seconds per link.
|
Map<Long,Double> |
getLinkPropagationDelayInSecondsMap(long layerId)
Returns the propagation delay in seconds per link.
|
double[] |
getLinkPropagationDelayInSecondsVector()
Returns the propagation delay in seconds per link, in increasing order of identifier.
|
double[] |
getLinkPropagationDelayInSecondsVector(long layerId)
Returns the propagation delay in seconds per link, in increasing order of identifier.
|
double |
getLinkPropagationSpeedInKmPerSecond(long linkId)
Returns the propagation speed in km/s of a given link.
|
double |
getLinkPropagationSpeedInKmPerSecond(long layerId,
long linkId)
Returns the propagation speed in km/s of a given link.
|
Map<Long,Double> |
getLinkPropagationSpeedInKmPerSecondMap()
Returns the propagation speed in km/s per link.
|
Map<Long,Double> |
getLinkPropagationSpeedInKmPerSecondMap(long layerId)
Returns the propagation speed in km/s per link.
|
double[] |
getLinkPropagationSpeedInKmPerSecondVector()
Returns the propagation speed in km/s per link, in increasing order of identifier.
|
double[] |
getLinkPropagationSpeedInKmPerSecondVector(long layerId)
Returns the propagation speed in km/s per link, in increasing order of identifier.
|
Map<Long,String> |
getLinksAttributeMap(long layerId,
String key)
Returns the value of an attribute for each demand at the given layer.
|
Map<Long,String> |
getLinksAttributeMap(String key)
Returns the value of an attribute for each demand at the first layer.
|
Set<Long> |
getLinksByAttribute(long layerId,
String attribute,
String value)
Returns the identifiers of the links with a given value in a certain attribute.
|
Set<Long> |
getLinksByAttribute(String attribute,
String value)
Returns the identifiers of the links with a given value in a certain attribute.
|
Map<Long,Pair<Long,Long>> |
getLinksCoupledDemandMap()
Returns the lower layer demand coupled to each link (among the coupled ones).
|
Map<Long,Pair<Long,Long>> |
getLinksCoupledDemandMap(long layerId)
Returns the lower layer demand coupled to each link (among the coupled ones).
|
Set<Long> |
getLinksDown()
Returns the set of links down.
|
Set<Long> |
getLinksDown(long layerId)
Returns the set of links down.
|
Map<Long,Set<Long>> |
getLinksDownAllLayers()
Returns the set of links down per layer.
|
Set<Long> |
getLinksOversubscribed()
Returns the set of oversubscribed links.
|
Set<Long> |
getLinksOversubscribed(long layerId)
Returns the set of oversubscribed links.
|
double |
getLinkSpareCapacity(long linkId)
Returns the available capacity in a link.
|
double |
getLinkSpareCapacity(long layerId,
long linkId)
Returns the available capacity in a link.
|
Map<Long,Double> |
getLinkSpareCapacityMap()
Returns the available capacity per link.
|
Map<Long,Double> |
getLinkSpareCapacityMap(long layerId)
Returns the available capacity per link.
|
double[] |
getLinkSpareCapacityVector()
Returns the available capacity per link, in increasing order of identifier.
|
double[] |
getLinkSpareCapacityVector(long layerId)
Returns the available capacity per link, in increasing order of identifier.
|
Set<Long> |
getLinkSRGs(long linkId)
Returns all SRGs associated to a given link.
|
Set<Long> |
getLinkSRGs(long layerId,
long linkId)
Returns all SRGs associated to a given link.
|
Map<Long,Set<Long>> |
getLinkSRGsMap()
Returns all SRGs associated to each link.
|
Map<Long,Set<Long>> |
getLinkSRGsMap(long layerId)
Returns all SRGs associated to each link.
|
Set<Long> |
getLinksWithUnlimitedCapacity()
Returns the set of links with a capacity equal to
Double.MAX_VALUE . |
Set<Long> |
getLinksWithUnlimitedCapacity(long layerId)
Returns the set of links with a capacity equal to
Double.MAX_VALUE . |
Set<Long> |
getLinksWithZeroCapacity()
Returns the set of links with a capacity equal to zero.
|
Set<Long> |
getLinksWithZeroCapacity(long layerId)
Returns the set of links with a capacity equal to zero.
|
double |
getLinkTotalCapacity()
Returns the total installed capacity.
|
double |
getLinkTotalCapacity(long layerId)
Returns the total installed capacity.
|
double |
getLinkTotalCarriedTraffic()
Returns the total carried traffic by links (excluding protection segments).
|
double |
getLinkTotalCarriedTraffic(long layerId)
Returns the total carried traffic by links (excluding protection segments).
|
double |
getLinkUtilization(long linkId)
Returns the utilization of a given link.
|
double |
getLinkUtilization(long layerId,
long linkId)
Returns the utilization of a given link.
|
Map<Long,Double> |
getLinkUtilizationMap()
Returns the utilization per link.
|
Map<Long,Double> |
getLinkUtilizationMap(long layerId)
Returns the utilization per link.
|
double[] |
getLinkUtilizationVector()
Returns the utilization per link, in increasing order of identifier.
|
double[] |
getLinkUtilizationVector(long layerId)
Returns the utilization per link, in increasing order of identifier.
|
double |
getLinkUtilizationWithoutConsiderReservedCapacityForProtection(long linkId)
Returns the utilization of a link (excluding protection segments).
|
double |
getLinkUtilizationWithoutConsiderReservedCapacityForProtection(long layerId,
long linkId)
Returns the utilization of a link (excluding protection segments).
|
Map<Long,Double> |
getLinkUtilizationWithoutConsiderReservedCapacityForProtectionMap()
Returns the utilization per link (excluding protection segments).
|
Map<Long,Double> |
getLinkUtilizationWithoutConsiderReservedCapacityForProtectionMap(long layerId)
Returns the utilization per link (excluding protection segments).
|
double[] |
getLinkUtilizationWithoutConsiderReservedCapacityForProtectionVector()
Returns the utilization per link (excluding protection segments), in increasing order of identifier.
|
double[] |
getLinkUtilizationWithoutConsiderReservedCapacityForProtectionVector(long layerId)
Returns the utilization per link (excluding protection segments), in increasing order of identifier.
|
List<Long> |
getMergedPath(List<Long> originalPath,
List<Long> partialPath)
Finds a new path after merging a
partialPath into an originalPath ,
both of them composed of links (and maybe protection segments). |
List<Long> |
getMergedPath(long layerId,
List<Long> originalPath,
List<Long> partialPath)
Finds a new path after merging a
partialPath into an originalPath ,
both of them composed of links (and maybe protection segments). |
String |
getNetworkAttribute(String key)
Returns the value of a network attribute.
|
Map<String,String> |
getNetworkAttributeMap()
Returns the attributes of the network.
|
String |
getNetworkDescription()
Returns the description of the network.
|
String |
getNetworkName()
Returns the name of the network.
|
Set<Long> |
getNodeAssociatedDemands(long nodeId)
Gets all the links which has a given node as origin or destination.
|
Set<Long> |
getNodeAssociatedDemands(long layerId,
long nodeId)
Gets all the links which has a given node as origin or destination.
|
Set<Long> |
getNodeAssociatedLinks(long nodeId)
Gets all the links which has a given node as origin or destination.
|
Set<Long> |
getNodeAssociatedLinks(long layerId,
long nodeId)
Gets all the links which has a given node as origin or destination.
|
Set<Long> |
getNodeAssociatedProtectionSegments(long nodeId)
Returns the protection segments traversing a given node.
|
Set<Long> |
getNodeAssociatedProtectionSegments(long layerId,
long nodeId)
Returns the protection segments traversing a given node.
|
Set<Long> |
getNodeAssociatedRoutes(long nodeId)
Returns the routes traversing a given node (but not starting/ending there).
|
Set<Long> |
getNodeAssociatedRoutes(long layerId,
long nodeId)
Returns the routes traversing a given node (but not starting/ending there).
|
String |
getNodeAttribute(long nodeId,
String key)
Returns the value of a given attribute for a node.
|
Map<String,String> |
getNodeAttributeMap(long nodeId)
Returns the attributes defined for a given node.
|
long |
getNodeByAttribute(String attribute,
String value)
Returns the identifier of the first node with a given value in a
certain attribute, or -1 if not found.
|
long |
getNodeByName(String name)
Returns the identifier of the first node matching the given name, or -1 if
not found.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeDemandAdjacencyMatrix()
Given a map of demands, it computes the adjacency matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeDemandAdjacencyMatrix(long layerId)
Given a map of demands, it computes the adjacency matrix.
|
Set<Pair<Long,Long>> |
getNodeDemandForwardingRules(long nodeId,
long demandId)
Returns the set of forwarding rules installed in a given node for a given demand.
|
Set<Pair<Long,Long>> |
getNodeDemandForwardingRules(long layerId,
long nodeId,
long demandId)
Returns the set of forwarding rules installed in a given node for a given demand.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeDemandIncidenceMatrix()
Given a map of demands, it computes the node-demand incidence matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeDemandIncidenceMatrix(long layerId)
Given a map of demands, it computes the node-demand incidence matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeDemandIncomingIncidenceMatrix()
Given a map of demands, it computes the node-demand incoming incidence
matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeDemandIncomingIncidenceMatrix(long layerId)
Given a map of demands, it computes the node-demand incoming incidence
matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeDemandOutgoingIncidenceMatrix()
Given a map of demands, it computes the node-demand outgoing incidence matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeDemandOutgoingIncidenceMatrix(long layerId)
Given a map of demands, it computes the node-demand outgoing incidence matrix.
|
double |
getNodeEgressTraffic(long nodeId)
Returns the egress traffic of a node (in demand traffic units), that is,
the traffic leaving the network through that node.
|
double |
getNodeEgressTraffic(long layerId,
long nodeId)
Returns the egress traffic of a node (in demand traffic units), that is,
the traffic leaving the network through that node.
|
Map<Long,Double> |
getNodeEgressTrafficMap()
Returns the egress traffic per node (in demand traffic units), that is,
the traffic leaving the network through each node.
|
Map<Long,Double> |
getNodeEgressTrafficMap(long layerId)
Returns the egress traffic per node (in demand traffic units), that is,
the traffic leaving the network through each node.
|
double[] |
getNodeEgressTrafficVector()
Returns the egress traffic per node (in demand traffic units), that is,
the traffic leaving the network through each node, in increasing order of
identifier.
|
double[] |
getNodeEgressTrafficVector(long layerId)
Returns the egress traffic per node (in demand traffic units), that is,
the traffic leaving the network through each node, in increasing order of
identifier.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeEuclideanDistanceMatrix()
Returns the NxN Euclidean distance matrix (derived
from node coordinates), where N is the number of nodes within the network.
|
Set<Pair<Long,Long>> |
getNodeForwardingRules(long nodeId)
Returns the set of forwarding rules installed in a given node.
|
Set<Pair<Long,Long>> |
getNodeForwardingRules(long layerId,
long nodeId)
Returns the set of forwarding rules installed in a given node.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeHaversineDistanceInKmMatrix()
Returns the NxN Haversine distance matrix (derived
from node coordinates, where 'xCoord' is equal to longitude and 'yCoord'
is equal to latitude), where N is the number of nodes within the network.
|
Set<Long> |
getNodeIds()
Returns the set of identifiers of the active nodes.
|
long[] |
getNodeIdsVector()
Returns the set of identifiers of the active nodes, in increasing order of
identifier.
|
Set<Long> |
getNodeIncomingDemands(long nodeId)
Returns the demands ending in a given node.
|
Set<Long> |
getNodeIncomingDemands(long layerId,
long nodeId)
Returns the demands ending in a given node.
|
Set<Long> |
getNodeIncomingLinks(long nodeId)
Returns the links ending in a given node.
|
Set<Long> |
getNodeIncomingLinks(long layerId,
long nodeId)
Returns the links ending in a given node.
|
Set<Long> |
getNodeIncomingRoutes(long nodeId)
Returns the routes ending in a given node.
|
Set<Long> |
getNodeIncomingRoutes(long layerId,
long nodeId)
Returns the routes ending in a given node.
|
double |
getNodeIngressTraffic(long nodeId)
Returns the ingress traffic of a node node (in demand traffic units), that is,
the traffic entering the network through that node.
|
double |
getNodeIngressTraffic(long layerId,
long nodeId)
Returns the ingress traffic of a node node (in demand traffic units), that is,
the traffic entering the network through that node.
|
Map<Long,Double> |
getNodeIngressTrafficMap()
Returns the ingress traffic per node (in demand traffic units), that is,
the traffic entering the network through each node.
|
Map<Long,Double> |
getNodeIngressTrafficMap(long layerId)
Returns the ingress traffic per node (in demand traffic units), that is,
the traffic entering the network through each node.
|
double[] |
getNodeIngressTrafficVector()
Returns the ingress traffic per node (in demand traffic units), that is,
the traffic entering the network through each node, in increasing order of
identifier.
|
double[] |
getNodeIngressTrafficVector(long layerId)
Returns the ingress traffic per node (in demand traffic units), that is,
the traffic entering the network through each node, in increasing order of
identifier.
|
Set<Long> |
getNodeInNeighbors(long nodeId)
Returns the set of nodes whose links are incoming to a given node.
|
Set<Long> |
getNodeInNeighbors(long layerId,
long nodeId)
Returns the set of nodes whose links are incoming to a given node.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeLinkAdjacencyMatrix()
Given a map of links, it computes the adjacency matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeLinkAdjacencyMatrix(long layerId)
Given a map of links, it computes the adjacency matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeLinkIncidenceMatrix()
Given a map of links, it computes the node-link incidence matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeLinkIncidenceMatrix(long layerId)
Given a map of links, it computes the node-link incidence matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeLinkIncomingIncidenceMatrix()
Given a map of links, it computes the node-link incoming incidence
matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeLinkIncomingIncidenceMatrix(long layerId)
Given a map of links, it computes the node-link incoming incidence
matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeLinkOutgoingIncidenceMatrix()
Given a map of links, it computes the node-link outgoing incidence matrix.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getNodeLinkOutgoingIncidenceMatrix(long layerId)
Given a map of links, it computes the node-link outgoing incidence matrix.
|
String |
getNodeName(long nodeId)
Returns the node name.
|
Map<Long,String> |
getNodeNameMap()
Returns the name for each node.
|
String[] |
getNodeNameVector()
Returns the name for each node, in increasing order of identifier.
|
long |
getNodeNextId()
Returns the next identifier for a new node.
|
Set<Long> |
getNodeOutgoingDemands(long nodeId)
Returns the demands starting in a given node.
|
Set<Long> |
getNodeOutgoingDemands(long layerId,
long nodeId)
Returns the demands starting in a given node.
|
Set<Long> |
getNodeOutgoingLinks(long nodeId)
Returns the links starting in a given node.
|
Set<Long> |
getNodeOutgoingLinks(long layerId,
long nodeId)
Returns the links starting in a given node.
|
Set<Long> |
getNodeOutgoingRoutes(long nodeId)
Returns the routes starting in a given node.
|
Set<Long> |
getNodeOutgoingRoutes(long layerId,
long nodeId)
Returns the routes starting in a given node at the given layer.
|
Set<Long> |
getNodeOutNeighbors(long nodeId)
Returns the set of nodes reachable from the outgoing links of a given node.
|
Set<Long> |
getNodeOutNeighbors(long layerId,
long nodeId)
Returns the set of nodes reachable from the outgoing links of a given node.
|
double |
getNodePairAverageOfferedTraffic()
Returns the average offered traffic per node pair.
|
double |
getNodePairAverageOfferedTraffic(long layerId)
Returns the average offered traffic per node pair.
|
Set<Long> |
getNodePairBidirectionalDemands(long node1,
long node2)
Returns demands between two nodes (in both directions).
|
Set<Long> |
getNodePairBidirectionalDemands(long layerId,
long node1,
long node2)
Returns demands between two nodes (in both directions).
|
Set<Long> |
getNodePairBidirectionalLinks(long node1,
long node2)
Returns links between two nodes (in both directions).
|
Set<Long> |
getNodePairBidirectionalLinks(long layerId,
long node1,
long node2)
Returns links between two nodes (in both directions).
|
Set<Long> |
getNodePairDemands(long ingressNodeId,
long egressNodeId)
Returns the demands from a node to other one.
|
Set<Long> |
getNodePairDemands(long layerId,
long ingressNodeId,
long egressNodeId)
Returns the demands from a node to other one.
|
double |
getNodePairEuclideanDistance(long nodeId_1,
long nodeId_2)
Gets the Euclidean distance (derived from node coordinates,
where 'xCoord' is equal to longitude and 'yCoord' is equal to latitude) for a node pair.
|
double |
getNodePairHaversineDistanceInKm(long nodeId_1,
long nodeId_2)
Gets the Haversine distance matrix (derived from node coordinates,
where 'xCoord' is equal to longitude and 'yCoord' is equal to latitude) for a node pair.
|
Set<Long> |
getNodePairLinks(long originNodeId,
long destinationNodeId)
Returns the links from a node to other one.
|
Set<Long> |
getNodePairLinks(long layerId,
long originNodeId,
long destinationNodeId)
Returns the links from a node to other one.
|
Set<Long> |
getNodePairRoutes(long ingressNodeId,
long egressNodeId)
Returns the routes from a node to other one.
|
Set<Long> |
getNodePairRoutes(long layerId,
long ingressNodeId,
long egressNodeId)
Returns the routes from a node to other one.
|
Map<Long,String> |
getNodesAttributeMap(String key)
Returns the value of an attribute for each node.
|
Set<Long> |
getNodesByAttribute(String attribute,
String value)
Returns the identifiers of the nodes with a given value in a certain attribute.
|
Set<Long> |
getNodesDown()
Returns the set of nodes down.
|
Set<Long> |
getNodeSRGs(long nodeId)
Returns all SRGs associated to a given node.
|
Map<Long,Set<Long>> |
getNodeSRGsMap()
Returns all SRGs associated to each node.
|
Set<Long> |
getNodeTraversingRoutes(long nodeId)
Returns the routes traversing a given node (but not starting/ending there).
|
Set<Long> |
getNodeTraversingRoutes(long layerId,
long nodeId)
Returns the routes traversing a given node (but not starting/ending there).
|
double |
getNodeTraversingTraffic(long nodeId)
Returns the traversing traffic of a node (in demand traffic units), that is,
the processed traffic neither entering or leaving the network through that node.
|
double |
getNodeTraversingTraffic(long layerId,
long nodeId)
Returns the traversing traffic of a node (in demand traffic units), that is,
the processed traffic neither entering or leaving the network through that node.
|
Map<Long,Double> |
getNodeTraversingTrafficMap()
Returns the traversing traffic per node (in demand traffic units), that is,
the processed traffic neither entering or leaving the network through each node.
|
Map<Long,Double> |
getNodeTraversingTrafficMap(long layerId)
Returns the traversing traffic per node (in demand traffic units), that is,
the processed traffic neither entering or leaving the network through each node.
|
double[] |
getNodeTraversingTrafficVector()
Returns the traversing traffic per node (in demand traffic units), that is,
the processed traffic neither entering or leaving the network through each node,
in increasing order of identifier.
|
double[] |
getNodeTraversingTrafficVector(long layerId)
Returns the traversing traffic per node (in demand traffic units), that is,
the processed traffic neither entering or leaving the network through each node,
in increasing order of identifier.
|
Point2D |
getNodeXYPosition(long nodeId)
Returns the node position in a 2D Cartesian plane.
|
Map<Long,Point2D> |
getNodeXYPositionMap()
Returns the position for each node.
|
int |
getNumberOfDemands()
Returns the number of traffic demands defined.
|
int |
getNumberOfDemands(long layerId)
Returns the number of traffic demands defined.
|
int |
getNumberOfForwardingRules()
Returns the number of forwarding rules.
|
int |
getNumberOfForwardingRules(long layerId)
Returns the number of forwarding rules.
|
int |
getNumberOfLayers()
Returns the number of layers defined in the network.
|
int |
getNumberOfLinks()
Returns the number of unidirectional links.
|
int |
getNumberOfLinks(long layerId)
Returns the number of unidirectional links.
|
int |
getNumberOfNodePairs()
Returns the number of node pairs.
|
int |
getNumberOfNodes()
Returns the number of nodes defined within the network.
|
int |
getNumberOfProtectionSegments()
Returns the number of protection segments.
|
int |
getNumberOfProtectionSegments(long layerId)
Returns the number of protection segments.
|
int |
getNumberOfRoutes()
Returns the number of routes for traffic demands defined.
|
int |
getNumberOfRoutes(long layerId)
Returns the number of routes for traffic demands defined.
|
int |
getNumberOfSRGs()
Returns the number of SRGs defined.
|
Map<Long,List<Long>> |
getProtectionSegmentAllSequenceOfLinks()
Returns the list with the sequence of links for each protection segment.
|
Map<Long,List<Long>> |
getProtectionSegmentAllSequenceOfLinks(long layerId)
Returns the list with the sequence of links for each protection segment.
|
String |
getProtectionSegmentAttribute(long layerId,
long segmentId,
String key)
Returns the value of a given attribute for a protection segment.
|
String |
getProtectionSegmentAttribute(long segmentId,
String key)
Returns the value of a given attribute for a protection segment.
|
Map<String,String> |
getProtectionSegmentAttributeMap(long segmentId)
Returns the attributes defined for a given protection segment.
|
Map<String,String> |
getProtectionSegmentAttributeMap(long layerId,
long segmentId)
Returns the attributes defined for a given protection segment.
|
long |
getProtectionSegmentByAttribute(long layerId,
String attribute,
String value)
Returns the identifier of the first protection segment with a given value in a
certain attribute, or -1 if not found.
|
long |
getProtectionSegmentByAttribute(String attribute,
String value)
Returns the identifier of the first protection segment with a given value in a
certain attribute, or -1 if not found.
|
double |
getProtectionSegmentCarriedTraffic(long segmentId)
Returns the carried traffic for a given protection segment.
|
double |
getProtectionSegmentCarriedTraffic(long layerId,
long segmentId)
Returns the carried traffic for a given protection segment.
|
Map<Long,Double> |
getProtectionSegmentCarriedTrafficMap()
Returns the carried traffic for each protection segment.
|
Map<Long,Double> |
getProtectionSegmentCarriedTrafficMap(long layerId)
Returns the carried traffic for each protection segment.
|
double[] |
getProtectionSegmentCarriedTrafficVector()
Returns the carried traffic for each protection segment, in increasing
order of identifier.
|
double[] |
getProtectionSegmentCarriedTrafficVector(long layerId)
Returns the carried traffic for each protection segment, in increasing
order of identifier.
|
long |
getProtectionSegmentDestinationNode(long segmentId)
Returns the identifier of the destination node of the given protection segment.
|
long |
getProtectionSegmentDestinationNode(long layerId,
long segmentId)
Returns the identifier of the destination node of the given protection segment.
|
Set<Long> |
getProtectionSegmentIds()
Returns the set of identifiers of the protection segments.
|
Set<Long> |
getProtectionSegmentIds(long layerId)
Returns the set of identifiers of the protection segments.
|
long[] |
getProtectionSegmentIdsVector()
Returns the set of identifiers of the protection segments, in increasing
order of identifier.
|
long[] |
getProtectionSegmentIdsVector(long layerId)
Returns the set of identifiers of the protection segments, in increasing
order of identifier.
|
double |
getProtectionSegmentLengthInKm(long segmentId)
Returns the length in kilometers for the given protection segment.
|
double |
getProtectionSegmentLengthInKm(long layerId,
long segmentId)
Returns the length in kilometers for the given protection segment.
|
Map<Long,Double> |
getProtectionSegmentLengthInKmMap()
Returns the length in kilometers for each protection segment.
|
Map<Long,Double> |
getProtectionSegmentLengthInKmMap(long layerId)
Returns the length in kilometers for each protection segment.
|
double[] |
getProtectionSegmentLengthInKmVector()
Returns the length in kilometers for each protection segment, in increasing
order of identifier.
|
double[] |
getProtectionSegmentLengthInKmVector(long layerId)
Returns the length in kilometers for each protection segment, in increasing
order of identifier.
|
long |
getProtectionSegmentNextId()
Returns the next identifier for a new protection segment.
|
long |
getProtectionSegmentNextId(long layerId)
Returns the next identifier for a new protection segment.
|
int |
getProtectionSegmentNumberOfHops(long segmentId)
Returns the number of hops for a given protection segment.
|
int |
getProtectionSegmentNumberOfHops(long layerId,
long segmentId)
Returns the number of hops for a given protection segment.
|
Map<Long,Integer> |
getProtectionSegmentNumberOfHopsMap()
Returns the number of hops per protection segment.
|
Map<Long,Integer> |
getProtectionSegmentNumberOfHopsMap(long layerId)
Returns the number of hops per protection segment.
|
int[] |
getProtectionSegmentNumberOfHopsVector()
Returns the number of hops per protection segment, in increasing order of identifier.
|
int[] |
getProtectionSegmentNumberOfHopsVector(long layerId)
Returns the number of hops per protection segment, in increasing order of identifier.
|
Pair<Long,Long> |
getProtectionSegmentOriginDestinationNodePair(long segmentId)
Returns the origin-destination node pair for the given protection segment.
|
Pair<Long,Long> |
getProtectionSegmentOriginDestinationNodePair(long layerId,
long segmentId)
Returns the origin-destination node pair for the given protection segment.
|
long |
getProtectionSegmentOriginNode(long segmentId)
Returns the identifier of the origin node of the given protection segment.
|
long |
getProtectionSegmentOriginNode(long layerId,
long segmentId)
Returns the identifier of the origin node of the given protection segment.
|
double |
getProtectionSegmentPropagationDelayInSeconds(long segmentId)
Returns the propagation delay in seconds of a given protection segment.
|
double |
getProtectionSegmentPropagationDelayInSeconds(long layerId,
long segmentId)
Returns the propagation delay in seconds of a given protection segment.
|
Map<Long,Double> |
getProtectionSegmentPropagationDelayInSecondsMap()
Returns the propagation delay in seconds per protection segment.
|
Map<Long,Double> |
getProtectionSegmentPropagationDelayInSecondsMap(long layerId)
Returns the propagation delay in seconds per protection segment.
|
double[] |
getProtectionSegmentPropagationDelayInSecondsVector()
Returns the propagation delay in seconds per protection segment, in
increasing order of identifier.
|
double[] |
getProtectionSegmentPropagationDelayInSecondsVector(long layerId)
Returns the propagation delay in seconds per protection segment, in
increasing order of identifier.
|
double |
getProtectionSegmentReservedCapacity(long segmentId)
Returns the reserved capacity of a protection segment.
|
double |
getProtectionSegmentReservedCapacity(long layerId,
long segmentId)
Returns the reserved capacity of a protection segment.
|
Map<Long,Double> |
getProtectionSegmentReservedCapacityMap()
Returns the reserved capacity per protection segment.
|
Map<Long,Double> |
getProtectionSegmentReservedCapacityMap(long layerId)
Returns the reserved capacity per protection segment.
|
double[] |
getProtectionSegmentReservedCapacityVector()
Returns the reserved capacity per protection segment, in increasing order
of identifier.
|
double[] |
getProtectionSegmentReservedCapacityVector(long layerId)
Returns the reserved capacity per protection segment, in increasing order
of identifier.
|
Set<Long> |
getProtectionSegmentRoutes(long segmentId)
Returns the routes which share a given protection segment.
|
Set<Long> |
getProtectionSegmentRoutes(long layerId,
long segmentId)
Returns the routes which share a given protection segment.
|
Map<Long,Set<Long>> |
getProtectionSegmentRoutesMap()
Returns the routes which share each protection segment.
|
Map<Long,Set<Long>> |
getProtectionSegmentRoutesMap(long layerId)
Returns the routes which share each protection segment.
|
Map<Long,String> |
getProtectionSegmentsAttributeMap(long layerId,
String key)
Returns the value of an attribute for each protection segment.
|
Map<Long,String> |
getProtectionSegmentsAttributeMap(String key)
Returns the value of an attribute for each protection segment.
|
Set<Long> |
getProtectionSegmentsByAttribute(long layerId,
String attribute,
String value)
Returns the identifiers of the protection segments with a given value in a certain attribute.
|
Set<Long> |
getProtectionSegmentsByAttribute(String attribute,
String value)
Returns the identifiers of the protection segments with a given value in a certain attribute.
|
Set<Long> |
getProtectionSegmentsDedicated()
Returns the set of protection segments assigned only to one route.
|
Set<Long> |
getProtectionSegmentsDedicated(long layerId)
Returns the set of protection segments assigned only to one route.
|
Set<Long> |
getProtectionSegmentsDown()
Returns the set of protection segments down.
|
Set<Long> |
getProtectionSegmentsDown(long layerId)
Returns the set of protection segments down.
|
Map<Long,Set<Long>> |
getProtectionSegmentsDownMap()
Returns the set of protection segments down per layer.
|
List<Long> |
getProtectionSegmentSequenceOfLinks(long segmentId)
Returns the sequence of links traversed by a protection segment.
|
List<Long> |
getProtectionSegmentSequenceOfLinks(long layerId,
long segmentId)
Returns the sequence of links traversed by a protection segment.
|
List<Long> |
getProtectionSegmentSequenceOfNodes(long segmentId)
Returns the sequence of nodes traversed by a protection segment.
|
List<Long> |
getProtectionSegmentSequenceOfNodes(long layerId,
long segmentId)
Returns the sequence of nodes traversed by a protection segment.
|
double |
getProtectionSegmentSpareCapacity(long segmentId)
Returns the available capacity for a protection segment.
|
double |
getProtectionSegmentSpareCapacity(long layerId,
long segmentId)
Returns the available capacity for a protection segment.
|
Map<Long,Double> |
getProtectionSegmentSpareCapacityMap()
Returns the available capacity per protection segment.
|
Map<Long,Double> |
getProtectionSegmentSpareCapacityMap(long layerId)
Returns the available capacity per protection segment.
|
double[] |
getProtectionSegmentSpareCapacityVector()
Returns the available capacity per protection segment, in increasing
order of identifier.
|
double[] |
getProtectionSegmentSpareCapacityVector(long layerId)
Returns the available capacity per protection segment, in increasing
order of identifier.
|
Set<Long> |
getProtectionSegmentSRGs(long segmentId)
Returns all SRGs associated to a given protection segment.
|
Set<Long> |
getProtectionSegmentSRGs(long layerId,
long segmentId)
Returns all SRGs associated to a given protection segment.
|
Map<Long,Set<Long>> |
getProtectionSegmentSRGsMap()
Returns all SRGs associated to each protection segment.
|
Map<Long,Set<Long>> |
getProtectionSegmentSRGsMap(long layerId)
Returns all SRGs associated to each protection segment.
|
Map<Long,List<Long>> |
getRouteAllSequenceOfLinks()
Returns the sequence of links (and maybe protection segments) for each
route.
|
Map<Long,List<Long>> |
getRouteAllSequenceOfLinks(long layerId)
Returns the sequence of links (and maybe protection segments) for each
route.
|
String |
getRouteAttribute(long layerId,
long routeId,
String key)
* Returns the value of a given attribute for a route.
|
String |
getRouteAttribute(long routeId,
String key)
Returns the value of a given attribute for a route.
|
Map<String,String> |
getRouteAttributeMap(long routeId)
Returns the attributes defined for a given route.
|
Map<String,String> |
getRouteAttributeMap(long layerId,
long routeId)
Returns the attributes defined for a given route.
|
List<Long> |
getRouteBackupSegmentList(long routeId)
Returns the protection segments defined for a given route.
|
List<Long> |
getRouteBackupSegmentList(long layerId,
long routeId)
Returns the protection segments defined for a given route.
|
Map<Long,List<Long>> |
getRouteBackupSegmentListMap()
Returns the backup segment list per route.
|
Map<Long,List<Long>> |
getRouteBackupSegmentListMap(long layerId)
Returns the backup segment list per route.
|
long |
getRouteByAttribute(long layerId,
String attribute,
String value)
Returns the identifier of the first route with a given value in a
certain attribute, or -1 if not found.
|
long |
getRouteByAttribute(String attribute,
String value)
Returns the identifier of the first route with a given value in a
certain attribute, or -1 if not found.
|
double |
getRouteCarriedTraffic(long routeId)
Returns the carried traffic (in demand traffic units) for a given route.
|
double |
getRouteCarriedTraffic(long layerId,
long routeId)
Returns the carried traffic (in demand traffic units) for a given route.
|
double |
getRouteCarriedTrafficFraction(long routeId)
Returns the ratio between the carried traffic per route with respect to
the total offered traffic by the corresponding demand.
|
double |
getRouteCarriedTrafficFraction(long layerId,
long routeId)
Returns the ratio between the carried traffic per route with respect to
the total offered traffic by the corresponding demand.
|
Map<Long,Double> |
getRouteCarriedTrafficFractionMap()
Returns the carried traffic (in demand traffic units), with respect to
the total offered traffic by the corresponding demand, per route.
|
Map<Long,Double> |
getRouteCarriedTrafficFractionMap(long layerId)
Returns the carried traffic (in demand traffic units), with respect to
the total offered traffic by the corresponding demand, per route.
|
double[] |
getRouteCarriedTrafficFractionVector()
Returns the carried traffic (in demand traffic units), with respect to
the total offered traffic by the corresponding demand, per route, in increasing
order of identifier.
|
double[] |
getRouteCarriedTrafficFractionVector(long layerId)
Returns the carried traffic (in demand traffic units), with respect to
the total offered traffic by the corresponding demand, per route, in increasing
order of identifier.
|
Map<Long,Double> |
getRouteCarriedTrafficMap()
Returns the carried traffic (in demand traffic units) per route.
|
Map<Long,Double> |
getRouteCarriedTrafficMap(long layerId)
Returns the carried traffic (in demand traffic units) per route.
|
double[] |
getRouteCarriedTrafficVector()
Returns the carried traffic (in demand traffic units) per route, in
increasing order of identifier.
|
double[] |
getRouteCarriedTrafficVector(long layerId)
Returns the carried traffic (in demand traffic units) per route, in
increasing order of identifier.
|
Constants.RoutingCycleType |
getRouteCycleType(long routeId)
Returns the cycle type of a route (i.e., loopless, or with loops).
|
Constants.RoutingCycleType |
getRouteCycleType(long layerId,
long routeId)
Returns the cycle type of a route (i.e., loopless, or with loops).
|
long |
getRouteDemand(long routeId)
Returns the associated demand for a given route.
|
long |
getRouteDemand(long layerId,
long routeId)
Returns the associated demand for a given route.
|
Map<Long,Long> |
getRouteDemandMap()
Returns the associated demand per route.
|
Map<Long,Long> |
getRouteDemandMap(long layerId)
Returns the associated demand per route.
|
long[] |
getRouteDemandVector()
Returns the associated demand per route, in increasing order of identifier.
|
long[] |
getRouteDemandVector(long layerId)
Returns the associated demand per route, in increasing order of identifier.
|
long |
getRouteEgressNode(long routeId)
Returns the identifier of the egress node of the given route.
|
long |
getRouteEgressNode(long layerId,
long routeId)
Returns the identifier of the egress node of the given route.
|
Set<Long> |
getRouteIds()
Returns the set of identifiers of the routes.
|
Set<Long> |
getRouteIds(long layerId)
Returns the set of identifiers of the routes.
|
long[] |
getRouteIdsVector()
Returns the set of identifiers of the routes, in increasing order of identifier.
|
long[] |
getRouteIdsVector(long layerId)
Returns the set of identifiers of the routes, in increasing order of identifier.
|
Pair<Long,Long> |
getRouteIngressEgressNodePair(long routeId)
Returns the ingress-egress node pair of a route.
|
Pair<Long,Long> |
getRouteIngressEgressNodePair(long layerId,
long routeId)
Returns the ingress-egress node pair of a route.
|
long |
getRouteIngressNode(long routeId)
Returns the identifier of the ingress node of the given route.
|
long |
getRouteIngressNode(long layerId,
long routeId)
Returns the identifier of the ingress node of the given route.
|
double |
getRouteLengthInKm(long routeId)
Returns the length in kilometers for the given route.
|
double |
getRouteLengthInKm(long layerId,
long routeId)
Returns the length in kilometers for the given route.
|
Map<Long,Double> |
getRouteLengthInKmMap()
Returns the length in kilometers per route.
|
Map<Long,Double> |
getRouteLengthInKmMap(long layerId)
Returns the length in kilometers per route.
|
double[] |
getRouteLengthInKmVector()
Returns the length in kilometers per route, in increasing order of identifier.
|
double[] |
getRouteLengthInKmVector(long layerId)
Returns the length in kilometers per route, in increasing order of identifier.
|
long |
getRouteNextId()
Returns the next identifier for a new route.
|
long |
getRouteNextId(long layerId)
Returns the next identifier for a new route.
|
int |
getRouteNumberOfHops(long routeId)
Returns the number of hops for a given route.
|
int |
getRouteNumberOfHops(long layerId,
long routeId)
Returns the number of hops for a given route.
|
Map<Long,Integer> |
getRouteNumberOfHopsMap()
Returns the number of hops per route.
|
Map<Long,Integer> |
getRouteNumberOfHopsMap(long layerId)
Returns the number of hops per route.
|
int[] |
getRouteNumberOfHopsVector()
Returns the number of hops per route, in increasing order of identifier.
|
int[] |
getRouteNumberOfHopsVector(long layerId)
Returns the number of hops per route, in increasing order of identifier.
|
double |
getRouteOccupiedCapacity(long routeId)
Returns the capacity occupied (in link capacity units) by the given route.
|
double |
getRouteOccupiedCapacity(long layerId,
long routeId)
Returns the capacity occupied (in link capacity units) by the given route.
|
Map<Long,Double> |
getRouteOccupiedCapacityMap()
Returns the capacity occupied (in link capacity units) per route.
|
Map<Long,Double> |
getRouteOccupiedCapacityMap(long layerId)
Returns the capacity occupied (in link capacity units) per route.
|
double[] |
getRouteOccupiedCapacityVector()
Returns the capacity occupied (in link capacity units) per route, in
increasing order of identifier.
|
double[] |
getRouteOccupiedCapacityVector(long layerId)
Returns the capacity occupied (in link capacity units) per route, in
increasing order of identifier.
|
double |
getRouteOriginalCarriedTraffic(long routeId)
Returns the original carried traffic (in demand traffic units) by the route.
|
double |
getRouteOriginalCarriedTraffic(long layerId,
long routeId)
Returns the original carried traffic (in demand traffic units) by the route.
|
double |
getRouteOriginalOccupiedCapacity(long routeId)
Returns the original occupied capacity (in link capacity units) by the route.
|
double |
getRouteOriginalOccupiedCapacity(long layerId,
long routeId)
Returns the original occupied capacity (in link capacity units) by the route.
|
List<Long> |
getRouteOriginalSequenceOfLinks(long routeId)
Returns the original sequence of links of the route.
|
List<Long> |
getRouteOriginalSequenceOfLinks(long layerId,
long routeId)
Returns the original sequence of links of the route.
|
double |
getRoutePropagationDelayInSeconds(long routeId)
Returns the propagation delay in seconds in a given route.
|
double |
getRoutePropagationDelayInSeconds(long layerId,
long routeId)
Returns the propagation delay in seconds in a given route.
|
Map<Long,Double> |
getRoutePropagationDelayInSecondsMap()
Returns the propagation delay per route.
|
Map<Long,Double> |
getRoutePropagationDelayInSecondsMap(long layerId)
Returns the propagation delay per route.
|
double[] |
getRoutePropagationDelayInSecondsVector()
Returns the propagation delay per route, in increasing order of identifier.
|
double[] |
getRoutePropagationDelayInSecondsVector(long layerId)
Returns the propagation delay per route, in increasing order of identifier.
|
Map<Long,String> |
getRoutesAttributeMap(long layerId,
String key)
Returns the value of an attribute for each route.
|
Map<Long,String> |
getRoutesAttributeMap(String key)
Returns the value of an attribute for each route.
|
Set<Long> |
getRoutesByAttribute(long layerId,
String attribute,
String value)
Returns the identifiers of the routes with a given value in a certain attribute.
|
Set<Long> |
getRoutesByAttribute(String attribute,
String value)
Returns the identifiers of the routes with a given value in a certain attribute.
|
Set<Long> |
getRoutesDown()
Returns the set of routes in down state.
|
Set<Long> |
getRoutesDown(long layerId)
Returns the set of routes in down state.
|
Map<Long,Set<Long>> |
getRoutesDownMap()
Returns the set of routes in down state per layer.
|
List<Long> |
getRouteSequenceOfLinks(long routeId)
Returns the sequence of links (and maybe protection segments) traversed by
a route.
|
List<Long> |
getRouteSequenceOfLinks(long layerId,
long routeId)
Returns the sequence of links (and maybe protection segments) traversed by
a route.
|
List<Long> |
getRouteSequenceOfNodes(long routeId)
Returns the sequence of nodes traversed by a route (including those in
protection segments).
|
List<Long> |
getRouteSequenceOfNodes(long layerId,
long routeId)
Returns the sequence of nodes traversed by a route (including those in
protection segments).
|
Set<Long> |
getRouteSRGs(long routeId)
Returns all SRGs associated to a given route.
|
Set<Long> |
getRouteSRGs(long layerId,
long routeId)
Returns all SRGs associated to a given route.
|
Map<Long,Set<Long>> |
getRouteSRGsMap()
Returns all SRGs associated per route.
|
Map<Long,Set<Long>> |
getRouteSRGsMap(long layerId)
Returns all SRGs associated per route.
|
Constants.RoutingType |
getRoutingType()
Returns the current
RoutingType . |
Constants.RoutingType |
getRoutingType(long layerId)
Returns the current
RoutingType . |
Map<Long,Constants.RoutingType> |
getRoutingTypeMap()
Returns the current
RoutingType per layer. |
String |
getSRGAttribute(long srgId,
String key)
Returns the value of a given attribute for an SRG at the first layer.
|
Map<String,String> |
getSRGAttributeMap(long srgId)
Returns the attributes defined for a given SRG.
|
double |
getSRGAvailability(long srgId)
Returns the availability of the given SRG.
|
Map<Long,Double> |
getSRGAvailabilityMap()
Returns the availability per SRG.
|
double[] |
getSRGAvailabilityVector()
Returns the availability per SRG, in increasing order of identifier.
|
long |
getSRGByAttribute(String attribute,
String value)
Returns the identifier of the first SRG with a given value in a
certain attribute, or -1 if not found.
|
Set<Long> |
getSRGIds()
Returns the set of identifiers of the SRGs.
|
long[] |
getSRGIdsVector()
Returns the set of identifiers of the SRGs, in increasing order of identifier.
|
Set<Long> |
getSRGLinks(long srgId)
Returns the set of links in a given SRG.
|
Set<Long> |
getSRGLinks(long layerId,
long srgId)
Returns the set of links in a given SRG.
|
Map<Long,Set<Long>> |
getSRGLinksAllLayers(long srgId)
Returns the set of links in a given SRG per layer.
|
Map<Long,Set<Long>> |
getSRGLinksMap()
Returns the set of links per SRG.
|
Map<Long,Set<Long>> |
getSRGLinksMap(long layerId)
Returns the set of links per SRG.
|
double |
getSRGMeanTimeToFailInHours(long srgId)
Returns the Mean Time To Fail (in hours) of the given SRG.
|
Map<Long,Double> |
getSRGMeanTimeToFailInHoursMap()
Returns the Mean Time To Fail (in hours) per SRG.
|
double[] |
getSRGMeanTimeToFailInHoursVector()
Returns the Mean Time To Fail (in hours) per SRG, in increasing order of identifier.
|
double |
getSRGMeanTimeToRepairInHours(long srgId)
Returns the Mean Time To Repair (in hours) of the given SRG.
|
Map<Long,Double> |
getSRGMeanTimeToRepairInHoursMap()
Returns the Mean Time To Repair (in hours) per SRG.
|
double[] |
getSRGMeanTimeToRepairInHoursVector()
Returns the Mean Time To Repair (in hours) per SRG, in increasing order of identifier.
|
long |
getSRGNextId()
Returns the next identifier for a new SRG.
|
Set<Long> |
getSRGNodes(long srgId)
Returns the set of nodes in a given SRG.
|
Map<Long,Set<Long>> |
getSRGNodesMap()
Returns the set of nodes per SRG.
|
Set<Long> |
getSRGProtectionSegments(long srgId)
Returns the set of protection segments affected by a given SRG.
|
Set<Long> |
getSRGProtectionSegments(long layerId,
long srgId)
Returns the set of protection segments affected by a given SRG.
|
Map<Long,Set<Long>> |
getSRGProtectionSegmentsMap()
Returns the set of protection segments per SRG.
|
Map<Long,Set<Long>> |
getSRGProtectionSegmentsMap(long layerId)
Returns the set of protection segments per SRG.
|
Set<Long> |
getSRGRoutes(long srgId)
Returns the set of routes affected by a given SRG.
|
Set<Long> |
getSRGRoutes(long layerId,
long srgId)
Returns the set of routes affected by a given SRG.
|
Map<Long,Set<Long>> |
getSRGRoutesMap()
Returns the set of routes per SRG.
|
Map<Long,Set<Long>> |
getSRGRoutesMap(long layerId)
Returns the set of routes per SRG.
|
Map<Long,String> |
getSRGsAttributeMap(String key)
Returns the value of an attribute for each SRG.
|
Set<Long> |
getSRGsByAttribute(String attribute,
String value)
Returns the identifiers of the SRGs with a given value in a certain attribute.
|
Map<Pair<Long,Long>,Double> |
getTrafficMap()
Returns the aggregate traffic between each node pair.
|
Map<Pair<Long,Long>,Double> |
getTrafficMap(long layerId)
Returns the aggregate traffic between each node pair.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getTrafficMatrix()
Returns the traffic matrix, where rows and columns represent the ingress
node and the egress node, respectively, in increasing order of identifier.
|
cern.colt.matrix.tdouble.DoubleMatrix2D |
getTrafficMatrix(long layerId)
Returns the traffic matrix, where rows and columns represent the ingress
node and the egress node, respectively, in increasing order of identifier.
|
boolean |
hasDemands()
Returns
true if there is at least one demand. |
boolean |
hasDemands(long layerId)
Returns
true if there is at least one demand. |
boolean |
hasForwardingRules()
Returns
true if there is at least one forwarding rule. |
boolean |
hasForwardingRules(long layerId)
Returns
true if there is at least one forwarding rule. |
boolean |
hasLinks()
Returns
true if there is at least one link. |
boolean |
hasLinks(long layerId)
Returns
true if there is at least one link. |
boolean |
hasNodes()
Returns
true if there is at least one node. |
boolean |
hasProtectionSegments()
Returns
true if there is at least one protection segment. |
boolean |
hasProtectionSegments(long layerId)
Returns
true if there is at least one protection segment. |
boolean |
hasRoutes()
Returns
true if there is at least one route. |
boolean |
hasRoutes(long layerId)
Returns
true if there is at least one route. |
boolean |
hasRoutingLoops()
Indicates whether or not at least one demand has routing loops.
|
boolean |
hasRoutingLoops(long layerId)
Indicates whether or not at least one demand has routing loops.
|
boolean |
hasSRGs()
Returns
true if there is at least one SRG. |
boolean |
isActionMonitoringActivated()
Indicates whether or not action monitoring is activated.
|
boolean |
isDemandActive(long demandId)
Indicates whether or not a demand is active.
|
boolean |
isDemandActive(long layerId,
long demandId)
Indicates whether or not a demand is active.
|
boolean |
isDemandBifurcated(long demandId)
Indicates whether or a demand is bifurcated, that is, traffic is being sent
through more than one traffic route.
|
boolean |
isDemandBifurcated(long layerId,
long demandId)
Indicates whether or a demand is bifurcated, that is, traffic is being sent
through more than one traffic route.
|
boolean |
isDemandCoupled(long demandId)
Indicates whether or not a demand is coupled to an upper layer link.
|
boolean |
isDemandCoupled(long layerId,
long demandId)
Indicates whether or not a demand is coupled to an upper layer link.
|
boolean |
isEmpty()
Returns
true if the network is empty (i.e. without nodes...). |
boolean |
isForwardingRuleActive(long layerId,
Pair<Long,Long> demandLinkPair)
Indicates whether or not a forwarding rule is active.
|
boolean |
isForwardingRuleActive(Pair<Long,Long> demandLinkPair)
Indicates whether or not a forwarding rule is active.
|
boolean |
isForwardingRuleDown(long layerId,
Pair<Long,Long> demandLinkPair)
Indicates whether or not a forwarding rule is down.
|
boolean |
isForwardingRuleDown(Pair<Long,Long> demandLinkPair)
Indicates whether or not a forwarding rule is down.
|
boolean |
isLayerActive(long layerId)
Indicates whether or not a layer is active.
|
boolean |
isLayerCouplingValid(long lowerLayerId,
long upperLayerId)
Indicates whether or not a further coupling between two layers would be valid.
|
boolean |
isLinkActive(long linkId)
Indicates whether or not a link is active.
|
boolean |
isLinkActive(long layerId,
long linkId)
Indicates whether or not a link is active.
|
boolean |
isLinkBottleneck(long linkId)
Indicates whether or not a link is a bottleneck, that is, if has the largest
utilization among the link set.
|
boolean |
isLinkBottleneck(long layerId,
long linkId)
Indicates whether or not a link is a bottleneck, that is, if has the largest
utilization among the link set.
|
boolean |
isLinkCoupled(long linkId)
Indicates whether or not a link is coupled to a lower layer demand.
|
boolean |
isLinkCoupled(long layerId,
long linkId)
Indicates whether or not a link is coupled to a lower layer demand.
|
boolean |
isLinkDown(long linkId)
Indicates whether or not a link is down.
|
boolean |
isLinkDown(long layerId,
long linkId)
Indicates whether or not a link is down.
|
boolean |
isMultiLayer()
Indicates whether the network design is multilayer.
|
boolean |
isNodeActive(long nodeId)
Indicates whether or not a node is active.
|
boolean |
isNodeDown(long nodeId)
Indicates whether or not a node is down.
|
boolean |
isPathRestorable(List<Long> path)
Indicates whether or not a path (sequence of links, and maybe protection segments)
is restorable, that is, whether the whole set of traversed resources is up.
|
boolean |
isPathRestorable(long layerId,
List<Long> path)
Indicates whether or not a path (sequence of links, and maybe protection segments)
is restorable, that is, whether the whole set of traversed resources is up.
|
boolean |
isProtectionSegmentActive(long segmentId)
Indicates whether or not a protection segment is active.
|
boolean |
isProtectionSegmentActive(long layerId,
long segmentId)
Indicates whether or not a protection segment is active.
|
boolean |
isProtectionSegmentDedicated(long segmentId)
Indicates whether or not a protection segment is dedicated, that is, if it
is associated to only one route.
|
boolean |
isProtectionSegmentDedicated(long layerId,
long segmentId)
Indicates whether or not a protection segment is dedicated, that is, if it
is associated to only one route.
|
boolean |
isProtectionSegmentDown(long segmentId)
Indicates whether or not a protection segment is down.
|
boolean |
isProtectionSegmentDown(long layerId,
long segmentId)
Indicates whether or not a protection segment is down.
|
boolean |
isProtectionSegmentRestorable(long segmentId)
Indicates whether or not a protection segment is restorable, that is, whether the
whole set of resources is up.
|
boolean |
isProtectionSegmentRestorable(long layerId,
long segmentId)
Indicates whether or not a protection segment is restorable, that is, whether the
whole set of resources is up.
|
boolean |
isRouteActive(long routeId)
Indicates whether or not a route is active.
|
boolean |
isRouteActive(long layerId,
long routeId)
Indicates whether or not a route is active.
|
boolean |
isRouteDown(long routeId)
Indicates whether or not a route is down.
|
boolean |
isRouteDown(long layerId,
long routeId)
Indicates whether or not a route is down.
|
boolean |
isRouteRestorable(long routeId)
Indicates whether or not a route is restorable, that is, whether the
whole set of resources is up.
|
boolean |
isRouteRestorable(long layerId,
long routeId)
Indicates whether or not a route is restorable, that is, whether the
whole set of resources is up.
|
boolean |
isRoutingBifurcated()
Indicates whether or not routing is bifurcated, that is, whether any demand
is being actually carried through more than one route.
|
boolean |
isRoutingBifurcated(long layerId)
Indicates whether or not routing is bifurcated, that is, whether any demand
is being actually carried through more than one route.
|
boolean |
isSingleLayer()
Indicates whether the network design is multilayer.
|
boolean |
isSRGActive(long srgId)
Indicates whether or not an SRG is active.
|
static NetPlan |
loadFromFile(File file)
Static factory method to get a
NetPlan from a .n2p file. |
static NetPlan |
loadFromInputStream(InputStream inputStream)
Static factory method to get a
NetPlan from an input stream. |
void |
removeAllDemandForwardingRules(long demandId)
Removes all forwarding rules associated to a demand.
|
void |
removeAllDemandForwardingRules(long layerId,
long demandId)
Removes all forwarding rules associated to a demand.
|
void |
removeAllDemands()
Removes all the demands defined.
|
void |
removeAllDemands(long layerId)
Removes all the demands defined.
|
void |
removeAllForwardingRules()
Removes all forwarding rules.
|
void |
removeAllForwardingRules(long layerId)
Removes all forwarding rules.
|
void |
removeAllLinkForwardingRules(long linkId)
Removes all forwarding rules associated to a link.
|
void |
removeAllLinkForwardingRules(long layerId,
long linkId)
Removes all forwarding rules associated to a link.
|
void |
removeAllLinks()
Removes all the links defined.
|
void |
removeAllLinks(long layerId)
Removes all the links defined.
|
void |
removeAllNodeForwardingRules(long nodeId)
Removes all forwarding rules associated to a node.
|
void |
removeAllNodeForwardingRules(long layerId,
long nodeId)
Removes all forwarding rules associated to a node.
|
void |
removeAllNodes()
Removes all the nodes defined within the network.
|
void |
removeAllProtectionSegments()
Removes all the protection segments defined.
|
void |
removeAllProtectionSegments(long layerId)
Removes all the protection segments defined.
|
void |
removeAllRoutes()
Removes all the routes defined.
|
void |
removeAllRoutes(long layerId)
Removes all the routes defined.
|
void |
removeAllRoutingInformation()
Removes all the routing information, irrespective of the routing type
setting.
|
void |
removeAllRoutingInformation(long layerId)
Removes all the routing information, irrespective of the routing type
setting.
|
void |
removeAllSRGs()
Removes all the SRGs defined within the network.
|
void |
removeDemand(long demandId)
Removes a demand, and any associated route or forwarding rule.
|
void |
removeDemand(long layerId,
long demandId)
Removes a demand, and any associated route or forwarding rule.
|
void |
removeDemandAttribute(long layerId,
long demandId,
String key)
Removes a given attribute from a demand.
|
void |
removeDemandAttribute(long demandId,
String key)
Removes a given attribute from a demand.
|
void |
removeDemands(long layerId,
Set<Long> demandIds)
Removes a set of demands.
|
void |
removeDemands(Set<Long> demandIds)
Removes a set of demands.
|
void |
removeForwardingRule(long layerId,
Pair<Long,Long> demandLinkPair)
Removes a forwarding rule.
|
void |
removeForwardingRule(Pair<Long,Long> demandLinkPair)
Removes a forwarding rule.
|
void |
removeForwardingRuleAttribute(long layerId,
Pair<Long,Long> demandLinkPair,
String key)
Removes a given attribute from a forwarding rule.
|
void |
removeForwardingRuleAttribute(Pair<Long,Long> demandLinkPair,
String key)
Removes a given attribute from a forwarding rule.
|
void |
removeForwardingRules(long layerId,
Set<Pair<Long,Long>> demandLinkPairs)
Removes a set of forwarding rules.
|
void |
removeForwardingRules(Set<Pair<Long,Long>> demandLinkPairs)
Removes a set of forwarding rules.
|
void |
removeLayer(long layerId)
Removes a layer, and any associated link, demand, route, protection segment or forwarding rule.
|
void |
removeLayerAttribute(long layerId,
String key)
Removes a given attribute from the given layer.
|
void |
removeLayers(Set<Long> layerIds)
Removes a set of layers, and any associated link, demand, route, protection segment or forwarding rule.
|
void |
removeLink(long linkId)
Removes a link, and any associated route, protection segment or forwarding rule.
|
void |
removeLink(long layerId,
long linkId)
Removes a link, and any associated route, protection segment or forwarding rule.
|
void |
removeLinkAttribute(long layerId,
long linkId,
String key)
Removes a given attribute from a link.
|
void |
removeLinkAttribute(long linkId,
String key)
Removes a given attribute from a link.
|
void |
removeLinkFromSRG(long linkId,
long srgId)
Removes a link from the set of links of a given SRG at the first layer.
|
void |
removeLinkFromSRG(long layerId,
long linkId,
long srgId)
Removes a link from the set of links of a given SRG at the given layer.
|
void |
removeLinks(long layerId,
Set<Long> linkIds)
Removes a set of links.
|
void |
removeLinks(Set<Long> linkIds)
Removes a set of links.
|
void |
removeNetworkAttribute(String key)
Removes a given attribute from the network.
|
void |
removeNode(long nodeId)
Removes a node, and any associated link, demand, route, protection segment or forwarding rule.
|
void |
removeNodeAttribute(long nodeId,
String key)
Removes a given attribute from a node.
|
void |
removeNodeFromSRG(long nodeId,
long srgId)
Removes a node from the set of nodes of a given SRG.
|
void |
removeNodes(Set<Long> nodeIds)
Removes a set of nodes.
|
void |
removeProtectionSegment(long segmentId)
Removes a protection segment.
|
void |
removeProtectionSegment(long layerId,
long segmentId)
Removes a protection segment.
|
void |
removeProtectionSegmentAttribute(long layerId,
long segmentId,
String key)
Removes a given attribute from a protection segment.
|
void |
removeProtectionSegmentAttribute(long segmentId,
String key)
Removes a given attribute from a protection segment.
|
void |
removeProtectionSegmentFromRouteBackupSegmentList(long segmentId,
long routeId)
Removes a protection segment from the list of backup protection segments of a route.
|
void |
removeProtectionSegmentFromRouteBackupSegmentList(long layerId,
long segmentId,
long routeId)
Removes a protection segment from the list of backup protection segments of a route.
|
void |
removeProtectionSegments(long layerId,
Set<Long> segmentIds)
Removes a set of protection segments.
|
void |
removeProtectionSegments(Set<Long> segmentIds)
Removes a set of protection segments.
|
void |
removeRoute(long routeId)
Removes a route.
|
void |
removeRoute(long layerId,
long routeId)
Removes a route.
|
void |
removeRouteAttribute(long layerId,
long routeId,
String key)
Removes a given attribute from a route.
|
void |
removeRouteAttribute(long routeId,
String key)
Removes a given attribute from a route.
|
void |
removeRoutes(long layerId,
Set<Long> routeIds)
Removes a set of routes.
|
void |
removeRoutes(Set<Long> routeIds)
Removes a set of routes.
|
void |
removeSRG(long srgId)
Removes an SRG.
|
void |
removeSRGAttribute(long srgId,
String key)
Removes a given attribute from an SRG.
|
void |
removeSRGs(Set<Long> srgIds)
Removes a set of SRGs.
|
void |
reset()
Resets the state of the network to an empty
NetPlan . |
void |
saveToFile(File file)
Saves the current network plan to a given file.
|
void |
saveToOutputStream(OutputStream outputStream)
Saves the current network plan to a given output stream.
|
void |
setAllLinksUp()
Sets all links currently down as up.
|
void |
setAllLinksUp(long layerId)
Sets all links currently down as up.
|
void |
setAllNodesUp()
Sets all nodes currently down as up.
|
void |
setAllProtectionSegmentsUp()
Sets any protection segment currently down, whose resources are up, as up.
|
void |
setAllProtectionSegmentsUp(long layerId)
Sets any protection segment currently down, whose resources are up, as up.
|
void |
setAllRoutesUp()
Sets any route currently down, whose resources are up, as up.
|
void |
setAllRoutesUp(long layerId)
Sets any route currently down, whose resources are up, as up.
|
void |
setDemandAttribute(long layerId,
long demandId,
String key,
String value)
Sets an attribute for a given demand.
|
void |
setDemandAttribute(long demandId,
String key,
String value)
Sets an attribute for a given demand.
|
void |
setDemandAttributeMap(long layerId,
long demandId,
Map<String,String> attributes)
Sets the attributes for a given demand.
|
void |
setDemandAttributeMap(long demandId,
Map<String,String> attributes)
Sets the attributes for a given demand.
|
void |
setDemandOfferedTraffic(long demandId,
double h_d)
Sets the offered traffic by a demand.
|
void |
setDemandOfferedTraffic(long layerId,
long demandId,
double h_d)
Sets the offered traffic by a demand.
|
void |
setDemandOfferedTrafficMap(long layerId,
Map<Long,Double> h_d)
Sets the offered traffic per demand.
|
void |
setDemandOfferedTrafficMap(Map<Long,Double> h_d)
Sets the offered traffic per demand.
|
void |
setDemandOfferedTrafficVector(double[] h_d)
Sets the offered traffic per demand, in increasing order of identifier.
|
void |
setDemandOfferedTrafficVector(long layerId,
double[] h_d)
Sets the offered traffic per demand, in increasing order of identifier.
|
void |
setDemandTrafficUnitsName(long layerId,
String trafficUnitsName)
Sets the demand traffic units name.
|
void |
setDemandTrafficUnitsName(String trafficUnitsName)
Sets the demand traffic units name.
|
void |
setForwardingRuleAttribute(long layerId,
Pair<Long,Long> demandLinkPair,
String key,
String value)
Sets an attribute for a given forwarding rule.
|
void |
setForwardingRuleAttribute(Pair<Long,Long> demandLinkPair,
String key,
String value)
Sets an attribute for a given forwarding rule.
|
void |
setForwardingRuleAttributeMap(long layerId,
Pair<Long,Long> demandLinkPair,
Map<String,String> attributes)
Sets the attributes for a given forwarding rule.
|
void |
setForwardingRuleAttributeMap(Pair<Long,Long> demandLinkPair,
Map<String,String> attributes)
Sets the attributes for a given forwarding rule.
|
void |
setForwardingRules(cern.colt.matrix.tdouble.DoubleMatrix2D f_de)
Sets the forwarding rules for the given design.
|
void |
setForwardingRules(long layerId,
cern.colt.matrix.tdouble.DoubleMatrix2D f_de)
Sets the forwarding rules for the given design.
|
void |
setForwardingRules(long layerId,
Map<Pair<Long,Long>,Double> splittingRatioMap)
Sets the forwarding rules for the given design.
|
void |
setForwardingRules(Map<Pair<Long,Long>,Double> splittingRatioMap)
Sets the forwarding rules for the given design.
|
void |
setForwardingRuleSplittingRatio(long layerId,
Pair<Long,Long> demandLinkPair,
double splittingRatio)
Sets the splitting ratio (fraction of traffic from demand 'd' entering
to the origin node of link 'e', going through link 'e') of a forwarding rule.
|
void |
setForwardingRuleSplittingRatio(Pair<Long,Long> demandLinkPair,
double splittingRatio)
Sets the splitting ratio (fraction of traffic from demand 'd' entering
to the origin node of link 'e', going through link 'e') of a forwarding rule.
|
void |
setLayerAttribute(long layerId,
String key,
String value)
Sets an attribute for the given layer.
|
void |
setLayerAttributeMap(long layerId,
Map<String,String> attributes)
Sets the layer attributes.
|
void |
setLayerDefaultId(long layerId)
Sets the default layer identifier.
|
void |
setLayerDescription(long layerId,
String description)
Sets the layer description.
|
void |
setLayerName(long layerId,
String name)
Sets the layer name.
|
void |
setLinkAttribute(long layerId,
long linkId,
String key,
String value)
Sets an attribute for a given link.
|
void |
setLinkAttribute(long linkId,
String key,
String value)
Sets an attribute for a given link.
|
void |
setLinkAttributeMap(long layerId,
long linkId,
Map<String,String> attributes)
Sets the attributes for a given link.
|
void |
setLinkAttributeMap(long linkId,
Map<String,String> attributes)
Sets the attributes for a given link.
|
void |
setLinkCapacity(long linkId,
double u_e)
Sets the capacity of a link.
|
void |
setLinkCapacity(long layerId,
long linkId,
double u_e)
Sets the capacity of a link.
|
void |
setLinkCapacityMap(long layerId,
Map<Long,Double> u_e)
Sets the capacity per link.
|
void |
setLinkCapacityMap(Map<Long,Double> u_e)
Sets the capacity per link.
|
void |
setLinkCapacityUnitsName(long layerId,
String capacityUnitsName)
Sets the link capacity units name.
|
void |
setLinkCapacityUnitsName(String capacityUnitsName)
Sets the link capacity units name.
|
void |
setLinkCapacityVector(double[] u_e)
Sets the capacity per link, in increasing order of identifier.
|
void |
setLinkCapacityVector(long layerId,
double[] u_e)
Sets the capacity per link, in increasing order of identifier.
|
void |
setLinkDown(long linkId)
Sets a link as down.
|
void |
setLinkDown(long layerId,
long linkId)
Sets a link as down.
|
void |
setLinkLengthInKm(long linkId,
double linkLengthInKm)
Sets the length of a link.
|
void |
setLinkLengthInKm(long layerId,
long linkId,
double lengthInKm)
Sets the length of a link.
|
void |
setLinkPropagationSpeedInKmPerSecond(long linkId,
double propagationSpeedInKmPerSecond)
Sets the propagation speed in km/s of a link.
|
void |
setLinkPropagationSpeedInKmPerSecond(long layerId,
long linkId,
double propagationSpeedInKmPerSecond)
Sets the propagation speed in km/s of a link.
|
void |
setLinkPropagationSpeedInKmPerSecondMap(long layerId,
Map<Long,Double> propagationSpeedInKmPerSecond)
Sets the propagation speed in km/s per link.
|
void |
setLinkPropagationSpeedInKmPerSecondMap(Map<Long,Double> propagationSpeedInKmPerSecond)
Sets the propagation speed in km/s per link.
|
void |
setLinksDown(long layerId,
Set<Long> linkIds)
Sets some links as down.
|
void |
setLinksDown(Set<Long> linkIds)
Sets some links as down.
|
void |
setLinksUp(long layerId,
Set<Long> linkIds)
Sets some links as up.
|
void |
setLinksUp(Map<Long,Set<Long>> linkIds)
Sets some links as up.
|
void |
setLinksUp(Set<Long> linkIds)
Sets some links as up.
|
void |
setLinkUp(long linkId)
Sets a link as up.
|
void |
setLinkUp(long layerId,
long linkId)
Sets a link as up.
|
void |
setNetworkAttribute(String key,
String value)
Sets a network attribute.
|
void |
setNetworkAttributeMap(Map<String,String> attributes)
Sets the network attributes attributes.
|
void |
setNetworkDescription(String description)
Sets the network description.
|
void |
setNetworkName(String name)
Sets the network name.
|
void |
setNodeAttribute(long nodeId,
String key,
String value)
Sets an attribute for a given node.
|
void |
setNodeAttributeMap(long nodeId,
Map<String,String> attributes)
Sets the attributes for a given node.
|
void |
setNodeDown(long nodeId)
Sets a node as down.
|
void |
setNodeName(long nodeId,
String name)
Sets the node name.
|
void |
setNodesAndLinksDown(long layerId,
Set<Long> nodeIds,
Set<Long> linkIds)
Sets some nodes and links as down.
|
void |
setNodesAndLinksDown(Set<Long> nodeIds,
Map<Long,Set<Long>> linkIds)
Sets some nodes and links as down.
|
void |
setNodesAndLinksDown(Set<Long> nodeIds,
Set<Long> linkIds)
Sets some nodes and links as down.
|
void |
setNodesAndLinksUp(long layerId,
Set<Long> nodeIds,
Set<Long> linkIds)
Sets some nodes and links as up.
|
void |
setNodesAndLinksUp(Set<Long> nodeIds,
Map<Long,Set<Long>> linkIds)
Sets some nodes and links as up.
|
void |
setNodesAndLinksUp(Set<Long> nodeIds,
Set<Long> linkIds)
Sets some nodes and links as up.
|
void |
setNodesDown(Set<Long> nodeIds)
Sets a set of nodes as down.
|
void |
setNodesUp(Set<Long> nodeIds)
Sets a set of nodes as up.
|
void |
setNodeUp(long nodeId)
Sets a node as up.
|
void |
setNodeXYPosition(long nodeId,
double x,
double y)
Sets the node position.
|
void |
setProtectionSegmentAttribute(long layerId,
long segmentId,
String key,
String value)
Sets an attribute for a given protection segment.
|
void |
setProtectionSegmentAttribute(long segmentId,
String key,
String value)
Sets an attribute for a given protection segment.
|
void |
setProtectionSegmentAttributeMap(long layerId,
long segmentId,
Map<String,String> attributes)
Sets the attributes for a given protection segment.
|
void |
setProtectionSegmentAttributeMap(long segmentId,
Map<String,String> attributes)
Sets the attributes for a given protection segment.
|
void |
setProtectionSegmentDown(long segmentId)
Sets a protection segment as down.
|
void |
setProtectionSegmentDown(long layerId,
long segmentId)
Sets a protection segment as down.
|
void |
setProtectionSegmentReservedCapacity(long segmentId,
double u_s)
Sets the reserved capacity of a protection segment.
|
void |
setProtectionSegmentReservedCapacity(long layerId,
long segmentId,
double u_s)
Sets the reserved capacity of a protection segment.
|
void |
setProtectionSegmentReservedCapacityMap(long layerId,
Map<Long,Double> u_s)
Sets the reserved capacity per protection segment.
|
void |
setProtectionSegmentReservedCapacityMap(Map<Long,Double> u_s)
Sets the reserved capacity per protection segment.
|
void |
setProtectionSegmentReservedCapacityVector(double[] u_s)
Sets the reserved capacity per protection segment, in increasing order of identifier.
|
void |
setProtectionSegmentReservedCapacityVector(long layerId,
double[] u_s)
Sets the reserved capacity per protection segment, in increasing order of identifier.
|
void |
setProtectionSegmentsUp(long layerId,
Set<Long> segmentIds)
Sets the given protection segments as up.
|
void |
setProtectionSegmentsUp(Set<Long> segmentIds)
Sets the given protection segments as up.
|
void |
setProtectionSegmentUp(long segmentId)
Sets the given protection segment as up.
|
void |
setProtectionSegmentUp(long layerId,
long segmentId)
Sets the given protection segment as up.
|
void |
setRouteAttribute(long layerId,
long routeId,
String key,
String value)
Sets an attribute for a given route.
|
void |
setRouteAttribute(long routeId,
String key,
String value)
Sets an attribute for a given route at the first layer.
|
void |
setRouteAttributeMap(long layerId,
long routeId,
Map<String,String> attributes)
Sets the attributes for a given route at the given layer.
|
void |
setRouteAttributeMap(long routeId,
Map<String,String> attributes)
Sets the attributes for a given route.
|
void |
setRouteCarriedTraffic(long routeId,
double x_p)
Sets the route carried traffic.
|
void |
setRouteCarriedTraffic(long layerId,
long routeId,
double x_p)
Sets the route carried traffic.
|
void |
setRouteCarriedTrafficMap(long layerId,
Map<Long,Double> x_p)
Sets the carried traffic per route.
|
void |
setRouteCarriedTrafficMap(Map<Long,Double> x_p)
Sets the carried traffic per route.
|
void |
setRouteCarriedTrafficVector(double[] x_p)
Sets the carried traffic per route, in increasing order of route identifier.
|
void |
setRouteCarriedTrafficVector(long layerId,
double[] x_p)
Sets the carried traffic per route, in increasing order of route identifier.
|
void |
setRouteDown(long routeId)
Sets a route as down.
|
void |
setRouteDown(long layerId,
long routeId)
Sets a route as down.
|
void |
setRouteOccupiedCapacity(long routeId,
double y_p)
Sets the capacity occupied by the route in links.
|
void |
setRouteOccupiedCapacity(long layerId,
long routeId,
double y_p)
Sets the capacity occupied by the route in links.
|
void |
setRouteOccupiedCapacityMap(long layerId,
Map<Long,Double> y_p)
Sets the occupied capacity per route.
|
void |
setRouteOccupiedCapacityMap(Map<Long,Double> y_p)
Sets the occupied capacity per route.
|
void |
setRouteOccupiedCapacityVector(double[] y_p)
Sets the occupied capacity per route, in increasing order of route identifier.
|
void |
setRouteOccupiedCapacityVector(long layerId,
double[] y_p)
Sets the occupied capacity per route, in increasing order of route identifier.
|
void |
setRouteSequenceOfLinks(long routeId,
List<Long> path)
Sets the current path of a route.
|
void |
setRouteSequenceOfLinks(long layerId,
long routeId,
List<Long> path)
Sets the current path of a route.
|
void |
setRoutesUp(long layerId,
Set<Long> routeIds)
Sets the given routes as up.
|
void |
setRoutesUp(Set<Long> routeIds)
Sets the given routes as up.
|
void |
setRouteUp(long routeId)
Sets the given route as up.
|
void |
setRouteUp(long layerId,
long routeId)
Sets the given route as up.
|
void |
setRoutingType(Constants.RoutingType routingType)
Sets the routing type.
|
void |
setRoutingType(long layerId,
Constants.RoutingType routingType)
Sets the routing type.
|
void |
setSRGAttribute(long srgId,
String key,
String value)
Sets an attribute for a given SRG.
|
void |
setSRGAttributeMap(long srgId,
Map<String,String> attributes)
Sets the attributes for a given SRG.
|
void |
setSRGDown(long srgId)
Sets nodes and links associated to the given SRG as down (in case they are not yet).
|
void |
setSRGMeanTimeToFailInHours(long srgId,
double mttfInHours)
Sets the Mean Time To Fail (in hours) of a given SRG.
|
void |
setSRGMeanTimeToRepairInHours(long srgId,
double mttrInHours)
Sets the Mean Time To Repair (in hours) of a given SRG.
|
void |
setTrafficMatrix(cern.colt.matrix.tdouble.DoubleMatrix2D trafficMatrix)
Sets the traffic demands at the given layer from a given traffic matrix, removing any previous
demand.
|
void |
setTrafficMatrix(long layerId,
cern.colt.matrix.tdouble.DoubleMatrix2D trafficMatrix)
Sets the traffic demands at the given layer from a given traffic matrix, removing any previous
demand.
|
String |
toString()
Returns a
String representation of the network design. |
String |
toString(Set<Long> layerIds)
Returns a
String representation of the network design only for the
given layers. |
NetPlan |
unmodifiableView()
Returns an unmodifiable view of the network.
|
public NetPlan()
public NetPlan(File file)
.n2p
file.file
- .n2p
filepublic NetPlan(InputStream inputStream)
inputStream
- Input streampublic void activateActionMonitoring()
getActionsPerformed()
method.public long addDemand(long ingressNodeId, long egressNodeId, double offeredTraffic, Map<String,String> attributes)
Adds a new traffic demand.
Important: Self-demands are not allowed.
Important: In case that action monitoring is activated, a DEMAND_ADDED
action will be issued.
ingressNodeId
- Identifier of the ingress nodeegressNodeId
- Identifier of the egress nodeofferedTraffic
- Offered traffic by this demand. It must be greater or equal than zeroattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic long addDemand(long layerId, long ingressNodeId, long egressNodeId, double offeredTraffic, Map<String,String> attributes)
Adds a new traffic demand.
Important: Self-demands are not allowed.
Important: In case that action monitoring is activated, a DEMAND_ADDED
action will be issued.
layerId
- Layer identifieringressNodeId
- Identifier of the ingress nodeegressNodeId
- Identifier of the egress nodeofferedTraffic
- Offered traffic by this demand. It must be greater or equal than zeroattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic Pair<Long,Long> addDemandBidirectional(long ingressNodeId, long egressNodeId, double offeredTraffic, Map<String,String> attributes)
Adds a new bidirectional traffic demand, that is, a demand on each direction.
Important: Self-demands are not allowed.
Important: In case that action monitoring is activated, two DEMAND_ADDED
actions will be issued.
ingressNodeId
- Identifier of the ingress nodeegressNodeId
- Identifier of the egress nodeofferedTraffic
- Offered traffic by this demand. It must be greater or equal than zeroattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic Pair<Long,Long> addDemandBidirectional(long layerId, long ingressNodeId, long egressNodeId, double offeredTraffic, Map<String,String> attributes)
Adds a new bidirectional traffic demand, that is, a demand on each direction.
Important: Self-demands are not allowed.
Important: In case that action monitoring is activated, two DEMAND_ADDED
actions will be issued.
layerId
- Layer identifieringressNodeId
- Identifier of the ingress nodeegressNodeId
- Identifier of the egress nodeofferedTraffic
- Offered traffic by this demand. It must be greater or equal than zeroattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic Pair<Long,Long> addForwardingRule(long demandId, long linkId, double splittingRatio, Map<String,String> attributes)
Adds a new forwarding rule (or override an existing one).
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, a FORWARDING_RULE_ADDED
action will be issued.
demandId
- Demand identifierlinkId
- Link identifiersplittingRatio
- Splitting ratio (fraction of traffic from demand 'd' entering to the origin node of link 'e', going through link 'e')attributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic Pair<Long,Long> addForwardingRule(long layerId, long demandId, long linkId, double splittingRatio, Map<String,String> attributes)
Adds a new forwarding rule (or override an existing one).
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, a FORWARDING_RULE_ADDED
action will be issued.
layerId
- Layer identifierdemandId
- Demand identifierlinkId
- Link identifiersplittingRatio
- Splitting ratio (fraction of traffic from demand 'd' entering to the origin node of link 'e', going through link 'e')attributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic void addForwardingRules(long layerId, Map<Pair<Long,Long>,Double> splittingRatioMap, boolean includeUnusedRules)
Adds a set of forwarding rules (or override existing ones).
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, several FORWARDING_RULE_ADDED
actions will be issued.
layerId
- Layer identifiersplittingRatioMap
- Splitting ratio map (fraction of traffic from demand 'd' entering to the origin node of link 'e', going through link 'e')includeUnusedRules
- Indicates whether or not rules whose splitting ratio is below a precision factor will be addedpublic void addForwardingRules(Map<Pair<Long,Long>,Double> splittingRatioMap, boolean includeUnusedRules)
Adds a set of forwarding rules (or override existing ones).
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, several FORWARDING_RULE_ADDED
actions will be issued.
splittingRatioMap
- Splitting ratio map (fraction of traffic from demand 'd' entering to the origin node of link 'e', going through link 'e')includeUnusedRules
- Indicates whether or not rules whose splitting ratio is below a precision factor will be addedpublic long addLayer(String name, String description, String linkCapacityUnitsName, String demandTrafficUnitsName, Map<String,String> attributes)
Adds a new layer.
Important: In case that action monitoring is activated, a LAYER_ADDED
action will be issued.
name
- Layer name (null
means empty)description
- Layer description (null
means empty)linkCapacityUnitsName
- Textual description of link capacity units (null
means empty)demandTrafficUnitsName
- Textual description of demand traffic units (null
means empty)attributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic long addLink(long originNodeId, long destinationNodeId, double capacity, double lengthInKm, double propagationSpeedInKmPerSecond, Map<String,String> attributes)
Adds a new link.
Important: Self-links are not allowed.
Important: In case that action monitoring is activated, a LINK_ADDED
action will be issued.
originNodeId
- Identifier of the origin nodedestinationNodeId
- Identifier of the destination nodecapacity
- Link capacity. It must be greater or equal than zerolengthInKm
- Link length. It must be greater or equal than zero. Physical distance between node pairs can be obtained through the getNodePairEuclideanDistance()
(for Euclidean distance) or getNodePairHaversineDistanceInKm()
(for airline distance) methodspropagationSpeedInKmPerSecond
- Link propagation speed. It must be greater than zero (Double.MAX_VALUE
means no propagation delay})attributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic long addLink(long originNodeId, long destinationNodeId, double capacity, double lengthInKm, Map<String,String> attributes)
Adds a new link. Propagation speed is assumed to be 200000 km/s.
Important: Self-links are not allowed.
Important: In case that action monitoring is activated, a LINK_ADDED
action will be issued.
originNodeId
- Identifier of the origin nodedestinationNodeId
- Identifier of the destination nodecapacity
- Link capacity. It must be greater or equal than zerolengthInKm
- Link length. It must be greater or equal than zero. Physical distance between node pairs can be obtained through the getNodePairEuclideanDistance()
(for Euclidean distance) or getNodePairHaversineDistanceInKm()
(for airline distance) methodsattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic long addLink(long layerId, long originNodeId, long destinationNodeId, double capacity, double lengthInKm, double propagationSpeedInKmPerSecond, Map<String,String> attributes)
Adds a new link.
Important: Self-links are not allowed.
Important: In case that action monitoring is activated, a LINK_ADDED
action will be issued.
layerId
- Layer identifieroriginNodeId
- Identifier of the origin nodedestinationNodeId
- Identifier of the destination nodecapacity
- Link capacity. It must be greater or equal than zerolengthInKm
- Link length. It must be greater or equal than zero. Physical distance between node pairs can be obtained through the getNodePairEuclideanDistance()
(for Euclidean distance) or getNodePairHaversineDistanceInKm()
(for airline distance) methodspropagationSpeedInKmPerSecond
- Link propagation speed. It must be greater than zero (Double.MAX_VALUE
means no propagation delay})attributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic long addLink(long layerId, long originNodeId, long destinationNodeId, double capacity, double lengthInKm, Map<String,String> attributes)
Adds a new link. Propagation speed is assumed to be 200000 km/s.
Important: Self-links are not allowed.
Important: In case that action monitoring is activated, a LINK_ADDED
action will be issued.
layerId
- Layer identifieroriginNodeId
- Identifier of the origin nodedestinationNodeId
- Identifier of the destination nodecapacity
- Link capacity. It must be greater or equal than zerolengthInKm
- Link length. It must be greater or equal than zero. Physical distance between node pairs can be obtained through the getNodePairEuclideanDistance()
(for Euclidean distance) or getNodePairHaversineDistanceInKm()
(for airline distance) methodsattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic Pair<Long,Long> addLinkBidirectional(long originNodeId, long destinationNodeId, double capacity, double lengthInKm, double propagationSpeedInKmPerSecond, Map<String,String> attributes)
Adds a new bidirectional link, that is, a link on each direction.
Important: Self-links are not allowed.
Important: In case that action monitoring is activated, two LINK_ADDED
actions will be issued.
originNodeId
- Identifier of the origin nodedestinationNodeId
- Identifier of the destination nodecapacity
- Link capacity. It must be greater or equal than zerolengthInKm
- Link length. It must be greater or equal than zero. Physical distance between node pairs can be obtained through the getNodePairEuclideanDistance()
(for Euclidean distance) or getNodePairHaversineDistanceInKm()
(for airline distance) methodspropagationSpeedInKmPerSecond
- Link propagation speed. It must be greater than zero (Double.MAX_VALUE
means no propagation delay})attributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic Pair<Long,Long> addLinkBidirectional(long originNodeId, long destinationNodeId, double capacity, double lengthInKm, Map<String,String> attributes)
Adds a new bidirectional link, that is, a link on each direction. Propagation speed is assumed to be 200000 km/s.
Important: Self-links are not allowed.
Important: In case that action monitoring is activated, two LINK_ADDED
actions will be issued.
originNodeId
- Identifier of the origin nodedestinationNodeId
- Identifier of the destination nodecapacity
- Link capacity. It must be greater or equal than zerolengthInKm
- Link length. It must be greater or equal than zero. Physical distance between node pairs can be obtained through the getNodePairEuclideanDistance()
(for Euclidean distance) or getNodePairHaversineDistanceInKm()
(for airline distance) methodsattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic Pair<Long,Long> addLinkBidirectional(long layerId, long originNodeId, long destinationNodeId, double capacity, double lengthInKm, double propagationSpeedInKmPerSecond, Map<String,String> attributes)
Adds a new bidirectional link, that is, a link on each direction.
Important: Self-links are not allowed.
Important: In case that action monitoring is activated, two LINK_ADDED
actions will be issued.
layerId
- Layer identifieroriginNodeId
- Identifier of the origin nodedestinationNodeId
- Identifier of the destination nodecapacity
- Link capacity. It must be greater or equal than zerolengthInKm
- Link length. It must be greater or equal than zero. Physical distance between node pairs can be obtained through the getNodePairEuclideanDistance()
(for Euclidean distance) or getNodePairHaversineDistanceInKm()
(for airline distance) methodspropagationSpeedInKmPerSecond
- Link propagation speed. It must be greater than zero (Double.MAX_VALUE
means no propagation delay})attributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic Pair<Long,Long> addLinkBidirectional(long layerId, long originNodeId, long destinationNodeId, double capacity, double lengthInKm, Map<String,String> attributes)
Adds a new bidirectional link, that is, a link on each direction. Propagation speed is assumed to be 200000 km/s.
Important: Self-links are not allowed.
Important: In case that action monitoring is activated, two LINK_ADDED
actions will be issued.
layerId
- Layer identifieroriginNodeId
- Identifier of the origin nodedestinationNodeId
- Identifier of the destination nodecapacity
- Link capacity. It must be greater or equal than zerolengthInKm
- Link length. It must be greater or equal than zero. Physical distance between node pairs can be obtained through the getNodePairEuclideanDistance()
(for Euclidean distance) or getNodePairHaversineDistanceInKm()
(for airline distance) methodsattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic void addLinkToSRG(long linkId, long srgId)
Adds a link to a given SRG.
Important: In case that action monitoring is activated, a SRG_MODIFIED
action will be issued.
linkId
- Link identifiersrgId
- SRG identifierpublic void addLinkToSRG(long layerId, long linkId, long srgId)
Adds a link to a given SRG.
Important: In case that action monitoring is activated, a SRG_MODIFIED
action will be issued.
layerId
- Layer identifierlinkId
- Link identifiersrgId
- SRG identifierpublic long addNode(double xCoord, double yCoord, String name, Map<String,String> attributes)
Important: In case that action monitoring is activated, a NODE_ADDED
action will be issued.
xCoord
- Node position in x-axisyCoord
- Node position in y-axisname
- Node name (null
will be converted to "Node " + node identifier)attributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic void addNodeToSRG(long nodeId, long srgId)
Adds a node to a given SRG.
Important: In case that action monitoring is activated, a SRG_MODIFIED
action will be issued.
nodeId
- Node identifiersrgId
- SRG identifierpublic long addProtectionSegment(List<Long> sequenceOfLinks, double reservedCapacity, Map<String,String> attributes)
Adds a new protection segment.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_ADDED
action will be issued.
sequenceOfLinks
- Sequence of linksreservedCapacity
- Reserved capacity in each link from seqLinks
. It must be greater or equal than zeroattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic long addProtectionSegment(long layerId, List<Long> sequenceOfLinks, double reservedCapacity, Map<String,String> attributes)
Adds a new protection segment.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_ADDED
action will be issued.
layerId
- Layer identifiersequenceOfLinks
- Sequence of linksreservedCapacity
- Reserved capacity in each link from seqLinks
. It must be greater or equal than zeroattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic void addProtectionSegmentToRouteBackupSegmentList(long segmentId, long routeId)
Adds a protection segment in the default layer to the list of backup protection segments of a route.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
segmentId
- Protection segment identifierrouteId
- Route identifierpublic void addProtectionSegmentToRouteBackupSegmentList(long layerId, long segmentId, long routeId)
Adds a protection segment in the given layer to the list of backup protection segments of a route.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
layerId
- Layer identifiersegmentId
- Protection segment identifierrouteId
- Route identifierpublic long addRoute(long demandId, double carriedTraffic, double occupiedLinkCapacity, List<Long> sequenceOfLinks, Map<String,String> attributes)
Adds a new traffic route.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_ADDED
action will be issued.
demandId
- Demand identifiercarriedTraffic
- Carried traffic. It must be greater or equal than zerooccupiedLinkCapacity
- Occupied link capacity. If -1, it will be assumed to be equal to the carried traffic. Otherwise, it must be greater or equal than zero.sequenceOfLinks
- Sequence of linksattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic long addRoute(long demandId, double carriedTraffic, List<Long> sequenceOfLinks, Map<String,String> attributes)
Adds a new traffic route. Capacity occupied in links is assumed to be the demand carried traffic.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_ADDED
action will be issued.
demandId
- Demand identifiercarriedTraffic
- Carried traffic. It must be greater or equal than zerosequenceOfLinks
- Sequence of linksattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic long addRoute(long layerId, long demandId, double carriedTraffic, double occupiedLinkCapacity, List<Long> sequenceOfLinks, Map<String,String> attributes)
Adds a new traffic route.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_ADDED
action will be issued.
layerId
- Layer identifierdemandId
- Demand identifiercarriedTraffic
- Carried traffic. It must be greater or equal than zerooccupiedLinkCapacity
- Occupied link capacity. If -1, it will be assumed to be equal to the carried traffic. Otherwise, it must be greater or equal than zero.sequenceOfLinks
- Sequence of linksattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic long addRoute(long layerId, long demandId, double carriedTraffic, List<Long> sequenceOfLinks, Map<String,String> attributes)
Adds a new traffic route. Capacity occupied in links is assumed to be the demand carried traffic.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_ADDED
action will be issued.
layerId
- Layer identifierdemandId
- Demand identifiercarriedTraffic
- Carried traffic. It must be greater or equal than zerosequenceOfLinks
- Sequence of linksattributes
- Map for user-defined attributes (null
means 'no attribute'). Each key represents the attribute name, whereas value represents the attribute valuepublic void addRoutes(CandidatePathList cpl)
Adds traffic routes from a candidate path list. Existing routes will not be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_ADDED
actions will be issued.
cpl
- Candidate path listpublic void addRoutes(CandidatePathList cpl, double[] x_p, boolean includeUnusedRoutes)
Adds traffic routes from a candidate path list. Existing routes will not be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_ADDED
actions will be issued.
cpl
- Candidate path listx_p
- Carried traffic per route. It must be greater or equal than zeroincludeUnusedRoutes
- Indicate whether routes carrying no traffic will be includedpublic void addRoutes(CandidatePathList cpl, double[] x_p, double[] y_p, boolean includeUnusedRoutes)
Adds traffic routes from a candidate path list. Existing routes will not be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_ADDED
actions will be issued.
cpl
- Candidate path listx_p
- Carried traffic per route. It must be greater or equal than zeroy_p
- Occupied link capacity per route. If null, it will be assumed to be equal to the carried traffic. Otherwise, it must be greater or equal than zero.includeUnusedRoutes
- Indicate whether routes carrying no traffic will be includedpublic void addRoutes(long layerId, CandidatePathList cpl)
Adds traffic routes from a candidate path list. Existing routes will not be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_ADDED
actions will be issued.
layerId
- Layer identifiercpl
- Candidate path listpublic void addRoutes(long layerId, CandidatePathList cpl, double[] x_p, boolean includeUnusedRoutes)
Adds traffic routes from a candidate path list. Existing routes will not be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_ADDED
actions will be issued.
layerId
- Layer identifiercpl
- Candidate path listx_p
- Carried traffic per route. It must be greater or equal than zeroincludeUnusedRoutes
- Indicate whether routes carrying no traffic will be includedpublic void addRoutes(long layerId, CandidatePathList cpl, double[] x_p, double[] y_p, boolean includeUnusedRoutes)
Adds traffic routes from a candidate path list. Existing routes will not be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_ADDED
actions will be issued.
layerId
- Layer identifiercpl
- Candidate path listx_p
- Carried traffic per route. It must be greater or equal than zeroy_p
- Occupied link capacity per route. If null, it will be assumed to be equal to the carried traffic. Otherwise, it must be greater or equal than zero.includeUnusedRoutes
- Indicate whether routes carrying no traffic will be includedpublic void addRoutesFromDemandLinkCarriedTraffic(cern.colt.matrix.tdouble.DoubleMatrix2D x_de)
Adds traffic routes from demand-link routing. Existing routes will not be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_ADDED
actions will be issued.
x_de
- Matrix containing the amount of traffic from demand d (d = 0 refers to the first demand in demandMap.keySet()
, d = 1 refers to the second one, and so on) which traverses link e (e = 0 refers to the first link in linkMap.keySet()
, e = 1 refers to the second one, and so on)public void addRoutesFromDemandLinkCarriedTraffic(long layerId, cern.colt.matrix.tdouble.DoubleMatrix2D x_de)
Adds traffic routes from demand-link routing. Existing routes will not be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_ADDED
actions will be issued.
layerId
- Layer identifierx_de
- Matrix containing the amount of traffic from demand d (d = 0 refers to the first demand in demandMap.keySet()
, d = 1 refers to the second one, and so on) which traverses link e (e = 0 refers to the first link in linkMap.keySet()
, e = 1 refers to the second one, and so on)public void addRoutesFromDestinationLinkCarriedTraffic(cern.colt.matrix.tdouble.DoubleMatrix2D x_te)
Adds traffic routes from destination-link routing. Existing routes will not be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_ADDED
actions will be issued.
x_te
- For each destination node t (t = 0 refers to the first node in nodeIds
, t = 1 refers to the second one, and so on), and each link e (e = 0 refers to the first link in linkMap.keySet()
, e = 1 refers to the second one, and so on), f_te[t][e]
represents the traffic targeted to node t that arrives (or is generated in) node a(e) (the origin node of link e), that is forwarded through link epublic void addRoutesFromDestinationLinkCarriedTraffic(long layerId, cern.colt.matrix.tdouble.DoubleMatrix2D x_te)
Adds traffic routes from destination-link routing. Existing routes will not be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_ADDED
actions will be issued.
layerId
- Layer identifierx_te
- For each destination node t (t = 0 refers to the first node in nodeIds
, t = 1 refers to the second one, and so on), and each link e (e = 0 refers to the first link in linkMap.keySet()
, e = 1 refers to the second one, and so on), f_te[t][e]
represents the traffic targeted to node t that arrives (or is generated in) node a(e) (the origin node of link e), that is forwarded through link epublic long addSRG(double mttfInHours, double mttrInHours, Map<String,String> attributes)
Adds a new SRG.
Important: In case that action monitoring is activated, an SRG_ADDED
action will be issued.
mttfInHours
- Mean Time To Fail (in hours). Zero or negative value means Double.MAX_VALUE
mttrInHours
- Mean Time To Repair (in hours). Zero or negative value are not allowedattributes
- Map for user-defined attributes. The key (String value) in the map will be the attribute name and the value (String value) will be whatever value is stored in that attribute. If null, it will be assumed to be an empty LinkedHashMappublic void assignFrom(NetPlan netPlan)
Assigns the information from the input NetPlan
.
Important: A shadow copy is made, so changes in the input object will be reflected in this one. For deep copies use copyFrom()
netPlan
- Network plan to be copiedpublic void checkDemandIsActive(long demandId)
demandId
- Demand identifierpublic void checkDemandIsActive(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifierpublic void checkForwardingRuleIsActive(long layerId, Pair<Long,Long> demandLinkPair)
Checks whether a forwarding rule is active. When negative, an exception will be thrown.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairpublic void checkForwardingRuleIsActive(Pair<Long,Long> demandLinkPair)
Checks whether a forwarding rule is active. When negative, an exception will be thrown.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandLinkPair
- Demand-outgoing link pairpublic void checkLayerIsActive(long layerId)
layerId
- Layer identifierpublic void checkLinkIsActive(long linkId)
linkId
- Link identifierpublic void checkLinkIsActive(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic void checkNodeIsActive(long nodeId)
nodeId
- Node identifierpublic void checkPathValidityForDemand(List<Long> path, long demandId)
path
- Sequence of links and segmentsdemandId
- Demand identifierpublic void checkPathValidityForDemand(long layerId, List<Long> path, long demandId)
layerId
- Layer identifierpath
- Sequence of links and segmentsdemandId
- Demand identifierpublic void checkProtectionSegmentIsActive(long segmentId)
Checks whether a protection segment is active. When negative, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic void checkProtectionSegmentIsActive(long layerId, long segmentId)
Checks whether a protection segment is active. When negative, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic void checkRouteIsActive(long routeId)
Checks whether a route is active. When negative, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic void checkRouteIsActive(long layerId, long routeId)
Checks whether a route is active. When negative, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic void checkRoutingType(Constants.RoutingType routingType)
routingType
- Expected RoutingType
public void checkRoutingType(long layerId, Constants.RoutingType routingType)
layerId
- Layer identifierroutingType
- Expected RoutingType
public void checkSRGIsActive(long srgId)
srgId
- SRG identifierpublic void checkValidity(long layerId, Map<String,String> net2planParameters, boolean allowLinkOversubscription, boolean allowExcessCarriedTraffic)
layerId
- Layer identifiernet2planParameters
- A key-value map with Net2Plan
-wide configuration optionsallowLinkOversubscription
- true
if link capacity constraint may be violated. Otherwise, false
allowExcessCarriedTraffic
- true
if carried traffic may be greater than the offered one for some demand. Otherwise, false
public void checkValidity(Map<String,String> net2planParameters, boolean allowLinkOversubscription, boolean allowExcessCarriedTraffic)
net2planParameters
- A key-value map with Net2Plan
-wide configuration optionsallowLinkOversubscription
- true
if link capacity constraint may be violated. Otherwise, false
allowExcessCarriedTraffic
- true
if carried traffic may be greater than the offered one for some demand. Otherwise, false
public List<Long> convertSequenceOfLinksAndProtectionSegmentsToSequenceOfLinks(List<Long> path)
path
- Sequence of links and protection segmentspublic List<Long> convertSequenceOfLinksAndProtectionSegmentsToSequenceOfLinks(long layerId, List<Long> path)
layerId
- Layer identifierpath
- Sequence of links and protection segmentspublic NetPlan copy()
public void copyFrom(NetPlan netPlan)
NetPlan
and copy the
information from the input NetPlan
.
Important: In case that action monitoring is activated, several LAYER_ADDED
actions will be issued.
netPlan
- Network plan to be copiedpublic void copyFrom(NetPlan netPlan, Set<Long> layerIds)
NetPlan
and copy the
information all the specified layers from the input NetPlan
.
Important: In case that action monitoring is activated, several LAYER_ADDED
actions will be issued.
netPlan
- Network plan to be copiedlayerIds
- Set of layers to be copiedpublic long copyLayer()
Copies the default layer as a new layer. Naturally, inter-layer couplings are omitted.
Important: In case that action monitoring is activated, a LAYER_ADDED
action will be issued.
public long copyLayer(long layerId)
Copies a given layer as a new layer. Naturally, inter-layer couplings are omitted.
Important: In case that action monitoring is activated, a LAYER_ADDED
action will be issued.
layerId
- Layer to copy frompublic long copyLayerFrom(NetPlan netPlan)
Copies the default layer from a given network design as a new layer. Naturally, inter-layer couplings are omitted.
Important: Set of nodes and SRGs must be the same in both designs
Important: In case that action monitoring is activated, a LAYER_ADDED
action will be issued.
netPlan
- Network designpublic long copyLayerFrom(NetPlan netPlan, long layerId)
Copies a given layer from a given network as a new layer. Naturally, inter-layer couplings are omitted.
Important: Set of nodes and SRGs must be the same in both designs
Important: In case that action monitoring is activated, a LAYER_ADDED
action will be issued.
netPlan
- Network designlayerId
- Layer to copy frompublic void coupleDemandWithUpperLayerLink(long demandId, long upperLayerId, long linkId)
demandId
- Demand identifierupperLayerId
- Upper layer identifierlinkId
- Link identifierpublic void coupleDemandWithUpperLayerLink(long lowerLayerId, long demandId, long upperLayerId, long linkId)
lowerLayerId
- Lower layer identifierdemandId
- Demand identifierupperLayerId
- Upper layer identifierlinkId
- Link identifierpublic void coupleLinkWithLowerLayerDemand(long linkId, long lowerLayerId, long demandId)
linkId
- Link identifierlowerLayerId
- Lower layer identifierdemandId
- Demand identifierpublic void coupleLinkWithLowerLayerDemand(long upperLayerId, long linkId, long lowerLayerId, long demandId)
upperLayerId
- Upper layer identifierlinkId
- Link identifierlowerLayerId
- Lower layer identifierdemandId
- Demand identifierpublic long createLowerLayerDemandFromLink(long linkId, long lowerLayerId)
linkId
- Link identifierlowerLayerId
- Identifier of the layer where the demand will be createdpublic long createLowerLayerDemandFromLink(long upperLayerId, long linkId, long lowerLayerId)
upperLayerId
- Upper layer identifierlinkId
- Link identifierlowerLayerId
- Identifier of the layer where the demand will be createdpublic Map<Long,Long> createLowerLayerDemandsFromLinks(long lowerLayerId)
Creates lower layer demands from existing links.
lowerLayerId
- Identifier of the layer where demands will be createdpublic Map<Long,Long> createLowerLayerDemandsFromLinks(long upperLayerId, long lowerLayerId)
Creates lower layer demands from existing links.
upperLayerId
- Upper layer identifierlowerLayerId
- Identifier of the layer where demands will be createdpublic long createUpperLayerLinkFromDemand(long demandId, long upperLayerId)
demandId
- Demand identifierupperLayerId
- Identifier of the layer where the link will be createdpublic long createUpperLayerLinkFromDemand(long lowerLayerId, long demandId, long upperLayerId)
lowerLayerId
- Lower layer identifierdemandId
- Demand identifierupperLayerId
- Identifier of the layer where the link will be createdpublic Map<Long,Long> createUpperLayerLinksFromDemands(long upperLayerId)
Creates upper layer links from existing demands.
upperLayerId
- Identifier of the layer where demands will be createdpublic Map<Long,Long> createUpperLayerLinksFromDemands(long lowerLayerId, long upperLayerId)
Creates upper layer links from existing demands.
lowerLayerId
- Lower layer identifierupperLayerId
- Identifier of the layer where demands will be createdpublic void deactivateActionMonitoring()
getActionsPerformed()
method.public void decoupleDemand(long demandId)
demandId
- Demand identifierpublic void decoupleDemand(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifierpublic void decoupleLink(long linkId)
linkId
- Link identifierpublic void decoupleLink(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic List<SimAction> getActionsPerformed()
activateActionMonitoring()
was called.
deactivateActionMonitoring()
is called internally.public Set<Long> getAvailableNodesFromNode(long nodeId, List<Long> path)
nodeId
- Node identifierpath
- Sequence of links (and maybe protection segments)public Set<Long> getAvailableNodesFromNode(long layerId, long nodeId, List<Long> path)
layerId
- Layer identifiernodeId
- Node identifierpath
- Sequence of links (and maybe protection segments)public cern.colt.matrix.tdouble.DoubleMatrix2D getDemand2LinkAssignmentMatrix()
public cern.colt.matrix.tdouble.DoubleMatrix2D getDemand2LinkAssignmentMatrix(long layerId)
layerId
- Layer identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getDemand2RouteAssignmentMatrix()
public cern.colt.matrix.tdouble.DoubleMatrix2D getDemand2RouteAssignmentMatrix(long layerId)
layerId
- Layer identifierpublic String getDemandAttribute(long layerId, long demandId, String key)
layerId
- Layer identifierdemandId
- Demand identifierkey
- Attribute namepublic String getDemandAttribute(long demandId, String key)
demandId
- Demand identifierkey
- Attribute namepublic Map<String,String> getDemandAttributeMap(long demandId)
Returns the attributes defined for a given demand. The output map is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
demandId
- Demand identifierpublic Map<String,String> getDemandAttributeMap(long layerId, long demandId)
Returns the attributes defined for a given demand. The output map is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierdemandId
- Demand identifierpublic int getDemandBifurcationDegree(long demandId)
Returns the number of routes, in up state, carrying traffic for a given demand.
Important: Routing type must be SOURCE_ROUTING
.
demandId
- Demand identifierpublic int getDemandBifurcationDegree(long layerId, long demandId)
Returns the number of routes, in up state, carrying traffic for a given demand.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierdemandId
- Demand identifierpublic Map<Long,Integer> getDemandBifurcationDegreeMap()
Returns the bifurcation degree per demand.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Integer> getDemandBifurcationDegreeMap(long layerId)
Returns the bifurcation degree per demand.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic int[] getDemandBifurcationDegreeVector()
Returns the bifurcation degree per demand, in increasing order of demand identifier.
Important: Routing type must be SOURCE_ROUTING
.
public int[] getDemandBifurcationDegreeVector(long layerId)
Returns the bifurcation degree per demand, in increasing order of demand identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double getDemandBlockedTraffic(long demandId)
demandId
- Demand identifierpublic double getDemandBlockedTraffic(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifierpublic Map<Long,Double> getDemandBlockedTrafficMap()
Returns the blocked traffic per demand. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public Map<Long,Double> getDemandBlockedTrafficMap(long layerId)
Returns the blocked traffic per demand. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic double[] getDemandBlockedTrafficVector()
public double[] getDemandBlockedTrafficVector(long layerId)
layerId
- Layer identifierpublic long getDemandByAttribute(long layerId, String attribute, String value)
layerId
- Layer identifierattribute
- Attribute (not null)value
- Value (not null)public long getDemandByAttribute(String attribute, String value)
attribute
- Attribute (not null)value
- Value (not null)public double getDemandCarriedTraffic(long demandId)
demandId
- Demand identifierpublic double getDemandCarriedTraffic(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifierpublic Map<Long,Double> getDemandCarriedTrafficMap()
Returns the carried traffic per demand. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public Map<Long,Double> getDemandCarriedTrafficMap(long layerId)
Returns the carried traffic per demand. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic double[] getDemandCarriedTrafficVector()
public double[] getDemandCarriedTrafficVector(long layerId)
layerId
- Layer identifierpublic Pair<Long,Long> getDemandCoupledUpperLayerLink(long demandId)
demandId
- Demand identifierpublic Pair<Long,Long> getDemandCoupledUpperLayerLink(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifierpublic long getDemandEgressNode(long demandId)
demandId
- Demand identifierpublic long getDemandEgressNode(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifierpublic Set<Pair<Long,Long>> getDemandForwardingRules(long demandId)
Returns the set of forwarding rules associated to a demand. The output set is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandId
- Demand identifierpublic Set<Pair<Long,Long>> getDemandForwardingRules(long layerId, long demandId)
Returns the set of forwarding rules associated to a demand. The output set is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandId
- Demand identifierpublic Map<Pair<Long,Long>,Double> getDemandForwardingRuleSplittingRatioMap(long demandId)
Returns the forwarding rules and splitting ratios associated to a given demand.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandId
- Demand identifierpublic Map<Pair<Long,Long>,Double> getDemandForwardingRuleSplittingRatioMap(long layerId, long demandId)
Returns the forwarding rules and splitting ratios associated to a given demand.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandId
- Demand identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getDemandForwardingRuleSplittingRatioMatrix(long demandId)
Returns the splitting ratio vector (fractions of traffic entering a node from the given demand, leaving that node through link 'e'), in increasing order of link identifier.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandId
- Demand identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getDemandForwardingRuleSplittingRatioMatrix(long layerId, long demandId)
Returns the splitting ratio vector (fractions of traffic entering a node from the given demand, leaving that node through link 'e'), in increasing order of link identifier.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandId
- Demand identifierpublic Set<Long> getDemandIds()
Returns the set of identifiers of the demands. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
public Set<Long> getDemandIds(long layerId)
Returns the set of identifiers of the demands. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic long[] getDemandIdsVector()
public long[] getDemandIdsVector(long layerId)
layerId
- Layer identifierpublic Pair<Long,Long> getDemandIngressEgressNodePair(long demandId)
demandId
- Demand identifierpublic Pair<Long,Long> getDemandIngressEgressNodePair(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifierpublic long getDemandIngressNode(long demandId)
demandId
- Demand identifierpublic long getDemandIngressNode(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifierpublic Map<Long,Pair<Long,Long>> getDemandMap()
Returns the ingress-egress node pair per demand. The output map is
backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public Map<Long,Pair<Long,Long>> getDemandMap(long layerId)
Returns the ingress-egress node pair per demand. The output map is
backed in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic long getDemandNextId()
public long getDemandNextId(long layerId)
layerId
- Layer identifierpublic double getDemandOfferedTraffic(long demandId)
demandId
- Demand identifierpublic double getDemandOfferedTraffic(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifierpublic Map<Long,Double> getDemandOfferedTrafficMap()
Returns the offered traffic per demand. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public Map<Long,Double> getDemandOfferedTrafficMap(long layerId)
Returns the offered traffic per demand. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic double[] getDemandOfferedTrafficVector()
public double[] getDemandOfferedTrafficVector(long layerId)
layerId
- Layer identifierpublic Set<Long> getDemandRoutes(long demandId)
Returns the routes which can carry traffic from a given demand. The output
set is backed in the NetPlan
object, hence users should copy in
case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
demandId
- Demand identifierpublic Set<Long> getDemandRoutes(long layerId, long demandId)
Returns the routes which can carry traffic from a given demand. The output
set is backed in the NetPlan
object, hence users should copy in
case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierdemandId
- Demand identifierpublic Constants.RoutingCycleType getDemandRoutingCycleType(long demandId)
demandId
- Demand identifierRoutingCycleType
public Constants.RoutingCycleType getDemandRoutingCycleType(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifierRoutingCycleType
public Map<Long,String> getDemandsAttributeMap(long layerId, String key)
layerId
- Layer identifierkey
- Attribute namepublic Map<Long,String> getDemandsAttributeMap(String key)
key
- Attribute namepublic Set<Long> getDemandsBlocked()
Returns the set of demands with some blocked traffic. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
public Set<Long> getDemandsBlocked(long layerId)
Returns the set of demands with some blocked traffic. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic long[] getDemandsBlockedVector()
public long[] getDemandsBlockedVector(long layerId)
layerId
- Layer identifierpublic Set<Long> getDemandsByAttribute(long layerId, String attribute, String value)
layerId
- Layer identifierattribute
- Attribute (not null)value
- Value (not null)public Set<Long> getDemandsByAttribute(String attribute, String value)
attribute
- Attribute (not null)value
- Value (not null)public Map<Long,Pair<Long,Long>> getDemandsCoupledLinkMap()
Returns the upper layer link coupled to each demand (among the coupled ones).
The output map is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
public Map<Long,Pair<Long,Long>> getDemandsCoupledLinkMap(long layerId)
Returns the upper layer link coupled to each demand (among the coupled ones).
The output map is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
layerId
- Layer identifierpublic double getDemandTotalBlockedTraffic()
public double getDemandTotalBlockedTraffic(long layerId)
layerId
- Layer identifierpublic double getDemandTotalCarriedTraffic()
public double getDemandTotalCarriedTraffic(long layerId)
layerId
- Layer identifierpublic double getDemandTotalOfferedTraffic()
public double getDemandTotalOfferedTraffic(long layerId)
layerId
- Layer identifierpublic String getDemandTrafficUnitsName()
public String getDemandTrafficUnitsName(long layerId)
layerId
- Layer identifierpublic long getFirstAvailableNodeAfterFailures(List<Long> path)
path
- Sequence of links and protection segments (not checked for continuity)public long getFirstAvailableNodeAfterFailures(long layerId, List<Long> path)
layerId
- Layer identifierpath
- Sequence of links and protection segments (not checked for continuity)public long getFirstAvailableNodeBeforeFailures(List<Long> path)
path
- Sequence of links and protection segments (not checked for continuity)public long getFirstAvailableNodeBeforeFailures(long layerId, List<Long> path)
layerId
- Layer identifierpath
- Sequence of links and protection segments (not checked for continuity)public String getForwardingRuleAttribute(long layerId, Pair<Long,Long> demandLinkPair, String key)
Returns the value of a given attribute for a forwarding rule. If not defined, it is search for the given layer.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairkey
- Attribute namepublic String getForwardingRuleAttribute(Pair<Long,Long> demandLinkPair, String key)
Returns the value of a given attribute for a forwarding rule. If not defined, it is search for the default layer.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandLinkPair
- Demand-outgoing link pairkey
- Attribute namepublic Map<String,String> getForwardingRuleAttributeMap(long layerId, Pair<Long,Long> demandLinkPair)
Returns the attributes defined for a given forwarding rule. The output map is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairpublic Map<String,String> getForwardingRuleAttributeMap(Pair<Long,Long> demandLinkPair)
Returns the attributes defined for a given forwarding rule. The output map is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandLinkPair
- Demand-outgoing link pairpublic double getForwardingRuleCarriedTraffic(long layerId, Pair<Long,Long> demandLinkPair)
Returns the carried traffic using a forwarding rule.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairpublic double getForwardingRuleCarriedTraffic(Pair<Long,Long> demandLinkPair)
Returns the carried traffic using a forwarding rule.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandLinkPair
- Demand-outgoing link pairpublic Map<Pair<Long,Long>,Double> getForwardingRuleCarriedTrafficMap()
Returns the carried traffic per forwarding rule. The output map is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
public Map<Pair<Long,Long>,Double> getForwardingRuleCarriedTrafficMap(long layerId)
Returns the carried traffic per forwarding rule. The output map is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierpublic Set<Pair<Long,Long>> getForwardingRules()
Returns the identifiers of active forwarding rules. The output set is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
public Set<Pair<Long,Long>> getForwardingRules(long layerId)
Returns the identifiers of active forwarding rules. The output set is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierpublic Map<Pair<Long,Long>,String> getForwardingRulesAttributeMap(long layerId, String key)
Returns the value of the same attribute for each forwarding rule.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierkey
- Attribute namepublic Map<Pair<Long,Long>,String> getForwardingRulesAttributeMap(String key)
Returns the value of the same attribute for each forwarding rule.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
key
- Attribute namepublic Set<Pair<Long,Long>> getForwardingRulesDown()
Returns the set of forwarding rules that are down. The output set is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
public Set<Pair<Long,Long>> getForwardingRulesDown(long layerId)
Returns the set of forwarding rules that are down. The output set is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierpublic double getForwardingRuleSplittingRatio(long layerId, Pair<Long,Long> demandLinkPair)
Returns the splitting ratio associated to a forwarding rule (fractions of traffic entering a node from demand 'd', leaving that node through link 'e').
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairpublic double getForwardingRuleSplittingRatio(Pair<Long,Long> demandLinkPair)
Returns the splitting ratio associated to a forwarding rule (fractions of traffic entering a node from demand 'd', leaving that node through link 'e').
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandLinkPair
- Demand-outgoing link pairpublic Map<Pair<Long,Long>,Double> getForwardingRuleSplittingRatioMap()
Returns the splitting ratio associated to each forwarding rule (fractions of
traffic entering a node from demand 'd', leaving that node through link 'e').
The output map is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
public Map<Pair<Long,Long>,Double> getForwardingRuleSplittingRatioMap(long layerId)
Returns the splitting ratio associated to each forwarding rule (fractions of
traffic entering a node from demand 'd', leaving that node through link 'e').
The output map is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getForwardingRuleSplittingRatioMatrix()
Returns the splitting ratio matrix (fractions of traffic entering a node from demand 'd', leaving that node through link 'e'). Rows and columns are in increasing order of demand and link identifiers, respectively.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
public cern.colt.matrix.tdouble.DoubleMatrix2D getForwardingRuleSplittingRatioMatrix(long layerId)
Returns the splitting ratio matrix (fractions of traffic entering a node from demand 'd', leaving that node through link 'e'). Rows and columns are in increasing order of demand and link identifiers, respectively.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierpublic NetPlan getLayer(long layerId)
Returns a copy of the current network design where only the given layer is present.
Note that the returned network design is a deep copy of the current one, so subsequent changes in any of them is not reflected into the other one.
layerId
- Layer identifierpublic String getLayerAttribute(long layerId, String key)
layerId
- Layer identifierkey
- Attribute namepublic Map<String,String> getLayerAttributeMap(long layerId)
NetPlan
object, hence users should copy it in case they want to modify it.layerId
- Layer identifierpublic long getLayerByAttribute(String attribute, String value)
attribute
- Attribute (not null)value
- Value (not null)public long getLayerByName(String name)
name
- Layer namepublic long getLayerDefaultId()
public String getLayerDescription(long layerId)
layerId
- Layer identifierpublic Set<Long> getLayerIds()
Returns the set of identifiers of the active layers. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
public long[] getLayerIdsVector()
public String getLayerName(long layerId)
layerId
- Layer identifierpublic Map<Long,String> getLayerNameMap()
Returns the name for each layer. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public String[] getLayerNameVector()
public long getLayerNextId()
public Map<Long,String> getLayersAttributeMap(String key)
key
- Attribute namepublic Set<Long> getLayersByAttribute(String attribute, String value)
NetPlan
object,
hence changes will not affect it.attribute
- Attribute (not null)value
- Value (not null)public Set<Long> getLayerTopologicalSortIds()
NetPlan
object, hence changes will not affect it.public long[] getLayerTopologicalSortIdsVector()
public cern.colt.matrix.tdouble.DoubleMatrix2D getLink2RouteAssignmentMatrix()
public cern.colt.matrix.tdouble.DoubleMatrix2D getLink2RouteAssignmentMatrix(long layerId)
layerId
- Layer identifierpublic Set<Long> getLinkAssociatedProtectionSegments(long linkId)
Returns the protection segments traversing a given link. The output set
is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
linkId
- Link identifierpublic Set<Long> getLinkAssociatedProtectionSegments(long layerId, long linkId)
Returns the protection segments traversing a given link. The output set
is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierlinkId
- Link identifierpublic Set<Long> getLinkAssociatedRoutes(long linkId)
Returns the routes traversing a given link. The output set
is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
linkId
- Link identifierpublic Set<Long> getLinkAssociatedRoutes(long layerId, long linkId)
Returns the routes traversing a given link. The output set
is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierlinkId
- Link identifierpublic String getLinkAttribute(long layerId, long linkId, String key)
Returns the value of a given attribute for a link. If not defined, it is search for the given layer.
layerId
- Layer identifierlinkId
- Link identifierkey
- Attribute namepublic String getLinkAttribute(long linkId, String key)
Returns the value of a given attribute for a link. If not defined, it is search for the default layer in the network.
linkId
- Link identifierkey
- Attribute namepublic Map<String,String> getLinkAttributeMap(long linkId)
Returns the attributes defined for a given link. The output map is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
linkId
- Link identifierpublic Map<String,String> getLinkAttributeMap(long layerId, long linkId)
Returns the attributes defined for a given link. The output map is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierlinkId
- Link identifierpublic long getLinkByAttribute(long layerId, String attribute, String value)
layerId
- Layer identifierattribute
- Attribute (not null)value
- Value (not null)public long getLinkByAttribute(String attribute, String value)
attribute
- Attribute (not null)value
- Value (not null)public double getLinkCapacity(long linkId)
linkId
- Link identifierpublic double getLinkCapacity(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Double> getLinkCapacityMap()
Returns the link capacity per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public Map<Long,Double> getLinkCapacityMap(long layerId)
Returns the capacity per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic double getLinkCapacityNotReservedForProtection(long linkId)
linkId
- Link identifierpublic double getLinkCapacityNotReservedForProtection(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Double> getLinkCapacityNotReservedForProtectionMap()
Returns the capacity not reserved for protection per link.
public Map<Long,Double> getLinkCapacityNotReservedForProtectionMap(long layerId)
Returns the capacity not reserved for protection per link.
layerId
- Layer identifierpublic double[] getLinkCapacityNotReservedForProtectionVector()
public double[] getLinkCapacityNotReservedForProtectionVector(long layerId)
layerId
- Layer identifierpublic double getLinkCapacityReservedForProtection(long linkId)
linkId
- Link identifierpublic double getLinkCapacityReservedForProtection(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Double> getLinkCapacityReservedForProtectionMap()
Returns the capacity reserved for protection per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public Map<Long,Double> getLinkCapacityReservedForProtectionMap(long layerId)
Returns the capacity reserved for protection per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic double[] getLinkCapacityReservedForProtectionVector()
public double[] getLinkCapacityReservedForProtectionVector(long layerId)
layerId
- Layer identifierpublic String getLinkCapacityUnitsName()
public String getLinkCapacityUnitsName(long layerId)
layerId
- Layer identifierpublic double[] getLinkCapacityVector()
public double[] getLinkCapacityVector(long layerId)
layerId
- Layer identifierpublic double getLinkCarriedTraffic(long linkId)
linkId
- Link identifierpublic double getLinkCarriedTraffic(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Double> getLinkCarriedTrafficMap()
Returns the carried traffic per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public Map<Long,Double> getLinkCarriedTrafficMap(long layerId)
Returns the carried traffic per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic double[] getLinkCarriedTrafficVector()
public double[] getLinkCarriedTrafficVector(long layerId)
layerId
- Layer identifierpublic Pair<Long,Long> getLinkCoupledLowerLayerDemand(long linkId)
linkId
- Link identifierpublic Pair<Long,Long> getLinkCoupledLowerLayerDemand(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic long getLinkDestinationNode(long linkId)
linkId
- Link identifierpublic long getLinkDestinationNode(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Set<Pair<Long,Long>> getLinkForwardingRules(long linkId)
Returns the set of forwarding rules associated to a link. The output set is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
linkId
- Link identifierpublic Set<Pair<Long,Long>> getLinkForwardingRules(long layerId, long linkId)
Returns the set of forwarding rules associated to a link. The output set is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierlinkId
- Link identifierpublic Set<Long> getLinkIds()
Returns the set of identifiers of the links. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
public Set<Long> getLinkIds(long layerId)
Returns the set of identifiers of the links. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic long[] getLinkIdsVector()
public long[] getLinkIdsVector(long layerId)
layerId
- Layer identifierpublic double getLinkLengthInKm(long linkId)
linkId
- Link identifierpublic double getLinkLengthInKm(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Double> getLinkLengthInKmMap()
Returns the length in km per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public Map<Long,Double> getLinkLengthInKmMap(long layerId)
Returns the length in km per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic double[] getLinkLengthInKmVector()
public double[] getLinkLengthInKmVector(long layerId)
layerId
- Layer identifierpublic Map<Long,Pair<Long,Long>> getLinkMap()
Returns the origin-destination node pair per link. The output map is
backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public Map<Long,Pair<Long,Long>> getLinkMap(long layerId)
Returns the origin-destination node pair per link. The output map is
backed in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic double getLinkMaximumCapacity()
public double getLinkMaximumCapacity(long layerId)
layerId
- Layer identifierpublic double getLinkMaximumUtilization()
public double getLinkMaximumUtilization(long layerId)
layerId
- Layer identifierpublic double getLinkMaximumUtilizationWithoutConsiderReservedCapacityForProtection()
public double getLinkMaximumUtilizationWithoutConsiderReservedCapacityForProtection(long layerId)
layerId
- Layer identifierpublic long getLinkNextId()
public long getLinkNextId(long layerId)
layerId
- Layer identifierpublic double getLinkOccupiedCapacity(long linkId)
linkId
- Link identifierpublic double getLinkOccupiedCapacity(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Double> getLinkOccupiedCapacityMap()
Returns the occupied capacity per link.
public Map<Long,Double> getLinkOccupiedCapacityMap(long layerId)
Returns the occupied capacity per link.
layerId
- Layer identifierpublic double[] getLinkOccupiedCapacityVector()
public double[] getLinkOccupiedCapacityVector(long layerId)
layerId
- Layer identifierpublic Pair<Long,Long> getLinkOriginDestinationNodePair(long linkId)
linkId
- Link identifierpublic Pair<Long,Long> getLinkOriginDestinationNodePair(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic long getLinkOriginNode(long linkId)
linkId
- Link identifierpublic long getLinkOriginNode(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic double getLinkPropagationDelayInSeconds(long linkId)
linkId
- Link identifierpublic double getLinkPropagationDelayInSeconds(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Double> getLinkPropagationDelayInSecondsMap()
Returns the propagation delay in seconds per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public Map<Long,Double> getLinkPropagationDelayInSecondsMap(long layerId)
Returns the propagation delay in seconds per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic double[] getLinkPropagationDelayInSecondsVector()
public double[] getLinkPropagationDelayInSecondsVector(long layerId)
layerId
- Layer identifierpublic double getLinkPropagationSpeedInKmPerSecond(long linkId)
linkId
- Link identifierpublic double getLinkPropagationSpeedInKmPerSecond(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Double> getLinkPropagationSpeedInKmPerSecondMap()
Returns the propagation speed in km/s per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
public Map<Long,Double> getLinkPropagationSpeedInKmPerSecondMap(long layerId)
Returns the propagation speed in km/s per link. The output map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
layerId
- Layer identifierpublic double[] getLinkPropagationSpeedInKmPerSecondVector()
public double[] getLinkPropagationSpeedInKmPerSecondVector(long layerId)
layerId
- Layer identifierpublic Map<Long,String> getLinksAttributeMap(long layerId, String key)
layerId
- Layer identifierkey
- Attribute namepublic Map<Long,String> getLinksAttributeMap(String key)
key
- Attribute namepublic Set<Long> getLinksByAttribute(long layerId, String attribute, String value)
layerId
- Layer identifierattribute
- Attribute (not null)value
- Value (not null)public Set<Long> getLinksByAttribute(String attribute, String value)
attribute
- Attribute (not null)value
- Value (not null)public Map<Long,Pair<Long,Long>> getLinksCoupledDemandMap()
Returns the lower layer demand coupled to each link (among the coupled ones).
The output map is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
public Map<Long,Pair<Long,Long>> getLinksCoupledDemandMap(long layerId)
Returns the lower layer demand coupled to each link (among the coupled ones).
The output map is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
layerId
- Layer identifierpublic Set<Long> getLinksDown()
NetPlan
object, hence users should copy it in case they want to modify it.public Set<Long> getLinksDown(long layerId)
NetPlan
object, hence users should copy it in case they want to modify it.layerId
- Layer identifierpublic Map<Long,Set<Long>> getLinksDownAllLayers()
NetPlan
object, hence users should copy it in case they want to modify it.public Set<Long> getLinksOversubscribed()
NetPlan
object, hence users should copy it in case they want to modify it.public Set<Long> getLinksOversubscribed(long layerId)
NetPlan
object, hence users should copy it in case they want to modify it.layerId
- Layer identifierpublic double getLinkSpareCapacity(long linkId)
linkId
- Link identifierpublic double getLinkSpareCapacity(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Double> getLinkSpareCapacityMap()
public Map<Long,Double> getLinkSpareCapacityMap(long layerId)
layerId
- Layer identifierpublic double[] getLinkSpareCapacityVector()
public double[] getLinkSpareCapacityVector(long layerId)
layerId
- Layer identifierpublic Set<Long> getLinkSRGs(long linkId)
NetPlan
object, hence users should copy it in case they want to modify it.linkId
- Link identifierpublic Set<Long> getLinkSRGs(long layerId, long linkId)
NetPlan
object, hence users should copy it in case they want to modify it.layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Set<Long>> getLinkSRGsMap()
NetPlan
object, hence users should copy it in case they want to modify it.public Map<Long,Set<Long>> getLinkSRGsMap(long layerId)
NetPlan
object, hence users should copy it in case they want to modify it.layerId
- Layer identifierpublic Set<Long> getLinksWithUnlimitedCapacity()
Double.MAX_VALUE
.
The output set is backed in the NetPlan
object, hence users should
copy in case they want to modify it.public Set<Long> getLinksWithUnlimitedCapacity(long layerId)
Double.MAX_VALUE
.
The output set is backed in the NetPlan
object, hence users should
copy in case they want to modify it.layerId
- Layer identifierpublic Set<Long> getLinksWithZeroCapacity()
NetPlan
object, hence users should
copy in case they want to modify it.public Set<Long> getLinksWithZeroCapacity(long layerId)
NetPlan
object, hence users should
copy in case they want to modify it.layerId
- Layer identifierpublic double getLinkTotalCapacity()
public double getLinkTotalCapacity(long layerId)
layerId
- Layer identifierpublic double getLinkTotalCarriedTraffic()
public double getLinkTotalCarriedTraffic(long layerId)
layerId
- Layer identifierpublic double getLinkUtilization(long linkId)
linkId
- Link identifierpublic double getLinkUtilization(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Double> getLinkUtilizationMap()
NetPlan
object, hence users should copy it in case they want to modify it.public Map<Long,Double> getLinkUtilizationMap(long layerId)
NetPlan
object, hence users should copy it in case they want to modify it.layerId
- Layer identifierpublic double[] getLinkUtilizationVector()
public double[] getLinkUtilizationVector(long layerId)
layerId
- Layer identifierpublic double getLinkUtilizationWithoutConsiderReservedCapacityForProtection(long linkId)
linkId
- Link identifierpublic double getLinkUtilizationWithoutConsiderReservedCapacityForProtection(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifierpublic Map<Long,Double> getLinkUtilizationWithoutConsiderReservedCapacityForProtectionMap()
public Map<Long,Double> getLinkUtilizationWithoutConsiderReservedCapacityForProtectionMap(long layerId)
layerId
- Layer identifierpublic double[] getLinkUtilizationWithoutConsiderReservedCapacityForProtectionVector()
public double[] getLinkUtilizationWithoutConsiderReservedCapacityForProtectionVector(long layerId)
layerId
- Layer identifierpublic List<Long> getMergedPath(List<Long> originalPath, List<Long> partialPath)
partialPath
into an originalPath
,
both of them composed of links (and maybe protection segments). Note that the
partialPath
must be contained into the originalPath
in
downstream direction.originalPath
- Original sequence of links and protection segmentspartialPath
- Original sequence of links and protection segmentspublic List<Long> getMergedPath(long layerId, List<Long> originalPath, List<Long> partialPath)
partialPath
into an originalPath
,
both of them composed of links (and maybe protection segments). Note that the
partialPath
must be contained into the originalPath
in
downstream direction.layerId
- Layer identifieroriginalPath
- Original sequence of links and protection segmentspartialPath
- Original sequence of links and protection segmentspublic String getNetworkAttribute(String key)
key
- Attribute namepublic Map<String,String> getNetworkAttributeMap()
NetPlan
object, hence users should copy it in case they want to modify it.public String getNetworkDescription()
public String getNetworkName()
public Set<Long> getNodeAssociatedDemands(long nodeId)
nodeId
- Node identifierpublic Set<Long> getNodeAssociatedDemands(long layerId, long nodeId)
layerId
- Layer identifiernodeId
- Node identifierpublic Set<Long> getNodeAssociatedLinks(long nodeId)
nodeId
- Node identifierpublic Set<Long> getNodeAssociatedLinks(long layerId, long nodeId)
layerId
- Layer identifiernodeId
- Node identifierpublic Set<Long> getNodeAssociatedProtectionSegments(long nodeId)
Returns the protection segments traversing a given node.
Important: Routing type must be SOURCE_ROUTING
.
nodeId
- Node identifierpublic Set<Long> getNodeAssociatedProtectionSegments(long layerId, long nodeId)
Returns the protection segments traversing a given node.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiernodeId
- Node identifierpublic Set<Long> getNodeAssociatedRoutes(long nodeId)
Returns the routes traversing a given node (but not starting/ending there).
Important: Routing type must be SOURCE_ROUTING
.
nodeId
- Node identifierpublic Set<Long> getNodeAssociatedRoutes(long layerId, long nodeId)
Returns the routes traversing a given node (but not starting/ending there).
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiernodeId
- Node identifierpublic String getNodeAttribute(long nodeId, String key)
nodeId
- Node identifierkey
- Attribute namepublic Map<String,String> getNodeAttributeMap(long nodeId)
NetPlan
object, hence users should copy it in case they want to modify it.nodeId
- Node identifierpublic long getNodeByAttribute(String attribute, String value)
attribute
- Attribute (not null)value
- Value (not null)public long getNodeByName(String name)
name
- Node namepublic cern.colt.matrix.tdouble.DoubleMatrix2D getNodeDemandAdjacencyMatrix()
Given a map of demands, it computes the adjacency matrix. This is a matrix
with as many rows and columns as nodes. Position (i,j) accounts
for the number of demands from node i (i = 0 refers
to the first node in NetPlan
object, i = 1 refers to the second one,
and so on) to node j (j = 0 refers to the first node in
NetPlan
object, j = 1 refers to the second one, and so on).
The output is in the sparse DoubleMatrix2D
format, so that could
be directly used along with the JOM library in order to
solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeDemandAdjacencyMatrix().toArray();
public cern.colt.matrix.tdouble.DoubleMatrix2D getNodeDemandAdjacencyMatrix(long layerId)
Given a map of demands, it computes the adjacency matrix. This is a matrix
with as many rows and columns as nodes. Position (i,j) accounts
for the number of demands from node i (i = 0 refers
to the first node in NetPlan
object, i = 1 refers to the second one,
and so on) to node j (j = 0 refers to the first node in
NetPlan
object, j = 1 refers to the second one, and so on).
The output is in the sparse DoubleMatrix2D
format, so that could
be directly used along with the JOM library in order to
solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeDemandAdjacencyMatrix(layerId).toArray();
layerId
- Layer identifierpublic Set<Pair<Long,Long>> getNodeDemandForwardingRules(long nodeId, long demandId)
Returns the set of forwarding rules installed in a given node for a given demand.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
nodeId
- Node identifierdemandId
- Demand identifierpublic Set<Pair<Long,Long>> getNodeDemandForwardingRules(long layerId, long nodeId, long demandId)
Returns the set of forwarding rules installed in a given node for a given demand.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifiernodeId
- Node identifierdemandId
- Demand identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getNodeDemandIncidenceMatrix()
Given a map of demands, it computes the node-demand incidence matrix. This
is a matrix with as many rows as nodes, and as many columns as demands.
Position (n, d) has a 1 if link d (d = 0 refers
to the first demand in NetPlan
object, d = 1 refers to the
second one, and so on) is initiated in node n (n = 0 refers
to the first node in NetPlan
object, n = 1 refers to the second
one, and so on), -1 if it ends in node n, and 0 otherwise.
The output is in the sparse DoubleMatrix2D
format, so that could
be directly used along with the JOM library in order to
solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeDemandIncidenceMatrix().toArray();
public cern.colt.matrix.tdouble.DoubleMatrix2D getNodeDemandIncidenceMatrix(long layerId)
Given a map of demands, it computes the node-demand incidence matrix. This
is a matrix with as many rows as nodes, and as many columns as demands.
Position (n, d) has a 1 if link d (d = 0 refers
to the first demand in NetPlan
object, d = 1 refers to the
second one, and so on) is initiated in node n (n = 0 refers
to the first node in NetPlan
object, n = 1 refers to the second
one, and so on), -1 if it ends in node n, and 0 otherwise.
The output is in the sparse DoubleMatrix2D
format, so that could
be directly used along with the JOM library in order to
solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeDemandIncidenceMatrix(layerId).toArray();
layerId
- Layer identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getNodeDemandIncomingIncidenceMatrix()
Given a map of demands, it computes the node-demand incoming incidence
matrix. This is a matrix with as many rows as nodes, and as many columns
as demands. Position (n, d) has a 1 if demand d
(d = 0 refers to the first demand in NetPlan
object,
d = 1 refers to the second one, and so on) is terminated in node
n (n = 0 refers to the first node in NetPlan
object,
n = 1 refers to the second one, and so on), and 0 otherwise.
The output is in the sparse DoubleMatrix2D
format, so that could be directly used along with the JOM library in order to solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeDemandIncomingIncidenceMatrix().toArray();
public cern.colt.matrix.tdouble.DoubleMatrix2D getNodeDemandIncomingIncidenceMatrix(long layerId)
Given a map of demands, it computes the node-demand incoming incidence
matrix. This is a matrix with as many rows as nodes, and as many columns
as demands. Position (n, d) has a 1 if demand d
(d = 0 refers to the first demand in NetPlan
object,
d = 1 refers to the second one, and so on) is terminated in node
n (n = 0 refers to the first node in NetPlan
object,
n = 1 refers to the second one, and so on), and 0 otherwise.
The output is in the sparse DoubleMatrix2D
format, so that could be directly used along with the JOM library in order to solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeDemandIncomingIncidenceMatrix(layerId).toArray();
layerId
- Layer identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getNodeDemandOutgoingIncidenceMatrix()
Given a map of demands, it computes the node-demand outgoing incidence matrix.
This is a matrix with as many rows as nodes, and as many columns as demands.
Position (n, d) has a 1 if demand d (d = 0 refers
to the first demand in demandMap.keySet()
, d = 1 refers to the
second one, and so on) is initiated in node n (n = 0 refers
to the first node in NetPlan
object, n = 1 refers to the second
one, and so on), and 0 otherwise.
The output is in the sparse DoubleMatrix2D
format, so that could be directly used along with the JOM library in order to solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeDemandOutgoingIncidenceMatrix().toArray();
public cern.colt.matrix.tdouble.DoubleMatrix2D getNodeDemandOutgoingIncidenceMatrix(long layerId)
Given a map of demands, it computes the node-demand outgoing incidence matrix.
This is a matrix with as many rows as nodes, and as many columns as demands.
Position (n, d) has a 1 if demand d (d = 0 refers
to the first demand in demandMap.keySet()
, d = 1 refers to the
second one, and so on) is initiated in node n (n = 0 refers
to the first node in NetPlan
object, n = 1 refers to the second
one, and so on), and 0 otherwise.
The output is in the sparse DoubleMatrix2D
format, so that could be directly used along with the JOM library in order to solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeDemandOutgoingIncidenceMatrix(layerId).toArray();
layerId
- Layer identifierpublic double getNodeEgressTraffic(long nodeId)
nodeId
- Node identifierpublic double getNodeEgressTraffic(long layerId, long nodeId)
layerId
- Layer identifiernodeId
- Node identifierpublic Map<Long,Double> getNodeEgressTrafficMap()
public Map<Long,Double> getNodeEgressTrafficMap(long layerId)
layerId
- Layer identifierpublic double[] getNodeEgressTrafficVector()
public double[] getNodeEgressTrafficVector(long layerId)
layerId
- Layer identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getNodeEuclideanDistanceMatrix()
public Set<Pair<Long,Long>> getNodeForwardingRules(long nodeId)
Returns the set of forwarding rules installed in a given node.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
nodeId
- Node identifierpublic Set<Pair<Long,Long>> getNodeForwardingRules(long layerId, long nodeId)
Returns the set of forwarding rules installed in a given node.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifiernodeId
- Node identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getNodeHaversineDistanceInKmMatrix()
public Set<Long> getNodeIds()
NetPlan
object, hence users should copy it in case they want to modify it.public long[] getNodeIdsVector()
public Set<Long> getNodeIncomingDemands(long nodeId)
NetPlan
object, hence users should copy it in case they want to modify it.nodeId
- Node identifierpublic Set<Long> getNodeIncomingDemands(long layerId, long nodeId)
NetPlan
object, hence users should copy it in case they want to modify it.layerId
- Layer identifiernodeId
- Node identifierpublic Set<Long> getNodeIncomingLinks(long nodeId)
NetPlan
object, hence users should copy it in case they want to modify it.nodeId
- Node identifierpublic Set<Long> getNodeIncomingLinks(long layerId, long nodeId)
NetPlan
object, hence users should copy it in case they want to modify it.layerId
- Layer identifiernodeId
- Node identifierpublic Set<Long> getNodeIncomingRoutes(long nodeId)
Returns the routes ending in a given node. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
nodeId
- Node identifierpublic Set<Long> getNodeIncomingRoutes(long layerId, long nodeId)
Returns the routes ending in a given node. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiernodeId
- Node identifierpublic double getNodeIngressTraffic(long nodeId)
nodeId
- Node identifierpublic double getNodeIngressTraffic(long layerId, long nodeId)
layerId
- Layer identifiernodeId
- Node identifierpublic Map<Long,Double> getNodeIngressTrafficMap()
public Map<Long,Double> getNodeIngressTrafficMap(long layerId)
layerId
- Layer identifierpublic double[] getNodeIngressTrafficVector()
public double[] getNodeIngressTrafficVector(long layerId)
layerId
- Layer identifierpublic Set<Long> getNodeInNeighbors(long nodeId)
nodeId
- Node identifierpublic Set<Long> getNodeInNeighbors(long layerId, long nodeId)
layerId
- Layer identifiernodeId
- Node identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getNodeLinkAdjacencyMatrix()
Given a map of links, it computes the adjacency matrix. This is a matrix
with as many rows and columns as nodes. Position (i,j) accounts
for the number of links from node i (i = 0 refers
to the first node in NetPlan
object, i = 1 refers to the second one,
and so on) to node j (j = 0 refers to the first node in
NetPlan
object, j = 1 refers to the second one, and so on).
The output is in the sparse DoubleMatrix2D
format, so that could
be directly used along with the JOM library in order to
solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeLinkAdjacencyMatrix().toArray();
public cern.colt.matrix.tdouble.DoubleMatrix2D getNodeLinkAdjacencyMatrix(long layerId)
Given a map of links, it computes the adjacency matrix. This is a matrix
with as many rows and columns as nodes. Position (i,j) accounts
for the number of links from node i (i = 0 refers
to the first node in NetPlan
object, i = 1 refers to the second one,
and so on) to node j (j = 0 refers to the first node in
NetPlan
object, j = 1 refers to the second one, and so on).
The output is in the sparse DoubleMatrix2D
format, so that could
be directly used along with the JOM library in order to
solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeLinkAdjacencyMatrix(layerId).toArray();
layerId
- Layer identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getNodeLinkIncidenceMatrix()
Given a map of links, it computes the node-link incidence matrix. This
is a matrix with as many rows as nodes, and as many columns as links.
Position (n, e) has a 1 if link e (e = 0 refers
to the first link in NetPlan
object, e = 1 refers to the
second one, and so on) is initiated in node n (n = 0 refers
to the first node in NetPlan
object, n = 1 refers to the second
one, and so on), -1 if it ends in node n, and 0 otherwise.
The output is in the sparse getNodeLinkIncidenceMatrix
format, so that could
be directly used along with the JOM library in order to
solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getIncidenceMatrix(nodeIds, linkMap).toArray();
public cern.colt.matrix.tdouble.DoubleMatrix2D getNodeLinkIncidenceMatrix(long layerId)
Given a map of links, it computes the node-link incidence matrix. This
is a matrix with as many rows as nodes, and as many columns as links.
Position (n, e) has a 1 if link e (e = 0 refers
to the first link in NetPlan
object, e = 1 refers to the
second one, and so on) is initiated in node n (n = 0 refers
to the first node in NetPlan
object, n = 1 refers to the second
one, and so on), -1 if it ends in node n, and 0 otherwise.
The output is in the sparse DoubleMatrix2D
format, so that could
be directly used along with the JOM library in order to
solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeLinkIncidenceMatrix(nodeIds, linkMap).toArray();
layerId
- Layer identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getNodeLinkIncomingIncidenceMatrix()
Given a map of links, it computes the node-link incoming incidence
matrix. This is a matrix with as many rows as nodes, and as many columns
as links. Position (n, e) has a 1 if link e
(e = 0 refers to the first link in NetPlan
object,
e = 1 refers to the second one, and so on) is terminated in node
n (n = 0 refers to the first node in NetPlan
object,
n = 1 refers to the second one, and so on), and 0 otherwise.
The output is in the sparse DoubleMatrix2D
format, so that could be directly used along with the JOM library in order to solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeLinkIncomingIncidenceMatrix().toArray();
public cern.colt.matrix.tdouble.DoubleMatrix2D getNodeLinkIncomingIncidenceMatrix(long layerId)
Given a map of links, it computes the node-link incoming incidence
matrix. This is a matrix with as many rows as nodes, and as many columns
as links. Position (n, e) has a 1 if link e
(e = 0 refers to the first link in NetPlan
object,
e = 1 refers to the second one, and so on) is terminated in node
n (n = 0 refers to the first node in NetPlan
object,
n = 1 refers to the second one, and so on), and 0 otherwise.
The output is in the sparse DoubleMatrix2D
format, so that could be directly used along with the JOM library in order to solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeLinkIncomingIncidenceMatrix(layerId).toArray();
layerId
- Layer identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getNodeLinkOutgoingIncidenceMatrix()
Given a map of links, it computes the node-link outgoing incidence matrix.
This is a matrix with as many rows as nodes, and as many columns as links.
Position (n, e) has a 1 if link e (e = 0 refers
to the first link in linkMap.keySet()
, e = 1 refers to the
second one, and so on) is initiated in node n (n = 0 refers
to the first node in NetPlan
object, n = 1 refers to the second
one, and so on), and 0 otherwise.
The output is in the sparse DoubleMatrix2D
format, so that could be directly used along with the JOM library in order to solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeLinkOutgoingIncidenceMatrix().toArray();
public cern.colt.matrix.tdouble.DoubleMatrix2D getNodeLinkOutgoingIncidenceMatrix(long layerId)
Given a map of links, it computes the node-link outgoing incidence matrix.
This is a matrix with as many rows as nodes, and as many columns as links.
Position (n, e) has a 1 if link e (e = 0 refers
to the first link in linkMap.keySet()
, e = 1 refers to the
second one, and so on) is initiated in node n (n = 0 refers
to the first node in NetPlan
object, n = 1 refers to the second
one, and so on), and 0 otherwise.
The output is in the sparse DoubleMatrix2D
format, so that could be directly used along with the JOM library in order to solve optimization problems.
For users not interested in this format, a classical dense double[][]
matrix could be obtained via the command:
double[][] matrix = getNodeLinkOutgoingIncidenceMatrix(layerId).toArray();
layerId
- Layer identifierpublic String getNodeName(long nodeId)
nodeId
- Node identifierpublic Map<Long,String> getNodeNameMap()
NetPlan
object, hence users should copy it in case they want to modify it.public String[] getNodeNameVector()
public long getNodeNextId()
public Set<Long> getNodeOutgoingDemands(long nodeId)
NetPlan
object, hence users should copy it in case they want to modify it.nodeId
- Node identifierpublic Set<Long> getNodeOutgoingDemands(long layerId, long nodeId)
NetPlan
object, hence users should copy it in case they want to modify it.layerId
- Layer identifiernodeId
- Node identifierpublic Set<Long> getNodeOutgoingLinks(long nodeId)
NetPlan
object, hence users should copy it in case they want to modify it.nodeId
- Node identifierpublic Set<Long> getNodeOutgoingLinks(long layerId, long nodeId)
NetPlan
object, hence users should copy it in case they want to modify it.layerId
- Layer identifiernodeId
- Node identifierpublic Set<Long> getNodeOutgoingRoutes(long nodeId)
Returns the routes starting in a given node.
Important: Routing type must be SOURCE_ROUTING
.
nodeId
- Node identifierpublic Set<Long> getNodeOutgoingRoutes(long layerId, long nodeId)
Returns the routes starting in a given node at the given layer.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiernodeId
- Node identifierpublic Set<Long> getNodeOutNeighbors(long nodeId)
nodeId
- Node identifierpublic Set<Long> getNodeOutNeighbors(long layerId, long nodeId)
layerId
- Layer identifiernodeId
- Node identifierpublic double getNodePairAverageOfferedTraffic()
getDemandTotalOfferedTraffic()
and getNumberOfNodePairs()
.public double getNodePairAverageOfferedTraffic(long layerId)
getDemandTotalOfferedTraffic(layerId)
and getNumberOfNodePairs()
.layerId
- Layer identifierpublic Set<Long> getNodePairBidirectionalDemands(long node1, long node2)
node1
- Node 1node2
- Node 2public Set<Long> getNodePairBidirectionalDemands(long layerId, long node1, long node2)
layerId
- Layer identifiernode1
- Node 1node2
- Node 2public Set<Long> getNodePairBidirectionalLinks(long node1, long node2)
node1
- Node 1node2
- Node 2public Set<Long> getNodePairBidirectionalLinks(long layerId, long node1, long node2)
layerId
- Layer identifiernode1
- Node 1node2
- Node 2public Set<Long> getNodePairDemands(long ingressNodeId, long egressNodeId)
ingressNodeId
- Ingress nodeegressNodeId
- Egress nodepublic Set<Long> getNodePairDemands(long layerId, long ingressNodeId, long egressNodeId)
layerId
- Layer identifieringressNodeId
- Ingress nodeegressNodeId
- Egress nodepublic double getNodePairEuclideanDistance(long nodeId_1, long nodeId_2)
nodeId_1
- First nodenodeId_2
- Second nodepublic double getNodePairHaversineDistanceInKm(long nodeId_1, long nodeId_2)
nodeId_1
- First nodenodeId_2
- Second nodepublic Set<Long> getNodePairLinks(long originNodeId, long destinationNodeId)
originNodeId
- Origin nodedestinationNodeId
- Destination nodepublic Set<Long> getNodePairLinks(long layerId, long originNodeId, long destinationNodeId)
layerId
- Layer identifieroriginNodeId
- Origin nodedestinationNodeId
- Destination nodepublic Set<Long> getNodePairRoutes(long ingressNodeId, long egressNodeId)
Returns the routes from a node to other one.
Important: Routing type must be SOURCE_ROUTING
.
ingressNodeId
- Ingress nodeegressNodeId
- Egress nodepublic Set<Long> getNodePairRoutes(long layerId, long ingressNodeId, long egressNodeId)
Returns the routes from a node to other one.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifieringressNodeId
- Ingress nodeegressNodeId
- Egress nodepublic Map<Long,String> getNodesAttributeMap(String key)
key
- Attribute namepublic Set<Long> getNodesByAttribute(String attribute, String value)
attribute
- Attribute (not null)value
- Value (not null)public Set<Long> getNodesDown()
NetPlan
object, hence users should copy it in case they want to modify it.public Set<Long> getNodeSRGs(long nodeId)
NetPlan
object, hence users should copy it in case they want to modify it.nodeId
- Node identifierpublic Map<Long,Set<Long>> getNodeSRGsMap()
NetPlan
object, hence users should copy it in case they want to modify it.public Set<Long> getNodeTraversingRoutes(long nodeId)
Returns the routes traversing a given node (but not starting/ending there).
Important: Routing type must be SOURCE_ROUTING
.
nodeId
- Node identifierpublic Set<Long> getNodeTraversingRoutes(long layerId, long nodeId)
Returns the routes traversing a given node (but not starting/ending there).
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiernodeId
- Node identifierpublic double getNodeTraversingTraffic(long nodeId)
nodeId
- Node identifierpublic double getNodeTraversingTraffic(long layerId, long nodeId)
layerId
- Layer identifiernodeId
- Node identifierpublic Map<Long,Double> getNodeTraversingTrafficMap()
public Map<Long,Double> getNodeTraversingTrafficMap(long layerId)
layerId
- Layer identifierpublic double[] getNodeTraversingTrafficVector()
public double[] getNodeTraversingTrafficVector(long layerId)
layerId
- Layer identifierpublic Point2D getNodeXYPosition(long nodeId)
nodeId
- Node identifierpublic Map<Long,Point2D> getNodeXYPositionMap()
NetPlan
object, hence users should copy it in case they want to modify it.public int getNumberOfDemands()
public int getNumberOfDemands(long layerId)
layerId
- Layer identifierpublic int getNumberOfForwardingRules()
Returns the number of forwarding rules.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
public int getNumberOfForwardingRules(long layerId)
Returns the number of forwarding rules.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierpublic int getNumberOfLayers()
public int getNumberOfLinks()
public int getNumberOfLinks(long layerId)
layerId
- Layer identifierpublic int getNumberOfNodePairs()
public int getNumberOfNodes()
public int getNumberOfProtectionSegments()
Returns the number of protection segments.
Important: Routing type must be SOURCE_ROUTING
.
public int getNumberOfProtectionSegments(long layerId)
Returns the number of protection segments.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic int getNumberOfRoutes()
Returns the number of routes for traffic demands defined.
Important: Routing type must be SOURCE_ROUTING
.
public int getNumberOfRoutes(long layerId)
Returns the number of routes for traffic demands defined.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic int getNumberOfSRGs()
public Map<Long,List<Long>> getProtectionSegmentAllSequenceOfLinks()
Returns the list with the sequence of links for each protection segment.
The output map is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,List<Long>> getProtectionSegmentAllSequenceOfLinks(long layerId)
Returns the list with the sequence of links for each protection segment.
The output map is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic String getProtectionSegmentAttribute(long layerId, long segmentId, String key)
Returns the value of a given attribute for a protection segment. If not defined, it is search for the given layer in the network.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierkey
- Attribute namepublic String getProtectionSegmentAttribute(long segmentId, String key)
Returns the value of a given attribute for a protection segment. If not defined, it is search for the default layer in the network.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierkey
- Attribute namepublic Map<String,String> getProtectionSegmentAttributeMap(long segmentId)
Returns the attributes defined for a given protection segment. The output
map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic Map<String,String> getProtectionSegmentAttributeMap(long layerId, long segmentId)
Returns the attributes defined for a given protection segment. The output
map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic long getProtectionSegmentByAttribute(long layerId, String attribute, String value)
Returns the identifier of the first protection segment with a given value in a certain attribute, or -1 if not found.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierattribute
- Attribute (not null)value
- Value (not null)public long getProtectionSegmentByAttribute(String attribute, String value)
Returns the identifier of the first protection segment with a given value in a certain attribute, or -1 if not found.
Important: Routing type must be SOURCE_ROUTING
.
attribute
- Attribute (not null)value
- Value (not null)public double getProtectionSegmentCarriedTraffic(long segmentId)
Returns the carried traffic for a given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic double getProtectionSegmentCarriedTraffic(long layerId, long segmentId)
Returns the carried traffic for a given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic Map<Long,Double> getProtectionSegmentCarriedTrafficMap()
Returns the carried traffic for each protection segment.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Double> getProtectionSegmentCarriedTrafficMap(long layerId)
Returns the carried traffic for each protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double[] getProtectionSegmentCarriedTrafficVector()
Returns the carried traffic for each protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public double[] getProtectionSegmentCarriedTrafficVector(long layerId)
Returns the carried traffic for each protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic long getProtectionSegmentDestinationNode(long segmentId)
Returns the identifier of the destination node of the given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic long getProtectionSegmentDestinationNode(long layerId, long segmentId)
Returns the identifier of the destination node of the given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic Set<Long> getProtectionSegmentIds()
Returns the set of identifiers of the protection segments. The output
set is backed in the NetPlan
object, hence users should copy in
case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Set<Long> getProtectionSegmentIds(long layerId)
Returns the set of identifiers of the protection segments. The output
set is backed in the NetPlan
object, hence users should copy in
case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic long[] getProtectionSegmentIdsVector()
Returns the set of identifiers of the protection segments, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public long[] getProtectionSegmentIdsVector(long layerId)
Returns the set of identifiers of the protection segments, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double getProtectionSegmentLengthInKm(long segmentId)
Returns the length in kilometers for the given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic double getProtectionSegmentLengthInKm(long layerId, long segmentId)
Returns the length in kilometers for the given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic Map<Long,Double> getProtectionSegmentLengthInKmMap()
Returns the length in kilometers for each protection segment. The output
map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Double> getProtectionSegmentLengthInKmMap(long layerId)
Returns the length in kilometers for each protection segment. The output
map is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double[] getProtectionSegmentLengthInKmVector()
Returns the length in kilometers for each protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public double[] getProtectionSegmentLengthInKmVector(long layerId)
Returns the length in kilometers for each protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic long getProtectionSegmentNextId()
Returns the next identifier for a new protection segment.
Important: Routing type must be SOURCE_ROUTING
.
public long getProtectionSegmentNextId(long layerId)
Returns the next identifier for a new protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic int getProtectionSegmentNumberOfHops(long segmentId)
Returns the number of hops for a given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic int getProtectionSegmentNumberOfHops(long layerId, long segmentId)
Returns the number of hops for a given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic Map<Long,Integer> getProtectionSegmentNumberOfHopsMap()
Returns the number of hops per protection segment.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Integer> getProtectionSegmentNumberOfHopsMap(long layerId)
Returns the number of hops per protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic int[] getProtectionSegmentNumberOfHopsVector()
Returns the number of hops per protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public int[] getProtectionSegmentNumberOfHopsVector(long layerId)
Returns the number of hops per protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Pair<Long,Long> getProtectionSegmentOriginDestinationNodePair(long segmentId)
Returns the origin-destination node pair for the given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic Pair<Long,Long> getProtectionSegmentOriginDestinationNodePair(long layerId, long segmentId)
Returns the origin-destination node pair for the given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic long getProtectionSegmentOriginNode(long segmentId)
Returns the identifier of the origin node of the given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic long getProtectionSegmentOriginNode(long layerId, long segmentId)
Returns the identifier of the origin node of the given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic double getProtectionSegmentPropagationDelayInSeconds(long segmentId)
Returns the propagation delay in seconds of a given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic double getProtectionSegmentPropagationDelayInSeconds(long layerId, long segmentId)
Returns the propagation delay in seconds of a given protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic Map<Long,Double> getProtectionSegmentPropagationDelayInSecondsMap()
Returns the propagation delay in seconds per protection segment.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Double> getProtectionSegmentPropagationDelayInSecondsMap(long layerId)
Returns the propagation delay in seconds per protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double[] getProtectionSegmentPropagationDelayInSecondsVector()
Returns the propagation delay in seconds per protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public double[] getProtectionSegmentPropagationDelayInSecondsVector(long layerId)
Returns the propagation delay in seconds per protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double getProtectionSegmentReservedCapacity(long segmentId)
Returns the reserved capacity of a protection segment.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic double getProtectionSegmentReservedCapacity(long layerId, long segmentId)
Returns the reserved capacity of a protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic Map<Long,Double> getProtectionSegmentReservedCapacityMap()
Returns the reserved capacity per protection segment. The output map
is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Double> getProtectionSegmentReservedCapacityMap(long layerId)
Returns the reserved capacity per protection segment. The output map
is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double[] getProtectionSegmentReservedCapacityVector()
Returns the reserved capacity per protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public double[] getProtectionSegmentReservedCapacityVector(long layerId)
Returns the reserved capacity per protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Set<Long> getProtectionSegmentRoutes(long segmentId)
Returns the routes which share a given protection segment. The output
set is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic Set<Long> getProtectionSegmentRoutes(long layerId, long segmentId)
Returns the routes which share a given protection segment. The output
set is backed in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic Map<Long,Set<Long>> getProtectionSegmentRoutesMap()
Returns the routes which share each protection segment.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Set<Long>> getProtectionSegmentRoutesMap(long layerId)
Returns the routes which share each protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Map<Long,String> getProtectionSegmentsAttributeMap(long layerId, String key)
Returns the value of an attribute for each protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierkey
- Attribute namepublic Map<Long,String> getProtectionSegmentsAttributeMap(String key)
Returns the value of an attribute for each protection segment.
Important: Routing type must be SOURCE_ROUTING
.
key
- Attribute namepublic Set<Long> getProtectionSegmentsByAttribute(long layerId, String attribute, String value)
Returns the identifiers of the protection segments with a given value in a certain attribute.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierattribute
- Attribute (not null)value
- Value (not null)public Set<Long> getProtectionSegmentsByAttribute(String attribute, String value)
Returns the identifiers of the protection segments with a given value in a certain attribute.
Important: Routing type must be SOURCE_ROUTING
.
attribute
- Attribute (not null)value
- Value (not null)public Set<Long> getProtectionSegmentsDedicated()
Returns the set of protection segments assigned only to one route.
Important: Routing type must be SOURCE_ROUTING
.
public Set<Long> getProtectionSegmentsDedicated(long layerId)
Returns the set of protection segments assigned only to one route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Set<Long> getProtectionSegmentsDown()
Returns the set of protection segments down. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Set<Long> getProtectionSegmentsDown(long layerId)
Returns the set of protection segments down. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Map<Long,Set<Long>> getProtectionSegmentsDownMap()
Returns the set of protection segments down per layer.
Important: Routing type must be SOURCE_ROUTING
.
public List<Long> getProtectionSegmentSequenceOfLinks(long segmentId)
Returns the sequence of links traversed by a protection segment. The
output list is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic List<Long> getProtectionSegmentSequenceOfLinks(long layerId, long segmentId)
Returns the sequence of links traversed by a protection segment. The
output list is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic List<Long> getProtectionSegmentSequenceOfNodes(long segmentId)
Returns the sequence of nodes traversed by a protection segment. The
output list is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic List<Long> getProtectionSegmentSequenceOfNodes(long layerId, long segmentId)
Returns the sequence of nodes traversed by a protection segment. The
output list is backed in the NetPlan
object, hence users should
copy in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic double getProtectionSegmentSpareCapacity(long segmentId)
Returns the available capacity for a protection segment.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifierpublic double getProtectionSegmentSpareCapacity(long layerId, long segmentId)
Returns the available capacity for a protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic Map<Long,Double> getProtectionSegmentSpareCapacityMap()
Returns the available capacity per protection segment.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Double> getProtectionSegmentSpareCapacityMap(long layerId)
Returns the available capacity per protection segment.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double[] getProtectionSegmentSpareCapacityVector()
Returns the available capacity per protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public double[] getProtectionSegmentSpareCapacityVector(long layerId)
Returns the available capacity per protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Set<Long> getProtectionSegmentSRGs(long segmentId)
Returns all SRGs associated to a given protection segment. It is equal to the union of the SRGs associated to each traversed node/link.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Segment identifierpublic Set<Long> getProtectionSegmentSRGs(long layerId, long segmentId)
Returns all SRGs associated to a given protection segment. It is equal to the union of the SRGs associated to each traversed node/link.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic Map<Long,Set<Long>> getProtectionSegmentSRGsMap()
Returns all SRGs associated to each protection segment. It is equal to the union of the SRGs associated to each traversed node/link.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Set<Long>> getProtectionSegmentSRGsMap(long layerId)
Returns all SRGs associated to each protection segment. It is equal to the union of the SRGs associated to each traversed node/link.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Map<Long,List<Long>> getRouteAllSequenceOfLinks()
Returns the sequence of links (and maybe protection segments) for each
route. The output map is backed in the NetPlan
object, hence users
should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,List<Long>> getRouteAllSequenceOfLinks(long layerId)
Returns the sequence of links (and maybe protection segments) for each
route. The output map is backed in the NetPlan
object, hence users
should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic String getRouteAttribute(long layerId, long routeId, String key)
* Returns the value of a given attribute for a route. If not defined, it is search for the given layer.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierkey
- Attribute namepublic String getRouteAttribute(long routeId, String key)
Returns the value of a given attribute for a route. If not defined, it is search for the default layer in the network.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierkey
- Attribute namepublic Map<String,String> getRouteAttributeMap(long routeId)
Returns the attributes defined for a given route. The output map is
backed in the NetPlan
object, hence users should copy it in case
they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic Map<String,String> getRouteAttributeMap(long layerId, long routeId)
Returns the attributes defined for a given route. The output map is
backed in the NetPlan
object, hence users should copy it in case
they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic List<Long> getRouteBackupSegmentList(long routeId)
Returns the protection segments defined for a given route. The output
list is backed in the NetPlan
object, hence users should copy it
in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic List<Long> getRouteBackupSegmentList(long layerId, long routeId)
Returns the protection segments defined for a given route. The output
list is backed in the NetPlan
object, hence users should copy it
in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic Map<Long,List<Long>> getRouteBackupSegmentListMap()
Returns the backup segment list per route.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,List<Long>> getRouteBackupSegmentListMap(long layerId)
Returns the backup segment list per route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic long getRouteByAttribute(long layerId, String attribute, String value)
Returns the identifier of the first route with a given value in a certain attribute, or -1 if not found.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierattribute
- Attribute (not null)value
- Value (not null)public long getRouteByAttribute(String attribute, String value)
Returns the identifier of the first route with a given value in a certain attribute, or -1 if not found.
Important: Routing type must be SOURCE_ROUTING
.
attribute
- Attribute (not null)value
- Value (not null)public double getRouteCarriedTraffic(long routeId)
Returns the carried traffic (in demand traffic units) for a given route.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic double getRouteCarriedTraffic(long layerId, long routeId)
Returns the carried traffic (in demand traffic units) for a given route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic double getRouteCarriedTrafficFraction(long routeId)
Returns the ratio between the carried traffic per route with respect to the total offered traffic by the corresponding demand.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic double getRouteCarriedTrafficFraction(long layerId, long routeId)
Returns the ratio between the carried traffic per route with respect to the total offered traffic by the corresponding demand.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic Map<Long,Double> getRouteCarriedTrafficFractionMap()
Returns the carried traffic (in demand traffic units), with respect to the total offered traffic by the corresponding demand, per route.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Double> getRouteCarriedTrafficFractionMap(long layerId)
Returns the carried traffic (in demand traffic units), with respect to the total offered traffic by the corresponding demand, per route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double[] getRouteCarriedTrafficFractionVector()
Returns the carried traffic (in demand traffic units), with respect to the total offered traffic by the corresponding demand, per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public double[] getRouteCarriedTrafficFractionVector(long layerId)
Returns the carried traffic (in demand traffic units), with respect to the total offered traffic by the corresponding demand, per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Map<Long,Double> getRouteCarriedTrafficMap()
Returns the carried traffic (in demand traffic units) per route. The
output map is backed in the NetPlan
object, hence users should
copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Double> getRouteCarriedTrafficMap(long layerId)
Returns the carried traffic (in demand traffic units) per route. The
output map is backed in the NetPlan
object, hence users should
copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double[] getRouteCarriedTrafficVector()
Returns the carried traffic (in demand traffic units) per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public double[] getRouteCarriedTrafficVector(long layerId)
Returns the carried traffic (in demand traffic units) per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Constants.RoutingCycleType getRouteCycleType(long routeId)
Returns the cycle type of a route (i.e., loopless, or with loops).
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic Constants.RoutingCycleType getRouteCycleType(long layerId, long routeId)
Returns the cycle type of a route (i.e., loopless, or with loops).
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic long getRouteDemand(long routeId)
Returns the associated demand for a given route.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic long getRouteDemand(long layerId, long routeId)
Returns the associated demand for a given route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic Map<Long,Long> getRouteDemandMap()
Returns the associated demand per route. The output map is backed in the
NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Long> getRouteDemandMap(long layerId)
Returns the associated demand per route. The output map is backed in the
NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic long[] getRouteDemandVector()
Returns the associated demand per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public long[] getRouteDemandVector(long layerId)
Returns the associated demand per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic long getRouteEgressNode(long routeId)
Returns the identifier of the egress node of the given route.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic long getRouteEgressNode(long layerId, long routeId)
Returns the identifier of the egress node of the given route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic Set<Long> getRouteIds()
Returns the set of identifiers of the routes. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Set<Long> getRouteIds(long layerId)
Returns the set of identifiers of the routes. The output set is backed
in the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic long[] getRouteIdsVector()
Returns the set of identifiers of the routes, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public long[] getRouteIdsVector(long layerId)
Returns the set of identifiers of the routes, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Pair<Long,Long> getRouteIngressEgressNodePair(long routeId)
Returns the ingress-egress node pair of a route.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic Pair<Long,Long> getRouteIngressEgressNodePair(long layerId, long routeId)
Returns the ingress-egress node pair of a route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic long getRouteIngressNode(long routeId)
Returns the identifier of the ingress node of the given route.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic long getRouteIngressNode(long layerId, long routeId)
Returns the identifier of the ingress node of the given route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic double getRouteLengthInKm(long routeId)
Returns the length in kilometers for the given route.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic double getRouteLengthInKm(long layerId, long routeId)
Returns the length in kilometers for the given route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic Map<Long,Double> getRouteLengthInKmMap()
Returns the length in kilometers per route. The output map is backed in
the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Double> getRouteLengthInKmMap(long layerId)
Returns the length in kilometers per route. The output map is backed in
the NetPlan
object, hence users should copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double[] getRouteLengthInKmVector()
Returns the length in kilometers per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public double[] getRouteLengthInKmVector(long layerId)
Returns the length in kilometers per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic long getRouteNextId()
Returns the next identifier for a new route.
Important: Routing type must be SOURCE_ROUTING
.
public long getRouteNextId(long layerId)
Returns the next identifier for a new route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic int getRouteNumberOfHops(long routeId)
Returns the number of hops for a given route. In case some protection segment is traversed, all its links are also taken into account.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic int getRouteNumberOfHops(long layerId, long routeId)
Returns the number of hops for a given route. In case some protection segment is traversed, all its links are also taken into account.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic Map<Long,Integer> getRouteNumberOfHopsMap()
Returns the number of hops per route.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Integer> getRouteNumberOfHopsMap(long layerId)
Returns the number of hops per route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic int[] getRouteNumberOfHopsVector()
Returns the number of hops per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public int[] getRouteNumberOfHopsVector(long layerId)
Returns the number of hops per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double getRouteOccupiedCapacity(long routeId)
Returns the capacity occupied (in link capacity units) by the given route.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic double getRouteOccupiedCapacity(long layerId, long routeId)
Returns the capacity occupied (in link capacity units) by the given route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic Map<Long,Double> getRouteOccupiedCapacityMap()
Returns the capacity occupied (in link capacity units) per route. The
output map is backed in the NetPlan
object, hence users should
copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Double> getRouteOccupiedCapacityMap(long layerId)
Returns the capacity occupied (in link capacity units) per route. The
output map is backed in the NetPlan
object, hence users should
copy it in case they want to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double[] getRouteOccupiedCapacityVector()
Returns the capacity occupied (in link capacity units) per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public double[] getRouteOccupiedCapacityVector(long layerId)
Returns the capacity occupied (in link capacity units) per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double getRouteOriginalCarriedTraffic(long routeId)
Returns the original carried traffic (in demand traffic units) by the route.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic double getRouteOriginalCarriedTraffic(long layerId, long routeId)
Returns the original carried traffic (in demand traffic units) by the route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic double getRouteOriginalOccupiedCapacity(long routeId)
Returns the original occupied capacity (in link capacity units) by the route.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic double getRouteOriginalOccupiedCapacity(long layerId, long routeId)
Returns the original occupied capacity (in link capacity units) by the route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic List<Long> getRouteOriginalSequenceOfLinks(long routeId)
Returns the original sequence of links of the route.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic List<Long> getRouteOriginalSequenceOfLinks(long layerId, long routeId)
Returns the original sequence of links of the route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic double getRoutePropagationDelayInSeconds(long routeId)
Returns the propagation delay in seconds in a given route.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic double getRoutePropagationDelayInSeconds(long layerId, long routeId)
Returns the propagation delay in seconds in a given route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic Map<Long,Double> getRoutePropagationDelayInSecondsMap()
Returns the propagation delay per route.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Double> getRoutePropagationDelayInSecondsMap(long layerId)
Returns the propagation delay per route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic double[] getRoutePropagationDelayInSecondsVector()
Returns the propagation delay per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
public double[] getRoutePropagationDelayInSecondsVector(long layerId)
Returns the propagation delay per route, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Map<Long,String> getRoutesAttributeMap(long layerId, String key)
Returns the value of an attribute for each route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierkey
- Attribute namepublic Map<Long,String> getRoutesAttributeMap(String key)
Returns the value of an attribute for each route.
Important: Routing type must be SOURCE_ROUTING
.
key
- Attribute namepublic Set<Long> getRoutesByAttribute(long layerId, String attribute, String value)
Returns the identifiers of the routes with a given value in a certain attribute.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierattribute
- Attribute (not null)value
- Value (not null)public Set<Long> getRoutesByAttribute(String attribute, String value)
Returns the identifiers of the routes with a given value in a certain attribute.
Important: Routing type must be SOURCE_ROUTING
.
attribute
- Attribute (not null)value
- Value (not null)public Set<Long> getRoutesDown()
Returns the set of routes in down state. The output set is backed in
the NetPlan
object, hence users should copy it in case they want
to modify it.
Important: Routing type must be SOURCE_ROUTING
.
public Set<Long> getRoutesDown(long layerId)
Returns the set of routes in down state. The output set is backed in
the NetPlan
object, hence users should copy it in case they want
to modify it.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Map<Long,Set<Long>> getRoutesDownMap()
Returns the set of routes in down state per layer.
Important: Routing type must be SOURCE_ROUTING
.
public List<Long> getRouteSequenceOfLinks(long routeId)
Returns the sequence of links (and maybe protection segments) traversed by
a route. The output list is backed in the NetPlan
object, hence
users should copy it in case they want to modify it.
Important: Protection segments are indicated here as (-1 - segmentId), that is, protection segment 1 would be represented as -2.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic List<Long> getRouteSequenceOfLinks(long layerId, long routeId)
Returns the sequence of links (and maybe protection segments) traversed by
a route. The output list is backed in the NetPlan
object, hence
users should copy it in case they want to modify it.
Important: Protection segments are indicated here as (-1 - segmentId), that is, protection segment 1 would be represented as -2.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic List<Long> getRouteSequenceOfNodes(long routeId)
Returns the sequence of nodes traversed by a route (including those in protection segments).
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic List<Long> getRouteSequenceOfNodes(long layerId, long routeId)
Returns the sequence of nodes traversed by a route (including those in protection segments).
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic Set<Long> getRouteSRGs(long routeId)
Returns all SRGs associated to a given route. It is equal to the union of the SRGs associated to each traversed node/link.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifierpublic Set<Long> getRouteSRGs(long layerId, long routeId)
Returns all SRGs associated to a given route. It is equal to the union of the SRGs associated to each traversed node/link.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifierpublic Map<Long,Set<Long>> getRouteSRGsMap()
Returns all SRGs associated per route. It is equal to the union of the SRGs associated to each traversed node/link.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Set<Long>> getRouteSRGsMap(long layerId)
Returns all SRGs associated per route. It is equal to the union of the SRGs associated to each traversed node/link.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Constants.RoutingType getRoutingType()
RoutingType
.RoutingType
public Constants.RoutingType getRoutingType(long layerId)
RoutingType
.layerId
- Layer identifierRoutingType
public Map<Long,Constants.RoutingType> getRoutingTypeMap()
RoutingType
per layer.RoutingType
per layerpublic String getSRGAttribute(long srgId, String key)
srgId
- SRG identifierkey
- Attribute namepublic Map<String,String> getSRGAttributeMap(long srgId)
NetPlan
object, hence users should copy it in case they want to modify it.srgId
- SRG identifierpublic double getSRGAvailability(long srgId)
srgId
- SRG identifierpublic Map<Long,Double> getSRGAvailabilityMap()
public double[] getSRGAvailabilityVector()
public long getSRGByAttribute(String attribute, String value)
attribute
- Attribute (not null)value
- Value (not null)public Set<Long> getSRGIds()
NetPlan
object, hence users should copy it in case they want to modify it.public long[] getSRGIdsVector()
public Set<Long> getSRGLinks(long srgId)
NetPlan
object, hence users should copy it in case they want to modify it.srgId
- SRG identifierpublic Set<Long> getSRGLinks(long layerId, long srgId)
NetPlan
object, hence users should copy it in case they want to modify it.layerId
- Layer identifiersrgId
- SRG identifierpublic Map<Long,Set<Long>> getSRGLinksAllLayers(long srgId)
srgId
- SRG identifierpublic Map<Long,Set<Long>> getSRGLinksMap()
public Map<Long,Set<Long>> getSRGLinksMap(long layerId)
layerId
- Layer identifierpublic double getSRGMeanTimeToFailInHours(long srgId)
srgId
- SRG identifierpublic Map<Long,Double> getSRGMeanTimeToFailInHoursMap()
NetPlan
object, hence users should copy it in case they want to modify it.public double[] getSRGMeanTimeToFailInHoursVector()
public double getSRGMeanTimeToRepairInHours(long srgId)
srgId
- SRG identifierpublic Map<Long,Double> getSRGMeanTimeToRepairInHoursMap()
NetPlan
object, hence users should copy it in case they want to modify it.public double[] getSRGMeanTimeToRepairInHoursVector()
public long getSRGNextId()
public Set<Long> getSRGNodes(long srgId)
NetPlan
object, hence users should copy it in case they want to modify it.srgId
- SRG identifierpublic Map<Long,Set<Long>> getSRGNodesMap()
public Set<Long> getSRGProtectionSegments(long srgId)
Returns the set of protection segments affected by a given SRG.
Important: Routing type must be SOURCE_ROUTING
.
srgId
- SRG identifierpublic Set<Long> getSRGProtectionSegments(long layerId, long srgId)
Returns the set of protection segments affected by a given SRG.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersrgId
- SRG identifierpublic Map<Long,Set<Long>> getSRGProtectionSegmentsMap()
Returns the set of protection segments per SRG.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Set<Long>> getSRGProtectionSegmentsMap(long layerId)
Returns the set of protection segments per SRG.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Set<Long> getSRGRoutes(long srgId)
Returns the set of routes affected by a given SRG.
Important: Routing type must be SOURCE_ROUTING
.
srgId
- SRG identifierpublic Set<Long> getSRGRoutes(long layerId, long srgId)
Returns the set of routes affected by a given SRG.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersrgId
- SRG identifierpublic Map<Long,Set<Long>> getSRGRoutesMap()
Returns the set of routes per SRG.
Important: Routing type must be SOURCE_ROUTING
.
public Map<Long,Set<Long>> getSRGRoutesMap(long layerId)
Returns the set of routes per SRG.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic Map<Long,String> getSRGsAttributeMap(String key)
key
- Attribute namepublic Set<Long> getSRGsByAttribute(String attribute, String value)
attribute
- Attribute (not null)value
- Value (not null)public Map<Pair<Long,Long>,Double> getTrafficMap()
public Map<Pair<Long,Long>,Double> getTrafficMap(long layerId)
layerId
- Layer identifierpublic cern.colt.matrix.tdouble.DoubleMatrix2D getTrafficMatrix()
public cern.colt.matrix.tdouble.DoubleMatrix2D getTrafficMatrix(long layerId)
layerId
- Layer identifierpublic boolean hasDemands()
true
if there is at least one demand. It is equivalent to {@link #getNumberOfDemands() getNumberOfDemands()} > 0
.true
if there are demands, and false
otherwisepublic boolean hasDemands(long layerId)
true
if there is at least one demand. It is equivalent to {@link #getNumberOfDemands(long) getNumberOfDemands(layerId)} > 0
.layerId
- Layer identifiertrue
if there are demands, and false
otherwisepublic boolean hasForwardingRules()
Returns true
if there is at least one forwarding rule. It is equivalent to {@link #getNumberOfForwardingRules() getNumberOfForwardingRules()} > 0
.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
true
if there are forwarding rules, and false
otherwisepublic boolean hasForwardingRules(long layerId)
Returns true
if there is at least one forwarding rule. It is equivalent to {@link #getNumberOfForwardingRules(long) getNumberOfForwardingRules(layerId)} > 0
.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifiertrue
if there are forwarding rules, and false
otherwisepublic boolean hasLinks()
true
if there is at least one link. It is equivalent to {@link #getNumberOfLinks() getNumberOfLinks()} > 0
.true
if there are links, and false
otherwisepublic boolean hasLinks(long layerId)
true
if there is at least one link. It is equivalent to {@link #getNumberOfLinks(long) getNumberOfLinks(layerId)} > 0
.layerId
- Layer identifiertrue
if there are links, and false
otherwisepublic boolean hasNodes()
true
if there is at least one node. It is equivalent to {@link #getNumberOfNodes() getNumberOfNodes()} > 0
.true
if there are nodes, and false
otherwisepublic boolean hasProtectionSegments()
Returns true
if there is at least one protection segment. It is equivalent to {@link #getNumberOfProtectionSegments() getNumberOfProtectionSegments()} > 0
.
Important: Routing type must be SOURCE_ROUTING
.
true
if there are protection segments, and false
otherwisepublic boolean hasProtectionSegments(long layerId)
Returns true
if there is at least one protection segment. It is equivalent to {@link #getNumberOfProtectionSegments(long) getNumberOfProtectionSegments(layerId)} > 0
.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiertrue
if there are protection segments, and false
otherwisepublic boolean hasRoutes()
Returns true
if there is at least one route. It is equivalent to {@link #getNumberOfRoutes() getNumberOfRoutes()} > 0
.
Important: Routing type must be SOURCE_ROUTING
.
true
if there are routes, and false
otherwisepublic boolean hasRoutes(long layerId)
Returns true
if there is at least one route. It is equivalent to {@link #getNumberOfRoutes(long) getNumberOfRoutes(layerId)} > 0
.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiertrue
if there are routes, and false
otherwisepublic boolean hasRoutingLoops()
true
if at least one demand has routing loops, and false
otherwisepublic boolean hasRoutingLoops(long layerId)
layerId
- Layer identifiertrue
if at least one demand has routing loops, and false
otherwisepublic boolean hasSRGs()
Returns true
if there is at least one SRG. It is equivalent to {@link #getNumberOfSRGs() getNumberOfSRGs()} > 0
.
true
if there are SRGs, and false
otherwisepublic boolean isActionMonitoringActivated()
true
if action monitoring is activated, and false
otherwisepublic boolean isDemandActive(long demandId)
demandId
- Demand identifiertrue
if demand is active, and false
otherwisepublic boolean isDemandActive(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifiertrue
if demand is active, and false
otherwisepublic boolean isDemandBifurcated(long demandId)
Indicates whether or a demand is bifurcated, that is, traffic is being sent through more than one traffic route.
Important: Routing type must be SOURCE_ROUTING
.
demandId
- Demand identifiertrue
if traffic for the demand is bifurcated, and false
otherwisepublic boolean isDemandBifurcated(long layerId, long demandId)
Indicates whether or a demand is bifurcated, that is, traffic is being sent through more than one traffic route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierdemandId
- Demand identifiertrue
if traffic for the demand is bifurcated, and false
otherwisepublic boolean isDemandCoupled(long demandId)
demandId
- Demand identifiertrue
if the demand is coupled, and false
otherwisepublic boolean isDemandCoupled(long layerId, long demandId)
layerId
- Layer identifierdemandId
- Demand identifiertrue
if the demand is coupled, and false
otherwisepublic boolean isEmpty()
true
if the network is empty (i.e. without nodes...). It is equivalent to !{@link #hasNodes hasNodes()}
.true
if the network is empty, and false
otherwisepublic boolean isForwardingRuleActive(long layerId, Pair<Long,Long> demandLinkPair)
Indicates whether or not a forwarding rule is active.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairtrue
if forwarding rule is active, and false
otherwisepublic boolean isForwardingRuleActive(Pair<Long,Long> demandLinkPair)
Indicates whether or not a forwarding rule is active.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandLinkPair
- Demand-outgoing link pairtrue
if forwarding rule is active, and false
otherwisepublic boolean isForwardingRuleDown(long layerId, Pair<Long,Long> demandLinkPair)
Indicates whether or not a forwarding rule is down. A forwarding rule is down if: (i) the node where the rule is installed is down, (ii) the associated outgoing link is down.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairtrue
if the forwarding rule is down, and false
otherwisepublic boolean isForwardingRuleDown(Pair<Long,Long> demandLinkPair)
Indicates whether or not a forwarding rule is down. A forwarding rule is down if: (i) the node where the rule is installed is down, (ii) the associated outgoing link is down.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandLinkPair
- Demand-outgoing link pairtrue
if the forwarding rule is down, and false
otherwisepublic boolean isLayerActive(long layerId)
layerId
- Layer identifiertrue
if layer is active, and false
otherwisepublic boolean isLayerCouplingValid(long lowerLayerId, long upperLayerId)
lowerLayerId
- Lower layer identifierupperLayerId
- Upper layer identifiertrue
if coupling would be valid, and false
otherwisepublic boolean isLinkActive(long linkId)
linkId
- Link identifiertrue
if link is active, and false
otherwisepublic boolean isLinkActive(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifiertrue
if link is active, and false
otherwisepublic boolean isLinkBottleneck(long linkId)
linkId
- Link identifiertrue
if link is a bottleneck, and false
otherwisepublic boolean isLinkBottleneck(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifiertrue
if link is a bottleneck, and false
otherwisepublic boolean isLinkCoupled(long linkId)
linkId
- Link identifiertrue
if the link is coupled, and false
otherwisepublic boolean isLinkCoupled(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifiertrue
if the link is coupled, and false
otherwisepublic boolean isLinkDown(long linkId)
linkId
- Link identifiertrue
if the link is down, and false
otherwisepublic boolean isLinkDown(long layerId, long linkId)
layerId
- Layer identifierlinkId
- Link identifiertrue
if the link is down, and false
otherwisepublic boolean isMultiLayer()
!isSingleLayer()
.true
if the network design is multilayer, and false
otherwise.public boolean isNodeActive(long nodeId)
nodeId
- Node identifiertrue
if node is active, and false
otherwisepublic boolean isNodeDown(long nodeId)
nodeId
- Node identifiertrue
if the node is down, and false
otherwisepublic boolean isPathRestorable(List<Long> path)
path
- Sequence of links and protection segmentstrue
if the path is restorable, and false
otherwisepublic boolean isPathRestorable(long layerId, List<Long> path)
layerId
- Layer identifierpath
- Sequence of links and protection segmentstrue
if the path is restorable, and false
otherwisepublic boolean isProtectionSegmentActive(long segmentId)
Indicates whether or not a protection segment is active.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifiertrue
if protection segment is active, and false
otherwisepublic boolean isProtectionSegmentActive(long layerId, long segmentId)
Indicates whether or not a protection segment is active.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifiertrue
if protection segment is active, and false
otherwisepublic boolean isProtectionSegmentDedicated(long segmentId)
Indicates whether or not a protection segment is dedicated, that is, if it is associated to only one route.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifiertrue
if the protection segment is dedicated. Otherwise, false
public boolean isProtectionSegmentDedicated(long layerId, long segmentId)
Indicates whether or not a protection segment is dedicated, that is, if it is associated to only one route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifiertrue
if the protection segment is dedicated. Otherwise, false
public boolean isProtectionSegmentDown(long segmentId)
Indicates whether or not a protection segment is down.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifiertrue
if the protection segment is down, and false
otherwisepublic boolean isProtectionSegmentDown(long layerId, long segmentId)
Indicates whether or not a protection segment is down.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifiertrue
if the protection segment is down, and false
otherwisepublic boolean isProtectionSegmentRestorable(long segmentId)
Indicates whether or not a protection segment is restorable, that is, whether the whole set of resources is up.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Protection segment identifiertrue
if the protection segment is restorable, and false
otherwisepublic boolean isProtectionSegmentRestorable(long layerId, long segmentId)
Indicates whether or not a protection segment is restorable, that is, whether the whole set of resources is up.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Protection segment identifiertrue
if the protection segment is restorable, and false
otherwisepublic boolean isRouteActive(long routeId)
Indicates whether or not a route is active.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifiertrue
if route is active, and false
otherwisepublic boolean isRouteActive(long layerId, long routeId)
Indicates whether or not a route is active.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifiertrue
if route is active, and false
otherwisepublic boolean isRouteDown(long routeId)
Indicates whether or not a route is down.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifiertrue
if the route is down, and false
otherwisepublic boolean isRouteDown(long layerId, long routeId)
Indicates whether or not a route is down.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifiertrue
if the route is down, and false
otherwisepublic boolean isRouteRestorable(long routeId)
Indicates whether or not a route is restorable, that is, whether the whole set of resources is up.
Important: Routing type must be SOURCE_ROUTING
.
routeId
- Route identifiertrue
if the route is restorable, and false
otherwisepublic boolean isRouteRestorable(long layerId, long routeId)
Indicates whether or not a route is restorable, that is, whether the whole set of resources is up.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierrouteId
- Route identifiertrue
if the route is restorable, and false
otherwisepublic boolean isRoutingBifurcated()
Indicates whether or not routing is bifurcated, that is, whether any demand is being actually carried through more than one route.
Important: Routing type must be SOURCE_ROUTING
.
true
if routing is bifurcated, and false
otherwisepublic boolean isRoutingBifurcated(long layerId)
Indicates whether or not routing is bifurcated, that is, whether any demand is being actually carried through more than one route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiertrue
if routing is bifurcated, and false
otherwisepublic boolean isSingleLayer()
getNumberOfLayers() == 1
.true
if the network design is multilayer, and false
otherwise.public boolean isSRGActive(long srgId)
srgId
- SRG identifiertrue
if SRG is active, and false
otherwisepublic static NetPlan loadFromFile(File file)
NetPlan
from a .n2p
file.file
- .n2p
filepublic static NetPlan loadFromInputStream(InputStream inputStream)
NetPlan
from an input stream.inputStream
- Input streampublic void removeAllDemandForwardingRules(long demandId)
Removes all forwarding rules associated to a demand.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
actions will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandId
- Demand identifierpublic void removeAllDemandForwardingRules(long layerId, long demandId)
Removes all forwarding rules associated to a demand.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
actions will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandId
- Demand identifierpublic void removeAllDemands()
Removes all the demands defined.
Important: All the associated routes and upper layer links will be removed as well.
Important: In case that action monitoring is activated, several DEMAND_REMOVED
actions will be issued.
public void removeAllDemands(long layerId)
Removes all the demands defined.
Important: All the associated routes and upper layer links will be removed as well.
Important: In case that action monitoring is activated, several DEMAND_REMOVED
actions will be issued.
layerId
- Layer identifierpublic void removeAllForwardingRules()
Removes all forwarding rules.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
actions will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
public void removeAllForwardingRules(long layerId)
Removes all forwarding rules.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
actions will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierpublic void removeAllLinkForwardingRules(long linkId)
Removes all forwarding rules associated to a link.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
actions will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
linkId
- Link identifierpublic void removeAllLinkForwardingRules(long layerId, long linkId)
Removes all forwarding rules associated to a link.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
actions will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierlinkId
- Link identifierpublic void removeAllLinks()
Removes all the links defined.
Important: All the associated routes, protection segments and lower layer demands will be removed as well.
Important: In case that action monitoring is activated, several LINK_REMOVED
actions will be issued.
public void removeAllLinks(long layerId)
Removes all the links defined.
Important: All the associated routes, protection segments and lower layer demands will be removed as well.
Important: In case that action monitoring is activated, several LINK_REMOVED
actions will be issued.
layerId
- Layer identifierpublic void removeAllNodeForwardingRules(long nodeId)
Removes all forwarding rules associated to a node.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
actions will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
nodeId
- Node identifierpublic void removeAllNodeForwardingRules(long layerId, long nodeId)
Removes all forwarding rules associated to a node.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
actions will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifiernodeId
- Node identifierpublic void removeAllNodes()
Removes all the nodes defined within the network.
Important: All the links, traffic demands, traffic routes, protection segments and SRGs will be also removed. Layers are maintained.
Important: In case that action monitoring is activated, several NODE_REMOVED
actions will be issued.
public void removeAllProtectionSegments()
Removes all the protection segments defined.
Important: All the list of protection segments from traffic routes will be cleared.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_REMOVED
actions will be issued.
Important: Routing type must be SOURCE_ROUTING
.
public void removeAllProtectionSegments(long layerId)
Removes all the protection segments defined.
Important: All the list of protection segments from traffic routes will be cleared.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_REMOVED
actions will be issued.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic void removeAllRoutes()
Removes all the routes defined.
Important: In case that action monitoring is activated, several ROUTE_REMOVED
actions will be issued.
Important: Routing type must be SOURCE_ROUTING
.
public void removeAllRoutes(long layerId)
Removes all the routes defined.
Important: In case that action monitoring is activated, several ROUTE_REMOVED
actions will be issued.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifierpublic void removeAllRoutingInformation()
Removes all the routing information, irrespective of the routing type setting. For source routing, all routes and protection segments are removed. For hop-by-hop routing, all forwarding rules are removed.
Important: In case that action monitoring is activated, several ROUTE_REMOVED
, PROTECTION_SEGMENT_REMOVED
or FORWARDING_RULE_REMOVED
actions will be issued.
public void removeAllRoutingInformation(long layerId)
Removes all the routing information, irrespective of the routing type setting. For source routing, all routes and protection segments are removed. For hop-by-hop routing, all forwarding rules are removed.
Important: In case that action monitoring is activated, several ROUTE_REMOVED
, PROTECTION_SEGMENT_REMOVED
or FORWARDING_RULE_REMOVED
actions will be issued.
layerId
- Layer identifierpublic void removeAllSRGs()
Important: In case that action monitoring is activated, several SRG_REMOVED
actions will be issued.
public void removeDemand(long demandId)
Removes a demand, and any associated route or forwarding rule.
Important: if demand is coupled, its coupled link will be also removed.
Important: In case that action monitoring is activated, a DEMAND_REMOVED
action will be issued.
demandId
- Demand identifierpublic void removeDemand(long layerId, long demandId)
Removes a demand, and any associated route or forwarding rule.
Important: if demand is coupled, its coupled link will be also removed.
Important: In case that action monitoring is activated, a DEMAND_REMOVED
action will be issued.
layerId
- Layer identifierdemandId
- Demand identifierpublic void removeDemandAttribute(long layerId, long demandId, String key)
Removes a given attribute from a demand. If the attribute is not defined, no action is made.
Important: In case that action monitoring is activated, a DEMAND_MODIFIED
action will be issued.
layerId
- Layer identifierdemandId
- Demand identifierkey
- Attribute namepublic void removeDemandAttribute(long demandId, String key)
Removes a given attribute from a demand. If the attribute is not defined, no action is made.
Important: In case that action monitoring is activated, a DEMAND_MODIFIED
action will be issued.
demandId
- Demand identifierkey
- Attribute namepublic void removeDemands(long layerId, Set<Long> demandIds)
Removes a set of demands.
Important: All the associated routes and upper layer links will be removed as well.
Important: In case that action monitoring is activated, several DEMAND_REMOVED
actions will be issued.
layerId
- Layer identifierdemandIds
- Demand identifierspublic void removeDemands(Set<Long> demandIds)
Removes a set of demands.
Important: All the associated routes and upper layer links will be removed as well.
Important: In case that action monitoring is activated, several DEMAND_REMOVED
actions will be issued.
demandIds
- Demand identifierspublic void removeForwardingRule(long layerId, Pair<Long,Long> demandLinkPair)
Removes a forwarding rule.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, a FORWARDING_RULE_REMOVED
action will be issued.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairpublic void removeForwardingRule(Pair<Long,Long> demandLinkPair)
Removes a forwarding rule.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, a FORWARDING_RULE_REMOVED
action will be issued.
demandLinkPair
- Demand-outgoing link pairpublic void removeForwardingRuleAttribute(long layerId, Pair<Long,Long> demandLinkPair, String key)
Removes a given attribute from a forwarding rule. If the attribute is not defined, no action is made.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, a FORWARDING_RULE_MODIFIED
action will be issued.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairkey
- Attribute namepublic void removeForwardingRuleAttribute(Pair<Long,Long> demandLinkPair, String key)
Removes a given attribute from a forwarding rule. If the attribute is not defined, no action is made.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, a FORWARDING_RULE_MODIFIED
action will be issued.
demandLinkPair
- Demand-outgoing link pairkey
- Attribute namepublic void removeForwardingRules(long layerId, Set<Pair<Long,Long>> demandLinkPairs)
Removes a set of forwarding rules.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
actions will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandLinkPairs
- Demand-outgoing link pairpublic void removeForwardingRules(Set<Pair<Long,Long>> demandLinkPairs)
Removes a set of forwarding rules.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
actions will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandLinkPairs
- Demand-outgoing link pairpublic void removeLayer(long layerId)
Removes a layer, and any associated link, demand, route, protection segment or forwarding rule.
Important: In case that action monitoring is activated, a LAYER_REMOVED
action will be issued.
layerId
- Layer identifierpublic void removeLayerAttribute(long layerId, String key)
Important: In case that action monitoring is activated, a LAYER_MODIFIED
action will be issued.
layerId
- Layer identifierkey
- Attribute namepublic void removeLayers(Set<Long> layerIds)
Removes a set of layers, and any associated link, demand, route, protection segment or forwarding rule.
Important: In case that action monitoring is activated, several LAYER_REMOVED
actions will be issued.
layerIds
- Layer identifierspublic void removeLink(long linkId)
Removes a link, and any associated route, protection segment or forwarding rule.
Important: In case that action monitoring is activated, a LINK_REMOVED
action will be issued.
linkId
- Link identifierpublic void removeLink(long layerId, long linkId)
Removes a link, and any associated route, protection segment or forwarding rule.
Important: if link is coupled, its coupled demand will be also removed.
Important: In case that action monitoring is activated, a LINK_REMOVED
action will be issued.
layerId
- Layer identifierlinkId
- Link identifierpublic void removeLinkAttribute(long layerId, long linkId, String key)
Removes a given attribute from a link. If the attribute is not defined, no action is made.
Important: In case that action monitoring is activated, a LINK_REMOVED
action will be issued.
layerId
- Layer identifierlinkId
- Link identifierkey
- Attribute namepublic void removeLinkAttribute(long linkId, String key)
Removes a given attribute from a link. If the attribute is not defined, no action is made.
Important: In case that action monitoring is activated, a LINK_REMOVED
action will be issued.
linkId
- Link identifierkey
- Attribute namepublic void removeLinkFromSRG(long linkId, long srgId)
linkId
- Link identifiersrgId
- SRG identifierpublic void removeLinkFromSRG(long layerId, long linkId, long srgId)
layerId
- Layer identifierlinkId
- Link identifiersrgId
- SRG identifierpublic void removeLinks(long layerId, Set<Long> linkIds)
Removes a set of links.
Important: All the associated routes, protection segments and lower layer demands will be removed as well.
Important: In case that action monitoring is activated, several LINK_REMOVED
actions will be issued.
layerId
- Layer identifierlinkIds
- Link identifierspublic void removeLinks(Set<Long> linkIds)
Removes a set of links.
Important: All the associated routes, protection segments and lower layer demands will be removed as well.
Important: In case that action monitoring is activated, several LINK_REMOVED
actions will be issued.
linkIds
- Link identifierspublic void removeNetworkAttribute(String key)
key
- Attribute namepublic void removeNode(long nodeId)
Removes a node, and any associated link, demand, route, protection segment or forwarding rule.
Important: In case that action monitoring is activated, a NODE_REMOVED
action will be issued.
nodeId
- Node identifierpublic void removeNodeAttribute(long nodeId, String key)
Removes a given attribute from a node. If the attribute is not defined, no action is made.
Important: In case that action monitoring is activated, a NODE_MODIFIED
action will be issued.
nodeId
- Node identifierkey
- Attribute namepublic void removeNodeFromSRG(long nodeId, long srgId)
nodeId
- Node identifiersrgId
- SRG identifierpublic void removeNodes(Set<Long> nodeIds)
Removes a set of nodes.
Important: In case that action monitoring is activated, several NODE_REMOVED
actions will be issued.
nodeIds
- Nodes identifierspublic void removeProtectionSegment(long segmentId)
Removes a protection segment.
Important: The protection segment will be removed from the list of protection segments of any associated route, and removing any route using it in the current path.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_REMOVED
action will be issued.
segmentId
- Protection segment identifierpublic void removeProtectionSegment(long layerId, long segmentId)
Removes a protection segment.
Important: The protection segment will be removed from the list of protection segments of any associated route, and removing any route using it in the current path.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_REMOVED
action will be issued.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic void removeProtectionSegmentAttribute(long layerId, long segmentId, String key)
Removes a given attribute from a protection segment. If the attribute is not defined, no action is made.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
layerId
- Layer identifiersegmentId
- Protection segment identifierkey
- Attribute namepublic void removeProtectionSegmentAttribute(long segmentId, String key)
Removes a given attribute from a protection segment. If the attribute is not defined, no action is made.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
segmentId
- Protection segment identifierkey
- Attribute namepublic void removeProtectionSegmentFromRouteBackupSegmentList(long segmentId, long routeId)
Removes a protection segment from the list of backup protection segments of a route.
Important: Routing type must be SOURCE_ROUTING
.
segmentId
- Segment identifierrouteId
- Route identifierpublic void removeProtectionSegmentFromRouteBackupSegmentList(long layerId, long segmentId, long routeId)
Removes a protection segment from the list of backup protection segments of a route.
Important: Routing type must be SOURCE_ROUTING
.
layerId
- Layer identifiersegmentId
- Segment identifierrouteId
- Route identifierpublic void removeProtectionSegments(long layerId, Set<Long> segmentIds)
Removes a set of protection segments.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_REMOVED
actions will be issued.
layerId
- Layer identifiersegmentIds
- Protection segment identifierspublic void removeProtectionSegments(Set<Long> segmentIds)
Removes a set of protection segments.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_REMOVED
actions will be issued.
segmentIds
- Protection segment identifierspublic void removeRoute(long routeId)
Removes a route.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_REMOVED
action will be issued.
routeId
- Route identifierpublic void removeRoute(long layerId, long routeId)
Removes a route.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_REMOVED
action will be issued.
layerId
- Layer identifierrouteId
- Route identifierpublic void removeRouteAttribute(long layerId, long routeId, String key)
Removes a given attribute from a route. If the attribute is not defined, no action is made.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
layerId
- Layer identifierrouteId
- Route identifierkey
- Attribute namepublic void removeRouteAttribute(long routeId, String key)
Removes a given attribute from a route. If the attribute is not defined, no action is made.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
routeId
- Route identifierkey
- Attribute namepublic void removeRoutes(long layerId, Set<Long> routeIds)
Removes a set of routes.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_REMOVED
actions will be issued.
layerId
- Layer identifierrouteIds
- Route identifierspublic void removeRoutes(Set<Long> routeIds)
Removes a set of routes.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_REMOVED
actions will be issued.
routeIds
- Route identifierspublic void removeSRG(long srgId)
Removes an SRG.
Important: In case that action monitoring is activated, a SRG_REMOVED
action will be issued.
srgId
- SRG identifierpublic void removeSRGAttribute(long srgId, String key)
Removes a given attribute from an SRG. If the attribute is not defined, no action is made.
Important: In case that action monitoring is activated, a SRG_MODIFIED
action will be issued.
srgId
- SRG identifierkey
- Attribute namepublic void removeSRGs(Set<Long> srgIds)
Removes a set of SRGs.
Important: In case that action monitoring is activated, several SRG_REMOVED
actions will be issued.
srgIds
- SRG identifierspublic void reset()
NetPlan
.public void saveToFile(File file)
.n2p
is not in the file name, it will be added automatically.file
- .n2p filepublic void saveToOutputStream(OutputStream outputStream)
outputStream
- Output streampublic void setAllLinksUp()
Sets all links currently down as up.
Important: In case that action monitoring is activated, several LINK_UP
actions will be issued.
public void setAllLinksUp(long layerId)
Sets all links currently down as up.
Important: In case that action monitoring is activated, several LINK_UP
actions will be issued.
layerId
- Layer identifierpublic void setAllNodesUp()
Sets all nodes currently down as up.
Important: In case that action monitoring is activated, several NODE_UP
actions will be issued.
public void setAllProtectionSegmentsUp()
Sets any protection segment currently down, whose resources are up, as up.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_MODIFIED
actions will be issued.
public void setAllProtectionSegmentsUp(long layerId)
Sets any protection segment currently down, whose resources are up, as up.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_MODIFIED
actions will be issued.
layerId
- Layer identifierpublic void setAllRoutesUp()
Sets any route currently down, whose resources are up, as up.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
public void setAllRoutesUp(long layerId)
Sets any route currently down, whose resources are up, as up.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
layerId
- Layer identifierpublic void setDemandAttribute(long layerId, long demandId, String key, String value)
Sets an attribute for a given demand. If it already exists, it will be overriden.
Important: In case that action monitoring is activated, a DEMAND_MODIFIED
action will be issued.
layerId
- Layer identifierdemandId
- Demand identifierkey
- Attribute namevalue
- Attribute valuepublic void setDemandAttribute(long demandId, String key, String value)
Sets an attribute for a given demand. If it already exists, it will be overriden.
Important: In case that action monitoring is activated, a DEMAND_MODIFIED
action will be issued.
demandId
- Demand identifierkey
- Attribute namevalue
- Attribute valuepublic void setDemandAttributeMap(long layerId, long demandId, Map<String,String> attributes)
Sets the attributes for a given demand. Any previous attribute will be removed.
Important: In case that action monitoring is activated, a DEMAND_MODIFIED
action will be issued.
layerId
- Layer identifierdemandId
- Demand identifierattributes
- Map of attributes (in case of null, an empty map will be assumed)public void setDemandAttributeMap(long demandId, Map<String,String> attributes)
Sets the attributes for a given demand. Any previous attribute will be removed.
Important: In case that action monitoring is activated, a DEMAND_MODIFIED
action will be issued.
demandId
- Demand identifierattributes
- Map of attributespublic void setDemandOfferedTraffic(long demandId, double h_d)
Sets the offered traffic by a demand.
Important: In case that action monitoring is activated, a DEMAND_MODIFIED
action will be issued.
demandId
- Demand identifierh_d
- Offered trafficpublic void setDemandOfferedTraffic(long layerId, long demandId, double h_d)
Sets the offered traffic by a demand.
Important: In case that action monitoring is activated, a DEMAND_MODIFIED
action will be issued.
layerId
- Layer identifierdemandId
- Demand identifierh_d
- Offered trafficpublic void setDemandOfferedTrafficMap(long layerId, Map<Long,Double> h_d)
Sets the offered traffic per demand.
Important: In case that action monitoring is activated, several DEMAND_MODIFIED
actions will be issued.
layerId
- Layer identifierh_d
- Offered traffic per demandpublic void setDemandOfferedTrafficMap(Map<Long,Double> h_d)
Sets the offered traffic per demand.
Important: In case that action monitoring is activated, several DEMAND_MODIFIED
actions will be issued.
h_d
- Offered traffic per demandpublic void setDemandOfferedTrafficVector(double[] h_d)
Sets the offered traffic per demand, in increasing order of identifier.
Important: In case that action monitoring is activated, several DEMAND_MODIFIED
actions will be issued.
h_d
- Offered traffic per demandpublic void setDemandOfferedTrafficVector(long layerId, double[] h_d)
Sets the offered traffic per demand, in increasing order of identifier.
Important: In case that action monitoring is activated, several DEMAND_MODIFIED
actions will be issued.
layerId
- Layer identifierh_d
- Offered traffic per demandpublic void setDemandTrafficUnitsName(long layerId, String trafficUnitsName)
Sets the demand traffic units name.
Important: In case that action monitoring is activated, a LAYER_MODIFIED
action will be issued.
layerId
- Layer identifiertrafficUnitsName
- Demand traffic units namepublic void setDemandTrafficUnitsName(String trafficUnitsName)
Sets the demand traffic units name.
Important: In case that action monitoring is activated, a LAYER_MODIFIED
action will be issued.
trafficUnitsName
- Demand traffic units namepublic void setForwardingRuleAttribute(long layerId, Pair<Long,Long> demandLinkPair, String key, String value)
Sets an attribute for a given forwarding rule. If it already exists, it will be overriden.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, a FORWARDING_RULE_MODIFIED
action will be issued.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairkey
- Attribute namevalue
- Attribute valuepublic void setForwardingRuleAttribute(Pair<Long,Long> demandLinkPair, String key, String value)
Sets an attribute for a given forwarding rule. If it already exists, it will be overriden.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, a FORWARDING_RULE_MODIFIED
action will be issued.
demandLinkPair
- Demand-outgoing link pairkey
- Attribute namevalue
- Attribute valuepublic void setForwardingRuleAttributeMap(long layerId, Pair<Long,Long> demandLinkPair, Map<String,String> attributes)
Sets the attributes for a given forwarding rule. Any previous attribute will be removed.
Important: In case that action monitoring is activated, a FORWARDING_RULE_MODIFIED
action will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairattributes
- Map of attributes (in case of null, an empty map will be assumed)public void setForwardingRuleAttributeMap(Pair<Long,Long> demandLinkPair, Map<String,String> attributes)
Sets the attributes for a given forwarding rule. Any previous attribute will be removed.
Important: In case that action monitoring is activated, a FORWARDING_RULE_MODIFIED
action will be issued.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
demandLinkPair
- Demand-outgoing link pairattributes
- Map of attributes (in case of null, an empty map will be assumed)public void setForwardingRules(cern.colt.matrix.tdouble.DoubleMatrix2D f_de)
Sets the forwarding rules for the given design. Any previous routing information (either source routing or hop-by-hop routing) will be removed.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
and FORWARDING_RULE_ADDED
actions will be issued.
f_de
- For each demand d (d = 0 refers to the first demand in demandIds
, d = 1 refers to the second one, and so on), and each link e (e = 0 refers to the first link in NetPlan
object, e = 1 refers to the second one, and so on), f_de[d][e]
sets the fraction of the traffic from demand d that arrives (or is generated in) node a(e) (the origin node of link e), that is forwarded through link e. It must hold that for every node n different of b(d), the sum of the fractions fte along its outgoing links must be lower or equal than 1public void setForwardingRules(long layerId, cern.colt.matrix.tdouble.DoubleMatrix2D f_de)
Sets the forwarding rules for the given design. Any previous routing information (either source routing or hop-by-hop routing) will be removed.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
and FORWARDING_RULE_ADDED
actions will be issued.
layerId
- Layer identifierf_de
- For each demand d (d = 0 refers to the first demand in demandIds
, d = 1 refers to the second one, and so on), and each link e (e = 0 refers to the first link in NetPlan
object, e = 1 refers to the second one, and so on), f_de[d][e]
sets the fraction of the traffic from demand d that arrives (or is generated in) node a(e) (the origin node of link e), that is forwarded through link e. It must hold that for every node n different of b(d), the sum of the fractions fte along its outgoing links must be lower or equal than 1public void setForwardingRules(long layerId, Map<Pair<Long,Long>,Double> splittingRatioMap)
Sets the forwarding rules for the given design. Any previous routing information (either source routing or hop-by-hop routing) will be removed.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
and FORWARDING_RULE_ADDED
actions will be issued.
layerId
- Layer identifiersplittingRatioMap
- Splitting ratio mapping, where key is the demand-outgoing link pair and the value is the fraction of traffic sent through the given outgoing link, with respect to the total traffic entering to the node for the given demandpublic void setForwardingRules(Map<Pair<Long,Long>,Double> splittingRatioMap)
Sets the forwarding rules for the given design. Any previous routing information (either source routing or hop-by-hop routing) will be removed.
Important: In case that action monitoring is activated, several FORWARDING_RULE_REMOVED
and FORWARDING_RULE_ADDED
actions will be issued.
splittingRatioMap
- Splitting ratio mapping, where key is the demand-outgoing link pair and the value is the fraction of traffic sent through the given outgoing link, with respect to the total traffic entering to the node for the given demandpublic void setForwardingRuleSplittingRatio(long layerId, Pair<Long,Long> demandLinkPair, double splittingRatio)
Sets the splitting ratio (fraction of traffic from demand 'd' entering to the origin node of link 'e', going through link 'e') of a forwarding rule.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, a FORWARDING_RULE_MODIFIED
action will be issued.
layerId
- Layer identifierdemandLinkPair
- Demand-outgoing link pairsplittingRatio
- Splitting ratio (fraction of traffic from demand 'd' entering to the origin node of link 'e', going through link 'e')public void setForwardingRuleSplittingRatio(Pair<Long,Long> demandLinkPair, double splittingRatio)
Sets the splitting ratio (fraction of traffic from demand 'd' entering to the origin node of link 'e', going through link 'e') of a forwarding rule.
Important: Routing type must be HOP_BY_HOP_ROUTING
.
Important: In case that action monitoring is activated, a FORWARDING_RULE_MODIFIED
action will be issued.
demandLinkPair
- Demand-outgoing link pairsplittingRatio
- Splitting ratio (fraction of traffic from demand 'd' entering to the origin node of link 'e', going through link 'e')public void setLayerAttribute(long layerId, String key, String value)
Sets an attribute for the given layer. If already exists, it will be overriden.
Important: In case that action monitoring is activated, a LAYER_MODIFIED
action will be issued.
layerId
- Layer identifierkey
- Attribute namevalue
- Attribute valuepublic void setLayerAttributeMap(long layerId, Map<String,String> attributes)
Sets the layer attributes. Any previous attribute will be removed.
Important: In case that action monitoring is activated, a LAYER_MODIFIED
action will be issued.
layerId
- Layer identifierattributes
- Map of attributes (in case of null, an empty map will be assumed)public void setLayerDefaultId(long layerId)
layerId
- Layer identifierpublic void setLayerDescription(long layerId, String description)
Sets the layer description.
Important: In case that action monitoring is activated, a LAYER_MODIFIED
action will be issued.
layerId
- Layer identifierdescription
- Description (when null
, it will be set to empty)public void setLayerName(long layerId, String name)
Sets the layer name.
Important: In case that action monitoring is activated, a LAYER_MODIFIED
action will be issued.
layerId
- Layer identifiername
- Name (when null
, it will be set to 'Layer ' + layerId)public void setLinkAttribute(long layerId, long linkId, String key, String value)
Sets an attribute for a given link. If it already exists, it will be overriden.
Important: In case that action monitoring is activated, a LINK_MODIFIED
action will be issued.
layerId
- Layer identifierlinkId
- Link identifierkey
- Attribute namevalue
- Attribute valuepublic void setLinkAttribute(long linkId, String key, String value)
Sets an attribute for a given link. If it already exists, it will be overriden.
Important: In case that action monitoring is activated, a LINK_MODIFIED
action will be issued.
linkId
- Link identifierkey
- Attribute namevalue
- Attribute valuepublic void setLinkAttributeMap(long layerId, long linkId, Map<String,String> attributes)
Sets the attributes for a given link. Any previous attribute will be removed.
Important: In case that action monitoring is activated, a LINK_MODIFIED
action will be issued.
layerId
- Layer identifierlinkId
- Link identifierattributes
- Map of attributes (in case of null, an empty map will be assumed)public void setLinkAttributeMap(long linkId, Map<String,String> attributes)
Sets the attributes for a given link. Any previous attribute will be removed.
Important: In case that action monitoring is activated, a LINK_MODIFIED
action will be issued.
linkId
- Link identifierattributes
- Map of attributes (in case of null, an empty map will be assumed)public void setLinkCapacity(long linkId, double u_e)
Sets the capacity of a link.
Important: If link is coupled, link capacity is given by the carried traffic of the lower layer demand.
Important: In case that action monitoring is activated, a LINK_MODIFIED
action will be issued.
linkId
- Link identifieru_e
- Link capacity. It must be greater or equal than zeropublic void setLinkCapacity(long layerId, long linkId, double u_e)
Sets the capacity of a link.
Important: If link is coupled, link capacity is given by the carried traffic of the lower layer demand.
Important: In case that action monitoring is activated, a LINK_MODIFIED
action will be issued.
layerId
- Layer identifierlinkId
- Link identifieru_e
- Link capacity. It must be greater or equal than zeropublic void setLinkCapacityMap(long layerId, Map<Long,Double> u_e)
Sets the capacity per link.
Important: If links are coupled, link capacities are given by the carried traffic of the lower layer demands.
Important: In case that action monitoring is activated, several LINK_MODIFIED
actions will be issued.
layerId
- Layer identifieru_e
- Capacity per linkpublic void setLinkCapacityMap(Map<Long,Double> u_e)
Sets the capacity per link.
Important: If links are coupled, link capacities are given by the carried traffic of the lower layer demands.
Important: In case that action monitoring is activated, several LINK_MODIFIED
actions will be issued.
u_e
- Capacity per linkpublic void setLinkCapacityUnitsName(long layerId, String capacityUnitsName)
Sets the link capacity units name.
Important: In case that action monitoring is activated, a LAYER_MODIFIED
action will be issued.
layerId
- Layer identifiercapacityUnitsName
- Capacity units namepublic void setLinkCapacityUnitsName(String capacityUnitsName)
Sets the link capacity units name.
Important: In case that action monitoring is activated, a LAYER_MODIFIED
action will be issued.
capacityUnitsName
- Capacity units namepublic void setLinkCapacityVector(double[] u_e)
Sets the capacity per link, in increasing order of identifier.
Important: If links are coupled, link capacities are given by the carried traffic of the lower layer demands.
Important: In case that action monitoring is activated, several LINK_MODIFIED
actions will be issued.
u_e
- Capacity per linkpublic void setLinkCapacityVector(long layerId, double[] u_e)
Sets the capacity per link, in increasing order of identifier.
Important: If links are coupled, link capacities are given by the carried traffic of the lower layer demands.
Important: In case that action monitoring is activated, several LINK_MODIFIED
actions will be issued.
layerId
- Layer identifieru_e
- Capacity per linkpublic void setLinkDown(long linkId)
Sets a link as down.
Important: In case that action monitoring is activated, a LINK_DOWN
action will be issued.
linkId
- Link identifierpublic void setLinkDown(long layerId, long linkId)
Sets a link as down.
Important: In case that action monitoring is activated, a LINK_DOWN
action will be issued.
layerId
- Layer identifierlinkId
- Link identifierpublic void setLinkLengthInKm(long linkId, double linkLengthInKm)
Sets the length of a link.
Important: In case that action monitoring is activated, a LINK_MODIFIED
action will be issued.
linkId
- Link identifierlinkLengthInKm
- Link length measured in km. It must be greater or equal than zero. Physical distance between node pairs can be obtained through the getNodePairPhysicalDistance()
methodpublic void setLinkLengthInKm(long layerId, long linkId, double lengthInKm)
Sets the length of a link.
Important: In case that action monitoring is activated, a LINK_MODIFIED
action will be issued.
layerId
- Layer identifierlinkId
- Link identifierlengthInKm
- Link length measured in km. It must be greater or equal than zero. Physical distance between node pairs can be obtained through the getNodePairPhysicalDistance()
methodpublic void setLinkPropagationSpeedInKmPerSecond(long linkId, double propagationSpeedInKmPerSecond)
Sets the propagation speed in km/s of a link.
Important: In case that action monitoring is activated, a LINK_MODIFIED
action will be issued.
linkId
- Link identifierpropagationSpeedInKmPerSecond
- Propagation speed in km/spublic void setLinkPropagationSpeedInKmPerSecond(long layerId, long linkId, double propagationSpeedInKmPerSecond)
Sets the propagation speed in km/s of a link.
Important: In case that action monitoring is activated, a LINK_MODIFIED
action will be issued.
layerId
- Layer identifierlinkId
- Link identifierpropagationSpeedInKmPerSecond
- Propagation speed in km/spublic void setLinkPropagationSpeedInKmPerSecondMap(long layerId, Map<Long,Double> propagationSpeedInKmPerSecond)
Sets the propagation speed in km/s per link.
Important: In case that action monitoring is activated, several LINK_MODIFIED
actions will be issued.
layerId
- Layer identifierpropagationSpeedInKmPerSecond
- Propagation speed in km/s per linkpublic void setLinkPropagationSpeedInKmPerSecondMap(Map<Long,Double> propagationSpeedInKmPerSecond)
Sets the propagation speed in km/s per link.
Important: In case that action monitoring is activated, several LINK_MODIFIED
actions will be issued.
propagationSpeedInKmPerSecond
- Propagation speed in km/s per linkpublic void setLinksDown(long layerId, Set<Long> linkIds)
Sets some links as down.
Important: In case that action monitoring is activated, several LINK_DOWN
actions will be issued.
layerId
- Layer identifierlinkIds
- Link identifierspublic void setLinksDown(Set<Long> linkIds)
Sets some links as down.
Important: In case that action monitoring is activated, several LINK_DOWN
actions will be issued.
linkIds
- Link identifiers per layerpublic void setLinksUp(long layerId, Set<Long> linkIds)
Sets some links as up.
Important: In case that action monitoring is activated, several LINK_UP
actions will be issued.
layerId
- Layer identifierlinkIds
- Link identifierspublic void setLinksUp(Map<Long,Set<Long>> linkIds)
Sets some links as up.
Important: In case that action monitoring is activated, several LINK_UP
actions will be issued.
linkIds
- Link identifiers per layerpublic void setLinksUp(Set<Long> linkIds)
Sets some links as up.
Important: In case that action monitoring is activated, several LINK_UP
actions will be issued.
linkIds
- Link identifierspublic void setLinkUp(long linkId)
Sets a link as up.
Important: In case that action monitoring is activated, a LINK_UP
action will be issued.
linkId
- Link identifierpublic void setLinkUp(long layerId, long linkId)
Sets a link as up.
Important: In case that action monitoring is activated, a LINK_UP
action will be issued.
layerId
- Layer identifierlinkId
- Link identifierpublic void setNetworkAttribute(String key, String value)
key
- Attribute namevalue
- Attribute valuepublic void setNetworkAttributeMap(Map<String,String> attributes)
attributes
- Map of attributespublic void setNetworkDescription(String description)
description
- Description (when null
, it will be set to empty)public void setNetworkName(String name)
name
- Name (when null
, it will be set to 'Layer ' + layerId)public void setNodeAttribute(long nodeId, String key, String value)
Sets an attribute for a given node. If it already exists, it will be overriden.
Important: In case that action monitoring is activated, a NODE_MODIFIED
action will be issued.
nodeId
- Node identifierkey
- Attribute namevalue
- Attribute valuepublic void setNodeAttributeMap(long nodeId, Map<String,String> attributes)
Sets the attributes for a given node. Any previous attribute will be removed.
Important: In case that action monitoring is activated, a NODE_MODIFIED
action will be issued.
nodeId
- Node identifierattributes
- Map of attributes (in case of null, an empty map will be assumed)public void setNodeDown(long nodeId)
Sets a node as down.
Important: In case that action monitoring is activated, a NODE_DOWN
action will be issued.
nodeId
- Node identifierpublic void setNodeName(long nodeId, String name)
Sets the node name.
Important: In case that action monitoring is activated, a NODE_MODIFIED
action will be issued.
nodeId
- Node identifiername
- Name (when null
, it will be set to 'Node ' + nodeId)public void setNodesAndLinksDown(long layerId, Set<Long> nodeIds, Set<Long> linkIds)
Sets some nodes and links as down.
Important: In case that action monitoring is activated, several NODE_DOWN
and LINK_DOWN
actions will be issued.
layerId
- Layer identifiernodeIds
- Node identifierslinkIds
- Link identifierspublic void setNodesAndLinksDown(Set<Long> nodeIds, Map<Long,Set<Long>> linkIds)
Sets some nodes and links as down.
Important: In case that action monitoring is activated, several NODE_DOWN
and LINK_DOWN
actions will be issued.
nodeIds
- Node identifierslinkIds
- Link identifiers per layerpublic void setNodesAndLinksDown(Set<Long> nodeIds, Set<Long> linkIds)
Sets some nodes and links as down.
Important: In case that action monitoring is activated, several NODE_DOWN
and LINK_DOWN
actions will be issued.
nodeIds
- Node identifierslinkIds
- Link identifierspublic void setNodesAndLinksUp(long layerId, Set<Long> nodeIds, Set<Long> linkIds)
Sets some nodes and links as up.
Important: In case that action monitoring is activated, several NODE_UP
and LINK_UP
actions will be issued.
layerId
- Layer identifiernodeIds
- Node identifierslinkIds
- Link identifierspublic void setNodesAndLinksUp(Set<Long> nodeIds, Map<Long,Set<Long>> linkIds)
Sets some nodes and links as up.
Important: In case that action monitoring is activated, several NODE_UP
and LINK_UP
actions will be issued.
nodeIds
- Node identifierslinkIds
- Link identifiers per layerpublic void setNodesAndLinksUp(Set<Long> nodeIds, Set<Long> linkIds)
Sets some nodes and links as up.
Important: In case that action monitoring is activated, several NODE_UP
and LINK_UP
actions will be issued.
nodeIds
- Node identifierslinkIds
- Link identifierspublic void setNodesDown(Set<Long> nodeIds)
Sets a set of nodes as down.
Important: In case that action monitoring is activated, several NODE_DOWN
actions will be issued.
nodeIds
- Node identifierspublic void setNodesUp(Set<Long> nodeIds)
Sets a set of nodes as up.
Important: In case that action monitoring is activated, several NODE_UP
actions will be issued.
nodeIds
- Node identifierspublic void setNodeUp(long nodeId)
Sets a node as up.
Important: In case that action monitoring is activated, a NODE_UP
action will be issued.
nodeId
- Node identifierpublic void setNodeXYPosition(long nodeId, double x, double y)
Sets the node position.
Important: In case that action monitoring is activated, a NODE_MODIFIED
action will be issued.
nodeId
- Node identifierx
- Node position in x-axisy
- Node position in y-axispublic void setProtectionSegmentAttribute(long layerId, long segmentId, String key, String value)
Sets an attribute for a given protection segment. If it already exists, it will be overriden.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
layerId
- Layer identifiersegmentId
- Protection segment identifierkey
- Attribute namevalue
- Attribute valuepublic void setProtectionSegmentAttribute(long segmentId, String key, String value)
Sets an attribute for a given protection segment. If it already exists, it will be overriden.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
segmentId
- Protection segment identifierkey
- Attribute namevalue
- Attribute valuepublic void setProtectionSegmentAttributeMap(long layerId, long segmentId, Map<String,String> attributes)
Sets the attributes for a given protection segment. Any previous attribute will be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
layerId
- Layer identifiersegmentId
- Protection segment identifierattributes
- Map of attributes (in case of null, an empty map will be assumed)public void setProtectionSegmentAttributeMap(long segmentId, Map<String,String> attributes)
Sets the attributes for a given protection segment. Any previous attribute will be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
segmentId
- Protection segment identifierattributes
- Map of attributespublic void setProtectionSegmentDown(long segmentId)
Sets a protection segment as down.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
segmentId
- Protection segment identifierpublic void setProtectionSegmentDown(long layerId, long segmentId)
Sets a protection segment as down.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
layerId
- Layer identifiersegmentId
- Protection segment identifierpublic void setProtectionSegmentReservedCapacity(long segmentId, double u_s)
Sets the reserved capacity of a protection segment.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
segmentId
- Segment identifieru_s
- Reserved capacitypublic void setProtectionSegmentReservedCapacity(long layerId, long segmentId, double u_s)
Sets the reserved capacity of a protection segment.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
layerId
- Layer identifiersegmentId
- Segment identifieru_s
- Reserved capacitypublic void setProtectionSegmentReservedCapacityMap(long layerId, Map<Long,Double> u_s)
Sets the reserved capacity per protection segment.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_MODIFIED
actions will be issued.
layerId
- Layer identifieru_s
- Reserved capacity per protection segmentpublic void setProtectionSegmentReservedCapacityMap(Map<Long,Double> u_s)
Sets the reserved capacity per protection segment.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_MODIFIED
actions will be issued.
u_s
- Reserved capacity per protection segmentpublic void setProtectionSegmentReservedCapacityVector(double[] u_s)
Sets the reserved capacity per protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_MODIFIED
actions will be issued.
u_s
- Reserved capacity per protection segmentpublic void setProtectionSegmentReservedCapacityVector(long layerId, double[] u_s)
Sets the reserved capacity per protection segment, in increasing order of identifier.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_MODIFIED
actions will be issued.
layerId
- Layer identifieru_s
- Reserved capacity per protection segmentpublic void setProtectionSegmentsUp(long layerId, Set<Long> segmentIds)
Sets the given protection segments as up. If some of them is not restorable, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_MODIFIED
actions will be issued.
layerId
- Layer identifiersegmentIds
- Segment identifierspublic void setProtectionSegmentsUp(Set<Long> segmentIds)
Sets the given protection segments as up. If some of them is not restorable, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several PROTECTION_SEGMENT_MODIFIED
actions will be issued.
segmentIds
- Segment identifierspublic void setProtectionSegmentUp(long segmentId)
Sets the given protection segment as up. If it is not restorable, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
segmentId
- Segment identifierpublic void setProtectionSegmentUp(long layerId, long segmentId)
Sets the given protection segment as up. If it is not restorable, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a PROTECTION_SEGMENT_MODIFIED
action will be issued.
layerId
- Layer identifiersegmentId
- Segment identifierpublic void setRouteAttribute(long layerId, long routeId, String key, String value)
Sets an attribute for a given route. If it already exists, it will be overriden.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
layerId
- Layer identifierrouteId
- Route identifierkey
- Attribute namevalue
- Attribute valuepublic void setRouteAttribute(long routeId, String key, String value)
Sets an attribute for a given route at the first layer. If it already exists, it will be overriden.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
routeId
- Route identifierkey
- Attribute namevalue
- Attribute valuepublic void setRouteAttributeMap(long layerId, long routeId, Map<String,String> attributes)
Sets the attributes for a given route at the given layer. Any previous attribute will be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
layerId
- Layer identifierrouteId
- Route identifierattributes
- Map of attributes (in case of null, an empty map will be assumed)public void setRouteAttributeMap(long routeId, Map<String,String> attributes)
Sets the attributes for a given route. Any previous attribute will be removed.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
routeId
- Route identifierattributes
- Map of attributespublic void setRouteCarriedTraffic(long routeId, double x_p)
Sets the route carried traffic.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
routeId
- Route identifierx_p
- Carried traffic (greater or equal than zero)public void setRouteCarriedTraffic(long layerId, long routeId, double x_p)
Sets the route carried traffic.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
layerId
- Layer identifierrouteId
- Route identifierx_p
- Carried traffic (greater or equal than zero)public void setRouteCarriedTrafficMap(long layerId, Map<Long,Double> x_p)
Sets the carried traffic per route.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
layerId
- Layer identifierx_p
- Carried traffic per routepublic void setRouteCarriedTrafficMap(Map<Long,Double> x_p)
Sets the carried traffic per route.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
x_p
- Carried traffic per routepublic void setRouteCarriedTrafficVector(double[] x_p)
Sets the carried traffic per route, in increasing order of route identifier.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
x_p
- Carried traffic per routepublic void setRouteCarriedTrafficVector(long layerId, double[] x_p)
Sets the carried traffic per route, in increasing order of route identifier.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
layerId
- Layer identifierx_p
- Carried traffic per routepublic void setRouteDown(long routeId)
Sets a route as down.
Important: Route keeps its carried traffic assignment, but it is not taking into account for metrics.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
routeId
- Route identifierpublic void setRouteDown(long layerId, long routeId)
Sets a route as down.
Important: Route keeps its carried traffic assignment, but it is not taking into account for metrics.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
layerId
- Layer identifierrouteId
- Route identifierpublic void setRouteOccupiedCapacity(long routeId, double y_p)
Sets the capacity occupied by the route in links.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
routeId
- Route identifiery_p
- Occupied capacitypublic void setRouteOccupiedCapacity(long layerId, long routeId, double y_p)
Sets the capacity occupied by the route in links.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
layerId
- Layer identifierrouteId
- Route identifiery_p
- Occupied capacitypublic void setRouteOccupiedCapacityMap(long layerId, Map<Long,Double> y_p)
Sets the occupied capacity per route.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
layerId
- Layer identifiery_p
- Occupied capacity per routepublic void setRouteOccupiedCapacityMap(Map<Long,Double> y_p)
Sets the occupied capacity per route.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
y_p
- Occupied capacity per routepublic void setRouteOccupiedCapacityVector(double[] y_p)
Sets the occupied capacity per route, in increasing order of route identifier.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
y_p
- Occupied capacity per routepublic void setRouteOccupiedCapacityVector(long layerId, double[] y_p)
Sets the occupied capacity per route, in increasing order of route identifier.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
layerId
- Layer identifiery_p
- Occupied capacity per routepublic void setRouteSequenceOfLinks(long routeId, List<Long> path)
Sets the current path of a route. Original route can be always accessed
from the getRouteOriginalSequenceOfLinks()
method.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
routeId
- Route identifierpath
- Sequence of links (and maybe protection segments)public void setRouteSequenceOfLinks(long layerId, long routeId, List<Long> path)
Sets the current path of a route. Original route can be always accessed
from the getRouteOriginalSequenceOfLinks()
method.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
layerId
- Layer identifierrouteId
- Route identifierpath
- Sequence of links (and maybe protection segments)public void setRoutesUp(long layerId, Set<Long> routeIds)
Sets the given routes as up. If some of them is not restorable, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
layerId
- Layer identifierrouteIds
- Route identifierspublic void setRoutesUp(Set<Long> routeIds)
Sets the given routes as up. If some of them is not restorable, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, several ROUTE_MODIFIED
actions will be issued.
routeIds
- Route identifierspublic void setRouteUp(long routeId)
Sets the given route as up. If it is not restorable, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
routeId
- Route identifierpublic void setRouteUp(long layerId, long routeId)
Sets the given route as up. If it is not restorable, an exception will be thrown.
Important: Routing type must be SOURCE_ROUTING
.
Important: In case that action monitoring is activated, a ROUTE_MODIFIED
action will be issued.
layerId
- Layer identifierrouteId
- Route identifierpublic void setRoutingType(Constants.RoutingType routingType)
routingType
- RoutingType
public void setRoutingType(long layerId, Constants.RoutingType routingType)
layerId
- Layer identifierroutingType
- RoutingType
public void setSRGAttribute(long srgId, String key, String value)
Sets an attribute for a given SRG. If it already exists, it will be overriden.
Important: In case that action monitoring is activated, a SRG_MODIFIED
action will be issued.
srgId
- SRG identifierkey
- Attribute namevalue
- Attribute valuepublic void setSRGAttributeMap(long srgId, Map<String,String> attributes)
Sets the attributes for a given SRG. Any previous attribute will be removed.
Important: In case that action monitoring is activated, a SRG_MODIFIED
action will be issued.
srgId
- SRG identifierattributes
- Map of attributespublic void setSRGDown(long srgId)
srgId
- SRG identifierpublic void setSRGMeanTimeToFailInHours(long srgId, double mttfInHours)
Sets the Mean Time To Fail (in hours) of a given SRG.
Important: In case that action monitoring is activated, a SRG_MODIFIED
action will be issued.
srgId
- SRG identifiermttfInHours
- Mean Time To Fail (in hours). Zero or negative value means Double.MAX_VALUE
public void setSRGMeanTimeToRepairInHours(long srgId, double mttrInHours)
Sets the Mean Time To Repair (in hours) of a given SRG.
Important: In case that action monitoring is activated, a SRG_MODIFIED
action will be issued.
srgId
- SRG identifiermttrInHours
- Mean Time To Repair (in hours). Zero or negative value are not allowedpublic void setTrafficMatrix(cern.colt.matrix.tdouble.DoubleMatrix2D trafficMatrix)
Sets the traffic demands at the given layer from a given traffic matrix, removing any previous demand.
Important: In case that action monitoring is activated, several DEMAND_REMOVED
and DEMAND_ADDED
actions will be issued.
Important: If there are less nodes than those in the traffic matrix as nodes as needed will be added in position (0,0).
trafficMatrix
- Traffic matrixpublic void setTrafficMatrix(long layerId, cern.colt.matrix.tdouble.DoubleMatrix2D trafficMatrix)
Sets the traffic demands at the given layer from a given traffic matrix, removing any previous demand.
Important: In case that action monitoring is activated, several DEMAND_REMOVED
and DEMAND_ADDED
actions will be issued.
Important: If there are less nodes than those in the traffic matrix as nodes as needed will be added in position (0,0).
layerId
- Layer identifiertrafficMatrix
- Traffic matrixpublic String toString()
String
representation of the network design.toString
in class Object
public String toString(Set<Long> layerIds)
String
representation of the network design only for the
given layers.layerIds
- Layer identifierspublic NetPlan unmodifiableView()