Tracked Variable line plot does not work with kinetic variables

Tracked Variable line plot does not work with kinetic variables

sean_tully
Contributor Contributor
209 Views
2 Replies
Message 1 of 3

Tracked Variable line plot does not work with kinetic variables

sean_tully
Contributor
Contributor

I am modelling a water storage tank and am using a kinetic variable, storageVolume, to model tank volume (and net inflow). I don't set the volume directly, I'm only modifying storageVolume.rate in my scripts. If I put a Tracked Variable Table on the dashboard, I can see that the volume is correctly updated as the rate is changed, but if I put a Tracked Variable Line plot on the dashboard, it does not register any points.

As a quick hack, after I modify storageVolume.rate, I can do something like this:

storageVolume.value += 0.0001;

storageVolume.value -= 0.0001;

The above will make the plot work, whilst doing storageVolume.value = storageVolume.value will not.

This feels hacky - is there a better approach?

On a related topic, how can I generate a line plot of storageVolume.rate?

 

0 Likes
Accepted solutions (1)
210 Views
2 Replies
Replies (2)
Message 2 of 3

FelixMoehlmann
Collaborator
Collaborator
Accepted solution

Install the chart components (Advanced tab in the chart properties). In the Statistics Collector that will now be accessible in the toolbox set the "Change Rule" to "Update".

moehlmann_fe_0-1766137697079.png

 

To track the rate you can use a copy of the same Statistics Collector and just change the expression for the value column to use the rate property.

moehlmann_fe_1-1766137771148.png

 

0 Likes
Message 3 of 3

sean_tully
Contributor
Contributor

Thanks - that worked perfectly. 

0 Likes