New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add ProfitOrLossReporter
to compute profit/loss of energy flows
#808
Conversation
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As with every new reporter, I'm looking forward to using this in production. I reviewed everything except the tests. My main issues are with naming of the output sensor (which is probably only a matter of internal aliases) and unit/sign validation.
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
… into feature/reporting/cost-reporter
CostReporter
to compute cashflows due to energy flowsProfitReporter
to compute cashflows due to energy flows
ProfitReporter
to compute cashflows due to energy flowsProfitReporter
to compute profit of energy flows
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
* add DataSource field to flexmeasures add report Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add new command to create basic sources for the available reporters. Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * Switch off HiGHS logs for `LOGGING_LEVEL=INFO` (#824) * add log toggling for HiGHS Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add changelog entry Signed-off-by: Victor Garcia Reolid <victor@seita.nl> --------- Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * rename command + add changelog Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * use for loop in flexmeasures add sources Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix: typo Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: make 'kind' choice singular, so it matches the key in data_generators Signed-off-by: F.N. Claessen <felix@seita.nl> * docs: add inline todo Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: get db from where we normally get it Signed-off-by: F.N. Claessen <felix@seita.nl> * style: black Signed-off-by: F.N. Claessen <felix@seita.nl> --------- Signed-off-by: Victor Garcia Reolid <victor@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> Co-authored-by: F.N. Claessen <felix@seita.nl>
…819) * add DataSource field to flexmeasures add report Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix: use source and make it an optional field Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * fix tests Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add test + fix case of multiple sources Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add new command to create basic sources for the available reporters. Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * set sensor in ouput bdf Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * set resolution Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * update docstring Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * add changelog entry Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * rename command + add changelog Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * allow passing multiple sources Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * extend changelog Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * clarify docstring Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * check sources Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * use for loop in flexmeasures add sources Signed-off-by: Victor Garcia Reolid <victor@seita.nl> --------- Signed-off-by: Victor Garcia Reolid <victor@seita.nl> Signed-off-by: Victor <victor@seita.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there. Very nice to see the boolean setting working so elegantly (without needing to have additional Reporter classes and duplicate code).
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
* fix: `highs` string is in `solve_name` using `in` Signed-off-by: Victor Garcia Reolid <victor@seita.nl> * chore: update changelog Signed-off-by: Victor Garcia Reolid <victor@seita.nl> --------- Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Fix two bugs dealing with public assets. * fix: public sensors have None owner Signed-off-by: F.N. Claessen <felix@seita.nl> * docs: changelog entry Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: searching for annotations on public assets Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: more explicit if-statement Signed-off-by: F.N. Claessen <felix@seita.nl> * docs: add second fix to changelog Signed-off-by: F.N. Claessen <felix@seita.nl> --------- Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: Victor <victor@seita.nl>
ProfitReporter
to compute profit of energy flowsProfitOrLossReporter
to compute profit/loss of energy flows
ProfitOrLossReporter
to compute profit/loss of energy flowsProfitOrLossReporter
to compute profit/loss of energy flows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Don't forget the changelog entry.
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
… into feature/reporting/cost-reporter
@@ -6,6 +6,12 @@ FlexMeasures Changelog | |||
v0.15.1 | August XX, 2023 | |||
============================ | |||
|
|||
New features |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Aye, you put this under 0.15.1 instead of 0.16.)
Description
This PR adds a new type of reporter:
ProfitReporter
. This reporter takes a production and consumption price and computes the cashflow given an energy or power sensor, applying the conversions required.How to test
You can find the tests in the following link:
fa7b2de#diff-5808e1304f6229bb4daae51719b6d9f17a8cd6469e4c3cf963366858c954f8b5
Further Improvements
This is reporter is going to show up in the coming tutorial for reporting.
TODO