Skip to content

Commit

Permalink
just print some results out to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
shieldo committed Mar 15, 2024
1 parent d293cda commit 71969b5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/corpus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1396,11 +1396,13 @@ impl Corpus {
}
}

#[derive(Debug)]
pub enum HotWaterResultMap<'a> {
Float(HashMap<&'a str, Vec<f64>>),
Int(HashMap<&'a str, Vec<usize>>),
}

#[derive(Debug)]
pub enum NumberOrDivisionByZero {
Number(f64),
DivisionByZero,
Expand Down
16 changes: 16 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ pub fn run_project(
heat_source_wet_results_annual_dict,
) = corpus.run();

// print everything out for now
// println!("{timestep_array:?}");
println!("{zone_dict:?}");
println!("{zone_list:?}");
// println!("{hc_system_dict:?}");
// println!("{hot_water_dict:?}");
// println!("{heat_cop_dict:?}");
// println!("{cool_cop_dict:?}");
// println!("{dhw_cop_dict:?}");
// println!("{ductwork_gains:?}");
// println!("{heat_balance_dict:?}");
// println!("{heat_source_wet_results_dict:?}");
// println!("{heat_source_wet_results_annual_dict:?}");

let _ = write_core_output_file(
output_file_detailed,
timestep_array,
Expand Down Expand Up @@ -183,6 +197,7 @@ fn write_core_output_file(
hot_water_dict: HashMap<&str, HotWaterResultMap>,
ductwork_gains: HashMap<&str, Vec<f64>>,
) -> Result<(), anyhow::Error> {
println!("writing out to {output_file}");
let mut writer = Writer::from_path(output_file)?;

let mut headings: Vec<Cow<'static, str>> = vec!["Timestep".into()];
Expand Down Expand Up @@ -365,6 +380,7 @@ fn write_core_output_file(
}
}

println!("flushing out CSV");
writer.flush()?;

Ok(())
Expand Down

0 comments on commit 71969b5

Please sign in to comment.