function TallyUpdate input Real newvalue "new value to update"; input Integer PLV "pointer to last value"; input Integer PM "pointer to mean value"; input Integer PMin "pointer to minimum value"; input Integer PMax "pointer to maximum value"; input Integer PObs "pointer to observations value"; input Real t "current simulation time"; output Integer out; end TallyUpdate;