From cb1b874f9f9dbca25035298d9e72026ae9727e77 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Wed, 12 Feb 2025 08:45:50 +0100 Subject: [PATCH 1/3] handle edge cases of thermal grid --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9070d22b39..6eb5eac45f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -173,6 +173,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 From f5d89b53e2689592d824db58a8e85a2a1f647b5c Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Wed, 12 Feb 2025 08:44:21 +0100 Subject: [PATCH 2/3] edge case continue heating till target temperature when surplus energy is dropping --- .../scala/edu/ie3/simona/model/thermal/ThermalGrid.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/edu/ie3/simona/model/thermal/ThermalGrid.scala b/src/main/scala/edu/ie3/simona/model/thermal/ThermalGrid.scala index c506e44cfd..6f253be704 100644 --- a/src/main/scala/edu/ie3/simona/model/thermal/ThermalGrid.scala +++ b/src/main/scala/edu/ie3/simona/model/thermal/ThermalGrid.scala @@ -228,11 +228,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) = From 526fb7875e00ef9f004548a99f9b1249b56a360f Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Mon, 17 Feb 2025 13:05:35 +0100 Subject: [PATCH 3/3] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd30d04150..3102301024 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -176,7 +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) +- Check for runningHp when handling infeed to thermalGrid [#1167](https://github.com/ie3-institute/simona/issues/1167) ## [3.0.0] - 2023-08-07