diff --git a/src/core/ductwork.rs b/src/core/ductwork.rs index fdff3b4..abb13b8 100644 --- a/src/core/ductwork.rs +++ b/src/core/ductwork.rs @@ -1,5 +1,4 @@ use crate::input::MVHRLocation; -use std::error::Error; use std::f64::consts::PI; // Set default value for the heat transfer coefficient inside the duct, in W / m^2 K diff --git a/src/core/energy_supply/energy_supply.rs b/src/core/energy_supply/energy_supply.rs index 1c4b3a6..1976968 100644 --- a/src/core/energy_supply/energy_supply.rs +++ b/src/core/energy_supply/energy_supply.rs @@ -2,7 +2,6 @@ use crate::input::{ ElectricBattery, EnergyDiverter, EnergySupplyDetails, EnergySupplyInput, EnergySupplyType, HeatNetwork, }; -use crate::simulation_time::SimulationTimeIterator; use std::collections::HashMap; // a slightly looser definition of an energy supply that includes heat networks @@ -230,7 +229,7 @@ fn supply_from_details( mod test { use super::*; use crate::input::EnergySupplyType::MainsGas; - use crate::simulation_time::SimulationTime; + use crate::simulation_time::{SimulationTime, SimulationTimeIterator}; use rstest::*; #[fixture] diff --git a/src/core/heating_systems/boiler.rs b/src/core/heating_systems/boiler.rs index 680c595..133f09a 100644 --- a/src/core/heating_systems/boiler.rs +++ b/src/core/heating_systems/boiler.rs @@ -12,7 +12,7 @@ use crate::{ use std::fmt; use std::sync::Arc; -enum ServiceType { +pub enum ServiceType { WaterCombi, WaterRegular, Space, diff --git a/src/core/heating_systems/common.rs b/src/core/heating_systems/common.rs index a1038d1..a405a55 100644 --- a/src/core/heating_systems/common.rs +++ b/src/core/heating_systems/common.rs @@ -48,7 +48,7 @@ impl SpaceHeatSystem { simulation_time_iteration: SimulationTimeIteration, ) -> (f64, f64) { match self { - SpaceHeatSystem::Instant(instant) => unreachable!(), // it isn't expected that this will be called on instant heaters + SpaceHeatSystem::Instant(_instant) => unreachable!(), // it isn't expected that this will be called on instant heaters SpaceHeatSystem::WarmAir(warm_air) => warm_air.running_time_throughput_factor( energy_demand, space_heat_running_time_cumulative, diff --git a/src/core/heating_systems/heat_network.rs b/src/core/heating_systems/heat_network.rs index 2d3792b..f0f4118 100644 --- a/src/core/heating_systems/heat_network.rs +++ b/src/core/heating_systems/heat_network.rs @@ -2,7 +2,6 @@ use crate::core::common::WaterSourceWithTemperature; use crate::core::controls::time_control::{per_control, Control, ControlBehaviour}; use crate::core::material_properties::WATER; use crate::core::units::{HOURS_PER_DAY, WATTS_PER_KILOWATT}; -use crate::core::water_heat_demand::cold_water_source::ColdWaterSource; use crate::simulation_time::SimulationTimeIteration; use parking_lot::Mutex; use std::sync::Arc; @@ -318,6 +317,7 @@ impl HeatNetwork { mod tests { use super::*; use crate::core::controls::time_control::SetpointTimeControl; + use crate::core::water_heat_demand::cold_water_source::ColdWaterSource; use crate::simulation_time::SimulationTime; use rstest::*; diff --git a/src/core/heating_systems/heat_pump.rs b/src/core/heating_systems/heat_pump.rs index 7c5fab0..f091dc8 100644 --- a/src/core/heating_systems/heat_pump.rs +++ b/src/core/heating_systems/heat_pump.rs @@ -15,13 +15,11 @@ use itertools::Itertools; use ordered_float::OrderedFloat; use parking_lot::Mutex; use polyfit_rs::polyfit_rs::polyfit; -use serde::Deserialize; use serde_enum_str::Serialize_enum_str; use std::collections::HashMap; -use std::hash::Hash; use std::iter::Sum; use std::ops::{Add, Div}; -use std::sync::{Arc, MutexGuard, PoisonError}; +use std::sync::Arc; /// This module provides objects to represent heat pumps and heat pump test data. /// The calculations are based on the DAHPSE method developed for generating PCDB @@ -62,7 +60,7 @@ impl HeatPumpSourceType { } #[derive(Copy, Clone, Serialize_enum_str)] -enum ServiceType { +pub enum ServiceType { Water, Space, } @@ -133,7 +131,7 @@ fn interpolate_exhaust_air_heat_pump_test_data( fixed_temps_and_test_letters = Some(fixed_temps_and_test_letters_this); } Some(ref fixed_temps_and_test_letters) => { - if (fixed_temps_and_test_letters != &fixed_temps_and_test_letters_this) { + if fixed_temps_and_test_letters != &fixed_temps_and_test_letters_this { return Err("In heat pump test data, fixed temps and test_letters were not consistent for one air_flow_temp value".to_string()); } } @@ -211,7 +209,7 @@ fn test_letter(letter: &str) -> TestLetter { #[derive(Derivative)] #[derivative(PartialEq, Debug)] -struct TestDatumTempsAndTestLetters<'a> { +pub struct TestDatumTempsAndTestLetters<'a> { #[derivative(PartialEq = "ignore")] // we need to ignore air flow rate when performing comparisons pub air_flow_rate: f64, @@ -223,7 +221,7 @@ struct TestDatumTempsAndTestLetters<'a> { } #[derive(Copy, Clone, Debug, PartialEq)] -struct CompleteHeatPumpTestDatum { +pub struct CompleteHeatPumpTestDatum { pub air_flow_rate: Option, pub test_letter: TestLetter, pub capacity: f64, @@ -249,7 +247,7 @@ impl CompleteHeatPumpTestDatum { } } -enum DatumItem { +pub enum DatumItem { CarnotCop, TempOutlet, TempSource, @@ -330,9 +328,7 @@ impl HeatPumpTestData { if !dsgn_flow_temps.contains(&dsgn_flow_temp) { dsgn_flow_temps.push(dsgn_flow_temp); } - test_data - .entry(dsgn_flow_temp) - .or_insert_with(|| Default::default()); + test_data.entry(dsgn_flow_temp).or_default(); } let mut duplicate = false; @@ -444,9 +440,9 @@ impl HeatPumpTestData { let temp_source = celsius_to_kelvin(datum.temp_source); let temp_outlet = celsius_to_kelvin(datum.temp_outlet); - let theoretical_load_ratio = ((carnot_cops[i] / carnot_cop_cld) + let theoretical_load_ratio = (carnot_cops[i] / carnot_cop_cld) * (temp_outlet_cld * temp_source / (temp_source_cld * temp_outlet)) - .powf(N_EXER)); + .powf(N_EXER); acc.push(theoretical_load_ratio); acc }); @@ -1975,13 +1971,11 @@ impl HeatPump { if temp_output > temp_limit_upper { if temp_output == temp_used_for_scaling { energy_output_required + } else if (temp_limit_upper - temp_used_for_scaling) >= self.temp_diff_flow_return_min { + energy_output_required * (temp_limit_upper - temp_used_for_scaling) + / (temp_output - temp_used_for_scaling) } else { - if (temp_limit_upper - temp_used_for_scaling) >= self.temp_diff_flow_return_min { - energy_output_required * (temp_limit_upper - temp_used_for_scaling) - / (temp_output - temp_used_for_scaling) - } else { - 0. - } + 0. } } else { energy_output_required @@ -2434,8 +2428,8 @@ impl HeatPump { (1. - deg_coeff_op_cond) * (compressor_power_min_load / load_ratio_continuous_min) * max_of_2( - (time_remaining_current_timestep - - load_ratio / load_ratio_continuous_min * timestep), + time_remaining_current_timestep + - load_ratio / load_ratio_continuous_min * timestep, 0., ) } else { @@ -2714,12 +2708,12 @@ fn result_str(string: &str) -> ResultString { name } -enum TempSpreadCorrectionArg { +pub enum TempSpreadCorrectionArg { Float(f64), Callable(Box f64>), } -enum ServiceResult { +pub enum ServiceResult { Full(HeatPumpEnergyCalculation), Aux(AuxiliaryParameters), } diff --git a/src/core/heating_systems/storage_tank.rs b/src/core/heating_systems/storage_tank.rs index 416a8bd..f8874b8 100644 --- a/src/core/heating_systems/storage_tank.rs +++ b/src/core/heating_systems/storage_tank.rs @@ -3,13 +3,11 @@ use crate::core::controls::time_control::Control; use crate::core::material_properties::MaterialProperties; use crate::core::pipework::Pipework; use crate::core::units::WATTS_PER_KILOWATT; -use crate::core::water_heat_demand::cold_water_source::ColdWaterSource; -use crate::corpus::{Controls, HeatSource, PositionedHeatSource}; +use crate::corpus::{HeatSource, PositionedHeatSource}; use crate::external_conditions::ExternalConditions; -use crate::input::{HeatSource as HeatSourceInput, SolarCellLocation, WaterPipework}; +use crate::input::{SolarCellLocation, WaterPipework}; use crate::simulation_time::SimulationTimeIteration; use indexmap::IndexMap; -use itertools::Itertools; use parking_lot::Mutex; use std::collections::HashMap; use std::iter::zip; @@ -439,7 +437,7 @@ impl StorageTank { // output energy delivered by the storage in kWh - timestep dependent let mut q_sto_h_out_n: [f64; STORAGE_TANK_NB_VOL] = Default::default(); - for i in (0..self.vol_n.len()) { + for i in 0..self.vol_n.len() { delta_temp_n[i] = (q_x_in_n[i] + q_sto_h_out_n[i]) / (self.rho * self.cp * self.vol_n[i]); temp_s6_n[i] = temp_s3_n[i] + delta_temp_n[i]; @@ -467,7 +465,7 @@ impl StorageTank { // loop through layers from bottom to top, without including top layer; // this is because the top layer has no upper layer to compare to - for i in (0..self.vol_n.len() - 1) { + for i in 0..self.vol_n.len() - 1 { if temp_s7_n[i] > temp_s7_n[i + 1] { // set layers to mix mix_layer_n[i] = 1; @@ -482,7 +480,7 @@ impl StorageTank { .map(|l| self.vol_n[l] * mix_layer_n[l] as f64) .sum::(); // set same temperature for all applicable layers - for j in (0..i + 2) { + for j in 0..i + 2 { if mix_layer_n[j] == 1 { temp_s7_n[j] = temp_mix; } @@ -532,7 +530,7 @@ impl StorageTank { // timestep (it seems to assume a 1 hour timestep implicitly), but it is // necessary to convert the rate of heat loss to a total heat loss over // the time period - for i in (0..self.vol_n.len()) { + for i in 0..self.vol_n.len() { q_ls_n[i] = (h_sto_ls * self.rho * self.cp) * (self.vol_n[i] / self.volume_total_in_litres) * (*[temp_s7_n[i], self.temp_set_on] @@ -553,7 +551,7 @@ impl StorageTank { // the final value of the temperature is reduced due to the effect of the thermal losses. // check temperature compared to set point // the temperature for each volume are limited to the set point for any volume controlled - for i in (0..self.vol_n.len()) { + for i in 0..self.vol_n.len() { temp_s8_n[i] = if temp_s7_n[i] > self.temp_set_on { // Case 2 - Temperature exceeding the set point self.temp_set_on @@ -1162,7 +1160,7 @@ impl SolarThermalSystem { let mut inlet_temp2: f64 = Default::default(); // need a running slot in the loop for this to be overridden each time // calculation of collector efficiency - for _ in (0..4) { + for _ in 0..4 { // Eq 53 let th = (avg_collector_water_temp - self.external_conditions.air_temp(simulation_time)) @@ -1243,6 +1241,7 @@ mod tests { use super::*; use crate::core::controls::time_control::{per_control, OnOffTimeControl}; use crate::core::material_properties::WATER; + use crate::core::water_heat_demand::cold_water_source::ColdWaterSource; use crate::corpus::HeatSource; use crate::input::{EnergySupplyType, HeatSourceControl, HeatSourceControlType}; use crate::simulation_time::SimulationTime; diff --git a/src/core/schedule.rs b/src/core/schedule.rs index 7ad3f52..d17ef25 100644 --- a/src/core/schedule.rs +++ b/src/core/schedule.rs @@ -1,7 +1,5 @@ use crate::input::{Schedule, WaterHeatingEvent}; use serde_json::Value; -use std::collections::HashMap; -use std::ops::Index; pub type BooleanSchedule = Vec; pub type NumericSchedule = Vec; diff --git a/src/core/space_heat_demand/thermal_bridge.rs b/src/core/space_heat_demand/thermal_bridge.rs index 3328620..99d9cc8 100644 --- a/src/core/space_heat_demand/thermal_bridge.rs +++ b/src/core/space_heat_demand/thermal_bridge.rs @@ -19,12 +19,12 @@ pub enum ThermalBridge { } pub fn heat_transfer_coefficient_for_thermal_bridge(thermal_bridge: &ThermalBridge) -> f64 { - match thermal_bridge { - &ThermalBridge::Linear { + match *thermal_bridge { + ThermalBridge::Linear { linear_thermal_transmittance: t, length: l, } => t * l, - &ThermalBridge::Point { + ThermalBridge::Point { heat_transfer_coefficient: h, } => h, } diff --git a/src/core/space_heat_demand/zone.rs b/src/core/space_heat_demand/zone.rs index fc360ed..a359670 100644 --- a/src/core/space_heat_demand/zone.rs +++ b/src/core/space_heat_demand/zone.rs @@ -489,13 +489,13 @@ pub fn space_heat_cool_demand( temp_setpnt_heat: f64, temp_setpnt_cool: f64, throughput_factor: Option, - building_elements: &Vec, - element_positions: &Vec<(usize, usize)>, - vent_elements: &Vec, + building_elements: &[NamedBuildingElement], + element_positions: &[(usize, usize)], + vent_elements: &[VentilationElement], vent_cool_extra: &Option, simulation_time: &SimulationTimeIteration, external_conditions: &ExternalConditions, - temp_prev: &Vec, + temp_prev: &[f64], no_of_temps: usize, area_el_total: f64, area: f64, @@ -822,8 +822,8 @@ fn calc_temperatures( vent_extra_h_ve: Option, throughput_factor: Option, no_of_temps: usize, - building_elements: &Vec, - element_positions: &Vec<(usize, usize)>, + building_elements: &[NamedBuildingElement], + element_positions: &[(usize, usize)], external_conditions: &ExternalConditions, simulation_time: &SimulationTimeIteration, passed_zone_idx: usize, @@ -831,7 +831,7 @@ fn calc_temperatures( volume: f64, c_int: f64, tb_heat_trans_coeff: f64, - vent_elements: &Vec, + vent_elements: &[VentilationElement], vent_cool_extra: &Option, print_heat_balance: Option, ) -> (Vec, Option<()>) { diff --git a/src/core/water_heat_demand/dhw_demand.rs b/src/core/water_heat_demand/dhw_demand.rs index 60c4ccd..02cb05c 100644 --- a/src/core/water_heat_demand/dhw_demand.rs +++ b/src/core/water_heat_demand/dhw_demand.rs @@ -41,7 +41,7 @@ impl DomesticHotWaterDemand { .flat_map(|input| { let mut showers = vec![( "mixer".to_owned(), - mixer_shower_input_to_shower(&input.mixer, cold_water_sources, &wwhrs), + mixer_shower_input_to_shower(&input.mixer, cold_water_sources, wwhrs), )]; if let Some(ies) = &input.ies { showers.push(( @@ -321,7 +321,7 @@ fn mixer_shower_input_to_shower( let wwhrs_instance: Option = input .waste_water_heat_recovery .as_ref() - .and_then(|w| wwhrs.get(&w.to_string()).map(|system| system.clone())); + .and_then(|w| wwhrs.get(&w.to_string()).cloned()); Shower::MixerShower(MixerShower::new( input.flowrate, diff --git a/src/core/water_heat_demand/other_hot_water_uses.rs b/src/core/water_heat_demand/other_hot_water_uses.rs index 614f8f0..aa0c427 100644 --- a/src/core/water_heat_demand/other_hot_water_uses.rs +++ b/src/core/water_heat_demand/other_hot_water_uses.rs @@ -47,9 +47,8 @@ impl OtherHotWater { // TODO (from Python) Account for behavioural variation factor fbeh (sic) let vol_warm_water = self.flowrate * total_demand_duration; // ^^^ litres = litres/minute * minutes - let vol_hot_water = vol_warm_water * frac_hot_water(temp_target, self.temp_hot, temp_cold); - vol_hot_water + vol_warm_water * frac_hot_water(temp_target, self.temp_hot, temp_cold) } } diff --git a/src/core/water_heat_demand/shower.rs b/src/core/water_heat_demand/shower.rs index 2853530..da07919 100644 --- a/src/core/water_heat_demand/shower.rs +++ b/src/core/water_heat_demand/shower.rs @@ -4,7 +4,6 @@ use crate::core::material_properties::WATER; use crate::core::units::MINUTES_PER_HOUR; use crate::core::water_heat_demand::cold_water_source::ColdWaterSource; use crate::core::water_heat_demand::misc::frac_hot_water; -use crate::corpus::ColdWaterSources; pub enum Shower { MixerShower(MixerShower), diff --git a/src/corpus.rs b/src/corpus.rs index 728362b..5724c0f 100644 --- a/src/corpus.rs +++ b/src/corpus.rs @@ -59,12 +59,10 @@ use crate::simulation_time::{SimulationTime, SimulationTimeIteration, Simulation use anyhow::bail; use indexmap::IndexMap; use indicatif::ProgressBar; -use parking_lot::{Mutex, RawMutex}; +use parking_lot::Mutex; use serde_json::Value; -use std::borrow::Cow; use std::collections::{HashMap, HashSet}; use std::hash::Hash; -use std::ops::Index; use std::sync::Arc; // TODO make this a runtime parameter? @@ -144,7 +142,7 @@ impl Corpus { let ventilation = input.ventilation.as_ref().map(|v| { Arc::new(Mutex::new(ventilation_from_input( - &v, + v, &infiltration, simulation_time_iterator.clone().as_ref(), ))) @@ -166,7 +164,7 @@ impl Corpus { opening_area_total_from_zones, &input.window_opening_for_cooling, &controls, - ventilation.map(|v| (&*v).clone()), + ventilation.map(|v| (*v).clone()), external_conditions.clone(), &infiltration, simulation_time_iterator.clone().as_ref(), @@ -211,7 +209,7 @@ impl Corpus { (*heat_source_wet_details).clone(), external_conditions.clone(), simulation_time_iterator.clone(), - ventilation.map(|v| (&*v).clone()), + ventilation.map(|v| (*v).clone()), input.ventilation.as_ref().map(|v| v.req_ach()), total_volume, &controls, @@ -250,7 +248,7 @@ impl Corpus { .as_ref() .map(|system| { space_heat_systems_from_input( - &system, + system, &controls, simulation_time_iterator.as_ref(), &Default::default(), @@ -269,7 +267,7 @@ impl Corpus { .as_ref() .map(|system| { space_cool_systems_from_input( - &system, + system, cool_system_name_for_zone .values() .flatten() @@ -545,7 +543,7 @@ impl Corpus { .internal_gains .total_internal_gains .as_ref() - .map(|gain| Gains::Internal(gain)), + .map(Gains::Internal), ), ( "metabolic_gains", @@ -553,47 +551,27 @@ impl Corpus { .internal_gains .metabolic_gains .as_ref() - .map(|gain| Gains::Internal(gain)), + .map(Gains::Internal), ), ( "lighting", - &self - .internal_gains - .lighting - .as_ref() - .map(|gain| Gains::Appliance(gain)), + &self.internal_gains.lighting.as_ref().map(Gains::Appliance), ), ( "cooking", - &self - .internal_gains - .cooking - .as_ref() - .map(|gain| Gains::Appliance(gain)), + &self.internal_gains.cooking.as_ref().map(Gains::Appliance), ), ( "cooking1", - &self - .internal_gains - .cooking1 - .as_ref() - .map(|gain| Gains::Appliance(gain)), + &self.internal_gains.cooking1.as_ref().map(Gains::Appliance), ), ( "cooking2", - &self - .internal_gains - .cooking2 - .as_ref() - .map(|gain| Gains::Appliance(gain)), + &self.internal_gains.cooking2.as_ref().map(Gains::Appliance), ), ( "other", - &self - .internal_gains - .other - .as_ref() - .map(|gain| Gains::Internal(gain)), + &self.internal_gains.other.as_ref().map(Gains::Internal), ), ] .iter() @@ -907,14 +885,14 @@ impl Corpus { } } - for (_z_name, h_name) in &self.heat_system_name_for_zone { + for h_name in self.heat_system_name_for_zone.values() { if let Some(h_name) = h_name { space_heat_demand_system_dict.insert(h_name.into(), vec![]); space_heat_provided_dict.insert(h_name.into(), vec![]); } } - for (_z_name, c_name) in &self.cool_system_name_for_zone { + for c_name in self.cool_system_name_for_zone.values() { if let Some(c_name) = c_name { space_cool_demand_system_dict.insert(c_name.into(), vec![]); space_cool_provided_dict.insert(c_name.into(), vec![]); @@ -1226,7 +1204,7 @@ impl Corpus { &self, simulation_time_iteration: SimulationTimeIteration, ) -> HashMap> { - (&self.space_heat_systems) + self.space_heat_systems .iter() .map(|(system_name, system)| { let system = system.lock(); @@ -1239,7 +1217,7 @@ impl Corpus { } fn space_heat_systems_frac_convective(&self) -> HashMap { - (&self.space_heat_systems) + self.space_heat_systems .iter() .map(|(system_name, system)| { let system = system.lock(); @@ -1252,7 +1230,7 @@ impl Corpus { &self, simulation_time_iteration: SimulationTimeIteration, ) -> HashMap> { - (&self.space_cool_systems) + self.space_cool_systems .iter() .map(|(system_name, system)| { ( @@ -1264,7 +1242,7 @@ impl Corpus { } fn space_cool_systems_frac_convective(&self) -> HashMap { - (&self.space_cool_systems) + self.space_cool_systems .iter() .map(|(system_name, system)| (system_name.clone(), system.frac_convective())) .collect() @@ -2507,7 +2485,7 @@ fn heat_source_from_input( } => HeatSource::Wet(Box::new(HeatSourceWet::HeatPumpWaterOnly( HeatPumpHotWaterOnly::new( power_max, - &test_data, + test_data, vol_hw_daily_average, simulation_time.step_in_hours(), controls.get(&control).map(|c| (*c).clone()), @@ -2755,7 +2733,7 @@ fn space_heat_systems_from_input( simulation_time.step_in_hours(), control .as_ref() - .and_then(|ctrl| controls.get_with_string(&ctrl).map(|c| (*c).clone())), + .and_then(|ctrl| controls.get_with_string(ctrl).map(|c| (*c).clone())), )), SpaceHeatSystemDetails::ElectricStorageHeater { .. } => unimplemented!(), // requires implementation of ElecStorageHeater SpaceHeatSystemDetails::WetDistribution { .. } => unimplemented!(), // requires implementation of Emitters @@ -2775,7 +2753,7 @@ fn space_heat_systems_from_input( } SpaceHeatSystem::WarmAir(HeatPump::create_service_space_heating_warm_air((*heat_pump).clone(), energy_supply_conn_name, control .as_ref() - .and_then(|ctrl| controls.get_with_string(&ctrl).map(|c| (*c).clone())).expect("A control object was expected for a heat pump warm air system"), *frac_convective).unwrap()) + .and_then(|ctrl| controls.get_with_string(ctrl).map(|c| (*c).clone())).expect("A control object was expected for a heat pump warm air system"), *frac_convective).unwrap()) } _ => panic!("The heat source referenced by details about warm air space heating with the name '{heat_source_name}' was expected to be a heat pump."), } @@ -2813,7 +2791,7 @@ fn space_cool_systems_from_input( } = space_cool_system_details; let control = control .as_ref() - .and_then(|ctrl| controls.get_with_string(&ctrl).map(|c| (*c).clone())); + .and_then(|ctrl| controls.get_with_string(ctrl).map(|c| (*c).clone())); ( (*system_name).clone(), diff --git a/src/lib.rs b/src/lib.rs index 764fa94..e0ca6b9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,15 +12,14 @@ mod simulation_time; extern crate is_close; extern crate lazy_static; -use crate::input::{parse_input_file, ExternalConditionsInput, Input, Ventilation}; +use crate::input::{parse_input_file, ExternalConditionsInput}; use crate::read_weather_file::ExternalConditions as ExternalConditionsFromFile; use std::borrow::Cow; use std::collections::HashMap; -use crate::core::units::{SECONDS_PER_HOUR, WATTS_PER_KILOWATT}; use crate::corpus::{Corpus, HotWaterResultMap}; use crate::external_conditions::{DaylightSavingsConfig, ExternalConditions}; -use crate::simulation_time::{SimulationTime, SimulationTimeIteration, SimulationTimeIterator}; +use crate::simulation_time::SimulationTime; use csv::Writer; use itertools::Itertools; use lazy_static::lazy_static; diff --git a/src/main.rs b/src/main.rs index 74119d6..c9119ac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,8 +61,6 @@ fn main() { _ => None, }; - println!("about to loop over the input files and run the calculation on each one!"); - run_project( args.input_file.as_str(), external_conditions,