bloc.report#
Automated Calculation Note generator for Bloc.
Generates an Excel workbook (.xlsx) from simulation results, following the structure of the manual SPRING Calculation Notes. Supports multiple scenarios as side-by-side columns.
Dependencies: openpyxl
Attributes#
Functions#
|
Generate a Calculation Note Excel workbook. |
Module Contents#
- bloc.report.INPUT_SECTION_FROM_OUTPUTS#
- bloc.report.GAS_PHASE_EXCLUDE_KEYS = ['X_C(s)', 'Y_C(s)']#
- bloc.report.COMPOSITION_AGGREGATE_EXCLUDE_KEYS = ['X_PAH']#
- bloc.report.LHV_HHV_EXCEL_ERROR_KEYS#
- bloc.report.generate_calculation_note_excel(scenario_results, output_path, title='SPRING Calculation Note', subtitle='Generated by Bloc', diagram_paths=None, yaml_files=None, header_comments=None)#
Generate a Calculation Note Excel workbook.
- Parameters:
scenario_results (
dict) –{scenario_id: {"inputs": dict, "outputs": dict, "metadata": dict}}whereinputsare the YAML initial parameters andoutputsis theres_dicfrom the simulation.output_path (
strorPath) – Where to write the.xlsxfile.title (
str) – Title for the header.subtitle (
str) – Subtitle / description.diagram_paths (
dictorNone) –{scenario_id: {"sankey": path, "network": path}}. If provided, diagrams are embedded as images.yaml_files (
listofstrorNone) – YAML file names used for this report (shown in header).header_comments (
listofstrorNone) – Header comments extracted from the YAML file (update log, etc.).
- Returns:
The path to the generated file.
- Return type:
Path