teaser.logic package

Subpackages

Submodules

teaser.logic.retrofit module

teaser.logic.retrofit.component_based_retrofit(building: Building, element_retrofit_stats: dict)[source]

Apply component-based retrofits to a building based on specified retrofit statuses.

This function applies retrofits to specific building elements (e.g., walls, windows) based on the provided retrofit statuses.

Parameters:
buildingBuilding

The building object to be retrofitted.

element_retrofit_statsdict

A dictionary specifying the retrofit status for each building element. Keys are element names (e.g., ‘outer_walls’), and values are retrofit options (e.g., ‘standard’, ‘retrofit’).

teaser.logic.retrofit.generate_buildings_for_all_element_combinations(project_add_building_function: callable, add_building_function_kwargs: dict, elements: list | None = None, retrofit_choices: list | None = None)[source]

Generate buildings for all possible combinations of retrofit statuses for specified building elements.

This function creates multiple variations of a building based on different retrofit options for specified building elements. It’s designed to work with TABULA archetypes.

Parameters:
project_add_building_functioncallable

Function to add a building to the project.

add_building_function_kwargsdict

Keyword arguments for the add_building function.

elementslist, optional

List of building elements to consider for retrofit. Defaults to [‘outer_walls’, ‘windows’, ‘rooftops’, ‘ground_floors’].

retrofit_choiceslist, optional

List of retrofit options to consider. Defaults to [‘standard’, ‘retrofit’, ‘adv_retrofit’].

Returns:
list: A list of names of the generated buildings.
Raises:
ValueError: If unsupported elements or retrofit choices are provided, or if the

construction data is not from TABULA DE or DK.

teaser.logic.utilities module

Utilities: Collection of all utility functions that are useful in several classes

teaser.logic.utilities.celsius_to_kelvin(value)[source]
teaser.logic.utilities.clear_directory(dir_path=None)[source]

Function to delete all files inside a directory.

Parameters:
dir_pathstr

Path of directory to be deleted. By default the teaser default directory is cleared

teaser.logic.utilities.create_path(path)[source]

Create a folder.

Creates a new folder.

Parameters:
pathstr
teaser.logic.utilities.division_from_json(ordereddict)[source]

function to transform the output of division in json after loading to python into float values

Parameters:
ordereddictoutput of the json load of arguments like
“persons”: {“/”:[1,15]}
teaser.logic.utilities.get_default_path()[source]

Function to construct default path to OutputData folder This function constructs the default path to the OutputData folder

teaser.logic.utilities.get_full_path(rel_path)[source]

Helperfunction to construct pathes to files within teaser.

Parameters:
rel_pathstr

Relative path beginning from teaser source folder including filename

Returns:
full_pathstr