Vulnerability Adjustments

On this page


Introduction


Vulnerability adjustments allow users to modify or update specific vulnerabilities without needing to replace or edit the entire vulnerability file. Users can apply adjustments in three ways:

  1. Replacing vulnerabilities indicating the path to a file.

  2. Replacing specific vulnerabilities via JSON format directly in the analysis_settings.

  3. Applying factor adjustments to modify probabilities.

These methods offer flexibility when customizing the model’s vulnerability settings to account for specific risk scenarios or data updates.


Vulnerability Replacements


    1. Replacing Vulnerabilities via path to a File

This method allows the user to replace specific vulnerabilities by providing an external file containing replacement data.

Example format in analysis_settings:


"vulnerability_adjustments": { "replace_file": {} }

The user can provide the path to a CSV file with the updated vulnerability data:


"vulnerability_adjustments": {"replace_file" : "vulnerability_adjustments.csv"}

The CSV file should contain updated data for the specific vulnerabilities to be replaced. For an example of the expected file contents, refer to the documentation provided in this repository (https://oasislmf.github.io/sections/Oasis-model-data-formats.html).

    1. Replacing Specific Vulnerability Data in JSON format in the analysis_settings

This method allows users to replace data for specific vulnerabilities directly within the analysis_settings file.

Example format:


"vulnerability_adjustments": { "replace_data": {} }

The data can be replaced for specific ``vulnerability_id``s:


"vulnerability_adjustments": {
  "replace_data": {
    "1": [[1,1,0.01],[1,2,0.02],...],
    "2": [[1,1,0.4],...]
  }
}

This replaces the entire data for the specified vulnerabilities. The format is as follows: - vulnerability_id - intensity_bin_id - damage_bin_id - probability

Vulnerability Adjustments


    1. Applying Adjustments Using Factors

This method allows users to apply a factor adjustment to specific vulnerabilities, altering the random number extraction process used to calculate probabilities.

Example format:


"vulnerability_adjustments": { "adjustments": {} }

The user can apply adjustment factors to the vulnerability_id as shown below:


"vulnerability_adjustments": {
  "adjustments": {
    "2": 0.5,
    "8": 1.5
  }
}

In this example, the factor for vulnerability_id 2 reduces the extracted random numbers (by multiplying by 0.5), thus lowering the probability of falling into higher damage bins. Conversely, for vulnerability_id 8, multiplying by 1.5 increases the likelihood of it falling into a higher damage bin.