@Test public void testSetCarriedTraffic() { sc123.setCarriedTraffic(1,2.0); assertEquals(sc123.getCarriedTraffic() , 1 , 0.0); assertEquals(sc123.getOccupiedCapacity() , 2.0 , 0.0); assertEquals(sc123.getSeqOccupiedCapacitiesIfNotFailing() , Arrays.asList(2.0,2.0,2.0)); r123a.setCarriedTraffic(10,15); assertEquals(r123a.getCarriedTraffic() , 10 , 0.0); assertEquals(r123a.getOccupiedCapacity() , 15 , 0.0); link23.setFailureState(false); assertEquals(r123a.getCarriedTraffic() , 0 , 0.0); assertEquals(r123a.getOccupiedCapacity() , 0 , 0.0); }
public void setCarriedTraffic(double newCarriedTraffic , double newOccupiedLinkAndResourcesCapacities) { setCarriedTraffic (newCarriedTraffic , Collections.nCopies(this.currentPath.size(), newOccupiedLinkAndResourcesCapacities)); }
Route extends NetworkElement { public void setCarriedTraffic(double newCarriedTraffic , double newOccupiedLinkAndResourcesCapacities) { setCarriedTraffic (newCarriedTraffic , Collections.nCopies(this.currentPath.size(), newOccupiedLinkAndResourcesCapacities)); } }
Route extends NetworkElement { public void setCarriedTraffic(double newCarriedTraffic , double newOccupiedLinkAndResourcesCapacities) { setCarriedTraffic (newCarriedTraffic , Collections.nCopies(this.currentPath.size(), newOccupiedLinkAndResourcesCapacities)); } Route(NetPlan netPlan , long id , int index , Demand demand , List<? extends NetworkElement> seqLinksAndResourcesTraversed , AttributeMap attributes); }
Route extends NetworkElement { public void setCarriedTraffic(double newCarriedTraffic , double newOccupiedLinkAndResourcesCapacities) { setCarriedTraffic (newCarriedTraffic , Collections.nCopies(this.currentPath.size(), newOccupiedLinkAndResourcesCapacities)); } 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 void setCarriedTraffic(double newCarriedTraffic , double newOccupiedLinkAndResourcesCapacities) { setCarriedTraffic (newCarriedTraffic , Collections.nCopies(this.currentPath.size(), newOccupiedLinkAndResourcesCapacities)); } 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);  }