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).

class simdesign.rcmrf.bcim.factory.Archetypes[source]

Bases: object

Orchestrator for the building archetypes data loaded from layouts file.

file_path

Path to the CSV file containing archetype data.

Type:

Path

all_data

List containing all archetype data loaded from the CSV file.

Type:

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:

StandardGeometry

class simdesign.rcmrf.bcim.factory.DefaultInputs[source]

Bases: object

The 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).

defaults

Data from all JSON files.

Type:

Dict[str, InputData]

data_path

Path to the folder containing JSON files of the parameters.

Type:

Path

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:

InputData

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: object

The class to generate Building Class Information Model (BCIM) data.

Currently, portfolio generation is limited to with fixed floor layouts and single staircase throughout buildings.

inputs

Input parameters used for BCIM data generation.

Type:

InputData

staircase_span_length_x

Staircase span length in x direction.

Type:

List[float]

staircase_span_length_y

Staircase span length in y direction.

Type:

List[float]

typical_span_length_x

Typical span length in x direction.

Type:

List[float]

typical_span_length_y

Typical span length in y direction.

Type:

List[float]

layout

Building floor layouts.

Type:

List[str]

typical_storey_height

Typical storey height.

Type:

List[float]

ground_storey_height

Ground storey height.

Type:

List[float]

slab_thickness

Slab thickness.

Type:

List[float | None]

slab_type

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).

Type:

List[int]

staircase_slab_depth

Depth of the staircase slabs.

Type:

List[float | None]

beam_type

Beam typology. 1: Wide beams. 2: Emergent beams.

Type:

List[int]

column_section

Column cross-section. 1: Square solid section. 2: Rectangular solid section.

Type:

List[int]

steel_grade

Steel material grade, e.g., ‘S400’.

Type:

List[str]

concrete_grade

Concrete material grade, e.g., ‘C20’.

Type:

List[str]

quality

Construction quality. 1: High quality. 2: Moderate quality. 3: Low quality.

Type:

List[int]

geometry

List of building geometry instances.

Type:

List[StandardGeometry]

floor_width_x

Total floor width in x direction in floor layout.

Type:

List[float]

floor_width_y

Total floor width in y direction in floor layout.

Type:

List[float]

floor_area

Total floor area in floor layout.

Type:

List[float]

long_over_short_width

Ratio of longer to shorter floor widths in floor layout.

Type:

List[float]

beta

Design lateral load factor.

Type:

List[float]

beta_v

Vertical load factor.

Type:

List[float | None]

num_storeys

Number of storeys.

Type:

List[int]

design_class

Building design class.

Type:

List[str]

infill_conf

Masonry infill wall configuration IDs.

Type:

List[int]

ext_infill

Exterior infill typology IDs.

Type:

List[int]

int_infill

Interior infill typology IDs.

Type:

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]

to_csv(path)[source]

Save the generated BCIM data to the specified CSV file.

Parameters:

path (str | Path) – File path of the csv file. e.g., My/Path/To/The/File.csv

Return type:

None