NHERI-SimCenter/pelicun: v3.3
- 1. Stanford University
- 2. University of California, Berkeley
Description
Changes affecting backwards compatibility
- Remove "bldg" from repair consequence output filenames: The increasing scope of Pelicun now covers simulations for transportation and water networks. Hence, labeling repair consequence outputs as if they were limited to buildings no longer seems appropriate. The
bldg
label was dropped from the following files:DV_bldg_repair_sample
,DV_bldg_repair_stats
,DV_bldg_repair_grp
,DV_bldg_repair_grp_stats
,DV_bldg_repair_agg
,DV_bldg_repair_agg_stats
.
- Remove "bldg" from repair consequence output filenames: The increasing scope of Pelicun now covers simulations for transportation and water networks. Hence, labeling repair consequence outputs as if they were limited to buildings no longer seems appropriate. The
Deprecation warnings
- Remove
Bldg
from repair settings label in DL configuration file: Following the changes above, we droppedBldg
fromBldgRepair
when defining settings for repair consequence simulation in a configuration file. The previous version (i.e.,BldgRepair
) will keep working until the next major release, but we encourage everyone to adopt the new approach and simply use theRepair
keyword there.
- Remove
New features
Location-specific damage processes: This new feature is useful when you want damage to a component type to induce damage in another component type at the same location only. For example, damaged water pipes on a specific story can trigger damage in floor covering only on that specific story. Location-matching is performed automatically without you having to define component pairs for every location using the following syntax:
'1_CMP.A-LOC', {'DS1': 'CMP.B_DS1'}
, where DS1 ofCMP.A
at each location triggers DS1 ofCMP.B
at the same location.New
custom_model_dir
argument forDL_calculation
: This argument allows users to prepare custom damage and loss model files in a folder and pass the path to that folder to an auto-population script throughDL_calculation
. Within the auto-population script, they can reference only the name of the files in that folder. This provides portability for simulations that use custom models and auto population, such as some of the advanced regional simualtions in SimCenter's R2D Tool.Extend Hazus EQ auto population sripts to include water networks: Automatically recognize water network assets and map them to archetypes from the Hazus Earthquake technical manual.
Introduce
convert_units
function: Provide streamlined unit conversion using the pre-defined library of units in Pelicun. Allows you to convert a variable from one unit to another using a single line of simple code, such asconverted_height = pelicun.base.convert_units(raw_height, unit='m', to_unit='ft')
While not as powerful as some of the Python packages dedicated to unit conversion (e.g., Pint), we believe the convenience this function provides for commonly used units justifies its use in several cases.
Architectural and code updates
Split
model.py
into subcomponents: Themodel.py
file was too large and its contents were easy to refactor into separate modules. Each model type has its own python file now and they are stored under themodel
folder.Split the
RandomVariable
class into specific classes: It seems more straightforward to grow the list of supported random variables by having a specific class for each kind of RV. We split the existing largeRandomVariable
class inuq.py
leveraging inheritance to minimize redundant code.Automatic code formatting: Further improve consistency in coding style by using black to review and format the code when needed.
Remove
bldg
from variable and class names: Following the changes mentioned earlier, we droppedbldg
from lables where the functionality is no longer limited to buildings.Introduce
calibrated
attribute for demand model: This new attribute will allow users to check if a model has already been calibrated to the provided empirical data.Several other minor improvements; see commit messages for details.
Dependencies
- Ceiling raised for
pandas
, supporting version 2.0 and above up until 3.0.
- Ceiling raised for
Files
NHERI-SimCenter/pelicun-v3.3.zip
Files
(1.2 MB)
Name | Size | Download all |
---|---|---|
md5:fbd25272a547c5564f4008ac7b875255
|
1.2 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/NHERI-SimCenter/pelicun/tree/v3.3 (URL)