Package ons
Class MyStatistics
java.lang.Object
ons.MyStatistics
public class MyStatistics
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description protected void
acceptBatch(Batch batch, LightPath[][] lightpaths, boolean[][] usedTransponders)
protected void
acceptBulk(BulkData bulk, LightPath[] lightpaths, boolean[] usedTransponders)
protected void
acceptFlow(Flow flow, LightPath[] lightpaths, boolean[] usedTransponders)
Adds an accepted flow to the statistics.protected void
addEvent(Event event, int availableTransponders)
Adds an event to the statistics.protected void
addEvent(Event event, int availableSlots, int availableTransponders, double frag)
protected void
addOrdinaryEvent(Event event)
protected void
addSNR()
protected void
addSNRSurplus(int modulation, double snr)
void
blockAFS(Flow flow)
protected void
blockBatch(Batch batch)
protected void
blockBulk(BulkData bulk)
protected void
blockFlow(Flow flow)
Adds a blocked flow to the statistics.void
blockFrag(Flow flow)
void
blockQoTN(Flow flow)
void
blockQoTO(Flow flow)
protected void
checkOXCState()
protected void
createLightpath(LightPath lp)
protected void
deallocatedLightpath(LightPath lp)
protected void
finish()
Terminates the singleton object.static MyStatistics
getMyStatisticsObject()
Creates a new MyStatistics object, in case it does'n exist yet.protected void
jsonStatistics(int simType, double load)
protected double
lengthPath(LightPath lightpath)
protected double
lengthPath(LightPath[] lps)
protected double
lengthPath(Path[] paths)
protected double
lengthPathBackups(LightPath lightpath)
protected double
maxLengthPath(Path[] paths)
protected void
printHeader(int simType)
protected void
printStatistics(int simType)
Prints all the obtained statistics, but only if verbose was not activated.protected void
removeLightpath(LightPath lp)
protected void
reprovisionLightpath(LightPath old, LightPath lp)
protected void
rerouteFlow(Flow flow, LightPath[] lightpaths, Path oldPath, boolean[] usedTransponders, boolean[] usedTranspondersOld)
protected void
setBatchArrivalTime(long time)
protected void
setBulkArrivalTime(long time)
void
setDoubleDumbParameter(double d)
protected void
setFlowArrivalTime(long time)
void
setIntDumbParameter(int i)
void
setStringDumbParameter(java.lang.String s)
protected void
statisticsSetup(PhysicalTopology pt, VirtualTopology vt, int numClasses, int minNumberArrivals)
Attributes initializer.protected void
subSNR()
protected void
subSNRSurplus(int modulation, double snr)
protected void
tableStatistics(int simType, double load)
protected java.lang.String
verboseStatistics(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
-