NetPlan extends NetworkElement { public boolean hasUnicastRoutingLoops(NetworkLayer... optionalLayerParameter) { NetworkLayer layer = checkInThisNetPlanOptionalLayerParameter(optionalLayerParameter); for (Demand d : layer.demands) if (d.getRoutingCycleType() != RoutingCycleType.LOOPLESS) return true; return false; } NetPlan();  NetPlan(File file);  NetPlan(InputStream inputStream); static Collection<Long> getIds(Collection<? extends NetworkElement> collection); static Collection<Integer> getIndexes(Collection<? extends NetworkElement> collection); static NetPlan loadFromFile(File file); boolean isDeepCopy(NetPlan np2); List<Demand> addDemandsFromTrafficMatrix(DoubleMatrix2D trafficMatrix, RoutingType routingType , NetworkLayer... optionalLayerParameter); Demand addDemand(Node ingressNode, Node egressNode, double offeredTraffic, RoutingType routingType , Map<String, String> attributes, NetworkLayer... optionalLayerParameter); Pair<Demand, Demand> addDemandBidirectional(Node ingressNode, Node egressNode, double offeredTraffic, RoutingType routingType , Map<String, String> attributes, NetworkLayer... optionalLayerParameter); NetworkLayer addLayer(String name, String description, String linkCapacityUnitsName, String demandTrafficUnitsName, URL defaultNodeIconURL, Map<String, String> attributes); NetworkLayer addLayerFrom(NetworkLayer origin); Link addLink(Node originNode, Node destinationNode, double capacity, double lengthInKm, double propagationSpeedInKmPerSecond, Map<String, String> attributes, NetworkLayer... optionalLayerParameter); Pair<Link, Link> addLinkBidirectional(Node originNode, Node destinationNode, double capacity, double lengthInKm, double propagationSpeedInKmPerSecond, Map<String, String> attributes, NetworkLayer... optionalLayerParameter); MulticastDemand addMulticastDemand(Node ingressNode, Set<Node> egressNodes, double offeredTraffic, Map<String, String> attributes, NetworkLayer... optionalLayerParameter); MulticastTree addMulticastTree(MulticastDemand demand, double carriedTraffic, double occupiedLinkCapacity, Set<Link> linkSet, Map<String, String> attributes); Node addNode(double xCoord, double yCoord, String name, Map<String, String> attributes); Resource addResource(String type, String name, Optional<Node> hostNode, double capacity, String capacityMeasurementUnits,
                                Map<Resource, Double> capacityIOccupyInBaseResource, double processingTimeToTraversingTrafficInMs, Map<String,String> attributes); Route addRoute(Demand demand, double carriedTraffic, double occupiedLinkCapacity, List<Link> sequenceOfLinks, Map<String, String> attributes); Route addServiceChain(Demand demand, double carriedTraffic, List<Double> occupiedLinkAndResourceCapacities, List<? extends NetworkElement> sequenceOfLinksAndResources, Map<String, String> attributes); static SortedMap<Pair<Node, Node>, List<Pair<List<Link>, List<Link>>>> computeUnicastCandidate11PathList(Map<Pair<Node, Node>, List<List<Link>>> cpl, int disjointType); static SortedMap<Demand, List<Pair<List<NetworkElement>, List<NetworkElement>>>> computeUnicastCandidate11ServiceChainList(SortedMap<Demand, List<List<NetworkElement>>> cpl, int disjointType); SortedMap<Demand, List<List<NetworkElement>>> computeUnicastCandidateServiceChainList(DoubleMatrix1D linkCosts, DoubleMatrix1D resourceCosts,
                                                                                           int K, double maxCostServiceChain, double maxLengthInKmPerSubpath, int maxNumHopsPerSubpath, double maxPropDelayInMsPerSubpath,
                                                                                           NetworkLayer... optionalLayerParameter); SortedMap<Pair<Node, Node>, List<List<Link>>> computeUnicastCandidatePathList(DoubleMatrix1D linkCosts,
                                                                                   int K, double maxLengthInKm, int maxNumHops, double maxPropDelayInMs, double maxRouteCost,
                                                                                   double maxRouteCostFactorRespectToShortestPath, double maxRouteCostRespectToShortestPath, SortedSet<Pair<Node, Node>> nodePairs, NetworkLayer... optionalLayerParameter); void addRoutesFromCandidatePathList(SortedMap<Pair<Node, Node>, List<List<Link>>> cpl, NetworkLayer... optionalLayer); void addRoutesAndBackupRoutesFromCandidate11PathList(SortedMap<Pair<Node, Node>, List<Pair<List<Link>, List<Link>>>> cpl11, NetworkLayer... optionalLayer); SortedMap<MulticastDemand, List<SortedSet<Link>>> computeMulticastCandidatePathList(DoubleMatrix1D costs, String solverName, String solverLibraryName, double maxSolverTimeInSecondsPerTree, String... candidateTreeListParamValuePairs); SortedMap<MulticastDemand, List<SortedSet<Link>>> computeMulticastCandidatePathList(NetworkLayer layer, DoubleMatrix1D linkCosts, String solverName, String solverLibraryName, double maxSolverTimeInSecondsPerTree, String... candidateTreeListParamValuePairs); void addMulticastTreesFromCandidateTreeList(SortedMap<MulticastDemand, List<SortedSet<Link>>> cpl); SharedRiskGroup addSRG(double mttfInHours, double mttrInHours, Map<String, String> attributes); SharedRiskGroup addSRGDynamic(double mttfInHours, double mttrInHours, String className , String dynamicInitializationString , Map<String, String> attributes); void assignFrom(NetPlan netPlan); NetworkLayer checkContiguousPath(List<Link> links, NetworkLayer layer, Node originNode, Node destinationNode); NetPlan copy(); NetPlan mergeIntoThisDesign(NetPlan otherDesign); NetPlan restrictDesign(SortedSet<Node> selectedNodes); void copyFrom(NetPlan originNetPlan); static SortedMap<NetworkElement, String> getAttributes(Collection<? extends NetworkElement> collection, String attribute); static DoubleMatrix1D getAttributeValues(Collection<? extends NetworkElement> collection, String attributeName, double defaultValue); Demand getDemand(int index, NetworkLayer... optionalLayerParameter); Demand getDemandFromId(long uid); ArrayList<Long> getDemandIds(NetworkLayer... optionalLayerParameter); List<Demand> getDemands(NetworkLayer... optionalLayerParameter); List<Demand> getDemandsSourceRouted(NetworkLayer... optionalLayerParameter); List<Demand> getDemandsHopByHopRouted(NetworkLayer... optionalLayerParameter); List<Demand> getDemandsBlocked(NetworkLayer... optionalLayerParameter); SortedSet<Demand> getDemandsCoupled(NetworkLayer... optionalLayerParameter); String getDemandTrafficUnitsName(NetworkLayer... optionalLayerParameter); double getForwardingRuleCarriedTraffic(Demand demand, Link link); SortedMap<Pair<Demand, Link>, Double> getForwardingRules(NetworkLayer... optionalLayerParameter); double getForwardingRuleSplittingFactor(Demand demand, Link link); NetworkLayer getNetworkLayer(int index); NetworkLayer getNetworkLayer(String name); Node getNode(int index); Link getLink(int index, NetworkLayer... optionalLayerParameter); Link getLinkFromId(long uid); String getLinkCapacityUnitsName(NetworkLayer... optionalLayerParameter); ArrayList<Long> getLinkIds(NetworkLayer... optionalLayerParameter); List<Link> getLinks(NetworkLayer... optionalLayerParameter); SortedSet<Link> getLinksAreBottleneck(NetworkLayer... optionalLayerParameter); SortedSet<Link> getLinksWithZeroCapacity(NetworkLayer... optionalLayerParameter); SortedSet<Link> getLinksCoupledToMulticastDemands(NetworkLayer... optionalLayerParameter); SortedSet<Link> getLinksCoupledToUnicastDemands(NetworkLayer... optionalLayerParameter); SortedSet<Link> getLinksDown(NetworkLayer... optionalLayerParameter); SortedSet<Link> getLinksDownAllLayers(); SortedSet<Link> getLinksUp(NetworkLayer... optionalLayerParameter); SortedSet<Link> getLinksUpAllLayers(); SortedSet<Link> getLinksOversubscribed(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixDemand2LinkAssignment(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixDemand2ResourceAssignment(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixRoute2SRGAffecting(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixRouteFirstBackupRoute2SRGAffecting(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixMulticastTree2SRGAffecting(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixMulticastDemand2LinkAssignment(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixDemand2LinkTrafficCarried(SortedSet<Demand> demandsOfInterest , NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixDemand2ResourceOccupiedCapacity(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixDestination2LinkTrafficCarried(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixDemand2RouteAssignment(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixMulticastDemand2MulticastTreeAssignment(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixDemandBasedForwardingRules(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixDestinationBasedForwardingRules(NetworkLayer... optionalLayer); DoubleMatrix2D getMatrixLink2RouteFirstBackupRouteAssignment(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixLink2RouteAssignment(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixLink2MulticastTreeAssignment(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixLink2SRGAssignment(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixMulticastDemand2LinkTrafficCarried(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNode2NodeEuclideanDistance(); DoubleMatrix2D getMatrixLink2LinkBidirectionalityMatrix(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixResource2ResourceUpperToBaseAssignment(); DoubleMatrix2D getMatrixResource2ResourceUpperToBaseOccupation(); DoubleMatrix2D getMatrixResource2RouteAssignment(NetworkLayer... optionalLayerParameter); Pair<List<Resource>, DoubleMatrix2D> getMatrixResource2RouteAssignment(String type, NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixResource2RouteOccupation(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixResource2SRGAssignment(); DoubleMatrix2D getMatrixResource2NodeAssignment(); DoubleMatrix2D getMatrixResource2ResourceType(String type); DoubleMatrix2D getMatrixNode2NodeHaversineDistanceInKm(); DoubleMatrix2D getMatrixNode2NodeOfferedTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeDemandAdjacency(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeMulticastDemandAdjacency(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeDemandIncidence(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeMulticastDemandIncidence(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeDemandIncomingIncidence(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeMulticastDemandIncomingIncidence(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeDemandOutgoingIncidence(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeMulticastDemandOutgoingIncidence(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeLinkAdjacency(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeLinkIncidence(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeLinkIncomingIncidence(NetworkLayer... optionalLayerParameter); DoubleMatrix2D getMatrixNodeLinkOutgoingIncidence(NetworkLayer... optionalLayerParameter); MulticastDemand getMulticastDemand(int index, NetworkLayer... optionalLayerParameter); MulticastDemand getMulticastDemandFromId(long uid); ArrayList<Long> getMulticastDemandIds(NetworkLayer... optionalLayerParameter); List<MulticastDemand> getMulticastDemands(NetworkLayer... optionalLayerParameter); List<MulticastDemand> getMulticastDemandsBlocked(NetworkLayer... optionalLayerParameter); MulticastTree getMulticastTree(int index, NetworkLayer... optionalLayerParameter); MulticastTree getMulticastTreeFromId(long uid); ArrayList<Long> getMulticastTreeIds(NetworkLayer... optionalLayerParameter); List<MulticastTree> getMulticastTrees(NetworkLayer... optionalLayerParameter); SortedSet<MulticastTree> getMulticastTreesDown(NetworkLayer... optionalLayerParameter); SortedSet<MulticastTree> getMulticastTreesTraversingZeroCapLinks(NetworkLayer... optionalLayerParameter); NetworkElement getNetworkElement(long id); static NetworkElement getNetworkElementByAttribute(Collection<? extends NetworkElement> listOfElements, String attribute, String value); long getNetworkElementNextId(); static Collection<? extends NetworkElement> getNetworkElementsByAttribute(Collection<? extends NetworkElement> listOfElements, String attribute, String value); NetworkLayer getNetworkLayerFromId(long uid); NetworkLayer getNetworkLayerDefault(); ArrayList<Long> getNetworkLayerIds(); List<NetworkLayer> getNetworkLayerInTopologicalOrder(); List<NetworkLayer> getNetworkLayers(); String getPlotNodeLayoutCurrentlyActive(); void setPlotNodeLayoutCurrentlyActive(String newCurrentPlotNodeLayout); SortedSet<String> getAllPlotNodeLayoutsDefined(); void addPlotNodeLayout(String newPlotNodeLayoutName); String getPlotNodeLayoutDefaultLayoutName(); void removePlotNodeLayout(String plotLayoutToRemove); Node getNodeFromId(long uid); Node getNodeByName(String name); List<Node> getNodeByNameAllNodes(String name); ArrayList<Long> getNodeIds(); SortedSet<Demand> getNodePairDemands(Node originNode, Node destinationNode, boolean returnDemandsInBothDirections, NetworkLayer... optionalLayerParameter); double getNodePairEuclideanDistance(Node originNode, Node destinationNode); double getNodePairHaversineDistanceInKm(Node originNode, Node destinationNode); SortedSet<Link> getNodePairLinks(Node originNode, Node destinationNode, boolean returnLinksInBothDirections, NetworkLayer... optionalLayerParameter); SortedSet<Route> getNodePairRoutes(Node originNode, Node destinationNode, boolean returnRoutesInBothDirections, NetworkLayer... optionalLayerParameter); List<Node> getNodes(); SortedSet<SharedRiskGroup> getSrgsDynamic(); SortedSet<Node> getNodesDown(); SortedSet<Node> getNodesUp(); int getNumberOfDemands(NetworkLayer... optionalLayerParameter); int getNumberOfForwardingRules(NetworkLayer... optionalLayerParameter); int getNumberOfLayers(); int getNumberOfLinks(NetworkLayer... optionalLayerParameter); int getNumberOfMulticastDemands(NetworkLayer... optionalLayerParameter); int getNumberOfMulticastTrees(NetworkLayer... optionalLayerParameter); int getNumberOfNodes(); int getNumberOfNodePairs(); int getNumberOfRoutes(NetworkLayer... optionalLayerParameter); int getNumberOfSRGs(); int getNumberOfResources(); Route getRoute(int index, NetworkLayer... optionalLayerParameter); Route getRouteFromId(long uid); ArrayList<Long> getRouteIds(NetworkLayer... optionalLayerParameter); List<Route> getRoutes(NetworkLayer... optionalLayerParameter); List<Route> getRoutesAreBackup(NetworkLayer... optionalLayerParameter); List<Route> getRoutesAreNotBackup(NetworkLayer... optionalLayerParameter); SortedSet<Route> getRoutesDown(NetworkLayer... optionalLayerParameter); SortedSet<Route> getRoutesTraversingZeroCapacityLinks(NetworkLayer... optionalLayerParameter); SharedRiskGroup getSRGFromId(long uid); Resource getResourceFromId(long uid); SharedRiskGroup getSRG(int index); Resource getResource(int index); ArrayList<Long> getSRGIds(); ArrayList<Long> getResourceIds(); List<SharedRiskGroup> getSRGs(); List<Resource> getResources(); SortedSet<Resource> getUnattachedResources(); SortedSet<Resource> getResourcesAttachedToAnyNode(); SortedSet<Resource> getResources(String type); DoubleMatrix1D getVectorDemandCarriedTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorAttributeValues(Collection<? extends NetworkElement> collection, String attributeKey); void setVectorAttributeValues(Collection<? extends NetworkElement> collection, String attributeKey, DoubleMatrix1D values); DoubleMatrix1D getVectorDemandWorseCasePropagationTimeInMs(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorMulticastDemandWorseCasePropagationTimeInMs(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorDemandTraversesOversubscribedLink(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorMulticastDemandTraversesOversubscribedLink(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorSRGAvailability(); DoubleMatrix1D getVectorDemandOfferedTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorDemandBlockedTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorLinkCapacity(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorLinkSpareCapacity(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorLinkLengthInKm(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorLinkPropagationDelayInMiliseconds(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorLinkPropagationSpeedInKmPerSecond(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorLinkCarriedTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorLinkOccupiedCapacity(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorLinkUpState(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorLinkUtilization(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorLinkOversubscribedTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorMulticastDemandCarriedTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorMulticastDemandOfferedTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorMulticastDemandBlockedTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorMulticastTreeCarriedTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorMulticastTreeNumberOfLinks(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorMulticastTreeAverageNumberOfHops(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorMulticastTreeOccupiedCapacity(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorNodeUpState(); DoubleMatrix1D getVectorNodePopulation(); DoubleMatrix1D getVectorNodeIngressUnicastTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorNodeEgressUnicastTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorRouteFirstBackupRouteLengthInKm(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorRouteFirstBackupRouteNumberOfLinks(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorResourceProcessingTimeInMs(); DoubleMatrix1D getVectorResourceCapacity(); DoubleMatrix1D getVectorResourceOccupiedCapacity(); DoubleMatrix1D getVectorResourceIsOfType(String type); DoubleMatrix1D getVectorRouteCarriedTraffic(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorRouteOfferedTrafficOfAssociatedDemand(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorMulticastTreeOfferedTrafficOfAssociatedMulticastDemand(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorRouteLengthInKm(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorRoutePropagationDelayInMiliseconds(NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorRouteNumberOfLinks(NetworkLayer... optionalLayerParameter); DoubleMatrix1D computeRouteCostVector(double[] costs, NetworkLayer... optionalLayerParameter); SortedSet<Node> getSiteNodes(String siteName); SortedSet<String> getGlobalPlanningDomains(); SortedSet<Node> getGlobalPlanningDomainNodes(String planningDomain); void addGlobalPlanningDomain(String planningDomain); void removeGlobalPlanningDomain(String planningDomain); void renameGlobalPlanningDomain(String oldName , String newName); SortedSet<String> getSiteNames(); SortedSet<Demand> getTaggedDemands(String tag , NetworkLayer... optionalLayerParameter); SortedSet<Link> getTaggedLinks(String tag , NetworkLayer... optionalLayerParameter); SortedSet<MulticastDemand> getTaggedMulticastDemands(String tag , NetworkLayer... optionalLayerParameter); SortedSet<MulticastTree> getTaggedMulticastTrees(String tag , NetworkLayer... optionalLayerParameter); SortedSet<NetworkLayer> getTaggedLayers(String tag); SortedSet<Node> getTaggedNodes(String tag); SortedSet<Resource> getTaggedResources(String tag); SortedSet<Route> getTaggedRoutes(String tag , NetworkLayer... optionalLayerParameter); SortedSet<SharedRiskGroup> getTaggedSrgs(String tag); DoubleMatrix1D computeMulticastTreeCostVector(double[] costs, NetworkLayer... optionalLayerParameter); DoubleMatrix1D getVectorRouteOccupiedCapacity(NetworkLayer... optionalLayerParameter); boolean hasDemands(NetworkLayer... optionalLayerParameter); boolean hasForwardingRules(NetworkLayer... optionalLayerParameter); boolean hasLinks(NetworkLayer... optionalLayerParameter); boolean hasMulticastDemands(NetworkLayer... optionalLayerParameter); boolean hasMulticastTrees(NetworkLayer... optionalLayerParameter); boolean hasNodes(); boolean hasRoutes(NetworkLayer... optionalLayerParameter); boolean hasSRGs(); boolean hasResources(); boolean hasUnicastRoutingLoops(NetworkLayer... optionalLayerParameter); boolean isLayerCouplingValid(NetworkLayer lowerLayer, NetworkLayer upperLayer); boolean isMulticastRoutingBifurcated(NetworkLayer... optionalLayerParameter); Date getCurrentDate(); void setCurrentDate(Date date); boolean isMultilayer(); boolean isSingleLayer(); boolean isUnicastRoutingBifurcated(NetworkLayer... optionalLayerParameter); boolean isUp(Collection<? extends NetworkElement> col); void removeNetworkLayer(NetworkLayer... optionalLayerParameter); void removeAllDemands(NetworkLayer... optionalLayerParameter); void removeAllForwardingRules(NetworkLayer... optionalLayerParameter); SortedMap<Link,SortedMap<String,Pair<Double,Double>>> getAllLinksPerQosOccupationAndQosViolationMap(NetworkLayer... optionalLayerParameter); void removeAllLinks(NetworkLayer... optionalLayerParameter); void removeAllMulticastDemands(NetworkLayer... optionalLayerParameter); void removeAllMulticastTrees(NetworkLayer... optionalLayerParameter); void removeAllMulticastTreesUnused(double toleranceTrafficAndCapacityValueToConsiderUnusedTree, NetworkLayer... optionalLayerParameter); void removeAllNetworkLayers(); void removeAllNodes(); void removeAllRoutes(NetworkLayer... optionalLayerParameter); void removeAllRoutesUnused(double toleranceTrafficAndCapacityValueToConsiderUnusedRoute, NetworkLayer... optionalLayerParameter); void removeAllLinksUnused(double toleranceCapacityValueToConsiderUnusedLink, NetworkLayer... optionalLayerParameter); void removeAllUnicastRoutingInformation(NetworkLayer... optionalLayerParameter); void removeAllSRGs(); void removeAllResources(); void reset(); void saveToFile(File file); void saveToOutputStream(OutputStream outputStream); void setAllLinksFailureState(boolean setAsUp, NetworkLayer... optionalLayerParameter); void setAllNodesFailureState(boolean setAsUp); void setLinksAndNodesFailureState(Collection<Link> linksToSetAsUp, Collection<Link> linksToSetAsDown, Collection<Node> nodesToSetAsUp, Collection<Node> nodesToSetAsDown); void setDemandTrafficUnitsName(String demandTrafficUnitsName, NetworkLayer... optionalLayerParameter); double setForwardingRule(Demand demand, Link link, double splittingRatio); void setForwardingRules(Collection<Demand> demands, Collection<Link> links, Collection<Double> splittingFactors, boolean removePreviousRulesAffectedDemands); void setForwardingRules(DoubleMatrix2D f_de, Set<Demand> demandsToUpdate , NetworkLayer... optionalLayerParameter); void setLinkCapacityUnitsName(String name, NetworkLayer... optionalLayerParameter); void setNetworkLayerDefault(NetworkLayer layer); DoubleMatrix1D checkMatrixDemandLinkCarriedTrafficFlowConservationConstraints(DoubleMatrix2D x_de, boolean xdeValueAsFractionsRespectToDemandOfferedTraffic, NetworkLayer... optionalLayerParameter); DoubleMatrix2D checkMatrixDestinationLinkCarriedTrafficFlowConservationConstraints(DoubleMatrix2D x_te, NetworkLayer... optionalLayerParameter); void setRoutingFromDemandLinkCarriedTraffic(DoubleMatrix2D x_de, boolean xdeValueAsFractionsRespectToDemandOfferedTraffic, boolean removeCycles, Set<Demand> demandsToSetRouting , NetworkLayer... optionalLayerParameter); void setRoutingFromDestinationLinkCarriedTraffic(DoubleMatrix2D x_te, boolean removeCycles, NetworkLayer... optionalLayerParameter); void setRoutingTypeAllDemands(RoutingType newRoutingType, NetworkLayer... optionalLayerParameter); void setTrafficMatrix(DoubleMatrix2D trafficMatrix, RoutingType routingTypeDemands , NetworkLayer... optionalLayerParameter); void setVectorDemandOfferedTraffic(DoubleMatrix1D offeredTrafficVector, NetworkLayer... optionalLayerParameter); void setVectorLinkCapacity(DoubleMatrix1D linkCapacities, NetworkLayer... optionalLayerParameter); void setVectorMulticastDemandOfferedTraffic(DoubleMatrix1D offeredTrafficVector, NetworkLayer... optionalLayerParameter); void setVectorMulticastTreeCarriedTrafficAndOccupiedLinkCapacities(DoubleMatrix1D carriedTraffic, DoubleMatrix1D occupiedLinkCapacity, NetworkLayer... optionalLayerParameter); void setVectorRouteCarriedTrafficAndOccupiedLinkCapacities(DoubleMatrix1D carriedTraffic, DoubleMatrix1D occupiedLinkCapacity, NetworkLayer... optionalLayerParameter); @Override String toString(); String toString(Collection<NetworkLayer> layers); boolean setModifiableState(boolean isModifiable); boolean isModifiable(); NetworkLayer checkInThisNetPlanOptionalLayerParameter(NetworkLayer... optionalLayer); @Override void checkCachesConsistency(); final static String PLOTLAYTOUT_DEFAULTNODELAYOUTNAME; final static String PLOTLAYTOUT_DEFAULTNODELAYOUTGUINAME; }
@Test public void testHasUnicastRoutingLoops() { assertTrue(!np.hasUnicastRoutingLoops()); Link link21 = np.addLink(n2,n1,0,0,1,null); np.addRoute(d13 , 0 , 0 , Arrays.asList(link12, link21, link13) , null); assertTrue(np.hasUnicastRoutingLoops()); }