/** Returns the set of incoming, outgoing and traversing lightpaths to the node * @return see above */ public SortedSet<WLightpathUnregenerated> getInOutOrTraversingLigtpaths () { return n.getAssociatedRoutes(getNet().getWdmLayer().getNe()).stream().map(ee->new WLightpathUnregenerated(ee)).collect(Collectors.toCollection(TreeSet::new)); } /** Returns the set of incoming lightpaths to the node
/** Returns the set of incoming, outgoing and traversing service chains to the node. * @return see above */ public SortedSet<WServiceChain> getInOutOrTraversingServiceChains () { return n.getAssociatedRoutes(getNet().getIpLayer().getNe()).stream().map(ee->new WServiceChain(ee)).collect(Collectors.toCollection(TreeSet::new)); }
/** Returns the set of outgoing service chains of the node, including those starting in a VNF in the node * @return see above */ public SortedSet<WServiceChain> getOutgoingServiceChains () { return n.getAssociatedRoutes(getNet().getIpLayer().getNe()).stream().map(ee->new WServiceChain(ee)).filter(sc->sc.getA().equals(this)).collect(Collectors.toCollection(TreeSet::new)); } /** Returns the set of incoming service chains to the node, including those ended in a VNF in the node
/** Returns the set of incoming service chains to the node, including those ended in a VNF in the node * @return see above */ public SortedSet<WServiceChain> getIncomingServiceChains () { return n.getAssociatedRoutes(getNet().getIpLayer().getNe()).stream().map(ee->new WServiceChain(ee)).filter(sc->sc.getB().equals(this)).collect(Collectors.toCollection(TreeSet::new)); } /** Returns the set of incoming, outgoing and traversing service chains to the node.
final int expressRegLps = (int) n.getAssociatedRoutes().stream ().filter(e -> !e.isBackupRoute()).count() - addRegLps - dropRegLps; final int addBackupLps = n.getOutgoingRoutes().size() - addRegLps; final int dropBackupLps = n.getIncomingRoutes().size() - dropRegLps; final int expressBackupLps = (int) n.getAssociatedRoutes().stream ().filter(e -> e.isBackupRoute()).count() - addBackupLps - dropBackupLps; List<Route> lists = stat.regOccupInfo.get(n); final int regenRegLp = lists == null? 0 : (int) lists.stream().filter(e -> !e.isBackupRoute()).count(); final int regenProtLp = lists == null? 0 : (int) lists.stream().filter(e -> e.isBackupRoute()).count(); int wcRegLp = 0; for (Route r : n.getAssociatedRoutes().stream().filter(e -> !e.isBackupRoute()).collect(Collectors.toSet())) for (Node nReg : stat.mapRoute2RSA.get(r).getNodesWithFrequencySlotConversion()) if (n == nReg) wcRegLp ++; int wcBackupLp = 0; for (Route r : n.getAssociatedRoutes().stream().filter(e -> e.isBackupRoute()).collect(Collectors.toSet())) for (Node nReg : stat.mapRoute2RSA.get(r).getNodesWithFrequencySlotConversion()) if (n == nReg) wcBackupLp ++; out.append("<tr>");
check (n.getIncomingRoutes().isEmpty()); check (n.getOutgoingRoutes().isEmpty()); final double traf = n.getAssociatedRoutes().stream().mapToDouble(r->r.getCarriedTraffic()).sum (); final int numStocks = getMaxNumDistributionCentersInLocation(n, 0); check (traf <= numStocks * getMaxStorageCapacity(n, 0.0) + 1e-3);