matflow.tests.subset_simulation#

Module containing functions to run a subset simulation on a simple toy model, used as a validation of the MatFlow implementation.

Functions

dist_to_str

Return a string representation of a distribution.

estimate_cov

Estimate the coefficient of variation at a given conditional level of the subset simulation.

generate_next_level_samples

generate_next_level_samples_ACS

Adaptive conditional sampling algorithm for generating states in the subset simulation level (aka adaptive subset infinity).

generate_next_level_samples_CS

Conditional sampling algorithm for generating states in the subset simulation level (aka subset infinity).

generate_next_state

Proposal must be a symmetric distribution centred on zero.

generate_next_state_ACS

generate_next_state_CS

get_stats

get_toy_model_results_from_matflow_workflows

param root_path:

A directory containing only (zipped) workflows that are toy-model subset

get_y_star

model

plot_cov_dist

plot_cov_estimates

plot_many_pf_num_samples

plot_many_pf_num_samples_from_files

plot_pf_dist

plot_pf_num_samples

run_convergence

Run a convergence test on the toy model subset simulation, for either number of samples per level, N, or number of repeats, R.

run_repeats

sample_direct_MC

subset_simulation

system_analysis_toy_model

x is within the failure domain if the return is greater than zero.