/** Adds a backup lightpath to this lightpath * @param backup see above */ public void addBackupLightpath (WLightpathUnregenerated backup) { r.addBackupRoute(backup.getNe ()); }
for (long backupId : entry.getValue()) primary.addBackupRoute(netPlan.getRouteFromId(backupId));
for (long backupId : entry.getValue()) primary.addBackupRoute(netPlan.getRouteFromId(backupId));
newLayer.routes.get(originRoute.index).addBackupRoute(newLayer.routes.get(originBackupRoute.index));
/** * For each demand in the map, adds a number of route pairs with the given paths, where each route pair has a primary route and one backup to it. * All routes have zero carried traffic and zero occupied capacity in the links * * @param cpl11 a map with the path info * @param optionalLayer the layer (optional) */ public void addRoutesAndBackupRoutesFromCandidate11PathList(SortedMap<Pair<Node, Node>, List<Pair<List<Link>, List<Link>>>> cpl11, NetworkLayer... optionalLayer) { checkIsModifiable(); NetworkLayer layer = checkInThisNetPlanOptionalLayerParameter(optionalLayer); List<Route> routes = new LinkedList<Route>(); try { for (Demand d : getDemands(layer)) for (Pair<List<Link>, List<Link>> path : cpl11.get(Pair.of(d.getIngressNode(), d.getEgressNode()))) { final Route primary = this.addRoute(d, 0, 0, path.getFirst(), null); routes.add(primary); final Route backup = this.addRoute(d, 0, 0, path.getSecond(), null); routes.add(backup); primary.addBackupRoute(backup); } } catch (Exception e) { for (Route r : routes) r.remove(); throw e; } if (ErrorHandling.isDebugEnabled()) this.checkCachesConsistency(); }
final Route s = netPlan.addServiceChain(d, 0, Collections.nCopies(minCostServiceChain2.size(), d.getOfferedTraffic()), minCostServiceChain2, null); r.addBackupRoute(s); addedRoutes.add(r); addedRoutes.add(s); final Route r = netPlan.addRoute(d, d.getOfferedTraffic(), d.getOfferedTraffic(), twoPaths.get(0), null); final Route s = netPlan.addRoute(d, 0, d.getOfferedTraffic(), twoPaths.get(1), null); r.addBackupRoute(s); addedRoutes.add(r); addedRoutes.add(s);
lp.addBackupRoute(lpBackup);
thisMain.addBackupRoute(thisBackup);
long backupRouteId = (Long) ((StringLabeller) selectedItem).getObject(); Route backupRoute = netPlan.getRouteFromId(backupRouteId); route.addBackupRoute(backupRoute); callback.getPickManager().reset(); callback.updateVisualizationAfterChanges();
addedRoute.addBackupRoute(addedBackupRoute); addRouteEvent.routeAddedToFillByProcessor = addedRoute; this.routeOriginalLinks.put (addedRoute , spLinks.getFirst());
route.addBackupRoute(backupRoute);
r.addBackupRoute(backupRoute);
for (Route r : d.getRoutes ()) if (Math.abs(best_xr.get(r.getIndex ()) - 1) <= 1e-3) { primaryRoute = r; primaryRoute.setCarriedTraffic(tcfa_circuitCapacity_Gbps.getDouble () , tcfa_circuitCapacity_Gbps.getDouble ()); break; } for (Route r : d.getRoutes ()) if (Math.abs(best_x2r.get(r.getIndex ()) - 1) <= 1e-3) { backupRoute = r; backupRoute.setCarriedTraffic(0 , tcfa_circuitCapacity_Gbps.getDouble ()); break; } primaryRoute.addBackupRoute(backupRoute);
primary.setCarriedTraffic(d.getOfferedTraffic() , d.getOfferedTraffic()); backup.setCarriedTraffic(0 , d.getOfferedTraffic()); primary.addBackupRoute(backup);
wdmLayerRoute.addBackupRoute(wdmLayerBackupRoute); WDMUtils.allocateResources(rwa.getSecond() , wavelengthFiberOccupancy , null); if (DEBUG) { checkWaveOccupEqualsNp(currentNetPlan); checkClashing (currentNetPlan); }