Skip to content

Feature/gsye 901#1915

Merged
hannesdiedrich merged 9 commits intomasterfrom
feature/GSYE-901
Mar 9, 2026
Merged

Feature/gsye 901#1915
hannesdiedrich merged 9 commits intomasterfrom
feature/GSYE-901

Conversation

@hannesdiedrich
Copy link
Member

Reason for the proposed changes

Please describe what we want to achieve and why.

Proposed changes

INTEGRATION_TESTS_BRANCH=master
GSY_FRAMEWORK_BRANCH=master
SCM_ENGINE_BRANCH=master

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 78.18182% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.14%. Comparing base (cd40ab1) to head (d68c0aa).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1915   +/-   ##
=======================================
  Coverage   71.13%   71.14%           
=======================================
  Files         149      149           
  Lines       14302    14309    +7     
  Branches     1889     1890    +1     
=======================================
+ Hits        10174    10180    +6     
- Misses       3589     3590    +1     
  Partials      539      539           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

… from electricity if the solver does not return a valid solution
condenser_temp_C: float,
heat_demand_kW: Optional[float],
electrical_demand_kW: Optional[float] = None,
heat_demand_kW: Optional[float] = None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand the None default value here. Does this method expect to work without heat demand as input ? I would expect not.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, then ignore this and the following comment

self,
source_temp_C: float,
condenser_temp_C: float,
heat_demand_kW: Optional[float] = None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to a previous comment, I think that heat demand should not be optional, because of this assertion later on:

assert heat_demand_kW is not None, "heat demand should be provided"

Comment on lines +266 to +268
if bought_energy_kWh < FLOATING_POINT_TOLERANCE:
self._hp_state.set_cop(time_slot, self._hp_state.get_cop(last_time_slot))
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my understanding, this means that if the heat pump did not buy any energy at all, then the COP value will be equal to the value of the last time slot ? This is a bit misleading in the graphs, since this is usually reported as 0 COP. Since we use the last slot COP though in case the COP model cannot calculate the COP for a specific heat demand, I agree to keep it because a non-zero last slot COP will be required in these cases.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you understand correctly.
It is indeed not ideal and the cop graphs look weird. Especially, if you compare the same simulation setup with different size of storages.
I had an alternative implemented, but did not push the changes:
If the Universal COP model is selected, we could still calculate a COP value here, because it does not need a traded energy value. This will lead to another if block here that checks for the COP model and if set to "Universal" we could calculate the COP value from the temperatures. If not, we return the latest value.
What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get your point for the alternative implementation but I would leave it as is in order to not further complicate the code for this cornercase. Thanks for the clarification!

Copy link
Member

@spyrostz spyrostz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a while, bit the PR is straightforward. LGTM

@hannesdiedrich hannesdiedrich merged commit ac144bf into master Mar 9, 2026
4 of 5 checks passed
@hannesdiedrich hannesdiedrich deleted the feature/GSYE-901 branch March 9, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants