/** * <p>Removes all the network layers (everything but the nodes and the SRGs). Removes all the links, demands and multicast demands of the defualt layer, it does not remove it </p> */ public void removeAllNetworkLayers() { final boolean previousErrorHandling = ErrorHandling.DEBUG; ErrorHandling.DEBUG = false; checkIsModifiable(); for (NetworkLayer layer : new ArrayList<NetworkLayer>(layers)) { if (layer != defaultLayer) { removeNetworkLayer(layer); continue; } removeAllLinks(layer); removeAllDemands(layer); removeAllMulticastDemands(layer); } ErrorHandling.DEBUG = previousErrorHandling; if (ErrorHandling.isDebugEnabled()) this.checkCachesConsistency(); }
netPlan.removeAllDemands(layer); for (Demand demand : demands.getDemands())
/** * <p>Sets the traffic demands at the given layer from a given traffic matrix, removing any previous * demand. If no layer is provided, default layer is assumed.</p> * <p><b>Important</b>: Matrix values must be strictly non-negative and matrix size have to be <i>N</i>x<i>N</i> (where <i>N</i> is the number of nodes) * * @param routingTypeDemands Routing type * @param optionalLayerParameter Network layer (optional * @param trafficMatrix Traffic matrix * @since 0.3.1 */ public void setTrafficMatrix(DoubleMatrix2D trafficMatrix, RoutingType routingTypeDemands , NetworkLayer... optionalLayerParameter) { trafficMatrix = NetPlan.adjustToTolerance(trafficMatrix); checkIsModifiable(); NetworkLayer layer = checkInThisNetPlanOptionalLayerParameter(optionalLayerParameter); removeAllDemands(layer); int N = nodes.size(); if ((trafficMatrix.rows() != N) || (trafficMatrix.columns() != N)) throw new Net2PlanException("Bad number of rows-columns in the traffic matrix"); if (trafficMatrix.size() > 0) if (trafficMatrix.getMinLocation()[0] < 0) throw new Net2PlanException("Offered traffic must be a non-negative"); for (int n1 = 0; n1 < N; n1++) for (int n2 = 0; n2 < N; n2++) { if (n1 == n2) continue; addDemand(nodes.get(n1), nodes.get(n2), trafficMatrix.getQuick(n1, n2), routingTypeDemands , null, layer); } if (ErrorHandling.isDebugEnabled()) this.checkCachesConsistency(); }
netPlan.removeAllDemands (wdmLayer); netPlan.removeAllMulticastDemands(wdmLayer);
double totalCost = op.getOptimalCost(); netPlan.removeAllDemands();
netPlan.removeAllDemands(wdmLayer);
netPlan.removeAllDemands (wdmLayer); netPlan.removeAllMulticastDemands(wdmLayer);
netPlan.removeAllDemands();
netPlan.removeAllDemands(); for (Node n1 : netPlan.getNodes()) for (Node n2 : netPlan.getNodes()) if (n1.getIndex () > n2.getIndex ()) netPlan.removeAllDemands(); for (Demand d : npcopy.getDemands())
netPlan.removeAllDemands(); netPlan.setRoutingTypeAllDemands(RoutingType.SOURCE_ROUTING); for (Node n1 : netPlan.getNodes())
try netPlan.removeAllDemands(); for (Demand demand : demands.getDemands()) netPlan.addDemand(netPlan.getNode(demand.getIngressNode().getIndex()), netPlan.getNode(demand.getEgressNode().getIndex()), demand.getOfferedTraffic(), demand.getRoutingType() , demand.getAttributes());
netPlan.removeAllDemands(); netPlan.setRoutingTypeAllDemands(RoutingType.SOURCE_ROUTING); List<Integer> arrayIndexesOfDemand1 = new LinkedList<Integer> ();
this.currentNetPlan.removeAllDemands(); currentNetPlan.setRoutingTypeAllDemands(RoutingType.SOURCE_ROUTING); for (Node n1 : this.currentNetPlan.getNodes())
this.currentNetPlan.removeAllDemands(); this.currentNetPlan.setRoutingTypeAllDemands(RoutingType.SOURCE_ROUTING); this.demandType = DoubleFactory1D.dense.make (D1+D2);
netPlan.removeAllDemands(lowerLayer); netPlan.setLinkCapacityUnitsName("Gbps" , lowerLayer); netPlan.setLinkCapacityUnitsName("Gbps" , upperLayer);