Package ons

Class EONPhysicalTopology

java.lang.Object
ons.PhysicalTopology
ons.EONPhysicalTopology

public class EONPhysicalTopology
extends PhysicalTopology
  • Field Details

    • pi

      protected static PhysicalImpairments pi
    • valueA

      public static java.util.Map<java.lang.Integer,​java.lang.Double> valueA
    • valueSi

      public static java.util.Map<java.lang.Integer,​java.math.BigInteger> valueSi
  • Constructor Details

  • Method Details

    • getPI

      public PhysicalImpairments getPI()
      Retrieves the
      Returns:
    • getSlotSize

      public static int getSlotSize()
      Retrieves the slot size in MHz.
      Returns:
      slot size in MHz
    • getMaxModulation

      public static int getMaxModulation()
      Retrieves the max modulation format in xml schema.
      Returns:
      the id of max modulation format allowed
    • createPhysicalLightpath

      public void createPhysicalLightpath​(LightPath lightpath)
      Allocates optical path network.
      Specified by:
      createPhysicalLightpath in class PhysicalTopology
      Parameters:
      lightpath - the lightpath will be alocated
    • createPhysicalLightpathInOpticalGrooming

      public void createPhysicalLightpathInOpticalGrooming​(LightPath lightpath)
      Allocates optical path with optical grooming technique.
      Parameters:
      lightpath - the lightpath will be alocated
    • createPhysicalLightpathHybrid

      public LightPath createPhysicalLightpathHybrid​(LightPath lpShared, LightPath lpNew, int dstNode)
      Allocates optical path with optical grooming technique.
      Parameters:
      lpShared - part of lightpath to be shared in optical grooming technique
      lpNew - part of lightpath to be not used optical grooming technique
      dstNode - the destination node of the new lightpath
      Returns:
      the lightpath created
    • canCreatePhysicalLightpath

      public boolean canCreatePhysicalLightpath​(LightPath lightpath)
      Examine whether it is possible to allocate the supplied optical path.
      Specified by:
      canCreatePhysicalLightpath in class PhysicalTopology
      Parameters:
      lightpath - the optical path
      Returns:
      true if is possible, false otherwise
    • removePhysicalLightpath

      public void removePhysicalLightpath​(LightPath lightpath)
      Deallocates optical path provided.
      Specified by:
      removePhysicalLightpath in class PhysicalTopology
      Parameters:
      lightpath - the optical path provided
    • removePhysicalLightpathInOpticalGrooming

      public void removePhysicalLightpathInOpticalGrooming​(LightPath lightpath)
      Deallocates optical path provided in optical grooming.
      Parameters:
      lightpath - the optical path provided
    • removePhysicalLightpathHybrid

      public void removePhysicalLightpathHybrid​(LightPath lightpath)
      Deallocates optical path provided in partly optical grooming.
      Parameters:
      lightpath - the lightpath
    • getBWAvailable

      public int getBWAvailable​(LightPath lightpath)
      Retrieves the bandwidth available in Mbps in this lightpath
      Specified by:
      getBWAvailable in class PhysicalTopology
      Parameters:
      lightpath - the lightpath to be examined
      Returns:
      the bandwidth available
    • addRate

      public void addRate​(int rate, LightPath lightpath)
      Add flow in this lightpath.
      Specified by:
      addRate in class PhysicalTopology
      Parameters:
      rate - the rate to be add
      lightpath - the lightpath
    • getBW

      public int getBW​(LightPath lightpath)
      Retrieves the total bandwidth this lightpath
      Specified by:
      getBW in class PhysicalTopology
      Parameters:
      lightpath - the lightpath
      Returns:
      the bandwidth in Mbps
    • getWeightedGraph

      public WeightedGraph getWeightedGraph​(int slots)
      Returns a weighted graph with vertices representing the physical network nodes, and the edges representing the physical links. The weight of each edge receives the same value of the original link weight if the link has at least slots available. Otherwise it has no edges.
      Parameters:
      slots - the flow rate are available in slots
      Returns:
      an WeightedGraph class object
    • canExtendLightpath

      public boolean canExtendLightpath​(int requiredSlots, LightPath lpGroomable, int tunnelSize)
      Examine whether it is possible to extend the lightpath with the number of slots provided.
      Parameters:
      requiredSlots - the slots provided
      lpGroomable - the lightpath groomable
      tunnelSize - the size of lpGroomable tunnel
      Returns:
      true if lightpath can extend to the right or left, false otherwise
    • canExtendLightpathToLeft

      public boolean canExtendLightpathToLeft​(int requiredSlots, LightPath lpGroomable, int tunnelSize)
      Examine whether it is possible to extend the lightpath to left with the number of slots provided.
      Parameters:
      requiredSlots - the slots provided
      lpGroomable - the lightpath groomable
      tunnelSize - the size of lpGroomable tunnel
      Returns:
      true if lightpath can extend to the left, false otherwise
    • canExtendLightpathToRight

      public boolean canExtendLightpathToRight​(int requiredSlots, LightPath lpGroomable, int tunnelSize)
      Examine whether it is possible to extend the lightpath to right with the number of slots provided.
      Parameters:
      requiredSlots - the slots provided
      lpGroomable - the lightpath groomable
      tunnelSize - the size of lpGroomable tunnel
      Returns:
      true if lightpath can extend to the right, false otherwise
    • canExtendLightpath

      public boolean canExtendLightpath​(LightPath lpCreated, LightPath lpGroomable, int tunnelSize)
      Examine whether it is possible optical grooming in this lightpaths.
      Parameters:
      lpCreated - the lightpath will be alocate
      lpGroomable - one lightpath alocated
      tunnelSize - the size of lpGroomable tunnel
      Returns:
      true if lightpaths can be uses optical grooming, false otherwise
    • canCreatePhysicalLightpathHybrid

      public boolean canCreatePhysicalLightpathHybrid​(LightPath lpShared, LightPath lpGroomable, int tunnelSize, LightPath lpNew, int dstNode)
      Examine whether it is possible optical grooming in this lightpaths ('lpShared' and 'lpGroomable') and examine whether it is possible to allocate the 'lpNew'.
      Parameters:
      lpShared - the lightpath will be alocate
      lpGroomable - one lightpath alocated
      tunnelSize - the size of lpGroomable tunnel
      lpNew - the optical path
      dstNode - the destination node of this new lightpath
      Returns:
      true if is possible, false otherwise
    • canAddRate

      public boolean canAddRate​(int rate, LightPath lightpath)
      Examine whether it is possible to add flow in the lightpath.
      Specified by:
      canAddRate in class PhysicalTopology
      Parameters:
      rate - the rate to be add
      lightpath - the lightpath
      Returns:
      true if is possible, false otherwise
    • removeRate

      public void removeRate​(int rate, LightPath lightpath)
      Remove the rate (in Mbps) of this litghpath.
      Specified by:
      removeRate in class PhysicalTopology
      Parameters:
      rate - the rate to be removed
      lightpath - the lightpath
    • getAvailableSlots

      public int getAvailableSlots()
      Retrieves the slots available in all physical topology links.
      Returns:
      the number of slots available
    • getAvaiableSlotsRoute

      public int[] getAvaiableSlotsRoute​(int[] links, int requiredSlots)
      Retrieves the slots avaiable in this route.
      Parameters:
      links - the links in this route.
      requiredSlots - the slots required
      Returns:
      the array with the merge slots avaiable in all links
    • getAvaiableSlotsSDMRoute

      public int[] getAvaiableSlotsSDMRoute​(int[] links, int requiredSlots)
      Retrieves the slots avaiable in this SDM route.
      Parameters:
      links - the links in this route.
      requiredSlots - the slots required
      Returns:
      the array with the merge slots avaiable in all links
    • getExFragmentation

      public double getExFragmentation()
      Retrieves the current fragmentation rate in this topology.
      Returns:
      the current fragmentation of topology, (1-largestFreeBlock/TotalFree) in each link
    • getExFragmentation

      public double getExFragmentation​(int[] links)
      Retrieves the current fragmentation rate in this links.
      Parameters:
      links - the links
      Returns:
      the current fragmentation of topology, (1-largestFreeBlock/TotalFree) in each link
    • getFragmentationWu

      public double getFragmentationWu()
      Retrieves the current fragmentation rate in this topology in accordance with Wu et al 2014. J. Wu, M. Zhang, F. Wang, Y. Yue, e S. Huang. An optimal independent sets based greedy spectral defragmentation algorithm in elastic optical network. In 2014 13th International Conference on Optical Communications and Networks (ICOCN), pages 1–4, Nov 2014.
      Returns:
      the current fragmentation of topology.
    • getFragmentationWu

      public double getFragmentationWu​(int[] links)
      Retrieves the current fragmentation rate in this links in accordance with Wu et al 2014. J. Wu, M. Zhang, F. Wang, Y. Yue, e S. Huang. An optimal independent sets based greedy spectral defragmentation algorithm in elastic optical network. In 2014 13th International Conference on Optical Communications and Networks (ICOCN), pages 1–4, Nov 2014.
      Parameters:
      links - the links
      Returns:
      the current fragmentation of topology.
    • getFragmentationWright

      public double getFragmentationWright()
      Retrieves the current fragmentation rate in this topology in accordance with Wright et al 2015. P. Wright, M. C. Parker, e A. Lord. Minimum- and maximum-entropy routing and spectrum assignment for flexgrid elastic optical networking [invited]. IEEE/OSA Journal of Optical Communications and Networking, 7(1):A66–A72, Jan 2015.
      Returns:
      the current fragmentation of topology.
    • getFragmentationWright

      public double getFragmentationWright​(int[] links)
      Retrieves the current fragmentation rate in this topology in accordance with Wright et al 2015. P. Wright, M. C. Parker, e A. Lord. Minimum- and maximum-entropy routing and spectrum assignment for flexgrid elastic optical networking [invited]. IEEE/OSA Journal of Optical Communications and Networking, 7(1):A66–A72, Jan 2015.
      Parameters:
      links - the links
      Returns:
      the current fragmentation of topology.
    • getFragmentationEntropy

      public double getFragmentationEntropy()
      Retrieves the current fragmentation rate in this topology in accordance with Sugihara et al 2017. S. Sugihara, Y. Hirota, S. Fujii, H. Tode, e T. Watanabe. Dynamic resource allocation for immediate and advance reservation in space-division-multiplexing-based elastic optical networks. IEEE/OSA Journal of Optical Communications and Networking, 9(3):183–197, March 2017.
      Returns:
      the current fragmentation of topology.
    • getFragmentationEntropy

      public double getFragmentationEntropy​(int[] links)
      Retrieves the current fragmentation rate in this links in accordance with Sugihara et al 2017. S. Sugihara, Y. Hirota, S. Fujii, H. Tode, e T. Watanabe. Dynamic resource allocation for immediate and advance reservation in space-division-multiplexing-based elastic optical networks. IEEE/OSA Journal of Optical Communications and Networking, 9(3):183–197, March 2017.
      Parameters:
      links - the links
      Returns:
      the current fragmentation of topology.
    • getFragmentationSingh

      public double getFragmentationSingh()
      Retrieves the current fragmentation rate in this topology in accordance with Singh and Jukan 2017. S. K. Singh e A. Jukan. Efficient spectrum defragmentation with holding-time awareness in elastic optical networks. IEEE/OSA Journal of Optical Communications and Networking, 9(3):B78–B89, March 2017.
      Returns:
      the current fragmentation of topology.
    • getFragmentationSingh

      public double getFragmentationSingh​(int[] links)
      Retrieves the current fragmentation rate in this links in accordance with Singh and Jukan 2017. S. K. Singh e A. Jukan. Efficient spectrum defragmentation with holding-time awareness in elastic optical networks. IEEE/OSA Journal of Optical Communications and Networking, 9(3):B78–B89, March 2017.
      Returns:
      the current fragmentation of topology.
    • getFragmentationWang

      public double getFragmentationWang()
      Retrieves the current fragmentation rate in this topology in accordance with Wang et al 2015. N. Wang, J. P. Jue, X. Wang, Q. Zhang, H. C. Cankaya, e M. Sekiya. Holding-timeaware scheduling for immediate and advance reservation in elastic optical networks. In 2015 IEEE International Conference on Communications (ICC), pages 5180–5185, June 2015.
      Returns:
      the current fragmentation of topology.
    • getFragmentationWang

      public double getFragmentationWang​(int[] links)
      Retrieves the current fragmentation rate in this links in accordance with Wang et al 2015. N. Wang, J. P. Jue, X. Wang, Q. Zhang, H. C. Cankaya, e M. Sekiya. Holding-timeaware scheduling for immediate and advance reservation in elastic optical networks. In 2015 IEEE International Conference on Communications (ICC), pages 5180–5185, June 2015.
      Returns:
      the current fragmentation of topology.