From 98a27eb2a114424ed825282f2aa81558af7dc548 Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Tue, 21 Jan 2025 08:17:30 +0100 Subject: [PATCH 1/2] Removed docs about the obsolete format for the consequence files --- .../event-based-risk-config.rst | 2 +- .../scenario-risk-config.rst | 29 ++++++++++--------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/doc/user-guide/configuration-file/event-based-risk-config.rst b/doc/user-guide/configuration-file/event-based-risk-config.rst index cf3ba453845d..161a04d2d4ac 100644 --- a/doc/user-guide/configuration-file/event-based-risk-config.rst +++ b/doc/user-guide/configuration-file/event-based-risk-config.rst @@ -56,7 +56,7 @@ event based damage calculation is shown in the listing below.:: structural_fragility_file = structural_fragility_model.xml [consequence] - structural_consequence_file = structural_consequence_model.xml + consequence_file = {'taxonomy': "consequence_model.csv"} [risk_calculation] master_seed = 42 diff --git a/doc/user-guide/configuration-file/scenario-risk-config.rst b/doc/user-guide/configuration-file/scenario-risk-config.rst index dbdaf52d7596..bfa34224fda0 100644 --- a/doc/user-guide/configuration-file/scenario-risk-config.rst +++ b/doc/user-guide/configuration-file/scenario-risk-config.rst @@ -346,20 +346,21 @@ is shown in the listing below.:: nonstructural_fragility_file = nonstructural_fragility_model.xml [consequence] - structural_consequence_file = structural_consequence_model.xml - nonstructural_consequence_file = nonstructural_consequence_model.xml - -Note that one or more of the following parameters can be used in the same job configuration file to provide the -corresponding *Consequence Model* files: - -- ``structural_consequence_file``: a parameter used to define the path to a structural Consequence Model file -- ``nonstructural_consequence_file``: a parameter used to define the path to a nonstructural Consequence Model file -- ``contents_consequence_file``: a parameter used to define the path to a contents Consequence Model file -- ``business_interruption_consequence_file``: a parameter used to define the path to a business interruption Consequence Model file - -It is important that the ``lossCategory`` parameter in the metadata section for each provided Consequence Model file -(“structural”, “nonstructural”, “contents”, or “business_interruption”) should match the loss type defined in the -configuration file by the relevant keyword above. + consequence_file = {'taxonomy': "consequence_model.csv"} + +Note that the "consequence_model.csv" file will have a structure like the +following:: + +taxonomy,consequence,loss_type,ds1,ds2,ds3,ds4 +tax1,losses,contents,1.000000E-01,3.000000E-01,6.000000E-01,9.000000E-01 +tax2,losses,contents,1.000000E-01,3.000000E-01,6.000000E-01,9.000000E-01 +tax3,losses,contents,1.000000E-01,3.000000E-01,6.000000E-01,9.000000E-01 +tax1,losses,nonstructural,5.000000E-02,2.500000E-01,5.000000E-01,7.500000E-01 +tax2,losses,nonstructural,5.000000E-02,2.500000E-01,5.000000E-01,7.500000E-01 +tax3,losses,nonstructural,5.000000E-02,2.500000E-01,5.000000E-01,7.500000E-01 +tax1,losses,structural,4.000000E-02,1.600000E-01,3.200000E-01,6.400000E-01 +tax2,losses,structural,4.000000E-02,1.600000E-01,3.200000E-01,6.400000E-01 +tax3,losses,structural,4.000000E-02,1.600000E-01,3.200000E-01,6.400000E-01 The above calculation can be run using the command line:: From 0be863d45cb1b98e5ac4921a1ac460f37befcd2c Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Tue, 21 Jan 2025 08:24:25 +0100 Subject: [PATCH 2/2] Fixed indentation --- .../scenario-risk-config.rst | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/user-guide/configuration-file/scenario-risk-config.rst b/doc/user-guide/configuration-file/scenario-risk-config.rst index bfa34224fda0..e9f66c3728cd 100644 --- a/doc/user-guide/configuration-file/scenario-risk-config.rst +++ b/doc/user-guide/configuration-file/scenario-risk-config.rst @@ -351,16 +351,16 @@ is shown in the listing below.:: Note that the "consequence_model.csv" file will have a structure like the following:: -taxonomy,consequence,loss_type,ds1,ds2,ds3,ds4 -tax1,losses,contents,1.000000E-01,3.000000E-01,6.000000E-01,9.000000E-01 -tax2,losses,contents,1.000000E-01,3.000000E-01,6.000000E-01,9.000000E-01 -tax3,losses,contents,1.000000E-01,3.000000E-01,6.000000E-01,9.000000E-01 -tax1,losses,nonstructural,5.000000E-02,2.500000E-01,5.000000E-01,7.500000E-01 -tax2,losses,nonstructural,5.000000E-02,2.500000E-01,5.000000E-01,7.500000E-01 -tax3,losses,nonstructural,5.000000E-02,2.500000E-01,5.000000E-01,7.500000E-01 -tax1,losses,structural,4.000000E-02,1.600000E-01,3.200000E-01,6.400000E-01 -tax2,losses,structural,4.000000E-02,1.600000E-01,3.200000E-01,6.400000E-01 -tax3,losses,structural,4.000000E-02,1.600000E-01,3.200000E-01,6.400000E-01 + taxonomy,consequence,loss_type,ds1,ds2,ds3,ds4 + tax1,losses,contents,1.000000E-01,3.000000E-01,6.000000E-01,9.000000E-01 + tax2,losses,contents,1.000000E-01,3.000000E-01,6.000000E-01,9.000000E-01 + tax3,losses,contents,1.000000E-01,3.000000E-01,6.000000E-01,9.000000E-01 + tax1,losses,nonstructural,5.000000E-02,2.500000E-01,5.000000E-01,7.500000E-01 + tax2,losses,nonstructural,5.000000E-02,2.500000E-01,5.000000E-01,7.500000E-01 + tax3,losses,nonstructural,5.000000E-02,2.500000E-01,5.000000E-01,7.500000E-01 + tax1,losses,structural,4.000000E-02,1.600000E-01,3.200000E-01,6.400000E-01 + tax2,losses,structural,4.000000E-02,1.600000E-01,3.200000E-01,6.400000E-01 + tax3,losses,structural,4.000000E-02,1.600000E-01,3.200000E-01,6.400000E-01 The above calculation can be run using the command line::