Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/df/#1167-handle-edg…
Browse files Browse the repository at this point in the history
…e-cases-of-thermal-grid' into df/#1176-heat-pump-targetTemp
  • Loading branch information
danielfeismann committed Feb 16, 2025
2 parents 86e6d23 + f5d89b5 commit 99313f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Rename `PrimaryDataWithApparentPower` to `PrimaryDataWithComplexPower` [#1140](https://github.com/ie3-institute/simona/issues/1140)
- Refactoring of `ThermalGrid.handleInfeed` to fix thermal storage recharge correctly when empty [#930](https://github.com/ie3-institute/simona/issues/930)
- Move `ScheduleServiceActivation` out of `RegistrationResponseMessage` [#1143](https://github.com/ie3-institute/simona/issues/1143)
- Handle edge cases of thermal grid [#1167](https://github.com/ie3-institute/simona/issues/1167)

## [3.0.0] - 2023-08-07

Expand Down
8 changes: 4 additions & 4 deletions src/main/scala/edu/ie3/simona/model/thermal/ThermalGrid.scala
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ final case class ThermalGrid(

// We can use the qDots from lastState to keep continuity. If...
if (
// ... house was heated in lastState but not from Storage and has still some demand.
((qDotHouseLastState > zeroKW && (qDotStorageLastState >= zeroKW) && thermalDemands.houseDemand.hasAdditionalDemand) ||
// ... house was heated in lastState but not from Storage and has still some demand. Hp must still run for this.
((qDotHouseLastState > zeroKW && (qDotStorageLastState >= zeroKW) && thermalDemands.houseDemand.hasAdditionalDemand) && isRunning ||
// ... storage was filled up in the lastState and has still additional demand
// But only if the house not reached some requiredDemand.
qDotStorageLastState > zeroKW && thermalDemands.heatStorageDemand.hasAdditionalDemand && !thermalDemands.houseDemand.hasRequiredDemand)
// But only if the house not reached some requiredDemand. Hp must still run for this.
qDotStorageLastState > zeroKW && thermalDemands.heatStorageDemand.hasAdditionalDemand && !thermalDemands.houseDemand.hasRequiredDemand && isRunning)
) {
// We can continue for the house
val (updatedHouseState, thermalHouseThreshold, remainingQDotHouse) =
Expand Down

0 comments on commit 99313f0

Please sign in to comment.