@Override void checkCachesConsistency () { super.checkCachesConsistency (); if (isUp && netPlan.cache_nodesDown.contains(this)) throw new RuntimeException ("Bad"); if (!isUp && !netPlan.cache_nodesDown.contains(this)) throw new RuntimeException ("Bad"); for (Link link : cache_nodeIncomingLinks) if (link.destinationNode != this) throw new RuntimeException ("Bad"); for (Link link : cache_nodeOutgoingLinks) if (link.originNode != this) throw new RuntimeException ("Bad"); for (Demand demand : cache_nodeIncomingDemands) if (demand.egressNode != this) throw new RuntimeException ("Bad"); for (Demand demand : cache_nodeOutgoingDemands) if (demand.ingressNode != this) throw new RuntimeException ("Bad"); for (MulticastDemand demand : cache_nodeIncomingMulticastDemands) if (!demand.egressNodes.contains(this)) throw new RuntimeException ("Bad"); for (MulticastDemand demand : cache_nodeOutgoingMulticastDemands) if (demand.ingressNode != this) throw new RuntimeException ("Bad"); for (SharedRiskGroup srg : cache_nodeNonDynamicSRGs) if (!srg.getNodes().contains(this)) throw new RuntimeException ("Bad"); for (Route route : cache_nodeAssociatedRoutes) if (!route.cache_seqNodesRealPath.contains(this)) throw new RuntimeException ("Bad: " + cache_nodeAssociatedRoutes); for (MulticastTree tree : cache_nodeAssociatedulticastTrees) if (!tree.cache_traversedNodes.contains(this)) throw new RuntimeException ("Bad"); if (!this.mapLayout2NodeXYPositionMap.keySet().equals(netPlan.cache_definedPlotNodeLayouts)) throw new RuntimeException ("Bad"); }
void checkCachesConsistency () { super.checkCachesConsistency (); double check_arriedTraffic = 0; for (MulticastTree t : cache_multicastTrees) { if (!t.demand.equals (this)) throw new RuntimeException ("Bad"); check_arriedTraffic += t.getCarriedTraffic(); } if (carriedTraffic != check_arriedTraffic) throw new RuntimeException ("Bad"); if (coupledUpperLayerLinks != null) for (Link e : coupledUpperLayerLinks.values ()) if (!e.coupledLowerLayerMulticastDemand.equals (this)) throw new RuntimeException ("Bad"); if (!layer.multicastDemands.contains(this)) throw new RuntimeException ("Bad"); }
@Override void checkCachesConsistency () { super.checkCachesConsistency (); if (!layer.multicastTrees.contains(this)) throw new RuntimeException ("Bad"); if (!demand.cache_multicastTrees.contains(this)) throw new RuntimeException ("Bad"); if (linkSet == null) throw new RuntimeException ("Multicast tree " + this + ", linkSet == null"); if (initialSetLinksWhenWasCreated == null) throw new RuntimeException ("Multicast Tree " + this + ", initialSetLinksWhenWasCreated == null"); netPlan.checkInThisNetPlanAndLayer(linkSet , layer); for (Link link : linkSet) if (!link.cache_traversingTrees.contains(this)) throw new RuntimeException ("Bad"); for (Node node : cache_traversedNodes) if (!node.cache_nodeAssociatedulticastTrees.contains(this)) throw new RuntimeException ("Bad"); boolean shouldBeUp = true; for (Link e : linkSet) if (!e.isUp) { shouldBeUp = false; break; } if (shouldBeUp) for (Node n : cache_traversedNodes) if (!n.isUp) { shouldBeUp = false; break; } if (!shouldBeUp != this.isDown()) throw new RuntimeException("Bad"); if (shouldBeUp) { if (getCarriedTraffic() != carriedTrafficIfNotFailing) throw new RuntimeException ("Bad"); } else { if (getCarriedTraffic() != 0) throw new RuntimeException ("Bad"); } }
@Override void checkCachesConsistency () super.checkCachesConsistency ();
void checkCachesConsistency () { super.checkCachesConsistency (); assert getNodes ().stream().allMatch(n->n.getNetPlan()== this.netPlan); assert getLinksAllLayers ().stream().allMatch(n->n.getNetPlan()== this.netPlan); if (isDynamicSrg()) { for (Link link : linksIfNonDynamic) if (!link.cache_nonDynamicSrgs.contains(this)) throw new RuntimeException ("Bad"); for (Node node : nodesIfNonDynamic) if (!node.cache_nodeNonDynamicSRGs.contains(this)) throw new RuntimeException ("Bad"); } }
@Override void checkCachesConsistency () super.checkCachesConsistency ();
@Override void checkCachesConsistency () super.checkCachesConsistency ();
super.checkCachesConsistency (); if (this.bidirectionalPair != null)
@Override void checkCachesConsistency () super.checkCachesConsistency (); if (layer.netPlan != this.netPlan) throw new RuntimeException ("Bad"); if (!layer.links.contains(this)) throw new RuntimeException ("Bad");
public void checkCachesConsistency() super.checkCachesConsistency ();