Skip to content

Commit

Permalink
Merge branch 'dev' into df/#930-refactor-handleInfeed
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
danielfeismann committed Nov 1, 2024
2 parents b6c596f + f51a719 commit e1df392
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix scheduling at Evcs with more than one Ev at a time without Em [#787](https://github.com/ie3-institute/simona/issues/787)
- Fix CheckWindow duration [#921](https://github.com/ie3-institute/simona/issues/921)
- Fixed ThermalStorageResults having multiple entries [#924](https://github.com/ie3-institute/simona/issues/924)
- Fix filter for thermal result checking for lastTick not for currentTick [#1008](https://github.com/ie3-institute/simona/issues/1008)
- Refactoring of `ThermalGrid.handleInfeed` to fix thermal storage recharge correctly when empty [#930](https://github.com/ie3-institute/simona/issues/930)

## [3.0.0] - 2023-08-07
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ trait HpAgentFundamentals
)

val accompanyingResults = baseStateData.model.thermalGrid.results(
tick,
updatedState.tick,
updatedState.thermalGridState,
)(baseStateData.startDate)
val result = AccompaniedSimulationResult(power, accompanyingResults)
Expand Down Expand Up @@ -253,8 +253,8 @@ trait HpAgentFundamentals
relevantData,
)
val accompanyingResults = baseStateData.model.thermalGrid.results(
currentTick,
lastModelState.thermalGridState,
updatedState.tick,
updatedState.thermalGridState,
)(baseStateData.startDate)
val result = AccompaniedSimulationResult(power, accompanyingResults)

Expand Down
8 changes: 4 additions & 4 deletions src/main/scala/edu/ie3/simona/model/participant/HpModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ object HpModel {
* temperature.
*
* @param isRunning
* indicates if CHP is turned on
* @param lastTimeTick
* contains last time tick
* indicates if HP is turned on
* @param tick
* the time tick of the HpState
* @param ambientTemperature
* Optional ambient temperature, if available
* @param activePower
Expand All @@ -430,7 +430,7 @@ object HpModel {
*/
final case class HpState(
isRunning: Boolean,
lastTimeTick: Long,
tick: Long,
ambientTemperature: Option[Temperature],
activePower: Power,
qDot: Power,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ class HpAgentModelCalculationSpec
_,
HpState(
isRunning,
lastTimeTick,
tick,
_,
activePower,
qDot,
Expand All @@ -516,7 +516,7 @@ class HpAgentModelCalculationSpec
)
) =>
isRunning shouldBe false
lastTimeTick shouldBe 0L
tick shouldBe 0L
activePower should approximate(Kilowatts(0.0))
qDot should approximate(Kilowatts(0.0))

Expand Down Expand Up @@ -634,7 +634,7 @@ class HpAgentModelCalculationSpec
_,
HpState(
isRunning,
lastTimeTick,
tick,
_,
activePower,
qDot,
Expand All @@ -644,7 +644,7 @@ class HpAgentModelCalculationSpec
)
) =>
isRunning shouldBe false
lastTimeTick shouldBe 0L
tick shouldBe 0L
activePower should approximate(Kilowatts(0d))
qDot should approximate(Kilowatts(0d))

Expand Down

0 comments on commit e1df392

Please sign in to comment.