This page will build upon the example presented that is presented in the Building Fragility page. Now that we have a building fragility curve ingested into Ergo, we need to tell Ergo how to map that fragility curve to buildings. What we will learn in this section is:
This section will require a very basic understanding of XML and is something that we can help the user with putting together if you contact us by email. The basic concept behind the fragility mapping is to tell Ergo which fragilities should be used with which "objects". In the case of a building dataset, which fragilities should be mapped to which buildings. The mapping file allows you to use a specific set of rules to map fragilities to buildings (e.g. if a building has a structure type S1 and has 6 stories, use fragility curve with ID SF_S1_1).
Using the example below, we'll go through the various parts of the fragility mapping.
<match-filter-map> <property-match> <success-value> <map> <entry key="Non-Retrofit Fragility ID Code" value="SF_S1_1"/> </map> </success-value> <filter> <statement> <rule>int no_stories GE 4</rule> <rule>int no_stories LE 7</rule> <rule>String struct_typ EQUALS S1</rule> </statement> </filter> </property-match> </match-filter-map>
In the section that says <map> </map> is where the fragility identifier is specified. Where it says key is for Ergo internal use and that must match exactly because the "Non-Retrofit Fragility ID Code" tells Ergo this is the as-built fragility. The second part where it says value is a fragility ID in your fragility dataset (e.g. SF_S1_1), this must match match a fragility in your fragility dataset.
In the next section of the example above you will see some <rule> </rule> tags between <statement> </statement> tags. These are the rules to determine if SF_S1_1 fragility should be used for a particular building. If you look at the first rule where it says:
<rule>int no_stories GE 4</rule>
The first part that says int tells Ergo what type of data to look for. The second part where it says no_stories tells Ergo which column to look at, so in this case, there should be a column in the building dataset called no_stories. For reference, if you look in the previous section it was specified that the column no_stories should be of typeinteger. Now, the third part tells Ergo what type of comparison to perform. In this case, we are looking for something that is greater than or equal to (GE) 4. For a building to pass this first rule, it must have a no_stories column with a value greater than or equal to 4. If it matches, Ergo will check the next rule. Looking at the next rule, it states that there must be a column called no_stories that is of type integer, with a value Less Than or Equal to 7 (LE). In order to use this set of fragilities a building must match all of the rules between <statement> </statement> tags. If any fail, Ergo will move onto the next <property-match> </property-match> tags set that contain the next fragility curve and its rules.
You can make these rules as complex or as simple as you want. You could simply have a single rule:
<rule>String STRUCT_TYP EQUALS S1</rule>
In this case, we are looking at a column called STRUCT_TYP (structure type) with a value of S1. If it matches, then use the fragility we specified.
If you need to create a fragility mapping file that maps your fragilities to your building dataset, you just need to come up with a list of rules that maps a fragilities to buildings and save them to an XML file. After creating the file, you need to ingest it into Ergo. Ingesting data into Ergo will be detailed in the next sections.