average

float TPT.average(timed_float expr)

This function returns the mean average value (arithmetic mean) of the timed expression expr(t) over all time steps within the current context interval. If the expression expr(t) is undefined at a time t, this value will be skipped in computation. If the expression expr(t) is undefined for all points in time in the current context interval a runtime exception will be raised.

Parameters:

expr The arithmetic mean value will be calculated for this timed float expression

Returns:

Mean average value of the numeric expression

Examples:

   res = TPT.DoubleX();   
   res := TPT.average(2 * t);   
   # res == this.getLength() length of time interval