Source files: src/MemSys/stat.c
Header files: incl/MemSys/simsys.h
The detailed set of statistics is printed on simulation output at the end of each phase and at the end of the simulation; a concise summary of the most important statistics is provided on the simulation standard error. The types of statistics and the utilities for processing these statistics are described in Chapter 6.
Some of the statistics are kept track of by simple counters, but most of these statistics are computed using the STATREC functions of YACSIM [8]. The key functions used are:
Returns a new statistics record with the specified name and type (POINT or INTERVAL). A POINT statistics record uses the weight passed in through StatrecUpdate for the weight of each sample, whereas an INTERVAL statistics record uses the difference between the weight parameter for the current sample and the weight parameter for the previous sample as the actual weight of the current sample. The most common way to use an INTERVAL statistics record is to pass in the current simulation time as the weight parameter. In this way, the weight of the sample being passed in is the length of time since the last call to StatrecUpdate for this record.
means (can be set to MEANS or NOMEANS) indicates whether or not this statistics record should calculate mean and standard deviation. hist (can be set to HIST or NOHIST) indicates whether or not a histogram should be generated and reported for this record. (RSIM has also added the value HISTSPECIAL, which indicates that a histogram should be generated, but only those bins with a non-zero number of entries should be displayed when reporting statistics.) If a histogram is used, it will have numbins primary bins, equally distributed with values from lowbin to highbin. There will also be overflow bins provided.
Clears out the statistics recorded in s
Adds the value val into the statistics record with a weight parameter of wt
Prints a report of the mean, standard deviation, high, low, sample count, and histogram of the STATREC on the simulation output (mean, standard deviation, and histogram provided only if thus configured when calling NewStatrec).
Returns number of samples recorded
Returns the mean of the samples
Returns the sum of the samples
Returns the standard deviation of the samples