Package SimPy :: Module Recording :: Class Tally

[hide private]
[frames] | no frames]

# Class Tally

source code

Instance Methods | [hide private]

__init__(self, name=`'``a_Tally``'`, ylab=`'``y``'`, tlab=`'``t``'`, sim=None) | source code

setHistogram(self, name=`'````'`, low=0.0, high=100.0, nbins=10) Sets histogram parameters. | source code

observe(self, y, t=None) | source code

reset(self, t=None) | source code

count(self) | source code

total(self) | source code

mean(self) | source code

timeAverage(self, t=None) | source code

var(self) | source code

timeVariance(self, t=None) the time - weighted Variance of the Tallied variable. | source code

__len__(self) | source code

__eq__(self, l) | source code

getHistogram(self) | source code

printHistogram(self, fmt=`'``%s``'`) Returns formatted frequency distribution table string from Tally. | source code

Method Details | [hide private]

### setHistogram(self, name=`'````'`, low=0.0, high=100.0, nbins=10)

source code

Sets histogram parameters. Must be called to prior to observations initiate data collection for histogram.

### timeVariance(self, t=None)

source code

the time - weighted Variance of the Tallied variable.

If t is used it is assumed to be the current time, otherwise t = self.sim.now()

### printHistogram(self, fmt=`'``%s``'`)

source code

Returns formatted frequency distribution table string from Tally. Precondition: setHistogram must have been called. fmt == format of bin range values