Package ons

Class MyStatistics

java.lang.Object
ons.MyStatistics

public class MyStatistics
extends java.lang.Object
  • Method Details

    • getMyStatisticsObject

      public static MyStatistics getMyStatisticsObject()
      Creates a new MyStatistics object, in case it does'n exist yet.
      Returns:
      the MyStatistics singletonObject
    • statisticsSetup

      protected void statisticsSetup​(PhysicalTopology pt, VirtualTopology vt, int numClasses, int minNumberArrivals)
      Attributes initializer.
      Parameters:
      pt - the object Physical Topology
      vt - the object Virtual Topology
      numClasses - number of classes of service
      minNumberArrivals - minimum number of arriving events
    • acceptFlow

      protected void acceptFlow​(Flow flow, LightPath[] lightpaths, boolean[] usedTransponders)
      Adds an accepted flow to the statistics.
      Parameters:
      flow - the accepted Flow object
      lightpaths - list of lightpaths in the flow
      usedTransponders - the number of transponders used in this RA solution
    • rerouteFlow

      protected void rerouteFlow​(Flow flow, LightPath[] lightpaths, Path oldPath, boolean[] usedTransponders, boolean[] usedTranspondersOld)
    • blockFlow

      protected void blockFlow​(Flow flow)
      Adds a blocked flow to the statistics.
      Parameters:
      flow - the blocked Flow object
    • addOrdinaryEvent

      protected void addOrdinaryEvent​(Event event)
    • addEvent

      protected void addEvent​(Event event, int availableSlots, int availableTransponders, double frag)
    • addEvent

      protected void addEvent​(Event event, int availableTransponders)
      Adds an event to the statistics.
      Parameters:
      event - the Event object to be added
      availableTransponders - the atual available transponders in physical topology
    • verboseStatistics

      protected java.lang.String verboseStatistics​(int simType)
      This function is called during the simulation execution, but only if verbose was activated.
      Parameters:
      simType - 0 if the physicalTopology is WDM; 0 if physicalTopology is EON.
      Returns:
      string with the obtained statistics
    • printStatistics

      protected void printStatistics​(int simType)
      Prints all the obtained statistics, but only if verbose was not activated.
      Parameters:
      simType - 0 if the physicalTopology is WDM; 0 if physicalTopology is EON.
    • tableStatistics

      protected void tableStatistics​(int simType, double load)
    • jsonStatistics

      protected void jsonStatistics​(int simType, double load)
    • finish

      protected void finish()
      Terminates the singleton object.
    • createLightpath

      protected void createLightpath​(LightPath lp)
    • removeLightpath

      protected void removeLightpath​(LightPath lp)
    • reprovisionLightpath

      protected void reprovisionLightpath​(LightPath old, LightPath lp)
    • deallocatedLightpath

      protected void deallocatedLightpath​(LightPath lp)
    • lengthPath

      protected double lengthPath​(LightPath lightpath)
    • lengthPathBackups

      protected double lengthPathBackups​(LightPath lightpath)
    • lengthPath

      protected double lengthPath​(LightPath[] lps)
    • lengthPath

      protected double lengthPath​(Path[] paths)
    • maxLengthPath

      protected double maxLengthPath​(Path[] paths)
    • printHeader

      protected void printHeader​(int simType)
    • checkOXCState

      protected void checkOXCState()
    • acceptBulk

      protected void acceptBulk​(BulkData bulk, LightPath[] lightpaths, boolean[] usedTransponders)
    • blockBulk

      protected void blockBulk​(BulkData bulk)
    • blockBatch

      protected void blockBatch​(Batch batch)
    • acceptBatch

      protected void acceptBatch​(Batch batch, LightPath[][] lightpaths, boolean[][] usedTransponders)
    • addSNR

      protected void addSNR()
    • addSNRSurplus

      protected void addSNRSurplus​(int modulation, double snr)
    • subSNR

      protected void subSNR()
    • subSNRSurplus

      protected void subSNRSurplus​(int modulation, double snr)
    • setIntDumbParameter

      public void setIntDumbParameter​(int i)
    • setStringDumbParameter

      public void setStringDumbParameter​(java.lang.String s)
    • setDoubleDumbParameter

      public void setDoubleDumbParameter​(double d)
    • setFlowArrivalTime

      protected void setFlowArrivalTime​(long time)
    • setBulkArrivalTime

      protected void setBulkArrivalTime​(long time)
    • setBatchArrivalTime

      protected void setBatchArrivalTime​(long time)
    • blockAFS

      public void blockAFS​(Flow flow)
    • blockQoTN

      public void blockQoTN​(Flow flow)
    • blockQoTO

      public void blockQoTO​(Flow flow)
    • blockFrag

      public void blockFrag​(Flow flow)