Monte Carlo Limit State Probability

Monte Carlo Limit State Probability#

Description

This analysis calculates a probability of limit state using a stochastic process. Limit state probability and damage state are derived using the dictionary of failed damage states in the input infrastructure dataset. Limit state probability is calculated from all stochastic runs, limit 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 limit state 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.

seed

int

Seed

Initial seed for the probabilistic model to ensure reproducibility.

Input Datasets

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).

sample_damage_states *

incore:sampleDamageState

Results

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

(* required)

Execution

code snippet:

    # Create instance
    mc = MonteCarloLimitStateProbability(client)

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

    # Set analysis parameters
    mc.set_parameter("result_name", "mc_limit_state_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"])
    mc.set_parameter("seed", 1111)

    # Run Monte Carlo limit state analysis
    mc.run_analysis()

full analysis: mc_limit_state_prob.ipynb