question

martin.j avatar image
0 Likes"
martin.j asked Jordan Johnson commented

Statistics displayed as Sliding Frame

Is it possible with the new statistics collector to create a sliding frame timeplot to show data from a statistics collector for only the past hour or past day?

When running a model for an extended period of time, showing time plots and seeing any discernible trends becomes rather difficult as the number of datapoints fill the same graph. In order to analyse data and see trends as the model runs it would be better to simply see a frame of the latest data - The past hour for instance. I cant seem to find a way to set up such a thing in the graphs.

I suppose it might be possible to delete old data from the statistics collector, but that might also affect averages and data calculation.

Is there a way to display only a subset of the data in a statistics collector?

B.T.W is there a class reference for the StatisticsCollector class and its collectedData property?

statistics collectorchartsstatistical analysis
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Jordan Johnson commented

One way to do it would be to have a Calculated Table with a query like this:

  1. SELECT * FROM MyStatisticsCollector
  2. WHERE Time > (Model.dateTime - DateTime.hours(1))

This would get the last hour of the Statistics Collector (theoretically; I haven't actually tried this, and assuming you are tracking time data). If you set the Update Mode to Always, it will show what you want. However, as long as that chart is begin painted, you will be re-running the query, so that might be slow. Consider using an update interval instead.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.