v3.3
-
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
bldglabel 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
Bldgfrom repair settings label in DL configuration file: Following the changes above, we droppedBldgfromBldgRepairwhen 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 theRepairkeyword 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.Aat each location triggers DS1 ofCMP.Bat the same location. -
New
custom_model_dirargument 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_unitsfunction: 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 as
converted_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.pyinto subcomponents: Themodel.pyfile 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 themodelfolder. -
Split the
RandomVariableclass 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 largeRandomVariableclass inuq.pyleveraging 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
bldgfrom variable and class names: Following the changes mentioned earlier, we droppedbldgfrom lables where the functionality is no longer limited to buildings. -
Introduce
calibratedattribute 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