Monte Carlo failure probability#

Description

This analysis calculates a probability of failure using a stochastic process. Failure probability and Failure state are derived using the dictionary of failed damage states in the input infrastructure dataset. Failure probability is calculated from all stochastic runs, failure state shows all infrastructure standings as a string of failed (0) and not failed (1) states of each individual run.

The output of this analysis are two CSV files; a failure proability base_name_failure_probability.csv with allocated house units and base_name_failure_state.csv.

Input Parameters

key name

type

name

description

result_name *

str

Result name

Name of the result dataset.

num_samples *

int

Samples

Number of Monte Carlo samples.

damage_interval_keys *

List[str]

Damage keys

Column names of the damage intervals.

failure_state_keys *

List[str]

Failure keys

Column names of damage intervals.

num_cpu

int

Number of CPUs

Number of CPUs used for parallel computations.
Default 1.

Input Datasets

key name

type

name

description

damage *

ergo:buildingDamageVer4
ergo:buildingDamageVer5
ergo:bridgeDamage
ergo:bridgeDamageVer2
incore:epfDamage
incore:epfDamageVer2
ergo:nsBuildingInventoryDamage
ergo:nsBuildingInventoryDamageVer2
incore:pipelineDamage
incore:pipelineDamageVer2
ergo:roadDamage
ergo:roadDamageVer2
ergo:waterFacilityDamageVer4
ergo:waterFacilityDamageVer5

Infrastructure damage

A file with infrastructure damage intervals.

Output Datasets

key name

type

name

description

failure_probability *

incore:failureProbability

Results

A dataset containing failure probability results
(format: CSV).

sample_failure_state *

incore:sampleFailureState

Results

A dataset containing failure state for each sample
(format: CSV).

(* required)

Execution

code snippet:

    # Create instance
    mc = MonteCarloFailureProbability(client)

    # Load remote datasets
    mc.load_remote_input_dataset("damage", damage_id)

    # Set analysis parameters
    mc.set_parameter("result_name", "mc_failure_probability")
    mc.set_parameter("num_cpu", 8)
    mc.set_parameter("num_samples", 10)
    mc.set_parameter("damage_interval_keys", ["DS_0", "DS_1", "DS_2", "DS_3"])
    mc.set_parameter("failure_state_keys", ["DS_1", "DS_2", "DS_3"])

    # Run Monte Carlo failure
    mc.run_analysis()

full analysis: mc_failure_prob.ipynb