Skip to content

Commit

Permalink
Merge branch 'develop' into 562-update-building-nonstructural-damage-…
Browse files Browse the repository at this point in the history
…to-support-flood-docs
  • Loading branch information
longshuicy authored May 30, 2024
2 parents 42eb869 + eeee0ba commit d3d6596
Show file tree
Hide file tree
Showing 8 changed files with 474 additions and 91 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed
- Rename Building Portfolio Analysis to Building Cluster Recovery Analysis [#559](https://github.com/IN-CORE/pyincore/issues/559)
- Update flood input to nonstructural damage output for combined wind-wave-surge building damage [#566](https://github.com/IN-CORE/incore-docs/issues/566)
- Update docs to reflect Non-structural Building Damage change [#562](https://github.com/IN-CORE/pyincore/issues/562)

### Added
- Gas facility damage analysis documentation and example notebook [#387](https://github.com/IN-CORE/incore-docs/issues/387)
- Traffic flow recovery analysis documentation and example notebook [#389](https://github.com/IN-CORE/incore-docs/issues/389)
- Social vulnerability score analysis documentation and example notebook [#392](https://github.com/IN-CORE/incore-docs/issues/392)

### Changed
- Update docs to reflect Non-structural Building Damage change [#562](https://github.com/IN-CORE/pyincore/issues/562)
- Update flood input to nonstructural damage output for combined wind-wave-surge building damage [#566](https://github.com/IN-CORE/incore-docs/issues/566)

## [4.11.0] - 2024-04-30

### Changed
Expand Down
2 changes: 2 additions & 0 deletions manual_jb/content/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ chapters:
- file: analyses
sections:
- file: analyses/bridge_dmg
- file: analyses/building_cluster_recovery
- file: analyses/building_dmg
- file: analyses/building_func
- file: analyses/building_loss
Expand All @@ -29,6 +30,7 @@ chapters:
- file: analyses/epf_restoration
- file: analyses/epn_functionality
- file: analyses/galveston_cge
- file: analyses/gas_facility_damage
- file: analyses/housing_household_recovery
- file: analyses/housing_recovery
- file: analyses/housingunitallocation
Expand Down
92 changes: 47 additions & 45 deletions manual_jb/content/analyses.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
# Analyses

1. [Bridge damage](analyses/bridge_dmg.md)
2. [Building damage](analyses/building_dmg)
3. [Building functionality](analyses/building_func)
4. [Building economic loss](analyses/building_loss)
5. [Building nonstructural damage](analyses/building_nonstructural_dmg)
6. [Capital shocks](analyses/capital_shocks)
7. [Combined wind wave surge building damage](analyses/combined_wind_wave_surge_building_dmg)
8. [Combined wind wave surge building loss](analyses/combined_wind_wave_surge_building_loss)
9. [Commercial building recovery](analyses/commercial_building_recovery)
10. [Cumulative building damage](analyses/cumulative_building_dmg)
11. [Electric power facility damage](analyses/epf_dmg)
12. [Electric power facility repair cost](analyses/epf_repair_cost)
13. [Electric power facility restoration](analyses/epf_restoration)
14. [Electric power network functionality](analyses/epn_functionality)
15. [Galveston Computable General Equilibrium (CGE)](analyses/galveston_cge.md)
16. [Household-level housing sequential recovery](analyses/housing_household_recovery)
17. [Housing recovery](analyses/housing_recovery)
18. [Housing unit allocation](analyses/housingunitallocation)
19. [Interdependent Network Design Problem](analyses/indp)
20. [Joplin Computable General Equilibrium (CGE)](analyses/joplin_cge)
21. [Joplin empirical building restoration](analyses/joplin_empirical_building_restoration)
22. [Machine Learning Enabled Computable General Equilibrium (CGE) - Salt Lake City](analyses/ml_slc_cge.md)
23. [Mean damage](analyses/mean_dmg)
24. [Monte Carlo failure probability](analyses/mc_failure_prob)
25. [Multi-objective retrofit optimization](analyses/multi_retrofit_optimization)
26. [Network cascading interdependency functionality](analyses/nci_functionality)
27. [Pipeline damage](analyses/pipeline_dmg)
28. [Pipeline damage with repair rate](analyses/pipeline_dmg_w_repair_rate)
29. [Pipeline functionality](analyses/pipeline_functionality)
30. [Pipeline repair cost](analyses/pipeline_repair_cost)
31. [Pipeline restoration](analyses/pipeline_restoration)
32. [Population dislocation](analyses/populationdislocation)
33. [Portfolio recovery](analyses/portfolio_recovery)
34. [Residential building recovery](analyses/residential_building_recovery)
35. [Road damage](analyses/road_dmg)
36. [Salt Lake City Computable General Equilibrium (CGE)](analyses/slc_cge.md)
37. [Seaside Computable General Equilibrium (CGE)](analyses/seaside_cge)
38. [Social Vulnerability](analyses/social_vulnerability)
39. [Social Vulnerability Score](analyses/social_vulnerability_score)
40. [Tornado electric power network (EPN) damage](analyses/tornadoepn_dmg)
41. [Traffic flow recovery](analyses/traffic_flow_recovery)
42. [Transportation recovery](analyses/transportation_recovery)
43. [Water facility damage](analyses/waterfacility_dmg)
44. [Water network functionality](analyses/wfn_functionality)
45. [Water facility repair cost](analyses/water_facility_repair_cost)
46. [Water facility restoration](analyses/water_facility_restoration)
2. [Building cluster recovery](analyses/building_cluster_recovery)
3. [Building damage](analyses/building_dmg)
4. [Building functionality](analyses/building_func)
5. [Building economic loss](analyses/building_loss)
6. [Building nonstructural damage](analyses/building_nonstructural_dmg)
7. [Capital shocks](analyses/capital_shocks)
8. [Combined wind wave surge building damage](analyses/combined_wind_wave_surge_building_dmg)
9. [Combined wind wave surge building loss](analyses/combined_wind_wave_surge_building_loss)
10. [Commercial building recovery](analyses/commercial_building_recovery)
11. [Cumulative building damage](analyses/cumulative_building_dmg)
12. [Electric power facility damage](analyses/epf_dmg)
13. [Electric power facility repair cost](analyses/epf_repair_cost)
14. [Electric power facility restoration](analyses/epf_restoration)
15. [Electric power network functionality](analyses/epn_functionality)
16. [Galveston Computable General Equilibrium (CGE)](analyses/galveston_cge.md)
16. [Gas facility damage](analyses/gas_facility_damage)
17. [Household-level housing sequential recovery](analyses/housing_household_recovery)
18. [Housing recovery](analyses/housing_recovery)
19. [Housing unit allocation](analyses/housingunitallocation)
20. [Interdependent Network Design Problem](analyses/indp)
21. [Joplin Computable General Equilibrium (CGE)](analyses/joplin_cge)
22. [Joplin empirical building restoration](analyses/joplin_empirical_building_restoration)
23. [Machine Learning Enabled Computable General Equilibrium (CGE) - Salt Lake City](analyses/ml_slc_cge.md)
24. [Mean damage](analyses/mean_dmg)
25. [Monte Carlo failure probability](analyses/mc_failure_prob)
26. [Multi-objective retrofit optimization](analyses/multi_retrofit_optimization)
27. [Network cascading interdependency functionality](analyses/nci_functionality)
28. [Nonstructural building damage](analyses/non_structural_building_dmg)
29. [Pipeline damage](analyses/pipeline_dmg)
30. [Pipeline damage with repair rate](analyses/pipeline_dmg_w_repair_rate)
31. [Pipeline functionality](analyses/pipeline_functionality)
32. [Pipeline repair cost](analyses/pipeline_repair_cost)
33. [Pipeline restoration](analyses/pipeline_restoration)
34. [Population dislocation](analyses/populationdislocation)
35. [Residential building recovery](analyses/residential_building_recovery)
36. [Road damage](analyses/road_dmg)
37. [Salt Lake City Computable General Equilibrium (CGE)](analyses/slc_cge.md)
38. [Seaside Computable General Equilibrium (CGE)](analyses/seaside_cge)
39. [Social Vulnerability](analyses/social_vulnerability)
40. [Social Vulnerability Score](analyses/social_vulnerability_score)
41. [Tornado electric power network (EPN) damage](analyses/tornadoepn_dmg)
42. [Traffic flow recovery](analyses/traffic_flow_recovery)
43. [Transportation recovery](analyses/transportation_recovery)
44. [Water facility damage](analyses/waterfacility_dmg)
45. [Water network functionality](analyses/wfn_functionality)
46. [Water facility repair cost](analyses/water_facility_repair_cost)
47. [Water facility restoration](analyses/water_facility_restoration)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Portfolio recovery
# Building Cluster Recovery

**Description**

The code creates two output files *building-recovery.csv* and *portfolio-recovery.csv*
The code creates two output files *building-recovery.csv* and *cluster-recovery.csv*

**Input Parameters**

Expand All @@ -29,9 +29,9 @@ key name | type | name | description

**Output Datasets**

key name | type | name | description
--- | --- | --- | ---
`result` <sup>*</sup> | [`incore:portfolioRecovery`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:portfolioRecovery) | Results | A dataset containing results (format: CSV).
key name | type | name | description
--- |--------------------------------------------------------------------------------------------------------------| --- | ---
`result` <sup>*</sup> | [`incore:clusterRecovery`](https://incore.ncsa.illinois.<br/>edu/semantics/api/types/incore:clusterRecovery) | Results | A dataset containing results (format: CSV).

<small>(* required)</small>

Expand All @@ -41,25 +41,25 @@ code snippet:

```
# Create instance
bldg_portfolio_recovery = BuildingPortfolioRecoveryAnalysis(client)
bldg_cluster_recovery = BuildingClusterRecovery(client)
# Load input datasets
bldg_portfolio_recovery.load_remote_input_dataset("building_data", bldg_data_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("occupancy_mapping", occupancy_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("building_damage", bldg_damage_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("dmg_ratios", mean_repair_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("utility", utility_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("utility_partial", utility_partial_dataset)
bldg_portfolio_recovery.load_remote_input_dataset("coefFL", coefFL_dataset)
bldg_cluster_recovery.load_remote_input_dataset("building_data", bldg_data_dataset)
bldg_cluster_recovery.load_remote_input_dataset("occupancy_mapping", occupancy_dataset)
bldg_cluster_recovery.load_remote_input_dataset("building_damage", bldg_damage_dataset)
bldg_cluster_recovery.load_remote_input_dataset("dmg_ratios", mean_repair_dataset)
bldg_cluster_recovery.load_remote_input_dataset("utility", utility_dataset)
bldg_cluster_recovery.load_remote_input_dataset("utility_partial", utility_partial_dataset)
bldg_cluster_recovery.load_remote_input_dataset("coefFL", coefFL_dataset)
# Set parameters
bldg_portfolio_recovery.set_parameter("uncertainty", True)
bldg_portfolio_recovery.set_parameter("sample_size", 35) # default none. Gets size form input dataset
bldg_portfolio_recovery.set_parameter("random_sample_size", 50) # default 10000
bldg_portfolio_recovery.set_parameter("no_of_weeks", 100) # default 250
bldg_cluster_recovery.set_parameter("uncertainty", True)
bldg_cluster_recovery.set_parameter("sample_size", 35) # default none. Gets size form input dataset
bldg_cluster_recovery.set_parameter("random_sample_size", 50) # default 10000
bldg_cluster_recovery.set_parameter("no_of_weeks", 100) # default 250
# Creates two output files building-recovery.csv and portfolio-recovery.csv
bldg_portfolio_recovery.run_analysis()
# Creates two output files building-recovery.csv and cluster-recovery.csv
bldg_cluster_recovery.run_analysis()
```

full analysis: [portfolio_recovery.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/portfolio_recovery.ipynb)
full analysis: [building_cluster_recovery.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/building_cluster_recovery.ipynb)
86 changes: 86 additions & 0 deletions manual_jb/content/analyses/gas_facility_damage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Gas facility damage

**Description**

This analysis computes gas facility damage based on a particular hazard. Currently supported hazards are:
**earthquake**.

The process for computing the structural damage is similar to other parts of the built environment. First, a fragility
is obtained based on the hazard type and attributes of the building. Based on the fragility, the hazard intensity at the
location of the building is computed. Using this information, the probability of exceeding each limit state is computed,
along with the probability of damage. For the case of an earthquake hazard, soil information can be used to
modify the damage probabilities to include damage due to liquefaction.

The outputs of this analysis are CSV file with probabilities of damage and JSON file with information about hazard and fragilities.

**Input Parameters**

key name | type | name | description
--- | --- | --- | ---
`result_name` <sup>*</sup> | `str` | Result name | Name of the result dataset.
`hazard_type` | `str` | Hazard type | Hazard type (earthquake).
`hazard_id` | `str` | Hazard id | ID of the hazard from the Hazard service.
`fragility_key` | `str` | Fragility key | Fragility key used in mapping dataset.
`use_liquefaction` | `bool` | Liquefaction | Use liquefaction, if applicable to the hazard. Default is <br>*False*.
`use_hazard_uncertainty` | `bool` | Uncertainty | Use hazard uncertainty.
`liquefaction_geology_dataset_id` | `str` | Liquefaction id | Liquefaction susceptibility dataset.
`liquefaction_fragility_key` | `str` | Fragility key | Fragility key used in mapping dataset.
`num_cpu` | `int` | Number of CPUs | Number of CPUs used for parallel computations. <br>Default *1*.

**Input Hazards**

key name | type | name | description
--- |-------|---------------| ---
`hazard` | `earthquake` | Hazard | Supported hazard object for using local and remote hazards.

**Input Datasets**

key name | type | name | description
--- |---------------------------------------------------------------------------------------------------------------| --- | ---
`gas_facilities` <sup>*</sup> | [`ergo:gasFacilityInventory`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:gasFacilityInventory) | Facility dataset | A gas facility dataset.
`dfr3_mapping_set` <sup>*</sup> | [`incore:dfr3MappingSet`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:dfr3MappingSet) | DFR3 Mapping Set | DFR3 Mapping Set.

**Output datasets**

key name | type | parent key | name | description
--- |---------------------------------------------------------------------------------------------------------------------------------|------------------| --- | ---
`result` <sup>*</sup> | [`ergo:gasFacilityInventoryDamage`](https://incore.ncsa.illinois.edu/semantics/api/types/ergo:gasFacilityInventoryDamage) | `gas_facilities` | Results | A dataset containing limit state and damage state probabilities <br>(format: CSV).
`metadata` <sup>*</sup> | [`incore:gasFacilityDamageSupplement`](https://incore.ncsa.illinois.edu/semantics/api/types/incore:gasFacilityDamageSupplement) | `gas_facilities` | Results | Information about applied hazard value and fragility for each facility<br>(format: JSON).

<small>(* required)</small>

**Execution**

code snippet:

```
# Create gas facility damage analysis
gf_dmg = GasFacilityDamage(client)
# Load gas facility inventory dataset
gf_dmg.load_remote_input_dataset("gas_facilities", facility_dataset_id)
# Load fragility mapping
fragility_service = FragilityService(client)
mapping_set = MappingSet(fragility_service.get_mapping(mapping_id))
gf_dmg.set_input_dataset('dfr3_mapping_set', mapping_set)
# Specify result name
result_name = "gf-dmg-results"
# Set analysis parameters
gf_dmg.set_parameter("result_name", result_name)
gf_dmg.set_parameter("hazard_type", hazard_type)
gf_dmg.set_parameter("hazard_id", hazard_id)
gf_dmg.set_parameter("fragility_key", fragility_key)
gf_dmg.set_parameter("use_liquefaction", liquefaction)
gf_dmg.set_parameter("liquefaction_geology_dataset_id", liq_geology_dataset_id)
gf_dmg.set_parameter("liquefaction_fragility_key", liq_fragility_key)
gf_dmg.set_parameter("use_hazard_uncertainty", uncertainty)
gf_dmg.set_parameter("num_cpu", 4)
# Run gas facility damage analysis
gf_dmg.run_analysis()
```

full analysis: [gas_facility_dmg.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/gas_facility_dmg.ipynb)
1 change: 1 addition & 0 deletions manual_jb/content/notebooks_other.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Note that some Notebooks might not work with the latest version of pyIncore.
[galveston_community_app.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/galveston_community_app.ipynb) <br />
[galveston_community_app_retrofit.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/galveston_community_app_retrofit.ipynb) <br />
[galveston_cge.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/galveston_cge.ipynb) <br />
[gas_facility_dmg.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/gas_facility_dmg.ipynb) <br />
[housing household recovery](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/housing_household_recovery.ipynb) <br />
[housing_recovery.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/housing_recovery.ipynb) <br />
[indp.ipynb](https://github.com/IN-CORE/incore-docs/blob/main/notebooks/indp.ipynb) <br />
Expand Down
Loading

0 comments on commit d3d6596

Please sign in to comment.