/** Returns the set of incoming lightpaths to the node * @return see above */ public SortedSet<WLightpathUnregenerated> getIncomingLigtpaths () { return n.getIncomingRoutes(getNet().getWdmLayer().getNe()).stream().map(ee->new WLightpathUnregenerated(ee)).collect(Collectors.toCollection(TreeSet::new)); }
final int dropRegLps = (int) n.getIncomingRoutes().stream ().filter(e -> !e.isBackupRoute()).count(); 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 double trafReceived = n.getIncomingRoutes().stream().mapToDouble(r->r.getCarriedTraffic()).sum(); final double maxBlockedTraffic = Math.max(0, getMaxBlockedGoods(n, 0.0)); final double demandedTraffic = getDemandSize(n, 0.0); check (num <= (int) getMaxNumDistributionCentersInLocation(n, Integer.MAX_VALUE)); check (num >= (int) getMinNumDistributionCentersInLocation(n, 0)); check (n.getIncomingRoutes().isEmpty()); check (n.getOutgoingRoutes().isEmpty()); final double traf = n.getAssociatedRoutes().stream().mapToDouble(r->r.getCarriedTraffic()).sum ();