Skip to content

Commit

Permalink
complete instance of memoisation in boiler module
Browse files Browse the repository at this point in the history
  • Loading branch information
shieldo committed Apr 26, 2024
1 parent a22df8e commit ca9f2b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/heating_systems/boiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit ca9f2b3

Please sign in to comment.