Utility
Class TimeSeriesTally

java.lang.Object
  |
  +--Utility.Tally
        |
        +--Utility.WeightedTally
              |
              +--Utility.TimeSeriesTally

public class TimeSeriesTally
extends WeightedTally

The TimeSeriesTally class is for calculating weighted time series statistics for a bunch of points.
Unfortunately, SimKit does not (yet) give the programmer access to either the current event or the current simulation time. This means that there is no method of providing a time weighted tally where the time weights are automatically calculated.

See Also:
Tally, WeightedTally

Field Summary
 
Fields inherited from class Utility.WeightedTally
fWeights
 
Fields inherited from class Utility.Tally
fCount, fDataPoints, fMax, fMin, fName, fSum, fSumSq, seperator, STORE_POINTS, SUMMARY_ONLY, WITH_HEADER, WO_HEADER
 
Constructor Summary
TimeSeriesTally()
           
 
Method Summary
 void reset()
          Remove all data points from the Tally.
 void update(double x)
          Add a data point to the tally.
 void update(double x, double currTime)
          Updates the statistics with the data item x with the weight calculated as the difference between the given time and the last given time point.
 
Methods inherited from class Utility.WeightedTally
average, outputPoints, outputSummary, stdDev, sumWeights, updateBatch, variance
 
Methods inherited from class Utility.Tally
count, isStoringPoints, max, min, sum, sumSq
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeSeriesTally

public TimeSeriesTally()
Method Detail

reset

public void reset()
Description copied from class: Tally
Remove all data points from the Tally.

Overrides:
reset in class WeightedTally

update

public void update(double x)
Add a data point to the tally. Assume that if no time is provided, that the new time is 1 unit greater than the previous time.

Overrides:
update in class WeightedTally
Parameters:
x - The value to add to the tally.

update

public void update(double x,
                   double currTime)
Updates the statistics with the data item x with the weight calculated as the difference between the given time and the last given time point. If there is no last given point, then 0.0 is used. This function is useful when doing a time weighted series. The point is just the simulation time at which the update is done.

Overrides:
update in class WeightedTally
Parameters:
x - The value to add to statistics
currTime - The current simulation time or some other value that can be interpreted as time (from an increasing sequence ...)