Skip to content

Commit

Permalink
add stub for hot water source output file
Browse files Browse the repository at this point in the history
  • Loading branch information
shieldo committed Feb 26, 2025
1 parent 5ede750 commit 283460c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ extern crate is_close;
use crate::core::heating_systems::elec_storage_heater::StorageHeaterDetailedResult;
use crate::core::heating_systems::emitters::EmittersDetailedResult;
use crate::core::heating_systems::heat_pump::{ResultsAnnual, ResultsPerTimestep};
use crate::core::heating_systems::storage_tank::StorageTankDetailedResult;
use crate::core::space_heat_demand::ventilation::VentilationDetailedResult;
use crate::core::units::{convert_profile_to_daily, WATTS_PER_KILOWATT};
pub use crate::corpus::RunResults;
Expand Down Expand Up @@ -286,6 +287,7 @@ pub fn run_project(
storage_from_grid,
battery_state_of_charge,
esh_output_dict,
hot_water_source_results_dict,
..
},
..
Expand Down Expand Up @@ -339,6 +341,10 @@ pub fn run_project(
// Function call to write detailed ventilation results
let vent_output_file = "ventilation_results";
write_core_output_file_ventilation_detailed(output, vent_output_file, vent_output_list)?;
for (hot_water_source_name, hot_water_source_results) in hot_water_source_results_dict.iter() {
let hot_water_source_file = format!("results_hot_water_source_summary__{}", hot_water_source_name.replace(" ", "_"));
write_core_output_file_hot_water_source_summary(output, &hot_water_source_file, hot_water_source_results);
}
}

write_core_output_file_summary(output, results.try_into()?)?;
Expand Down Expand Up @@ -1929,6 +1935,14 @@ fn write_core_output_file_ventilation_detailed(
Ok(())
}

fn write_core_output_file_hot_water_source_summary(
_output: &impl Output,
_output_file: &str,
_hot_water_source_results: &[StorageTankDetailedResult],
) {
// TODO complete when hot water source results defined
}

const HOURS_TO_END_JAN: f64 = 744.;
const HOURS_TO_END_FEB: f64 = 1416.;
const HOURS_TO_END_MAR: f64 = 2160.;
Expand Down

0 comments on commit 283460c

Please sign in to comment.