def write_results(bpr, building_name, date, loads_output, locator, massflows_output, resolution_outputs, temperatures_output, tsd, debug): if resolution_outputs == 'hourly': writer = demand_writers.HourlyDemandWriter(loads_output, massflows_output, temperatures_output) elif resolution_outputs == 'monthly': writer = demand_writers.MonthlyDemandWriter(loads_output, massflows_output, temperatures_output) else: raise Exception('error') if debug: print( 'Creating instant plotly visualizations of demand variable time series.' ) print('Behavior can be changed in cea.utilities.reporting code.') print('Writing detailed demand results of {} to .xls file.'.format( building_name)) reporting.quick_visualization_tsd(tsd, locator.get_demand_results_folder(), building_name) reporting.full_report_to_xls(tsd, locator.get_demand_results_folder(), building_name) else: writer.results_to_csv(tsd, bpr, locator, date, building_name)
def write_results(bpr, building_name, date, format_output, loads_output, locator, massflows_output, resolution_outputs, temperatures_output, tsd): if resolution_outputs == 'hourly': writer = demand_writers.HourlyDemandWriter(loads_output, massflows_output, temperatures_output) elif resolution_outputs == 'monthly': writer = demand_writers.MonthlyDemandWriter(loads_output, massflows_output, temperatures_output) else: raise Exception('error') if format_output == 'csv': writer.results_to_csv(tsd, bpr, locator, date, building_name) elif format_output == 'hdf5': writer.results_to_hdf5(tsd, bpr, locator, date, building_name) else: raise Exception('error')