Closed michaelpiron closed 9 months ago
For the sake of clarity: I didn't test these changes, as I don't have my dev space/container set up yet. I hope someone else can test this. On the other hand, the proposed changes are limited.
Attention: 2 lines
in your changes are missing coverage. Please review.
Comparison is base (
bec6f76
) 88.16% compared to head (d77c4f6
) 88.11%.
Files | Patch % | Lines |
---|---|---|
src/emhass/optimization.py | 60.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Implemented changes:
To resolve following issue:
While looking at the code in order to understand the functioning of EMHASS, I noticed an inconsistency in the objective formulas. The profit cost function shows this: https://github.com/davidusb-geek/emhass/blob/bec6f76f1d7795a1ab8730fb0a61f883e75caf0c/src/emhass/optimization.py#L196-L204 which looks correct, and is consistent with the EMHASS documentation:
However, the "grid cost" cost function seems to have the formulas inverted, which is unexpected: https://github.com/davidusb-geek/emhass/blob/bec6f76f1d7795a1ab8730fb0a61f883e75caf0c/src/emhass/optimization.py#L205-L211
Therefore, I wonder if the objective formulas in "Grid cost" cost function shouldn't be inverted.