Skip to content

Commit

Permalink
handle sonar code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfeismann committed Nov 14, 2024
1 parent 963670c commit bfd633b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/scala/edu/ie3/simona/model/thermal/ThermalGrid.scala
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ final case class ThermalGrid(
}

if (
(qDotHouseLastState > zeroKW && !(qDotStorageLastState < zeroKW)) | (qDotStorageLastState > zeroKW & heatStorageDemand)
(qDotHouseLastState >= zeroKW && !(qDotStorageLastState >= zeroKW)) | (qDotStorageLastState >= zeroKW & heatStorageDemand)
) {
val (updatedHouseState, thermalHouseThreshold, remainingQDotHouse) =
handleInfeedHouse(
Expand Down Expand Up @@ -486,14 +486,14 @@ final case class ThermalGrid(
}

/** Determines the most recent threshold of two given input thresholds
*
* @param maybeHouseThreshold
* Option of a possible next threshold of the thermal house
* @param maybeStorageThreshold
* Option of a possible next threshold of the thermal storage
* @return
* The next threshold
*/
*
* @param maybeHouseThreshold
* Option of a possible next threshold of the thermal house
* @param maybeStorageThreshold
* Option of a possible next threshold of the thermal storage
* @return
* The next threshold
*/

private def determineMostRecentThreshold(
maybeHouseThreshold: Option[ThermalThreshold],
Expand Down

0 comments on commit bfd633b

Please sign in to comment.