From ca9f2b387df76fe873dd4ef0b5233b5d47211ef0 Mon Sep 17 00:00:00 2001 From: Douglas Greenshields Date: Fri, 26 Apr 2024 14:31:16 +0100 Subject: [PATCH] complete instance of memoisation in boiler module --- src/core/heating_systems/boiler.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/heating_systems/boiler.rs b/src/core/heating_systems/boiler.rs index 3e4510f..afd17d5 100644 --- a/src/core/heating_systems/boiler.rs +++ b/src/core/heating_systems/boiler.rs @@ -136,7 +136,7 @@ impl BoilerServiceWaterCombi { ) } - fn boiler_combi_loss(&self, energy_demand: f64, timestep: f64) -> f64 { + fn boiler_combi_loss(&mut self, energy_demand: f64, timestep: f64) -> f64 { // daily hot water usage factor let threshold_volume = 100.; let fu = if self.daily_hot_water_usage < threshold_volume { @@ -186,7 +186,7 @@ impl BoilerServiceWaterCombi { } }; - // TODO account for the weird memoisation of the combi_loss in the Python + self.combi_loss = combi_loss; combi_loss }