Hello, Philippe!
Such behavior of [StatisticsContinuous.mean(t)] is normal. The value of the parameter [t] must be greater or equal to
the time of the last update (last sample).
API Reference says:
[StatisticsContinuous.mean(t)] Returns the mean of the statistics at the given time assuming the last value added holds
until the given time, or 0 if no samples have been added.
The mean is calculated as integral of observed value divided to the difference between times of last and first samples.
[StatisticsContinuous.mean(t)] adds (t - timeOfLastSample) * valueOfLastSample to the integral (numerator) and,
respectively, (t - timeOfLastSample) to the denominator. As you can see, there is no sense in [t] being less than time
of the last sample. Typical usage of [StatisticsContinuous.mean(t)] is mean(time()), which assumes that the observed
variable did not change since the last update.
Below is the numeric example (I advise you to draw the time chart on a sheet of paper).
Assume your model is running and current model time is 5. In your model you have an instance of [StatisticsContinuous]
object, and it has the following samples: (0, 1), (2, 2), (4, 1) (it means that at model time = 0 the observed value was
equal to 1, then at time = 2 it changed to 2, and so on...). So, mean() would return (2 * 1 + 2 * 2) / 4 =1.5, mean(5)
would return (2 * 1 + 2 * 2 + 1 * 1) / 5 = 1.4, mean(10) would return (2 * 1 + 2 * 2 + 6 * 1) / 10 = 1.2.
In your case, you can just save mean values at certain moments and then perform any calculations you want. I hope such a
long post helped you solve your problem.

