generated from aicoe-aiops/project-template
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configuration based TUDelft calculation (#353)
* Update config documentation. * Tidying and test improvements; fix precision-related bug in applying SOP. * Fix damage function. * Changes to standard of protection and use Sequence in place of List/Iterable. * Fix ruff exclusion of unused imports. --------- Signed-off-by: Joe Moorhouse <5102656+joemoorhouse@users.noreply.github.com>
- Loading branch information
1 parent
a385e3c
commit e7a1c3e
Showing
46 changed files
with
3,438 additions
and
1,484 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
19 changes: 19 additions & 0 deletions
19
src/physrisk/data/static/vulnerability/vulnerability_config.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
hazard_class,asset_class,asset_identifier,indicator_id,indicator_units,impact_id,impact_units,curve_type,points_x,points_y,points_z,cap_of_points_x,cap_of_points_y,activation_of_points_x | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Residential,location=Europe",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.25, 0.4, 0.5, 0.6, 0.75, 0.85, 0.95, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Residential,location=North America",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.01, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.201804543, 0.443269857, 0.582754693, 0.682521912, 0.783957148, 0.854348922, 0.923670101, 0.958522773, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Residential,location=South America",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.490885951, 0.711294067, 0.842026011, 0.949369096, 0.983636977, 1.0, 1.0, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Residential,location=Asia",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.326556502, 0.494050324, 0.616572124, 0.720711764, 0.869528213, 0.931487084, 0.983604148, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Residential,location=Africa",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.219925401, 0.378226846, 0.530589082, 0.635636733, 0.81693978, 0.903434688, 0.957152173, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Residential,location=Oceania",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.475418119, 0.640393124, 0.714614662, 0.787726348, 0.928779884, 0.967381853, 0.982795444, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Commercial,location=Europe",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.15, 0.3, 0.45, 0.55, 0.75, 0.9, 1.0, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Commercial,location=North America",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.01, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.018404908, 0.239263804, 0.374233129, 0.466257669, 0.552147239, 0.687116564, 0.82208589, 0.90797546, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Commercial,location=South America",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.611477587, 0.839531094, 0.923588457, 0.991972477, 1.0, 1.0, 1.0, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Commercial,location=Asia",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.376789623, 0.537681619, 0.659336684, 0.762845232, 0.883348656, 0.941854895, 0.98075938, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Commercial,location=Oceania",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.238953575, 0.481199682, 0.673795091, 0.864583333, 1.0, 1.0, 1.0, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Commercial,location=Global",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.323296918, 0.506529105, 0.63459558, 0.744309656, 0.864093044, 0.932788157, 0.977746968, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Industrial,location=Europe",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.15, 0.27, 0.4, 0.52, 0.7, 0.85, 1.0, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Industrial,location=North America",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.01, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.025714286, 0.322857143, 0.511428571, 0.637142857, 0.74, 0.86, 0.937142857, 0.98, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Industrial,location=South America",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.6670194, 0.888712522, 0.946737213, 1.0, 1.0, 1.0, 1.0, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Industrial,location=Asia",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.283181524, 0.481615653, 0.629218894, 0.717240588, 0.85667503, 0.908577004, 0.955327463, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Industrial,location=Africa",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.062682043, 0.247196046, 0.403329984, 0.494488633, 0.684652389, 0.918589786, 1.0, 1.0]",,,, | ||
"CoastalInundation,PluvialInundation,RiverineInundation",RealEstateAsset,"type=Buildings/Industrial,location=Global",flood_depth,metres,damage,,indicator/piecewise_linear,"[0.0, 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 6.0]","[0.0, 0.297148022, 0.479790559, 0.60328579, 0.694345844, 0.820265484, 0.922861929, 0.987065493, 1.0]",,,, |
5 changes: 5 additions & 0 deletions
5
src/physrisk/data/static/vulnerability/vulnerability_config_README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Vulnerability configuration | ||
|
||
Vulnerability configuration is generated by a test: `test_generate_all_config`. | ||
|
||
This test writes to a temporary file `candidate_vulnerability_config.csv` that can be copied into `vulnerability.config.csv`. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +0,0 @@ | ||
from .assets import Asset, PowerGeneratingAsset | ||
from .curve import ExceedanceCurve | ||
from .hazard_event_distrib import HazardEventDistrib | ||
from .hazards import Drought, Hazard, RiverineInundation | ||
from .vulnerability_distrib import VulnerabilityDistrib | ||
from .vulnerability_model import VulnerabilityModelAcuteBase | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.