|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.stat.StatProbe
umontreal.iro.lecuyer.stat.Tally
umontreal.iro.lecuyer.stat.TallyWithMovingWindow
public class TallyWithMovingWindow
Represents a tally with a moving window of fixed length. Usually, a tally counts the observations from the time it is initialized to the current time. This tally can be used to collect observations during a moving time window divided in P successive intervals of fixed duration d. This tally defines P internal tallies collecting period-specific observations. When an observation is given to this tally, it is added into the current tally which is changed by a simulation event happening every d time units. After the Pth period, the first tally becomes the current tally again, and its observations are lost.
This tally can be used as a usual tally, except start()
must be
called at the simulation time corresponding to the beginning of the first
collecting period.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.stat.Tally |
---|
confidenceInterval, digits, level |
Fields inherited from class umontreal.iro.lecuyer.stat.StatProbe |
---|
broadcast, collect, maxValue, minValue, name, showNobs, sumValue |
Constructor Summary | |
---|---|
TallyWithMovingWindow(boolean keepObs,
int numCollectingPeriods,
double collectingPeriodDuration,
double endingTime)
Constructs a new tally with moving window using numCollectingPeriods of duration collectingPeriodDuration, and with simulation ending at endingTime. |
|
TallyWithMovingWindow(String name,
boolean keepObs,
int numCollectingPeriods,
double collectingPeriodDuration,
double endingTime)
Constructs a new tally with moving window with name name, using numCollectingPeriods of duration collectingPeriodDuration, and with simulation ending at endingTime. |
Method Summary | |
---|---|
void |
add(double x)
|
double |
average()
|
TallyWithMovingWindow |
clone()
Clones this tally as well as the internal tallies. |
double |
getCollectingPeriodDuration()
Returns the duration of the collecting periods. |
int |
getNumCollectingPeriods()
Returns the number of collecting periods. |
Tally |
getTally(int i)
Returns the ith internal tally. |
void |
init()
Initializes this tally as well as all internal tallies. |
double |
max()
|
double |
min()
|
int |
numberObs()
|
void |
start()
Starts this tally with moving window by scheduling the first period-changing event. |
void |
stop()
Stops this tally with moving average by cancelling the currently scheduled period-changing event. |
double |
variance()
Computes and returns the sample variance of the observations in the moving window. |
Methods inherited from class umontreal.iro.lecuyer.stat.Tally |
---|
confidenceIntervalNormal, confidenceIntervalStudent, confidenceIntervalVarianceChi2, formatCINormal, formatCINormal, formatCIStudent, formatCIStudent, formatCIVarianceChi2, getConfidenceLevel, report, report, reportAndCIStudent, reportAndCIStudent, setConfidenceIntervalNone, setConfidenceIntervalNormal, setConfidenceIntervalStudent, setConfidenceLevel, setShowNumberObs, shortReport, shortReportHeader, standardDeviation |
Methods inherited from class umontreal.iro.lecuyer.stat.StatProbe |
---|
addObservationListener, clearObservationListeners, getName, isBroadcasting, isCollecting, notifyListeners, removeObservationListener, report, report, setBroadcasting, setCollecting, setName, sum |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TallyWithMovingWindow(boolean keepObs, int numCollectingPeriods, double collectingPeriodDuration, double endingTime)
keepObs
- determines if the internal tallies can keep observations.numCollectingPeriods
- the number of collecting periods.collectingPeriodDuration
- the duration of a collecting period.endingTime
- the ending time of the simulation.public TallyWithMovingWindow(String name, boolean keepObs, int numCollectingPeriods, double collectingPeriodDuration, double endingTime)
name
- the name of the tally.keepObs
- determines if the internal tallies can keep observations.numCollectingPeriods
- the number of collecting periods.collectingPeriodDuration
- the duration of a collecting period.endingTime
- the ending time of the simulation.Method Detail |
---|
public Tally getTally(int i)
i
- the index of the internal tally.
public int getNumCollectingPeriods()
public double getCollectingPeriodDuration()
public void init()
init
in class Tally
public void start()
public void stop()
public void add(double x)
add
in class Tally
public double average()
average
in class Tally
public TallyWithMovingWindow clone()
clone
in class Tally
public int numberObs()
numberObs
in class Tally
public double variance()
variance
in class Tally
public double max()
max
in class StatProbe
public double min()
min
in class StatProbe
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |