@Test public void testGetOccupiedCapacity() { this.sc123 = np.addServiceChain(scd123 , 100 , Arrays.asList(100.0 , 1.0 , 200.0) , Arrays.asList(link12 , res2 , link23) , null); assertEquals(sc123.getOccupiedCapacity(), 100.0 , 0.0); assertEquals(sc123.getOccupiedCapacity(link12), 100.0 , 0.0); assertEquals(sc123.getOccupiedCapacity(res2), 1.0 , 0.0); assertEquals(sc123.getOccupiedCapacity(link23), 200.0 , 0.0); assertEquals(sc123.getOccupiedCapacity(link13), 0.0 , 0.0); link12.setFailureState(false); assertEquals(sc123.getOccupiedCapacity(), 0.0 , 0.0); assertEquals(sc123.getOccupiedCapacity(link12), 0.0 , 0.0); assertEquals(sc123.getOccupiedCapacity(res2), 0.0 , 0.0); assertEquals(sc123.getOccupiedCapacity(link23), 0.0 , 0.0); assertEquals(sc123.getOccupiedCapacity(link13), 0.0 , 0.0); }
public double getOccupiedCapacity (NetworkElement ... e) { if (isDown ()) return 0.0; return getOccupiedCapacityInNoFailureState (e); }
Route extends NetworkElement { public double getOccupiedCapacity (NetworkElement ... e) { if (isDown ()) return 0.0; return getOccupiedCapacityInNoFailureState (e); } }
Route extends NetworkElement { public double getOccupiedCapacity (NetworkElement ... e) { if (isDown ()) return 0.0; return getOccupiedCapacityInNoFailureState (e); } Route(NetPlan netPlan , long id , int index , Demand demand , List<? extends NetworkElement> seqLinksAndResourcesTraversed , AttributeMap attributes); }
Route extends NetworkElement { public double getOccupiedCapacity (NetworkElement ... e) { if (isDown ()) return 0.0; return getOccupiedCapacityInNoFailureState (e); } Route(NetPlan netPlan , long id , int index , Demand demand , List<? extends NetworkElement> seqLinksAndResourcesTraversed , AttributeMap attributes); Route getBidirectionalPair(); void setBidirectionalPair(Route r); boolean isBidirectional(); Route createBidirectionalOppositePair(); boolean isServiceChain(); SortedSet<Route> getRoutesIAmBackup(); List<Route> getBackupRoutes(); Triple<Double,List<NetworkElement>,List<Double>> getInitialState(); List<NetworkElement> getPath(); List<NetworkElement> getOppositePath(); boolean isBackupRoute(); boolean hasBackupRoutes(); void addBackupRoute(Route backupRoute); void removeBackupRoute(Route backupRoute); double getCarriedTraffic(); double getOccupiedCapacity(NetworkElement ... e); double getCarriedTrafficInNoFailureState(); double getOccupiedCapacityInNoFailureState(NetworkElement ... e); Demand getDemand(); Node getEgressNode(); Node getFirstAvailableNodeAfterFailures(); Node getFirstAvailableNodeBeforeFailures(); Node getIngressNode(); NetworkLayer getLayer(); double getLengthInKm(); int getNumberOfHops(); double getPropagationDelayInMiliseconds(); double getPropagationSpeedInKmPerSecond(); List<Double> getSeqOccupiedCapacitiesIfNotFailing(); boolean isOccupyingDifferentCapacitiesInDifferentLinksInNoFailureState(); List<Resource> getSeqResourcesTraversed(); List<Link> getSeqLinks(); List<Node> getSeqNodes(); List<Node> getSeqIntermediateNodes(); int getNumberOfTimesIsTraversed(NetworkElement e); SortedSet<SharedRiskGroup> getSRGs(); boolean hasLoops(); boolean isDown(); boolean isTraversingZeroCapLinks(); void remove(); void setCarriedTraffic(double newCarriedTraffic , double newOccupiedLinkAndResourcesCapacities); void setCarriedTraffic(double newCarriedTraffic , List<Double> linkAndResourcesOccupationInformation); void setPath(double newCarriedTraffic , List<? extends NetworkElement> newPath , List<Double> newOccupationInformation); void setSeqLinks(List<Link> seqLinks); @Override String toString(); static List<Link> getSeqLinks(List<? extends NetworkElement> seqLinksAndResources); static List<Resource> getSeqResources(List<? extends NetworkElement> seqLinksAndResources); }
Route extends NetworkElement { public double getOccupiedCapacity (NetworkElement ... e) { if (isDown ()) return 0.0; return getOccupiedCapacityInNoFailureState (e); } Route(NetPlan netPlan , long id , int index , Demand demand , List<? extends NetworkElement> seqLinksAndResourcesTraversed , AttributeMap attributes); Route getBidirectionalPair(); void setBidirectionalPair(Route r); boolean isBidirectional(); Route createBidirectionalOppositePair(); boolean isServiceChain(); SortedSet<Route> getRoutesIAmBackup(); List<Route> getBackupRoutes(); Triple<Double,List<NetworkElement>,List<Double>> getInitialState(); List<NetworkElement> getPath(); List<NetworkElement> getOppositePath(); boolean isBackupRoute(); boolean hasBackupRoutes(); void addBackupRoute(Route backupRoute); void removeBackupRoute(Route backupRoute); double getCarriedTraffic(); double getOccupiedCapacity(NetworkElement ... e); double getCarriedTrafficInNoFailureState(); double getOccupiedCapacityInNoFailureState(NetworkElement ... e); Demand getDemand(); Node getEgressNode(); Node getFirstAvailableNodeAfterFailures(); Node getFirstAvailableNodeBeforeFailures(); Node getIngressNode(); NetworkLayer getLayer(); double getLengthInKm(); int getNumberOfHops(); double getPropagationDelayInMiliseconds(); double getPropagationSpeedInKmPerSecond(); List<Double> getSeqOccupiedCapacitiesIfNotFailing(); boolean isOccupyingDifferentCapacitiesInDifferentLinksInNoFailureState(); List<Resource> getSeqResourcesTraversed(); List<Link> getSeqLinks(); List<Node> getSeqNodes(); List<Node> getSeqIntermediateNodes(); int getNumberOfTimesIsTraversed(NetworkElement e); SortedSet<SharedRiskGroup> getSRGs(); boolean hasLoops(); boolean isDown(); boolean isTraversingZeroCapLinks(); void remove(); void setCarriedTraffic(double newCarriedTraffic , double newOccupiedLinkAndResourcesCapacities); void setCarriedTraffic(double newCarriedTraffic , List<Double> linkAndResourcesOccupationInformation); void setPath(double newCarriedTraffic , List<? extends NetworkElement> newPath , List<Double> newOccupationInformation); void setSeqLinks(List<Link> seqLinks); @Override String toString(); static List<Link> getSeqLinks(List<? extends NetworkElement> seqLinksAndResources); static List<Resource> getSeqResources(List<? extends NetworkElement> seqLinksAndResources);  }