An actor to compute the average of the input values received so far over model
time. This actor can fire whenever there is a token at its input port, or the
model time has advanced since last firing. It records the last token that it
received. In each firing, the produce of the last token and the amount of model
time increment is added to a sum variable. The average value received so far is
obtained by dividing the sum by the current model time. This average is sent to
the output port in each firing. If a token is available at the input port, this
actor reads that token and overwrites the last token with it.
tfeng
$Id: AverageOverTime.java 70398 2014-10-22 23:44:32Z cxh $
Ptolemy II 8.0
Yellow (tfeng)
Red (tfeng)