bloc.reporting.excel_main#
Main Calculation Note summary sheet generation.
Functions#
|
Generate a Calculation Note Excel workbook. |
Module Contents#
- bloc.reporting.excel_main.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, custom_input_categories=None, custom_output_categories=None, custom_input_variable_map=None, custom_output_variable_map=None, constraints=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.).custom_input_categories (
dictorNone) – Override forbloc.yaml_utils.INPUT_CATEGORIES(e.g. tube furnace model).custom_output_categories (
dictorNone) – Override forbloc.yaml_utils.OUTPUT_CATEGORIES.custom_input_variable_map (
dictorNone) – Override forbloc.yaml_utils.INPUT_VARIABLE_MAP.custom_output_variable_map (
dictorNone) – Override forbloc.yaml_utils.OUTPUT_VARIABLE_MAP.constraints (
listofbloc.constraints.ConstraintorNone) – Design constraints evaluated against each scenario’s outputs. When provided, a DESIGN CONSTRAINTS section is added to the summary sheet with red-background cells for violated constraints.
- Returns:
The path to the generated file.
- Return type:
Path