Postprocessing Package

postprocessing.chart_singleday module

Charts for a single day.

class postprocessing.chart_singleday.ChartSingleDay(output: Any, component_name: str, units: Any, directory_path: str, time_correction_factor: float, output_description: str, data: Any, day: Any = 0, month: Any = 0, output2: Any | None = None, figure_format: Any | None = None)

Bases: Chart, ChartFontsAndSize

For making visualisations for a single day.

close()

Closes a chart and saves.

get_day_data()

Extracts data for a single day.

plot(close: Any) ReportImageEntry

Plots a chart.

postprocessing.chartbase module

Contains the base class for the charts.

class postprocessing.chartbase.Chart(output, component_name, output_description, chart_type, units, directory_path, time_correction_factor, output2=None, figure_format=None)

Bases: object

Parent class for plots to be exported.

label_months_lowercase = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
months_abbrev_uppercase = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
rescale_y_axis(y_values: Any, units: Any) Tuple[Any, Any]

Rescale y_values of plots.

class postprocessing.chartbase.ChartFontsAndSize

Bases: object

Give the font sizes and figure sizes of the figures.

dpi = 600
figsize = (6, 4)
fontsize_label = 12
fontsize_legend = 12
fontsize_ticks = 10
fontsize_title = 14

postprocessing.charts module

Contains all the chart classes.

class postprocessing.charts.BarChart(output: Any, component_name: str, units: Any, directory_path: str, time_correction_factor: float, output_description: str, figure_format: FigureFormat)

Bases: Chart, ChartFontsAndSize

Makes Bar charts.

original_pv_sol = [385.66, 484.01, 981.05, 1096.7, 1157, 1299.9, 1415.3, 1266.1, 1075.8, 714.44, 422.51, 366.83]
plot(data: Any) ReportImageEntry

Plots the bar chart.

class postprocessing.charts.Carpet(output: Any, component_name: str, units: Any, directory_path: str, time_correction_factor: float, output_description: str, figure_format: FigureFormat)

Bases: Chart, ChartFontsAndSize

Class for carpet plots.

plot(xdims: int, data: Any) ReportImageEntry

Makes a carpet plot.

class postprocessing.charts.Line(output: Any, component_name: str, units: Any, directory_path: str, time_correction_factor: float, output_description: str, figure_format: FigureFormat)

Bases: Chart, ChartFontsAndSize

Makes a line chart.

plot(data: Any) ReportImageEntry

Makes a line plot.

postprocessing.compute_kpis module

postprocessing.generate_csv_for_housing_database module

postprocessing.postprocessing_datatransfer module

Data Transfer Object to get all the result data to the post processing.

class postprocessing.postprocessing_datatransfer.PostProcessingDataTransfer(results: Any, all_outputs: Any, simulation_parameters: SimulationParameters, wrapped_components: List[ComponentWrapper], mode: Any, setup_function: Any, module_filename: Any, my_module_config: Any, execution_time: Any, results_monthly: Any, results_hourly: Any, results_cumulative: Any, results_daily: Any, kpi_collection_dict: Dict = {})

Bases: object

Data class for transfering the result data to this class.

postprocessing.postprocessing_main module

postprocessing.reportgenerator module

Module for generating reports.

class postprocessing.reportgenerator.MyDocTemplate(filename, **kw)

Bases: BaseDocTemplate

MyDocTemplate class.

afterFlowable(flowable)

Registers TOC entries.

class postprocessing.reportgenerator.ReportGenerator(dirpath: str)

Bases: object

Class for generating reports.

add_page_number(canvas, doc)

Add page number to report.

add_spacer()

Add spacer.

close()

Close the report.

get_story()

Get the story.

open()

Open a file.

page_break()

Make a page break.

write_figures_to_report(file_path: str) None

Add figure to the report.

write_figures_to_report_with_size_four_six(file_path: str) None

Add figure to the report with certain size.

write_figures_to_report_with_size_seven_four(file_path: str) None

Add figure to the report with certain size.

write_heading_with_style_heading_one(text: List[str]) None

Write text as heading.

write_heading_with_style_heading_two(text: List[str]) None

Write text as heading.

write_preamble()

Write the preamble.

write_table_of_content()

Write Table of Content.

write_tables_to_report(table_as_list_of_lists: List) None

Add table to the report.

write_with_center_alignment(text: List[str]) None

Write a paragraph.

write_with_normal_alignment(text: List[str] | List[str | None]) None

Write a paragraph.

postprocessing.system_chart module

Module for visualizing the entire system as a flow chart.

class postprocessing.system_chart.SystemChart(ppdt: PostProcessingDataTransfer)

Bases: object

Class for generating charts that show all the components.

make_chart() List[SystemChartEntry]

Makes different charts. Entry point for the class.

make_graphviz_chart(with_labels: bool, with_class_names: bool, filename: str, caption: str, with_results: bool = False) SystemChartEntry | None

Generates the system charts with graphviz.