Package ons
Class MyStatistics
java.lang.Object
ons.MyStatistics
public class MyStatistics
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description protected voidacceptBatch(Batch batch, LightPath[][] lightpaths, boolean[][] usedTransponders)protected voidacceptBulk(BulkData bulk, LightPath[] lightpaths, boolean[] usedTransponders)protected voidacceptFlow(Flow flow, LightPath[] lightpaths, boolean[] usedTransponders)Adds an accepted flow to the statistics.protected voidaddEvent(Event event, int availableTransponders)Adds an event to the statistics.protected voidaddEvent(Event event, int availableSlots, int availableTransponders, double frag)protected voidaddOrdinaryEvent(Event event)protected voidaddSNR()protected voidaddSNRSurplus(int modulation, double snr)voidblockAFS(Flow flow)protected voidblockBatch(Batch batch)protected voidblockBulk(BulkData bulk)protected voidblockFlow(Flow flow)Adds a blocked flow to the statistics.voidblockFrag(Flow flow)voidblockQoTN(Flow flow)voidblockQoTO(Flow flow)protected voidcheckOXCState()protected voidcreateLightpath(LightPath lp)protected voiddeallocatedLightpath(LightPath lp)protected voidfinish()Terminates the singleton object.static MyStatisticsgetMyStatisticsObject()Creates a new MyStatistics object, in case it does'n exist yet.protected voidjsonStatistics(int simType, double load)protected doublelengthPath(LightPath lightpath)protected doublelengthPath(LightPath[] lps)protected doublelengthPath(Path[] paths)protected doublelengthPathBackups(LightPath lightpath)protected doublemaxLengthPath(Path[] paths)protected voidprintHeader(int simType)protected voidprintStatistics(int simType)Prints all the obtained statistics, but only if verbose was not activated.protected voidremoveLightpath(LightPath lp)protected voidreprovisionLightpath(LightPath old, LightPath lp)protected voidrerouteFlow(Flow flow, LightPath[] lightpaths, Path oldPath, boolean[] usedTransponders, boolean[] usedTranspondersOld)protected voidsetBatchArrivalTime(long time)protected voidsetBulkArrivalTime(long time)voidsetDoubleDumbParameter(double d)protected voidsetFlowArrivalTime(long time)voidsetIntDumbParameter(int i)voidsetStringDumbParameter(java.lang.String s)protected voidstatisticsSetup(PhysicalTopology pt, VirtualTopology vt, int numClasses, int minNumberArrivals)Attributes initializer.protected voidsubSNR()protected voidsubSNRSurplus(int modulation, double snr)protected voidtableStatistics(int simType, double load)protected java.lang.StringverboseStatistics(int simType)This function is called during the simulation execution, but only if verbose was activated.
-
Method Details
-
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 Topologyvt- the object Virtual TopologynumClasses- number of classes of serviceminNumberArrivals- minimum number of arriving events
-
acceptFlow
Adds an accepted flow to the statistics.- Parameters:
flow- the accepted Flow objectlightpaths- list of lightpaths in the flowusedTransponders- the number of transponders used in this RA solution
-
rerouteFlow
-
blockFlow
Adds a blocked flow to the statistics.- Parameters:
flow- the blocked Flow object
-
addOrdinaryEvent
-
addEvent
-
addEvent
Adds an event to the statistics.- Parameters:
event- the Event object to be addedavailableTransponders- 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
-
removeLightpath
-
reprovisionLightpath
-
deallocatedLightpath
-
lengthPath
-
lengthPathBackups
-
lengthPath
-
lengthPath
-
maxLengthPath
-
printHeader
protected void printHeader(int simType) -
checkOXCState
protected void checkOXCState() -
acceptBulk
-
blockBulk
-
blockBatch
-
acceptBatch
-
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
-
blockQoTN
-
blockQoTO
-
blockFrag
-