flexmeasures
flexmeasures copied to clipboard
[reporting] Convert the units of the input data to a target unit.
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
Indeed, this PR lacked a test. Other than that, I also added the changelog entry.
Added the unit conversion from in the output stage. Please, let me know what you think. :D