Module viiaReporting

This module contains functions to create report deliverables for the VIIA project.

Functions for reporting

viiapackage.viiaReporting.viia_create_report(project: ViiaProject, report_type: str = 'TVA', governing_analysis: str = None, soil_investigation: bool = True, scope_change_id: Optional[int] = None, werkpakket_lst: Optional[List[str]] = None, extra_object_parts: Optional[List[str]] = None, output_folder: Path = None, images_folder: Path = None, input_folders: Dict[str, Union[Path, Dict[str, Path]]] = None) List[Path][source]

This function creates the required report for VIIA. It will collect the correct template (depending on the tender specification which is defined on MYVIIA), collect the required data for the report (from local work-folder sources and/or MYVIIA) and generate the report.

Note

The tender specification (NL: vraagspecificatie) is retrieved from MYVIIA. If this is incorrect inform the project-leader. The projectleader can check and make sure that MYVIIA is updated.

With this function you can create different reports for VIIA. Some reports require specific additional input. The following report-types are available; these require input for the items mentioned. Input for other items is ignored.

  • TVA (default): Engineering report, input required for the governing analysis.

  • Opnameplan: Inspection plan document, input required if soil investigation is required (default True). This report template is used by project support.

  • Opname: Inspection report, no input required. This report template is used by the inspector of the object.

  • bkg: Form to be used for requesting scope changes for NCG. Form is used by the projectleader of the object. No additional input required. This is a report in Excel.

  • Kostenraming: Report template filled with data from MYVIIA to be used by the cost engineer of the object. This is a report in Excel.

  • crm: Administration form for the client NCG. This report template is used by the editor of the object. No additional input required. This is a report in Excel.

  • Beoordeling: Final assessment document for the owner, also called EVVA. This report template is used by the editor of the object. Requires no additional input.

  • UrenMonitor: Excel sheet with an overview of the progress. This report template is used by the projectleader and management.

  • UO: UO report, no input required. This report template is used by the engineer and lead engineer of the object.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • report_type (str): Select the report to be generated. Default value TVA, creating the engineering report including all of its annexes.

  • governing_analysis (str): Governing analysis for NLTH results. For NLTH report the governing analysis can be selected from ‘S1’, ‘S2’, ‘S3’, ‘S4’, ‘S5’, ‘S6’, ‘S7’, ‘S8’, ‘S9’, ‘S10’ or ‘S11’. Default value is None, which should be selected for other report-types than the NLTH TVA report.

  • soil_investigation (bool): Boolean for soil investigation (required for Opnameplan report). If soil investigation is to be done, the value is True. Otherwise, the value is False. Default value is True.

  • scope_change_id (int): ID of the selected object scope-change in MYVIIA database. Default value is None, only required when the BKG report is created with this function.

  • werkpakket_lst (list of str): List of names of the werkpakket to create the Excel for. Default value is None, only required when the uren monitor report is created with this function.

  • extra_object_parts (list of str): List of names of extra object parts to include in the report. Default value is None, only required when the UO report is created with this function.

  • output_folder (Path): Optional input for location where to create the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

  • images_folder (Path): Optional input for location where to store the images for the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

  • input_folders (dict): Dictionary with the folders where the results of the analyses should be collected from. Default value None. Input is only required for the engineering report of NLTH assessment.

Output:
  • The requested report is generated with the information of the object in py-memory, databases and local (image-) files. It is saved in sub-folder of the working folder, depending on the type of report. The user is notified where the document is created.

  • Returns list of files created for the report type selected.

viiapackage.viiaReporting.viia_prepare_for_engineering_report(project: ViiaProject, governing_analysis: str, folder_a7: Optional[Path] = None, folder_a10: Optional[Path] = None, folders_a12: Optional[Dict[str, Path]] = None, folder_a13: Optional[Path] = None, folders_a15: Optional[Dict[str, Path]] = None) Dict[str, Path][source]

This function collects the folders with analyses relevant for the reporting in TVA of the NLTH. It provides options for the user to check the inputs and overrule if needed. It will load the model of the governing analysis, which is used for the automated reporting (mesh data, applied strengthening measures, etc.).

Note

This function should be run in the report script, there should not be a model loaded prior to this function. Checks are performed if all required data is found and correct. Please follow VIIA workflow.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • governing_analysis (str): Governing analysis for NLTH results. For NLTH report the governing analysis can be selected from ‘S1’, ‘S2’, ‘S3’, ‘S4’, ‘S5’, ‘S6’, ‘S7’, ‘S8’, ‘S9’, ‘S10’ or ‘S11’.

  • folder_a7 (Path): Path of the A7 analysis folder where the results of the analysis can be found. Default value is None, in which case the folder is automatically retrieved based on naming conventions in VIIA.

  • folder_a10 (Path): Path of the A10 analysis folder where the results of the analysis can be found. Default value is None, in which case the folder is automatically retrieved based on naming conventions in VIIA.

  • folders_a12 (dict): Dictionary with the paths of the A12 analysis to be used. Default value is None, in which case the folder is automatically retrieved based on naming conventions in VIIA.

  • folder_a13 (Path): Path of the A13 analysis folder where the results of the analysis can be found. Default value is None, in which case the folder is automatically retrieved based on naming conventions in VIIA. Only used for objects with strengthening.

  • folders_a15 (dict): Dictionary with the paths of the A15 analysis to be used. Default value is None, in which case the folder is automatically retrieved based on naming conventions in VIIA. Only required for strengthened objects.

Output:
  • Returns dictionary with the folders with the results to be used in the report. Notifications are printed to inform the user which folders are used.

Functions used to create the engineering report and appendices

viiapackage.reporting.viia_create_engineering_report.viia_create_engineering_report(project: ViiaProject, template_locations: Dict[str, str], template_version: str, report_data: Optional[dict], images_folder: Path, input_folders: Dict[str, Union[Path, Dict[str, Path]]], output_folder: Optional[Path] = None) List[Path][source]

This function creates engineering report.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_locations (dict): Dictionary which stores the path of all requested template files.

  • report_data (dict): Dictionary which includes all project specific data for reporting.

  • images_folder (Path): Location where the manual images are stored and should be retrieved from.

  • input_folders (dict): Dictionary with the folders where the results of the analyses should be collected from. Default value None. Input is only required for the engineering report of NLTH assessment.

  • output_folder (Path): Optional input for location where to create the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

Output:
  • The requested report is generated with the information of the object in py-memory, databases and local (image-) files. It is saved in the ‘ER’ folder (and ‘EVVA’ folder if EVVA report is generated) of the working folder.

viiapackage.reporting.viia_create_model_plots_appendix.get_all_pictures(project: ViiaProject, pictures_folder: Optional[Path] = None) Dict[str, List[str]][source]

Function collects all pictures for the building structural setup appendix.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • pictures_folder (Path): Optional input for location where all the pictures should be collected from. Default value is None.

Output:
  • Returns a dictionary with sections (keys) and list of pictures in the picture folder (values).

viiapackage.reporting.viia_create_model_plots_appendix.get_floors_info(project: ViiaProject) Dict[str, Any][source]

Function collects the information in building structural setup appendix for the floors in the model.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • Returns a dictionary with information of the floors in the model.

viiapackage.reporting.viia_create_model_plots_appendix.get_fstrips_info(project: ViiaProject) List[Dict[str, Any]][source]

Function collects the information in building structural setup appendix for the foundation strips.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • Returns a list with dictionaries with information per foundation strip.

viiapackage.reporting.viia_create_model_plots_appendix.get_fwalls_info(project: ViiaProject) List[Dict[str, Any]][source]

Function collects the information in building structural setup appendix for the foundation walls.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • Returns a list with dictionaries with information per foundation wall.

viiapackage.reporting.viia_create_model_plots_appendix.get_roofs_info(project: ViiaProject) Dict[str, Any][source]

Function collects the information in building structural setup appendix for the roofs.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • Returns a dictionary with information of the roofs in the model.

viiapackage.reporting.viia_create_model_plots_appendix.viia_create_model_plots_appendix(project: ViiaProject, template_file: Optional[Path] = None, output_folder: Optional[Path] = None, pictures_folder: Optional[Path] = None) Path[source]

This function creates appendix of building setup for the engineering report.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_location (Path): Optional input for the location of the template file. Default value None. If not provided the file will be selected from the template library within this function.

  • output_folder (Path): Optional input for location where to create the report appendix. Default value is None, indicating the default location is used. In normal production objects do not change this!

  • pictures_folder (Path): Optional input for location where all the pictures should be collected from. Default value is None. In which case the appendix pictures folder set in project is used.

Output:
  • The requested report is generated with the information of the object in py-memory, databases and local (image-) files. It is saved in the ‘ER’ folder of the working folder or the location of the folder mentioned in the input.

viiapackage.reporting.viia_create_evva_report_engineering_input.viia_create_evva_report_engineering_input(project: ViiaProject, template_file: Path, output_file: Path, report_data: dict) Path[source]

This function creates a document with inputs from engineering for the EVVA report.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_file (Path): File reference for the template to be used.

  • output_file (Path): File reference for the generated output, this includes the folder, file name and suffix, as path.

  • report_data (dict): Optional input to pass the general info (if already collected). If not provided this general info will be collected first.

Output:
  • The requested report is generated with the information of the object in py-memory, databases and local (image-) files. It is saved in the ‘EVVA’ folder of the working folder.

  • Returns the path of the created document with information from engineering for the ‘Beoordelings’ report.

viiapackage.reporting.viia_create_psse_nsce_appendix.viia_create_psse_nsce_appendix(project: ViiaProject, template_file: Path, output_file: Path, pictures_folder: Optional[Path] = None, report_data: Optional[dict] = None) Path[source]

This function creates Appendix of NSCE assessment for the engineering report.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_file (Path): File reference for the template to be used.

  • output_file (Path): File reference for the generated output, this includes the folder, file name and suffix, as path.

  • pictures_folder (Path): Folder with the PSSE-NSCE pictures. Optional input, if not provided an empty document will be created.

  • report_data (dict): Optional input to pass the general info (if already collected). If not provided this general info will be collected first.

Output:
  • The requested report is generated with the information of the object in py-memory, databases and local (image-) files. It is saved in the location of the folder mentioned in the input.

Functions used to generate other reports (on MYVIIA)

viiapackage.reporting.viia_create_beoordeling_report.viia_create_beoordelings_report(project: ViiaProject, template_locations: Dict[str, str], report_data: Optional[dict], output_folder: Optional[Path] = None) List[Path][source]

This function creates the beoordelings report (EVVA) for VIIA.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_locations (dict): Dictionary which stores the path of all requested template files.

  • report_data (dict): Dictionary which includes all project specific data for reporting.

  • output_folder (Path): Optional input for location where to create the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

Output:
  • The requested report is generated with the information of the object in py-memory, databases and local (image-) files. It is saved in the ‘Beoordeling’ folder of the working folder.

viiapackage.reporting.viia_create_bevindingen_report.viia_create_bevindingen_report(project: ViiaProject, template_locations: Dict[str, str], report_data: Optional[dict], output_folder: Optional[Path] = None) List[Path][source]

This function creates bevindingen report.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_locations (dict): Dictionary which stores the path of all requested template files.

  • report_data (dict): Dictionary which includes all project specific data for reporting.

  • output_folder (Path): Optional input for location where to create the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

Output:
  • The requested report is generated with the information of the object in py-memory, databases and local (image)-files. It is saved in the ‘Bevindingenrapport’ folder of the working folder.

viiapackage.reporting.viia_create_bkg_report.collect_data_from_myviia(project: ViiaProject, scope_change_id: int) Dict[str, Union[str, float]][source]

This function collects scope change data that has been retrieved from MYVIIA and stored in the project variable. This data is to be used to fill the BKG report.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • scope_change_id (int): ID of the selected object scope-change in MYVIIA database.

Output:
  • Returns dictionary with the required information for the BKG form.

viiapackage.reporting.viia_create_bkg_report.viia_create_bkg_report(project: ViiaProject, scope_change_id: int, template_locations: Dict[str, str], output_folder: Optional[Path] = None) List[Path][source]

This function creates a BKG report for a specific object-assignment scope-change. Data from MYVIIA related to the scope-change is collected in a worksheet. Subsequently, a table, collected from the (specified, optional) template location, is filled with the object data and saved in the (specified, optional) output folder.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • scope_change_id (int): ID of the selected object scope-change in MYVIIA database.

  • template_locations (dict): Dictionary which stores the path of all requested template files.

  • output_folder (Path): Optional input for location where to create the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

Output:
  • Filled BKG report template with information from MYVIIA. Values that couldn’t be retrieved are left blank.

  • Returns list of created files.

viiapackage.reporting.viia_create_cost_report.viia_create_cost_report(project: ViiaProject, template_locations: Dict[str, str], output_folder: Path = None) List[Path][source]

This function creates the cost report for an object. Relevant data is assembled from project_information, cost estimation and cost key figures. Also, the applied measures are retrieved from MYVIIA from engineering database.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_locations (dict): Dictionary which stores the path of all requested template files.

  • output_folder (Path): Optional input for location where to create the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

Output:
  • Filled template with combined information from project and MYVIIA. Values that couldn’t be retrieved are left blank.

  • Returns list of created files.

viiapackage.reporting.viia_create_crm.viia_create_crm(project: ViiaProject, template_locations: Dict[str, str], output_folder: Path = None) List[Path][source]

This function creates the CRM deliverable for an object. Relevant data is assembled from project_information, cost estimation and cost key figures. Also, the applied measures are retrieved from MYVIIA from engineering database.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_locations (dict): Dictionary which stores the path of all requested template files.

  • output_folder (Path): Optional input for location where to create the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

Output:
  • Filled template with combined information from project and myviia. Values that couldn’t be retrieved are marked unknown (NL: onbekend).

  • Returns list of created files.

viiapackage.reporting.viia_create_inspection_report.viia_create_inspection_report(project: ViiaProject, template_locations: Dict[str, str], report_data: Optional[dict], output_folder: Optional[Path] = None, soil_investigation: bool = True) List[Path][source]

This function creates inspection report.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_locations (dict): Dictionary which stores the path of all requested template files.

  • report_data (dict): Dictionary which includes all project specific data for reporting.

  • output_folder (Path): Optional input for location where to create the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

  • soil_investigation (bool): Boolean for soil investigation (required for Opnameplan report). If soil investigation should be done, the value is True. Otherwise, the value is False. Default value is True.

Output:
  • The requested report is generated with the information of the object in py-memory, databases and local (image)-files. It is saved in the ‘Inspection Report’ folder of the working folder.

viiapackage.reporting.viia_create_ontwerpnotitie_report.viia_create_ontwerpnotitie_report(project: ViiaProject, template_locations: Dict[str, str], report_data: Optional[dict], output_folder: Optional[Path] = None) List[Path][source]

This function creates ontwerpnotitie report.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_locations (dict): Dictionary which stores the path of all requested template files.

  • report_data (dict): Dictionary which includes all project specific data for reporting.

  • output_folder (Path): Optional input for location where to create the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

Output:
  • The requested report is generated with the information of the object in py-memory, databases and local (image)-files. It is saved in the ‘Ontwerpnotitie Report’ folder of the working folder.

viiapackage.reporting.viia_create_uo_report.viia_create_uo_report(project: ViiaProject, template_locations: Dict[str, str], report_data: Optional[dict], output_folder: Optional[Path] = None) List[Path][source]

This function creates UO report.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_locations (dict): Dictionary which stores the path of all requested template files.

  • report_data (dict): Dictionary which includes all project specific data for reporting.

  • output_folder (Path): Optional input for location where to create the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

Output:
  • The requested report is generated with the information of the object in py-memory, databases and local (image)-files. It is saved in the ‘UO Report’ folder of the working folder.

viiapackage.reporting.viia_create_uren_monitor_report.collect_data_from_myviia(project: ViiaProject, werkpakket_lst: [str]) dict[source]

Function to collect relevant data from MYVIIA for uren monitor report.

viiapackage.reporting.viia_create_uren_monitor_report.viia_create_uren_monitor_report(project: ViiaProject, werkpakket_lst: List[str], template_locations: Dict[str, str], output_folder: Optional[Path] = None) List[Path][source]

This function creates an hours monitor report for a list of ‘werkpakket’. Data from all objects related to each specific werkpakket are collected in a separate worksheet. Subsequently, a table, collected from the (specified, optional) template location, is filled with the object data and saved in the (specified, optional) output folder.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • werkpakket_lst (list of str): List of names of the werkpakket to create the Excel for.

  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • template_locations (dict): Dictionary which stores the path of all requested template files.

  • output_folder (Path): Optional input for location where to create the report. Default value is None, indicating the default location is used. In normal production objects do not change this!

Output:
  • Filled template with combined information from project and MYVIIA. Values that couldn’t be retrieved are left blank.

  • Returns list of created files.

Helper functions for reporting

viiapackage.reporting.viia_forces_l2_measures.viia_forces_l2_measures(project: ViiaProject, json: Path, tb_4a_file: Path) Path[source]

This function can be used to obtain the maximum and minimum forces in L2 measures (interfaces). The output produces an Excel sheet with a summary of the maximum and minimum forces per interface.

Input:
  • project (obj): Project object reference containing collections of fem objects and project variables.

  • json_file (Path): Path to the location of the json-file including the analysis.

  • tb_file (Path): Path to the location of the tb-file which contains the results of the stresses in the interfaces from output 4 in the NLTH analysis.

Output:
  • Creates an Excel sheet with a summary of the maximum and minimum forces in the interfaces for strengthening measures L2.

  • Returns the path of the Excel-file.

viiapackage.reporting.viia_report_input_check.viia_get_tender_specification_deliverable(project: ViiaProject, report_type: str) str[source]

Function to collect the tender specification of the requested deliverable on MYVIIA.

viiapackage.reporting.viia_report_input_check.viia_report_input_check(project: ViiaProject, report_type: str = 'TVA', governing_analysis: Optional[str] = None, scope_change_id: Optional[int] = None, werkpakket_lst: Optional[List[str]] = None) Tuple[str, str][source]

This function checks the required input information for generating the report.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • report_type (str): Input of the user to specify the desired report that needs to be generated. Default value is ‘TVA’ selecting the engineering report.

  • governing_analysis (str): Governing analysis for NLTH results. For NLTH report the governing analysis can be selected from ‘S1’, ‘S2’, ‘S3’, ‘S4’, ‘S5’, ‘S6’, ‘S7’, ‘S8’, ‘S9’, ‘S10’ or ‘S11’. Default value is None, which should be selected for other report-types than the NLTH TVA report.

  • scope_change_id (int): ID of the selected object scope-change in MYVIIA database. Default value is None, only required when the BKG report is created with this function.

  • werkpakket_lst (list of str): List of names of the werkpakket to create the Excel for. Default value is None, only required when the uren monitor report is created with this function.

Output:
  • Raise error messages if the inputs are incomplete/wrong, and the reporting process will be aborted.

  • Provides warnings if certain input is set by the function.

  • Returns a tuple with the report-type as string and template version as string.

viiapackage.reporting.helper_functions.collect_template.viia_collect_templates(project: ViiaProject, report_type: str = None, tender_specification: str = None) Dict[str, str][source]

This function sets up the folder locations for the model/result pictures.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • report_type (str): Report type, choosing from ‘opname’, ‘opnameplan’, ‘engineering’ or ‘beoordeling’.

  • tender_specification (str): Tender specification (NL: vraagspecificatie) that relates to the required template version . For example ‘2021_09082021’.

Output:
  • Templates are collected and stored in a dictionary for all requested reports.

viiapackage.reporting.helper_functions.find_latest_folder.find_latest_folder(project: ViiaProject, file_path: Path)[source]

This function finds the latest folder in a given path based on the latest version and time an in the name of the folder. For BSC, v001 is used and for TVA, the latest version is utilised. Within this selection the latest timestamp in the folder name is used to find the folder.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • file_path (str): The path of the folder containing the folders from which the latest result folder must be obtained.

Output:
  • The latest result folder for BSC or TVA is returned. Returns None if it could not be found.

viiapackage.reporting.helper_functions.get_a1_info_from_myviia.viia_get_a1_info_from_myviia(project: ViiaProject, language: str = 'EN') Dict[str, Union[str, float]][source]

This function generates dictionary with data that can be used in reporting the results of the A1 analysis for NLTH.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • language (str): Select the language to use for collecting general info. Default value is ‘EN’ collecting the context in English.

Output
  • Dictionary of jinja tags assigned to corresponding info which is retrieved from A1 analysis on MYVIIA.

viiapackage.reporting.helper_functions.get_acceptance_criteria.viia_get_acceptance_criteria(project: ViiaProject, shape_type: str = 'floors') List[Dict[str, str]][source]

Function to collect the acceptance criteria per shape in the model of the object, for which a NLTH analysis is performed.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • shape_type (string): The type of shape that should be considered. Possible are ‘floors’ and ‘roofs’. Default is ‘floors’.

Output:
  • Returns a list with dictionaries with the acceptance criteria per shape.

viiapackage.reporting.helper_functions.get_beoordeling_data.get_beoordeling_data(project: ViiaProject) dict[source]

This function will generate dictionary keys for beoordeling data that can later be used as jinja tags for templating.

Note

Currently only available in Dutch.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output
  • Dictionary of jinja tags assigned to corresponding info.

viiapackage.reporting.helper_functions.get_components_info.get_components_info(project: ViiaProject) dict[source]

This function will generate dictionary keys for model information that can later be used as jinja tags for templating.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • Returns dictionary of jinja tags assigned to corresponding info.

viiapackage.reporting.helper_functions.get_connection_info.get_connection_info(project: ViiaProject) dict[source]

This function will generate dictionary keys for connection information that can later be used as jinja tags for templating.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • Returns dictionary of jinja tags assigned to corresponding info.

viiapackage.reporting.helper_functions.get_element_numbers.get_element_numbers(project: ViiaProject) Dict[str, Dict[str, str]][source]

This function will generate dictionary keys for number of mesh-elements that are used in the engineering report.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output
  • Returns dictionary of jinja tags assigned to corresponding info.

viiapackage.reporting.helper_functions.get_foundation_info.get_foundation_info(project: ViiaProject) dict[source]

This function will generate dictionary keys for foundation information that can later be used as jinja tags for templating.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output
  • Returns dictionary of jinja tags assigned to corresponding info.

viiapackage.reporting.helper_functions.get_inspection_data.get_inspection_data(project: ViiaProject) dict[source]

This function will generate dictionary keys for inspection data that can later be used as jinja tags for templating.

Note

Currently only available in Dutch.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output
  • Dictionary of jinja tags assigned to corresponding info.

viiapackage.reporting.helper_functions.get_l2_interfaces.get_l2_interfaces(project: ViiaProject)[source]

This function will get the L2 line interface.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output
  • List of L2 interfaces

viiapackage.reporting.helper_functions.get_l2_measure_data.get_l2_measure_data(project: ViiaProject) List[source]

Get the data of L2 measures.

Input:
  • project (obj): Project object reference containing collections of fem objects and project variables.

Output:
  • A dict with the measure information of the L2 measures

viiapackage.reporting.helper_functions.get_l2_measure_results.get_l2_measure_results(project: ViiaProject, interfaces: List[Interface] = None) dict[source]

Get the results of L2 measures.

Input:
  • project (obj): Project object reference containing collections of fem objects and project variables.

  • interfaces (list of obj): List of interfaces objects that needs to be considered. When None all the interfaces will be considered. Default is None.

Output:
  • A dict with the result information of the L2 measures

viiapackage.reporting.helper_functions.get_results_info.get_results_info(project: ViiaProject, governing_analysis: str = None, image_folders: dict = None) dict[source]

This function will generate dictionary keys for results information that can later be used as jinja tags for templating.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • governing_analysis (str): Governing analysis for NLTH/NLPO results. For NLTH, choosing from ‘S1’, ‘S2’, ‘S3’, ‘S4’, ‘S5’, ‘S6’, ‘S7’, ‘S8’, ‘S9’, ‘S10’ or ‘S11’. For NLPO choosing from ‘X_pos_uni’, ‘X_pos_modal’, ‘X_neg_uni’, ‘X_neg_modal’, ‘Y_pos_uni’, ‘Y_pos_modal’, ‘Y_neg_uni’ or ‘Y_neg_modal’.

  • image_folders (dict): Dictionary where the folder paths are stored for manual/model/result pictures.

Output
  • Dictionary of jinja tags assigned to corresponding info.

viiapackage.reporting.helper_functions.get_wall_displacements_data.viia_get_wall_displacements_data(project: ViiaProject, result_folder: Optional[Path] = None, wall_displacements_json_file: Optional[Path] = None) Dict[str, Dict[str, Union[str, List[Dict[str, Union[int, str, bool]]]]]][source]

This function will generate a dictionary with data for the wall displacements in the requested analysis. The data can later be used in the reporting. The data is ordered to generate a table with walls and per wall the in-plane and out-of-plane displacements and limits. Also, the name of the picture with the governing wall displacements is retrieved.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • result_folder (Path): Path for the NLTH result folder for which the wall displacements will be collected. Default value None, only applicable if the json-file is provided directly.

  • wall_displacements_json_file (Path): Json-file with the wall displacement results of the requested governing analysis.

Output:
  • Returns a dictionary with the data of the wall displacements relevant for summary in reporting.

viiapackage.reporting.helper_functions.load_l2_measure_data.load_l2_measure_data(project: ViiaProject, governing_analysis: str) List[source]

Get the data of L2 measures.

Input:
  • project (obj): Project object reference containing collections of fem objects and project variables.

  • governing_analysis (str): Name of the governing analysis, for example ‘S2’.

Output:
  • L2 measure data is loaded if available

viiapackage.reporting.helper_functions.set_folder_location.set_folder_location(project: ViiaProject, governing_analysis: str) dict[source]

This function sets up the folder locations for the model/result pictures.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • governing_analysis (str): Name of the governing analysis, for example ‘S2’.

Output:
  • Folder locations for the required model/result pictures are set up and returned in a dictionary.

  • User is notified about the folder locations in project log file.

viiapackage.reporting.helper_functions.viia_append_report.add_paragraph_in_word(bsc, tva, index_to_add: int, init_text: str, add_table: bool, index_for_table: Optional[int] = None, table: Optional = None, caption_for_table: Optional = None, final_text: Optional = None, final_word: Optional = None)[source]

Add paragraph in the Word document from another word document. The paragraph is retrieved based on te initial text. If no end string is provided only this paragraph will be transferred. The final text or final word (in that order) are checked to find the end of the paragraph to be transferred.

Input:
  • bsc (obj): Object of BSC word document in which paragraph should be added.

  • tva (obj): Object of TVA word document from which paragraph is taken.

  • index_to_add (int): Index for BSC word document in order to add the paragraph before this.

  • init_text (str): Initial text from the paragraph in TVA document that is to be added.

  • final_text (str): Final text from the paragraph in TVA document that is to be added.

  • final_word (str): Final word from the paragraph in TVA document that is to be added.

  • add_table (bool): Boolean to add table.

  • index_for_table (int): Index for BSC word document to add table before that

  • table (obj): Object from word document with table from the TVA document that needs to be added.

  • caption_for_table (str): Caption of the table to be added.

Output:
  • The paragraph is added to the Word document.

viiapackage.reporting.helper_functions.viia_append_report.del_paragraph_in_word(bsc, init_text: str, final_text: Optional[str] = None, final_word: Optional[str] = None) int[source]

Delete certain paragraph in word document. The paragraph is retrieved based on te initial text. If no end string is provided only this paragraph will be removed. The final text or final word (in that order) are checked to find the end of the paragraph to be removed.

Input:
  • bsc (obj): Object of word document.

  • init_text (str): Initial text of the paragraph to be deleted.

  • final_text (str): Optional final text of the paragraph to be deleted. Default value is None.

  • final_word (str): Final word of the paragraph to be deleted. Default value is None.

Output:
  • Removes the paragraph from the Word document.

  • Returns the index as integer of last paragraph in the BSC.

viiapackage.reporting.helper_functions.viia_collect_input_folders.viia_check_input_folders(input_folders: Dict[str, Union[Path, Dict[str, Path]]]) Dict[str, Path][source]

This function checks the input folders by the user for reporting functionality.

Input:
  • input_folders (dict): Dictionary with the input folders for reporting, provided by the user. The keys are the different analyses. The value is the path, or in case of the NLTH the signal folders as sub-dictionary.

Output:
  • Returns dictionary with the same structure, only the non-existing folders have been set to None.

viiapackage.reporting.helper_functions.viia_collect_input_folders.viia_collect_folders_reporting(project: ViiaProject, governing_analysis: str, folder_a7: Optional[Path] = None, folder_a10: Optional[Path] = None, folders_a12: Optional[Dict[str, Path]] = None, folder_a13: Optional[Path] = None, folders_a15: Optional[Dict[str, Path]] = None) Tuple[Dict[str, Path], Optional[Path]][source]

This function collects the folders with analyses relevant for the reporting in TVA of the NLTH. It provides options for the user to check the inputs and overrule if needed. It will load the model of the governing analysis, which is used for the automated reporting (mesh data, applied strengthening measures, etc.).

Note

This function should be run in the report script, there should not be a model loaded prior to this function. Checks are performed if all required data is found and correct. Please follow VIIA workflow.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • governing_analysis (str): Governing analysis for NLTH results. For NLTH report the governing analysis can be selected from ‘S1’, ‘S2’, ‘S3’, ‘S4’, ‘S5’, ‘S6’, ‘S7’, ‘S8’, ‘S9’, ‘S10’ or ‘S11’.

  • folder_a7 (Path): Path of the A7 analysis folder where the results of the analysis can be found. Default value is None, in which case the folder is automatically retrieved based on naming conventions in VIIA.

  • folder_a10 (Path): Path of the A10 analysis folder where the results of the analysis can be found. Default value is None, in which case the folder is automatically retrieved based on naming conventions in VIIA.

  • folders_a12 (dict): Dictionary with the paths of the A12 analysis to be used. Default value is None, in which case the folder is automatically retrieved based on naming conventions in VIIA.

  • folder_a13 (Path): Path of the A13 analysis folder where the results of the analysis can be found. Default value is None, in which case the folder is automatically retrieved based on naming conventions in VIIA. Only used for objects with strengthening.

  • folders_a15 (dict): Dictionary with the paths of the A15 analysis to be used. Default value is None, in which case the folder is automatically retrieved based on naming conventions in VIIA. Only required for strengthened objects.

Output:
  • Returns tuple of two with first item a dictionary with the result folders to be used for reporting. Second item is the folder of the governing NLTH folder (the governing signal for A12 or A15 analysis, depending on the version.

viiapackage.reporting.helper_functions.viia_collect_input_folders.viia_collect_result_files_nlth(version: int, governing_signal: str, result_folders: Dict[str, Union[Path, Dict[str, Path]]]) Dict[str, Dict[str, Union[str, Path]]][source]

Function to collect the data for governing signal and collect the other analyses separately. According to the jinja-tags used in the templates.

Input:
  • version (int): Version number of the object, 1 is existing situation assessment.

  • governing_signal (str): Name of the governing signal, for example ‘S1’.

  • result_folders (dict): Dictionary with the input folders for reporting, provided by the user. The keys are the different analyses. The value is the path, or in case of the NLTH the signal folders as sub-dictionary.

Output:
  • Returns the dictionary of analysis conforming to the structure expected in the templates.

viiapackage.reporting.helper_functions.viia_get_address_info.viia_get_address_info(project: ViiaProject, myviia_data_object_address: dict) Tuple[str, List[str], List[int], str, str][source]

This function will generate the information about the addresses in the object that needs to be collected for the reporting in a specific order. Data about the object addresses is to be retrieved from MYVIIA.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • myviia_data_object_address (dict): Dictionary with data on the object addresses from MYVIIA.

Output
  • Returns a tuple with five variables, in the following order.

  • String with contraction of all the addresses of the object, according specific rules on how to combine different addresses (if required to combine), as string.

  • List with the full address added separately, but ordered according requirements, as list of strings.

  • List of the dossier numbers of NCG from MYVIIA, as list of integers.

  • Zip-code for all the addresses, as string. If multiple a warning is thrown and the first one is used.

  • Name of the municipality for all the addresses, as string. If multiple a warning is thrown and the first one is used.

viiapackage.reporting.helper_functions.viia_get_bevindingen_report_data.get_bevindingen_report_data(project: ViiaProject, extra_object_parts: Optional[List[str]] = None) dict[source]

This function will generate dictionary keys for Bevindingen report data that can later be used as jinja tags for templating.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • extra_object_parts (list of str): List of names of extra object parts to include in the report. Default value is None.

Output
  • Dictionary of jinja tags assigned to corresponding info.

viiapackage.reporting.helper_functions.viia_get_general_info.viia_get_general_info(project: ViiaProject, language: str = 'en') dict[source]

This function will generate dictionary for general info that can later be used as jinja tags for templating. Data is mainly collected from MYVIIA webtool or derived from model.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • language (str): Select the language to use for collecting general info. Default value is ‘en’ collecting the context in English.

Output
  • Returns dictionary for jinja tags assigned to corresponding info.

viiapackage.reporting.helper_functions.viia_get_gutter_height.viia_get_gutter_height(project: ViiaProject) Optional[float][source]

This function will calculate the gutter height that is obtained based on the z-coordinates of horizontal floors. The gutter height is taken as the highest horizontal floor present in the fem-model.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • Returns the gutter height as float, in [m]. Returns None for non-NLTH analysis.

viiapackage.reporting.helper_functions.viia_get_ontwerpnotitie_report_data.get_ontwerpnotitie_report_data(project: ViiaProject, extra_object_parts: Optional[List[str]] = None) dict[source]

This function will generate dictionary keys for ontwerpnotitie report data that can later be used as jinja tags for templating.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • extra_object_parts (list of str): List of names of extra object parts to include in the report. Default value is None.

Output
  • Dictionary of jinja tags assigned to corresponding info.

viiapackage.reporting.helper_functions.viia_get_psse_nsce_plots.viia_get_psse_nsce_plots(project: ViiaProject, appendix_pictures_folder: Path) Dict[str, List[Dict[str, Union[str, Path]]]][source]

Collect the PSSE-NSCE plots to be added to the engineering report.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • appendix_pictures_folder (Path): Folder with the appendix pictures for the engineering report.

Output:
  • Returns a dictionary with jinja tag vs a list of dicts with jinja tags vs layer name and picture path.

viiapackage.reporting.helper_functions.viia_get_uo_report_data.get_uo_report_data(project: ViiaProject, extra_object_parts: Optional[List[str]] = None) dict[source]

This function will generate dictionary keys for UO report data that can later be used as jinja tags for templating.

Input
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • extra_object_parts (list of str): List of names of extra object parts to include in the report. Default value is None.

Output
  • Dictionary of jinja tags assigned to corresponding info.

viiapackage.reporting.helper_functions.viia_templating_data.viia_templating_data(project: ViiaProject, report_type: str, tender_specification: str, governing_analysis: str = None, input_folders: Dict[str, Path] = None, extra_object_parts: Optional[List[str]] = None) Dict[str, Any][source]

This function collects data for the templates.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • report_type (str): Report type, for example ‘opname’, ‘opnameplan’ or ‘engineering’, etc. Refer to the viia_create_report function for allowed report-types.

  • tender_specification (str): Tender specification (NL: vraagspecificatie) that relates to the required template version . For example ‘2021_09082021’.

  • governing_analysis (str): Governing analysis for NLTH/NLPO results. For NLTH, choosing from ‘S1’, ‘S2’, ‘S3’, ‘S4’, ‘S5’, ‘S6’, ‘S7’, ‘S8’, ‘S9’, ‘S10’ or ‘S11’. For NLPO choosing from ‘X_pos_uni’, ‘X_pos_modal’, ‘X_neg_uni’, ‘X_neg_modal’, ‘Y_pos_uni’, ‘Y_pos_modal’, ‘Y_neg_uni’ or ‘Y_neg_modal’.

  • input_folders (dict): Dictionary with the folders where the results of the analyses should be collected from. Default value None. Input is only required for the engineering report of NLTH assessment.

  • extra_object_parts (list of str): List of names of extra object parts to include in the report. Default value is None, only required when the uo report is created with this function.

Output:
  • Returns dictionary with all data to be passed to the jinja tags in the template.