Skip to content

Commit

Permalink
start fixing determineFlexOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfeismann committed Aug 21, 2024
1 parent 49bb285 commit a6b5031
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/main/scala/edu/ie3/simona/model/participant/HpModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,8 @@ final case class HpModel(
/* Determine the options we have */
val (
thermalEnergyDemandHouse,
thermalEnergyDemandStorage,
// FIXME
thermalEnergyDemandWaterStorage,
thermalEnergyDemandHeatStorage,
thermalEnergyDemandDomesticHotWaterStorage,
updatedThermalGridState,
) =
thermalGrid.energyDemandAndUpdatedState(
Expand All @@ -295,11 +294,16 @@ final case class HpModel(
data.simulationStart,
data.houseInhabitants,
)

val canOperate =
thermalEnergyDemandHouse.hasRequiredDemand || thermalEnergyDemandHouse.hasAdditionalDemand ||
thermalEnergyDemandStorage.hasRequiredDemand || thermalEnergyDemandStorage.hasAdditionalDemand
thermalEnergyDemandHeatStorage.hasRequiredDemand || thermalEnergyDemandHeatStorage.hasAdditionalDemand ||
thermalEnergyDemandDomesticHotWaterStorage.hasRequiredDemand || thermalEnergyDemandDomesticHotWaterStorage.hasAdditionalDemand

val canBeOutOfOperation =
!thermalEnergyDemandHouse.hasRequiredDemand && !thermalEnergyDemandStorage.hasRequiredDemand
!thermalEnergyDemandHouse.hasRequiredDemand &&
!thermalEnergyDemandHeatStorage.hasRequiredDemand &&
!thermalEnergyDemandDomesticHotWaterStorage.hasRequiredDemand

val lowerBoundary =
if (canBeOutOfOperation)
Expand Down

0 comments on commit a6b5031

Please sign in to comment.