Skip to content
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

Refactoring of ThermalGrid.handleInfeed to fix thermal storage recharge correctly when empty #931

Merged
merged 105 commits into from
Feb 6, 2025

Conversation

danielfeismann
Copy link
Member

@danielfeismann danielfeismann commented Aug 24, 2024

resolves #930

merge #1052 and #1046 and #1128 first

…neState-of-ThermalHouse' into df/tmpHPmergeall
…ageResults-have-multiple-entries' into df/tmpHPmergeall

# Conflicts:
#	CHANGELOG.md
…ion-of-Hp-when-not-under-control-of-an-EM' into df/tmpHPmergeall

# Conflicts:
#	CHANGELOG.md
…ermalGird-energyDemand' into df/tmpHPmergeall
@danielfeismann danielfeismann self-assigned this Aug 24, 2024
@danielfeismann danielfeismann added the bug Something isn't working label Aug 24, 2024
danielfeismann and others added 17 commits August 29, 2024 14:40
# Conflicts:
#	CHANGELOG.md
#	src/main/scala/edu/ie3/simona/model/thermal/ThermalGrid.scala
# Conflicts:
#	CHANGELOG.md
#	src/main/scala/edu/ie3/simona/model/thermal/ThermalGrid.scala
@danielfeismann danielfeismann marked this pull request as ready for review November 14, 2024 14:18
Copy link
Member

@sebastian-peter sebastian-peter left a comment

Choose a reason for hiding this comment

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

I simplified the infeed cases, please have a look. Besides that, I have some last requests before merging this...

Comment on lines 239 to 246
(zeroKW, lastStateStorageQDot * (-1))
else if (
lastStateStorageQDot == zeroKW && (demandWrapper.houseDemand.hasRequiredDemand || demandWrapper.heatStorageDemand.hasRequiredDemand)
)
(
zeroKW,
thermalGrid.storage.map(_.getChargingPower: squants.Power).get,
)
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding this large amount of commentary to the code! I have only two more places with "additional documentation demand" ;)

About storages: I guess one could argue about the required demand for empty storage (what if it's filled with a mWh of energy - there'd be no required demand). But, I'd suggest to just document the way this is currently implemented. Maybe it makes sense to enhance the documentation of ThermalDemandWrapper.heatStorageDemand in that regard?

Furthermore, ScalaDoc for ThermalStorageState would be great. Questions about the sign/direction of its qDot would be solved then.

danielfeismann and others added 2 commits February 5, 2025 20:37
Signed-off-by: Sebastian Peter <sebastian.peter@tu-dortmund.de>
Copy link
Member

@sebastian-peter sebastian-peter left a comment

Choose a reason for hiding this comment

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

Thanks, that's very much good enough now :)

@sebastian-peter sebastian-peter merged commit 5f018a3 into dev Feb 6, 2025
4 checks passed
@sebastian-peter sebastian-peter deleted the df/#930-refactor-handleInfeed branch February 6, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor ThermalGrid.handleInfeed
2 participants