A Python package to model post-earthquake functional recovery of bridges.
Project description
BridgeFuncRecovery
This project aims to probabilistically model the post-earthquake functional recovery of bridges. The source codes are programmed in Python.
Reference
[1] Wu, C., Burton, H., Zsarnóczay, A., Chen. S., Xie. Y., Terzić, V., Günay, S., Padgett, J., Mieler, and M., Almufti, I. (2025). Modeling Post-earthquake Functional Recovery of Bridges. Earthquake Spectra.
Prerequisites
Python: version 3.6 or above.
Necessary Python packages: copy, numpy, pandas, os, scipy, sys, shutil, pathlib, re, time, pickle
What is each file used for
main.py inputs user-specified parameters, and performs the entire analysis.
utils.py provides necessary auxiliary functions that is called from the main script main.py.
After running all cells in main.py, a pickle file Results.pkl is stored that records model output data.
result_anlaysis.py helps visualize the output data stored in Results.pkl.
User-specified inputs
Users must specify the following inputs:
- *IM_fixed
- num_span
- CompQty
- WorkerAllo_percrew
- Worker_Replace
The main function can be called using:
from BridgeFuncRecovery import run
# Example usage:
results = run(IM_fixed=..., num_span=..., CompQty=..., WorkerAllo_percrew=..., Worker_Replace=...)
This will return the result dictionary and save it to a Results.pkl
Analyzing the Results
The functions in result_analysis.py are used to interpret and visualize output data from the main analysis. Available functions include:
- plot_fs_initial(data)
- plot_fs_reopening(data)
- plot_total_impeding_ccdf(data)
- plot_total_repair_ccdf(data)
- print_impeding_medians(data)
- print_repair_durations(data)
- plot_repair_class_distribution_single(data, comp_name)
- plot_all_repair_class_distributions(data)
- plot_closed_lane_initial(data)
- show_all_results(data)
These functions can be called using:
from BridgeFuncRecovery import run, plot_repair_class_distribution_single
# Example usage:
# Run the analysis
results = run(IM_fixed=..., num_span=..., CompQty=..., WorkerAllo_percrew=..., Worker_Replace=...)
# Plot the Repair Class distribution for columns
plot_repair_class_distribution_single(results, 'Col')
This will save the results to Results.pkl and display a figure visualizing Repair Class (RC) distribution for columns.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bridgefuncrecovery-0.1.0.tar.gz.
File metadata
- Download URL: bridgefuncrecovery-0.1.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05300c7b6496fbea5c149304093be8d276c8c83510ffdcf35d7e8155bb41dcd7
|
|
| MD5 |
8a3e3028c7fb8fbc21750ca1e32ef3c5
|
|
| BLAKE2b-256 |
1cfb0f06a92a9d7be2cc35c609c669cd96f94a95d4c5d7cb356b36172c518d3b
|
File details
Details for the file bridgefuncrecovery-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bridgefuncrecovery-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55798a209fa611d819b4d2d910c1d1b0080b4eb8ce21a81d530f84c0a048530a
|
|
| MD5 |
02efa8ceea12d4502ba249a9a180787d
|
|
| BLAKE2b-256 |
918df1d96e0624faeb2ab8b32a2c5b917f102673562261e741d589c303911ede
|