flexmeasures icon indicating copy to clipboard operation
flexmeasures copied to clipboard

[reporting] Convert the units of the input data to a target unit.

Open victorgarcia98 opened this issue 10 months ago • 1 comments

Description

In order to make reporters more reusable, we need to get the data in a known unit. For example, if we want to have a reporter to compute the P&L, we need the units to work out, for example:

P&L [EUR] = Price [EUR/MWh] x Energy [MWh]

Before, we expect the sensors to have certain units which made the reporter unusable for sensors with equivalent (but different) units. Moreover, I hope this new feature helps to improve the readability of reporter configurations.


  • [X] I agree to contribute to the project under Apache 2 License.
  • [X] To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures

victorgarcia98 avatar Apr 24 '24 22:04 victorgarcia98

Indeed, this PR lacked a test. Other than that, I also added the changelog entry.

victorgarcia98 avatar Apr 29 '24 17:04 victorgarcia98

Added the unit conversion from in the output stage. Please, let me know what you think. :D

victorgarcia98 avatar May 22 '24 22:05 victorgarcia98