/** Returns the user-defined identifier of the modulation associated to the transponder realizing this lightpath * @return see above */ public String getModulationId () { return r.getAttribute(ATTNAMECOMMONPREFIX + ATTNAMESUFFIX_MODULATIONID, ""); } /** Sets the user-defined identifier of the modulation associated to the transponder realizing this lightpath
data[itemId][p + 1] = netPlan.getRouteFromId(routeId).getAttribute(attribute); if (data[itemId][p + 1] == null) data[itemId][p + 1] = "";
/** Creates a RSA object reading the information from the existing Route object (and its WDM-related attributes). * @param r the route object * @param initializeWithTheInitialState if {@code true}, the RSA object created gets the information from the route primary path: sequence of links, and if not, from the route current sequence of traversed links. */ public RSA (Route r , boolean initializeWithTheInitialState) { this.ingressNode = r.getIngressNode(); this.egressNode = r.getEgressNode(); this.seqLinks = initializeWithTheInitialState ? new ArrayList<>(Route.getSeqLinks(r.getInitialState().getSecond())) : new ArrayList<> (r.getSeqLinks()); try { if (!isNonNegativeInteger(r.getOccupiedCapacity())) throw new WDMException (""); if (!isNonNegativeInteger(r.getOccupiedCapacityInNoFailureState())) throw new WDMException (""); final IntMatrix2D candidateSeqFreqSlots = StringUtils.readIntMatrix (r.getAttribute(initializeWithTheInitialState? WDMUtils.SEQUENCE_OF_FREQUENCYSLOTS_INITIAL_ROUTE_ATTRIBUTE_NAME : WDMUtils.SEQUENCE_OF_FREQUENCYSLOTS_ATTRIBUTE_NAME)); this.seqFrequencySlots_se = candidateSeqFreqSlots.rows() > 0? candidateSeqFreqSlots : IntFactory2D.dense.make(0,this.seqLinks.size()); final int[] candidateSeqRegenerators = r.getAttribute(initializeWithTheInitialState? WDMUtils.SEQUENCE_OF_REGENERATORS_INITIAL_ROUTE_ATTRIBUTE_NAME : WDMUtils.SEQUENCE_OF_REGENERATORS_ATTRIBUTE_NAME) == null? new int [seqLinks.size()] : StringUtils.toIntArray(StringUtils.split(initializeWithTheInitialState? r.getAttribute(SEQUENCE_OF_REGENERATORS_INITIAL_ROUTE_ATTRIBUTE_NAME): r.getAttribute(SEQUENCE_OF_REGENERATORS_ATTRIBUTE_NAME), " ")); this.seqRegeneratorsOccupancy_e = candidateSeqRegenerators.length == 0 ? new int[this.seqLinks.size()] : candidateSeqRegenerators; } catch (Exception e) { throw new WDMException("RSA not correctly defined"); } if (initializeWithTheInitialState && getNumSlots() != r.getInitialState().getThird().get(0)) throw new WDMException("The occupied link capacity is different to the number of slots"); if (!initializeWithTheInitialState && getNumSlots() != r.getOccupiedCapacityInNoFailureState()) throw new WDMException("The occupied link capacity is different to the number of slots"); checkValidity(); }