open-simulation-platform / cosim-demo-app

Application demonstrating libcosim features
https://open-simulation-platform.github.io/libcosim
Mozilla Public License 2.0
17 stars 4 forks source link

Allow custom time window in plots #189

Open kyllingstad opened 3 years ago

kyllingstad commented 3 years ago

The visible time window in plots is limited to a discrete set of choices between 10 seconds and 20 minutes. This seems a bit arbitrary, and often not sufficient. If possible, we should allow users to set the length of the time window themselves, and "unlimited" ought to be an option (at least for the x–y plots).

SSkjong commented 3 years ago

It could be an idea to change the choices of seconds/minutes to numbers of sample points (length of data buffers). Also the choice of seconds/minutes does not scale with memory usage since it also depends on the macro time step size. Using the number of sample points is more generic since data from 20 min of simulation looking at electrical circuits, e.g. transformers and converters with time constants in the range of micro/nano seconds, is a lot compared to an offshore marine operation where 20 min is relatively low, and in the range of the time constants for the environmental conditions. Also, an additional feature/option regarding plotting could be to skip every X samples to save memory (and for keeping a longer history in the plot).