Skip to content

Commit

Permalink
Revert "adapt condition for hasAdditionalDemand"
Browse files Browse the repository at this point in the history
This reverts commit 441dfdb.
  • Loading branch information
danielfeismann committed Aug 21, 2024
1 parent 441dfdb commit b07c1f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ object ThermalGrid {

def hasRequiredDemand: Boolean = required > zeroMWH

def hasAdditionalDemand: Boolean = possible > zeroMWH
def hasAdditionalDemand: Boolean = possible > required
}
object ThermalEnergyDemand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ class ThermalGridSpec extends UnitSpec {
}

"checking for required and additional demand" should {
"return proper information, if no required and no additional demand is apparent" in {
val required = MegawattHours(0d)
val possible = MegawattHours(0d)

val energyDemand = ThermalEnergyDemand(required, possible)
energyDemand.hasRequiredDemand shouldBe false
energyDemand.hasAdditionalDemand shouldBe false
}

"return proper information, if no required but additional demand is apparent" in {
val required = MegawattHours(0d)
val possible = MegawattHours(45d)
Expand All @@ -71,7 +62,7 @@ class ThermalGridSpec extends UnitSpec {

"return proper information, if required but no additional demand is apparent" in {
val required = MegawattHours(45d)
val possible = MegawattHours(0d)
val possible = MegawattHours(45d)

val energyDemand = ThermalEnergyDemand(required, possible)
energyDemand.hasRequiredDemand shouldBe true
Expand Down

0 comments on commit b07c1f8

Please sign in to comment.