Skip to content

Minor fixes #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
<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>
<a href="https://gemsciencetools.github.io/oq-vmtk/"><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/oq-vmtk/tree/main/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/oq-vmtk/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>
<a href="https://github.com/GEMScienceTools/oq-vmtk/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
</p>
</div>

Expand Down Expand Up @@ -93,6 +93,9 @@ It is highly recommended to use a **virtual environment** to install this tool.
source .venv/Scripts/activate # On Linux
```

<img src="imgs/virtual-env.gif" alt="Logo" >


### 3. Install Dependencies
Install the required packages listed in `requirements.txt`.

Expand Down
9 changes: 3 additions & 6 deletions demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ This folder contains an ensemble of example python notebooks demonstrating vario
## Example 1: Ground-Motion Record Processing
This example provides a workflow for processing ground-motion records, such as spectral analysis and identification if intensity measure values for distinct intensity measure types (e.g., PGA, Arias Intensity, etc.).

## Example 2: Nonlinear Time-History Analysis on an MDOF System using Cloud Analysis
This example performs nonlinear time-history analysis on a multi-degree-of-freedom (MDOF) structural system calibrated using SDOF global capacity and using cloud analysis to assess seismic performance.
## Example 2: End-to-End Vulnerability Analysis of an MDOF System using Cloud Analysis
This example performs nonlinear time-history analysis on a multi-degree-of-freedom (MDOF) structural system calibrated using SDOF global capacity and using cloud analysis to assess seismic performance. The example additionally demonstrates postprocessing of cloud analysis results, including fragility curve estimation and vulnerability assessment visualization.

## Example 3: Postprocessing and Visualizing Cloud Analysis Results for Fragility and Vulnerability Analysis
This example demonstrates postprocessing of cloud analysis results, including fragility curve estimation and vulnerability assessment visualization.

## Example 4: Generating and Visualizing Storey Loss Functions
## Example 3: Generating and Visualizing Storey Loss Functions
This example focuses on computing and visualizing storey loss functions, providing insights into seismic damage assessment and economic loss estimation.

Each example includes relevant scripts, input data, and instructions to guide users through the analysis. Feel free to explore and modify them to suit your specific needs!
Binary file added imgs/virtual-env.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions openquake/vmtk/slf_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def _validate_component_data_schema(self):
# Validate base fields
id_set = set()
for row in component_data:
model = component_data_model.parse_obj(row)
model = component_data_model.model_validate(row)
if model.Component_ID is not None and model.Component_ID in id_set:
raise ValueError(f'Duplicate ITEM: {model.Component_ID}')
id_set.add(model.Component_ID)
Expand Down Expand Up @@ -613,7 +613,7 @@ def _validate_correlation_tree_schema(self,
# Validate base fields
id_set = set()
for row in corr_dict:
model = correlation_tree_model.parse_obj(row)
model = correlation_tree_model.model_validate(row)
if model.ITEM in id_set:
raise ValueError(f'Duplicate ITEM: {model.ITEM}')
id_set.add(model.ITEM)
Expand Down