Fixed external load hours forecast strategy, the current implementati…#1554
Merged
Fixed external load hours forecast strategy, the current implementati…#1554
Conversation
…on was failing due to the fact that the energy tracking of the load hours energy parameters was still partially active and was trying to decrease the operating hours of the strategy without being activated.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1554 +/- ##
==========================================
- Coverage 67.89% 67.86% -0.03%
==========================================
Files 129 129
Lines 12610 12611 +1
Branches 1884 1884
==========================================
- Hits 8562 8559 -3
- Misses 3586 3590 +4
Partials 462 462 |
hannesdiedrich
approved these changes
Oct 20, 2022
Member
hannesdiedrich
left a comment
There was a problem hiding this comment.
Wow! Indeed tricky one. Thanks a lot!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…on was failing due to the fact that the energy tracking of the load hours energy parameters was still partially active and was trying to decrease the operating hours of the strategy without being activated.
Reason for the proposed changes
This was revealed while implementing this PR gridsingularity/gsy-e-sdk#234, the CI failed for no apparent reason. After debugging the integration tests, pinpointed the root cause to the gsy-e failing due to this error:
The forecast strategy was trying to decrease the hours_per_day parameter, which is not supported in the forecast strategy (essentially the forecast strategy uses forecasts to track the energy and not a constant value). The only reason why we still have this strategy exposed to the user is in order to maintain the ability of a user to use the template strategy, and switch to forecasts only when the SDK connects to it.
Proposed changes
This change overrides the decrease of the hours_per_day parameter for the forecast strategy with an empty implementation. That way the forecasts will be used instead of the hours per day parameter.
Note for the future, try to minimise the use of this strategy in favor of the
LoadProfileForecastExternalStrategy(which is the only one used by GSy Maps ATM).INTEGRATION_TESTS_BRANCH=master
GSY_FRAMEWORK_BRANCH=master