Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a3b6116
added modeller, postprocessor and im_calculator tests and modified ex…
mouayed-nafeh Feb 7, 2025
813eba5
Added documentation for IMCalculator class
mouayed-nafeh Feb 7, 2025
616934c
Update IMCalculator.md
mouayed-nafeh Feb 8, 2025
65fe102
Changes to README
mouayed-nafeh Feb 16, 2025
1d18f4f
Merge branch 'tests' of github.com:GEMScienceTools/vulnerability-tool…
mouayed-nafeh Feb 16, 2025
220a7e2
Changes to README
mouayed-nafeh Feb 16, 2025
03db385
Changes to README
mouayed-nafeh Feb 16, 2025
eec4190
Changes to README
mouayed-nafeh Feb 16, 2025
a026bda
Changes to README
mouayed-nafeh Feb 16, 2025
c419475
Changes to README
mouayed-nafeh Feb 16, 2025
e5dfc4a
Changes to README
mouayed-nafeh Feb 16, 2025
6e1142a
Update directory in example_1
mouayed-nafeh Feb 16, 2025
1ad6e49
Changes to example_2
mouayed-nafeh Feb 16, 2025
9e460ae
Changes to README
mouayed-nafeh Feb 17, 2025
7a23959
Added bool variable for degradation in MDOF systems
mouayed-nafeh Feb 17, 2025
755f0c0
Updates to example_2
mouayed-nafeh Feb 17, 2025
92ed135
Updates to example_3
mouayed-nafeh Feb 17, 2025
610ba0d
Merge branch 'tests' of https://github.com/GEMScienceTools/vulnerabil…
mouayed-nafeh Feb 17, 2025
16459d2
Cleaned up postprocessor from additional functions
mouayed-nafeh Feb 17, 2025
fcdc3ec
Cleaned up utilities from additional functions
mouayed-nafeh Feb 17, 2025
f46ca4e
Merge branch 'tests' of github.com:GEMScienceTools/vulnerability-tool…
mouayed-nafeh Feb 17, 2025
1b65013
Added average annual damage state probability and average annual loss…
mouayed-nafeh Feb 17, 2025
012b556
Adds test to postprocessor class
mouayed-nafeh Feb 17, 2025
27423aa
Added documentation for modeller class
mouayed-nafeh Feb 17, 2025
e3a3982
Changes to documentation
mouayed-nafeh Feb 17, 2025
88047d9
Changes to documentation
mouayed-nafeh Feb 17, 2025
2e2e9ab
Added documentation to postprocessor class
mouayed-nafeh Feb 17, 2025
2d8bacc
Updates to documentation
mouayed-nafeh Feb 17, 2025
08da44e
Fixes bug in example_3
mouayed-nafeh Feb 18, 2025
ed01061
Deletes folder created from bug in example_3
mouayed-nafeh Feb 18, 2025
98f1437
Added multiple stripe analysis objects to postprocessor and plotter c…
mouayed-nafeh Feb 18, 2025
f1355e2
Added visualising beta distribution in vulnerability function to plot…
mouayed-nafeh Feb 18, 2025
3a3797f
Modify test_postprocessor
mouayed-nafeh Feb 26, 2025
67e1bf6
change name of workflows
vot4anto Feb 26, 2025
e97fd1c
install OQ and use requirements from OQ
vot4anto Feb 26, 2025
8f5fd80
add __init__.py files
vot4anto Feb 26, 2025
c0cf7fc
use src layout
vot4anto Feb 26, 2025
354c40e
change .gitignore
vot4anto Feb 26, 2025
3755dc3
add __init__.py files on tests_data
vot4anto Feb 26, 2025
dc4f45f
add run step on gh action
vot4anto Feb 26, 2025
70be17a
fix paths
vot4anto Feb 26, 2025
50d6062
add pull_request: for schedule
vot4anto Feb 26, 2025
5e94ca5
user mode installation of OpenQuake Engine
vot4anto Feb 26, 2025
6086a73
change folder to vmtk
vot4anto Feb 26, 2025
4380561
use two steps and not one
vot4anto Feb 26, 2025
1dbc681
Clean up functions
mouayed-nafeh Mar 2, 2025
144ca73
add pyproject.toml and requirements file
vot4anto Mar 4, 2025
64cca50
add version number
vot4anto Mar 4, 2025
e61bbf7
use openquake.vmtk in notebook
vot4anto Mar 4, 2025
0efae4a
change test to install package
vot4anto Mar 4, 2025
0ede710
update requirements file
vot4anto Mar 4, 2025
c101d81
update the folder for the test
vot4anto Mar 4, 2025
490fa14
change workflow for the CI
vot4anto Mar 5, 2025
6e068d0
Update pyproject.toml
vot4anto Mar 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 13 additions & 5 deletions .github/workflows/linux_test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Weekly Engine tests
name: Linux tests
on:
pull_request:
workflow_dispatch:
inputs:
git-ref:
Expand Down Expand Up @@ -32,9 +33,16 @@ jobs:
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Install dependencies and run tests
- name: Install Dependencies of OpenQuake engine
run: |
curl -L -O https://github.com/gem/oq-engine/raw/master/install.py
python install.py user --version=master
- name: Install vmtk Package
run: |
source ~/openquake/bin/activate
pip install -e .
- name: Run tests
run: |
source ~/openquake/bin/activate
pip install pytest https://wheelhouse.openquake.org/v3/py/rtgmpy-1.0.0-py3-none-any.whl
oq engine --upgrade-db
pytest --doctest-modules -x --disable-warnings --color=yes --durations=10 openquake/calculators -k 'not risk and not damage and not bcr'
cd openquake/vmtk
pytest --doctest-modules -x --color=yes --durations=10 tests/
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
*.pyc
__pycache__
*.DS_Store
\#*\#
\.\#*
.coverage
*~
*_flymake.py
TAGS
build
build-deb
build-rpm
dist
*.so
*.noseids
*.egg-info
local_settings.py
*.swp
.tox
venv
*.whl
.vscode/
.ipynb_checkpoints/
demos/notebooks/.ipynb_checkpoints/example_1-checkpoint.ipynb
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

## v1.0.0

### Added or Changed
- Stable source code for vulnerability-toolkit
- Added AGPL v3 license
- Added CONTRIBUTORS.txt

### Removed
94 changes: 72 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,69 @@
# Vulnerability-Toolkit

![logo](https://github.com/mouayed-nafeh/vulnerability-toolkit/blob/main/imgs/gem-vulnerability-toolkit.png)

## 🔎 Overview

The **Vulnerability-Toolkit** is an open source library that provides modelling of multi-degree-of-freedom systems and assessment via nonlinear time-history analyses for vulnerability and risk calculations. The **Vulnerability-Toolkit** is developed by the **[GEM](http://www.globalquakemodel.org)** (Global Earthquake Model) Foundation and its collaborators.

DOI: TBD

## 🛠️ Current Features

* MDOF Modelling: Model single- and multi-degree-of-freedom system using low-level information (e.g., number of storeys, first-mode transformation factor, SDoF- or storey-based force-deformation relationships);
* Modal analysis: Estimate periods of vibration and modal shapes;
* Static analysis: Perform gravity, static and cyclic pushover analyses;
* Dynamic analysis: Perform cloud analysis;
* Regression analysis: Perform regression analysis on cloud analysis data to characterise EDP|IM relationship;
* Fragility analysis: Calculate median seismic intensities, associated dispersion (i.e., record-to-record and modelling uncertainties) and the corresponding probabilities of damage based on demand-based thresholds;
* Vulnerability analysis: Perform fragility function convolution with with consequence models for structural, and building contents and region-specific non-structural storey-loss functions;
* Plotting: Plot analysis outputs such as model overview, cloud analysis results, demand profiles (i.e., peak storey drifts and peak floor acceleration along the height of the model), fragility functions. Additionally, it is possible to animate the MDoF considering a single run;

## 📚 Documentation
<a id="readme-top"></a>

<!-- PROJECT SHIELDS -->

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![project_license][license-shield]][license-url]


<!-- PROJECT LOGO -->
<br />
<div align="center">
<a href="https://github.com/GEMScienceTools/vulnerability-toolkit">
<img src="imgs/gem-vulnerability-toolkit.png" alt="Logo" >
</a>

<h3 align="center">Vulnerability Toolkit</h3>

<p align="center">
This repository contains an open source library that provides modelling of multi-degree-of-freedom systems and assessment via nonlinear time-history analyses for regional vulnerability and risk calculations. The vulnerability toolkit is developed by the Global Earthquake Model (GEM) Foundation and its collaborators.
<br />
<a href="https://github.com/GEMScienceTools/vulnerability-toolkit/docs"><strong>Explore the docs »</strong></a>
<br />
<br />
<a href="https://github.com/GEMScienceTools/vulnerability-toolkit/demos">View Demos</a>
·
<a href="https://github.com/GEMScienceTools/vulnerability-toolkit/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
·
<a href="https://github.com/GEMScienceTools/vulnerability-toolkit/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
</p>
</div>

# 🛠️ Features

* Modelling of Multi-Degree-of-Freedom Oscillators in OpenSees: Model single- and multi-degree-of-freedom system using low-level information (e.g., number of storeys, first-mode transformation factor, SDoF- or storey-based force-deformation relationships);
* Linear and Nonlinear Analysis in OpenSees:
* Modal Analysis: Estimate Periods of Vibration and Modal Shapes;
* Gravity Analysis
* Nonlinear Static Analysis: Perform Static and Cyclic Pushover Analyses to Characterise the Lateral Load-Resisting Response of the System;
* Dynamic Analysis: Perform Nonlinear Time-History Analyses using Selected Ground-Motion Records;
* Fragility Analysis: Calculate Median Seismic Intensities and Total Associated Dispersion (i.e., Record-to-Record Variability and Modelling Uncertainty):
* Regression Analysis following Cloud Analysis Method to Characterise EDP|IM Relationship and Calculate Exceedance Probabilities of Damage;
* Vulnerability Analysis: Calculate Vulnerability Functions to Estimate Decision-Variables (Economic- and Human-Based) Conditioned on Ground-Shaking Intensity using Consequence Models (Damage-to-Loss Ratios)
* Plotting: Plot Analysis Outputs
* Model Overview: OpenSees Model (Nodes and Elements)
* Cloud Analysis Results and Fitted IM|EDP Relationship
* Seismic Demand Profiles: Distribution of Peak Storey Drifts and Peak Floor Accelerations
* Fragility Functions
* Vulnerability Functions

# 📚 Documentation

TBD

# 🌟 Contributors

Contributors are gratefully acknowledged and listed in CONTRIBUTORS.txt.

<a href="https://github.com/GEMScienceTools/vulnerability-toolkit/graphs/contributors">
<img src="https://contrib.rocks/image?repo=GEMScienceTools/vulnerability-toolkit" alt="contrib.rocks image" />
</a>

<p align="right">(<a href="#readme-top">back to top</a>)</p>

# © License

This work is licensed under an AGPL v3 license (https://www.gnu.org/licenses/agpl-3.0.en.html)
Expand All @@ -48,3 +85,16 @@ Note that the `main` branch could contain the work-in-progress of the next versi
# 📑 References

TBD

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/GEMScienceTools/vulnerability-toolkit.svg?style=for-the-badge
[contributors-url]: https://github.com/GEMScienceTools/vulnerability-toolkit/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/GEMScienceTools/vulnerability-toolkit.svg?style=for-the-badge
[forks-url]: https://github.com/GEMScienceTools/vulnerability-toolkit/network/members
[stars-shield]: https://img.shields.io/github/stars/GEMScienceTools/vulnerability-toolkit.svg?style=for-the-badge
[stars-url]: https://github.com/GEMScienceTools/vulnerability-toolkit/stargazers
[issues-shield]: https://img.shields.io/github/issues/GEMScienceTools/vulnerability-toolkit.svg?style=for-the-badge
[issues-url]: https://github.com/GEMScienceTools/vulnerability-toolkit/issues
[license-shield]: https://img.shields.io/github/license/GEMScienceTools/vulnerability-toolkit.svg?style=for-the-badge
[license-url]: https://github.com/GEMScienceTools/vulnerability-toolkit/blob/master/LICENSE.txt
Loading