From a6b503184cd1b08b9fe9f25057d72c3f389fab24 Mon Sep 17 00:00:00 2001 From: danielfeismann Date: Wed, 21 Aug 2024 13:33:58 +0200 Subject: [PATCH] start fixing determineFlexOptions --- .../edu/ie3/simona/model/participant/HpModel.scala | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/scala/edu/ie3/simona/model/participant/HpModel.scala b/src/main/scala/edu/ie3/simona/model/participant/HpModel.scala index 0a18478d28..d78d3ffa07 100644 --- a/src/main/scala/edu/ie3/simona/model/participant/HpModel.scala +++ b/src/main/scala/edu/ie3/simona/model/participant/HpModel.scala @@ -282,9 +282,8 @@ final case class HpModel( /* Determine the options we have */ val ( thermalEnergyDemandHouse, - thermalEnergyDemandStorage, - // FIXME - thermalEnergyDemandWaterStorage, + thermalEnergyDemandHeatStorage, + thermalEnergyDemandDomesticHotWaterStorage, updatedThermalGridState, ) = thermalGrid.energyDemandAndUpdatedState( @@ -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)