For both the time_agg
and the net_agg
members of a stat,
the following aggregation operators are defined:
LAST
SUM
PROD
MIN
MAX
AVG
COPY
copy_vals
group of the stat. Thus, it does not form a single
summary number of all the values, instead it simply copies them
verbatim. This is useful for MonitorStat objects, which copy state
variables from the network. It can be used to view per-event values at
the end of the epoch by doing a time_agg
with the COPY
operator.
COUNT
count
field of the agg member. The count
expression has relational operators and a comparison value, so one could
for example count the number of times an error value was below some
threshold.
In addition to the aggregation operator, the time_agg
member has
a pointer to the stat that this stat is aggregating from
. If
this is NULL
, then the stat is computing original information
instead of aggregating.
It is possible to control when the stat is computed, and if the data is
logged, independently. The mod
member of a stat determines when
and if it is computed (and when its criterion is checked, when it is
logged, etc). For stats located in the loop_stats
group, this
mod operator works on the process whose loop_stats the stat is in. For
stats located in the final_stats
group, the mod operator works on
the next higher up process in the hierarchy (i.e., a stat in the
final_stats of a TrialProcess would use the trial counter from the
parent EpochProcess). The log_stat
flag provides a way of
turning on or off the logging of a statistic. If the flag is not
checked, a stat is not logged, but it is run and its criterion is
checked (as per the mod settings). Thus, one can keep lower-level stats
which might be just collecting data for aggregation from generating too
much log data.
Finally, the computation of the stat over the objects in the network can
be restricted to a given layer by setting the layer
pointer. The
layer name will also appear in the stat log output and in the name field
of the stat itself.