simdesign.rcmrf.bcim.factory
BCIM factory module.
This module provides a factory interface for generating Building Class Information Model (BCIM) for a given design class, number of storeys and lateral load coefficient (beta).
- simdesign.rcmrf.bcim.factory.INFILL_TYPE_MAPPER = {1: 'Weak', 2: 'Medium', 3: 'Strong'}
Infill typology mapper.
- simdesign.rcmrf.bcim.factory.INFILL_XZ_LIST = [1, 2, 3, 5, 6, 7, 9, 10, 11]
List of infill configuration IDs where infills exist in XZ plane.
- simdesign.rcmrf.bcim.factory.INFILL_YZ_LIST = [1, 2, 4, 5, 6, 8, 9, 10, 12]
List of infill configuration IDs where infills exist in YZ plane.
- simdesign.rcmrf.bcim.factory.INFILL_GROUND_LIST = [1, 5, 9]
List of infill configuration IDs where infills exist in ground floor.
- simdesign.rcmrf.bcim.factory.INFILL_INTERIOR_LIST = [5, 6, 7, 8, 9, 10, 11, 12]
List of infill configuration IDs where infills exist in interior frames.
- simdesign.rcmrf.bcim.factory.INFILL_EXTERIOR_LIST = [1, 2, 3, 4, 5, 6, 7, 8]
List of infill configuration IDs where infills exist in exterior frames.
- class simdesign.rcmrf.bcim.factory.Archetypes[source]
Bases:
objectOrchestrator for the building archetypes data loaded from layouts file.
- Variables:
available_tags (List[str]) – List of available archetype tags.
file_path (Path) – Path to the CSV file containing archetype data.
all_data (List[ArchetypeData]) – List containing all archetype data loaded from the CSV file.
- file_path: Path = PosixPath('/home/runner/work/simulated-design/simulated-design/simdesign/rcmrf/bcim/data/layouts.csv')
- all_data: List[ArchetypeData]
- property available_tags: List[str]
List of available archetype tags.
- Returns:
List of available archetype tags.
- Return type:
List[str]
- get_data_for_given_tag(tag)[source]
Retrieve archetype data for the given tag.
- Parameters:
tag (str) – The tag of the archetype (floor layout) for which data is requested.
- Returns:
Archetype data (floor layout) if found, None otherwise.
- Return type:
ArchetypeData | None
- get_data_for_given_tags(tags)[source]
Retrieve archetype data for the given list of tags.
- Parameters:
tags (List[str]) – The list of tags for which archetype (floor layout) data is requested.
- Returns:
List of archetype data for the requested tags.
- Return type:
List[ArchetypeData] | None
- get_geometry(tag, num_storeys, storey_height, ground_storey_height, bay_width_x, bay_width_y, stairs_width_x, infill_loc, ext_infill, int_infill)[source]
Retrieve the geometry of a building archetype for the given tag.
- Parameters:
tag (str) – The tag of the archetype (layout) for which geometry is requested.
num_storeys (int) – Number of storeys in the building.
storey_height (float) – Height of each storey.
ground_storey_height (float) – Height of the ground storey.
bay_width_x (float) – Width of the bays along the x-axis.
bay_width_y (float) – Width of the bays along the y-axis.
stairs_width_x (float) – Width of the stairs along the x-axis.
infill_loc (int) – Infill location configuration ID.
ext_infill (int) – Exterior infill typology ID.
int_infill (int) – Interior infill typology ID.
- Returns:
StandardGeometry object representing the geometry of the building archetype.
- Return type:
- class simdesign.rcmrf.bcim.factory.DefaultInputs[source]
Bases:
objectThe class to load and manage the default input data from JSON files.
The data include the statistical distribution parameters required to perform random sampling, the parameters required to define building geometries per realization (e.g., num_storeys) and those required to perform simulated designs (e.g., beta).
- Variables:
available_classes (List[str]) – List of available design classes.
defaults (Dict[str, InputData]) – Data from all JSON files.
data_path (Path) – Path to the folder containing JSON files of the parameters.
- data_path: Path = PosixPath('/home/runner/work/simulated-design/simulated-design/simdesign/rcmrf/bcim/data')
- get(design_class)[source]
Return the parameters data for the specified design class.
- Parameters:
design_class (str) – The design class for which the parameters will be returned.
- Returns:
The parameters defined for the specified design class.
- Return type:
- property available_classes: List[str]
List of available design classes.
- Returns:
List of available design classes.
- Return type:
List[str]
- class simdesign.rcmrf.bcim.factory.BCIM[source]
Bases:
objectThe class to generate Building Class Information Model (BCIM) data.
Currently, portfolio generation is limited to with fixed floor layouts and single staircase throughout buildings.
- Variables:
inputs (InputData) – Input parameters used for BCIM data generation.
staircase_span_length_x (List[float]) – Staircase span length in x direction.
staircase_span_length_y (List[float]) – Staircase span length in y direction.
typical_span_length_x (List[float]) – Typical span length in x direction.
typical_span_length_y (List[float]) – Typical span length in y direction.
layout (List[str]) – Building floor layouts.
typical_storey_height (List[float]) – Typical storey height.
ground_storey_height (List[float]) – Ground storey height.
slab_thickness (List[float | None]) – Slab thickness.
slab_type (List[int]) – Slab type. 1: Solid two-way cast-in-situ slabs (SS2). 2: Solid one-way cast-in-situ slabs (SS1). 3: One-way composite slab with ceramic blocks and RC joists or pre-stressed beams (HS).
staircase_slab_depth (List[float | None]) – Depth of the staircase slabs.
beam_type (List[int]) – Beam typology. 1: Wide beams. 2: Emergent beams.
column_section (List[int]) – Column cross-section. 1: Square solid section. 2: Rectangular solid section.
steel_grade (List[str]) – Steel material grade, e.g., ‘S400’.
concrete_grade (List[str]) – Concrete material grade, e.g., ‘C20’.
quality (List[int]) – Construction quality. 1: High quality. 2: Moderate quality. 3: Low quality.
geometry (List[StandardGeometry]) – List of building geometry instances.
floor_width_x (List[float]) – Total floor width in x direction in floor layout.
floor_width_y (List[float]) – Total floor width in y direction in floor layout.
floor_area (List[float]) – Total floor area in floor layout.
long_over_short_width (List[float]) – Ratio of longer to shorter floor widths in floor layout.
beta (List[float]) – Design lateral load factor.
beta_v (List[float | None]) – Vertical load factor.
num_storeys (List[int]) – Number of storeys.
design_class (List[str]) – Building design class.
infill_conf (List[int]) – Masonry infill wall configuration IDs.
ext_infill (List[int]) – Exterior infill typology IDs.
int_infill (List[int]) – Interior infill typology IDs.
available_design_classes (List[str]) – Available design classes to use.
available_archetypes (List[str]) – Available building archetypes (layouts) to use.
taxonomy (List[TaxonomyData]) – Taxonomy information required for simulated design.
- staircase_span_length_x: List[float]
- staircase_span_length_y: List[float]
- typical_span_length_x: List[float]
- typical_span_length_y: List[float]
- layout: List[str]
- typical_storey_height: List[float]
- ground_storey_height: List[float]
- slab_thickness: List[float | None]
- slab_type: List[Literal[1, 2, 3]]
- staircase_slab_depth: List[float | None]
- beam_type: List[Literal[1, 2]]
- column_section: List[Literal[1, 2]]
- steel_grade: List[str]
- concrete_grade: List[str]
- quality: List[Literal[1, 2, 3]]
- geometry: List[StandardGeometry]
- floor_width_x: List[float]
- floor_width_y: List[float]
- floor_area: List[float]
- long_over_short_width: List[float]
- beta: List[float]
- beta_v: List[float | None]
- num_storeys: List[int]
- design_class: List[float]
- infill_conf: List[int]
- ext_infill: List[int]
- int_infill: List[int]
- generate(design_class, **inputs)[source]
Generate BCIM data based on the specified inputs.
This method uses the parameters defined in JSON files for the specified design_class as the default inputs. If a parameter needs to be changed, it can be specified as a keyword argument. All possible inputs other than design_class are listed in the Examples section.
- Parameters:
design_class (str) – Building design class.
**inputs – Contains input parameters required for data generation. These will replace the defaults obtained for the specified design_class.
- Return type:
None
Examples
>>> design_class = "eu_cdh" >>> inputs = { "typical_storey_height": { "cv": 0.07, "mu": 2.90, "lower_bound": 2.3, "upper_bound": 3.8 }, "staircase_bay_width": { "lower_bound": 2.8, "upper_bound": 3.2 }, "standard_bay_width": { "corr_coeff_xy": -0.92, "lower_bound_x": 3.5, "upper_bound_x": 7.5, "theta_x": 4.5, "sigma_x": 0.35, "lower_bound_y": 3.5, "upper_bound_y": 7.5, "theta_y": 4.5, "sigma_y": 0.35 }, "steel": { "tag": ["S400", "S500"], "probability": [0.10, 0.90] }, "concrete": { "tag": ["C20", "C25", "C30", "C35"], "probability": [0.30, 0.45, 0.20, 0.05] }, "ground_storey_height": { "maximum": 4.20, "factor": [1.0, 1.1, 1.2, 1.3, 1.4], "probability": [0.55, 0.10, 0.20, 0.10, 0.05] }, "construction_quality": { "quality" [1, 2, 3] "probability": [0.6, 0.3, 0.1] }, "slab_typology": { "ss1_prob_given_ss1_or_hs": 0.50, "ss2_prob_given_ss2_or_hs": 0.65, "upper_lim_for_min_ss_span_length": 6.0, "upper_lim_for_max_ss2_span_ratio": 2.0, "staircase_slab_depth": 0.15, "floor_slab_thickness": 0.15 }, "exterior_infill_type": { "typology" [1, 2, 3] "probability": [0.4, 0.4, 0.2] }, "interior_infill_type": { "typology" [1, 2] "probability": [0.5, 0.5] }, "infill_configuration": { "configuration" [1, 2, 5, 6] "probability": [0.2, 0.2, 0.3, 0.3] }, "wb_prob_given_hs": 0.50, "square_column_prob": 0.50, "layout": "all", "beta": 0.15, "num_storeys": 5, "seed": 1993, "sample_size": 150 }
- property available_design_classes: List[str]
List of available design classes.
- Returns:
List of available design classes that can be used for BCIM data generation.
- Return type:
List[str]
- property available_archetypes: List[str]
List of available archetype tags.
- Returns:
List of available archetype (layouts) tags that can be used for BCIM data generation.
- Return type:
List[str]
- property taxonomy: List[TaxonomyData]
List of taxonomy data for each building realisation.
- Returns:
List of design inputs (taxonomy) for each building realisation.
- Return type:
List[TaxonomyData]