Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfeismann committed Nov 26, 2024
1 parent 0adc6c9 commit 1586bd3
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/main/scala/edu/ie3/simona/model/thermal/ThermalGrid.scala
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ final case class ThermalGrid(
)
}
// Handle edge case where house was heated from storage and HP will be activated in between
else if ((qDotHouseLastState > zeroKW && qDotStorageLastState < zeroKW)) {
else if (qDotHouseLastState > zeroKW && qDotStorageLastState < zeroKW) {
if (isRunning) {
handleCases(
tick,
Expand All @@ -299,7 +299,7 @@ final case class ThermalGrid(
}
}
// Handle edge case where house should be heated from storage
else if ((!isRunning && qDot > zeroKW)) {
else if (!isRunning && qDot > zeroKW) {
handleCases(
tick,
lastAmbientTemperature,
Expand All @@ -308,7 +308,15 @@ final case class ThermalGrid(
qDot,
-qDot,
)
} else handleFinaleInfeedCases(thermalDemands, tick, lastAmbientTemperature, ambientTemperature, state, qDot)
} else
handleFinaleInfeedCases(
thermalDemands,
tick,
lastAmbientTemperature,
ambientTemperature,
state,
qDot,
)
}

/** Handles the last cases of [[ThermalGrid.handleInfeed]], where the thermal
Expand Down Expand Up @@ -342,14 +350,14 @@ final case class ThermalGrid(
* | 4 | if(!house.reqD && house.addD && !storage.reqD && !storage.addD) => house | house |
* | 5 | if(all == false) => no output | no output |
*/
def handleFinaleInfeedCases(
private def handleFinaleInfeedCases(
thermalDemands: ThermalDemandWrapper,
tick: Long,
lastAmbientTemperature: Temperature,
ambientTemperature: Temperature,
state: ThermalGridState,
qDot: Power,
) = {
): (ThermalGridState, Option[ThermalThreshold]) = {
(
thermalDemands.houseDemand.hasRequiredDemand,
thermalDemands.houseDemand.hasAdditionalDemand,
Expand Down

0 comments on commit 1586bd3

Please sign in to comment.