cosim-demo-app icon indicating copy to clipboard operation
cosim-demo-app copied to clipboard

Flickering data on plots [client]

Open cesarcarc opened this issue 5 years ago • 3 comments

Action 1:

  • Load House demo
  • Let it run for sometime (simulation running faster than real time)
  • Create a new plot (time series) and add all the outputs from "Temp Controller"

Result 1: image

Data flickers as seen in the image above. Issue is quite frequent. Almost every other second. Could it be because the values are constant?

cesarcarc avatar Apr 24 '20 08:04 cesarcarc

I am not sure it is connected, but I have observed (after I have reported the issue above) that the RTF jumps to very small values every now and then.

image

I believe the large amount of data that is being sent from the server side is causing this issue.

cesarcarc avatar Apr 24 '20 08:04 cesarcarc

This is caused by two threads interacting with the same data source simultaneously:

  • libcosim inserts data (fast)
  • the server extracts data (slow)

For each cycle of the trend loop, for each trended variable, the server figures out for which timespan to extract data for, extracts the data, changes its format and then stores it. In-between each of these steps libcosim may store a multitude of values for the next variable to extract data for.

A solution could be to block the propagation of the simulation while the server's trend loop collects data, but this would prioritize getting trend data over driving the simulation forwards.

eidekrist avatar Jun 02 '20 14:06 eidekrist

I am not sure it is connected, but I have observed (after I have reported the issue above) that the RTF jumps to very small values every now and then.

It can certainly be provoked by extracting large amounts of trend data, but the root cause is something else.

eidekrist avatar Jun 02 '20 19:06 eidekrist