Given a list of quantitative scenario objects of type tidyrisk_scenario, run a OpenFAIR Monte Carlo simulation for each scenario.

run_simulations(scenario, ..., iterations = 10000L, ale_maximum = NULL,
  verbose = FALSE, simulation_count = NULL)

Arguments

scenario

A tidyrisk_scenario object.

...

Additional tidyrisk_scenario objects to simulate.

iterations

Number of iterations to run on each scenario.

ale_maximum

Maximum practical annual losses.

verbose

Whether verbose console output is requested.

simulation_count

DEPRECATED Number of simulations to perform.

Value

A list of one dataframe of results for each scenario.

Examples

# fetch three scenarios for this example data(mc_quantitative_scenarios) scenario_a <- mc_quantitative_scenarios[[1, "scenario"]] scenario_b <- mc_quantitative_scenarios[[2, "scenario"]] scenario_c <- mc_quantitative_scenarios[[3, "scenario"]] run_simulations(scenario_a, scenario_b, scenario_c, iterations = 10)
#> [[1]] #> # A tibble: 10 x 11 #> iteration threat_events loss_events vuln mean_tc_exceeda… mean_diff_excee… #> <int> <int> <int> <dbl> <dbl> <dbl> #> 1 1 30 5 0.167 0.0463 0.0690 #> 2 2 30 11 0.367 0.0323 0.0723 #> 3 3 23 7 0.304 0.0249 0.0842 #> 4 4 19 11 0.579 0.0330 0.0604 #> 5 5 24 4 0.167 0.0281 0.0759 #> 6 6 36 14 0.389 0.0255 0.0633 #> 7 7 32 7 0.219 0.0405 0.0580 #> 8 8 31 8 0.258 0.0210 0.0711 #> 9 9 41 11 0.268 0.0299 0.0660 #> 10 10 20 4 0.2 0.0459 0.0855 #> # … with 5 more variables: ale <dbl>, sle_mean <dbl>, sle_median <dbl>, #> # sle_max <dbl>, sle_min <dbl> #> #> [[2]] #> # A tibble: 10 x 11 #> iteration threat_events loss_events vuln mean_tc_exceeda… mean_diff_excee… #> <int> <int> <int> <dbl> <dbl> <dbl> #> 1 1 30 5 0.167 0.0463 0.0690 #> 2 2 30 11 0.367 0.0323 0.0723 #> 3 3 23 7 0.304 0.0249 0.0842 #> 4 4 19 11 0.579 0.0330 0.0604 #> 5 5 24 4 0.167 0.0281 0.0759 #> 6 6 36 14 0.389 0.0255 0.0633 #> 7 7 32 7 0.219 0.0405 0.0580 #> 8 8 31 8 0.258 0.0210 0.0711 #> 9 9 41 11 0.268 0.0299 0.0660 #> 10 10 20 4 0.2 0.0459 0.0855 #> # … with 5 more variables: ale <dbl>, sle_mean <dbl>, sle_median <dbl>, #> # sle_max <dbl>, sle_min <dbl> #> #> [[3]] #> # A tibble: 10 x 11 #> iteration threat_events loss_events vuln mean_tc_exceeda… mean_diff_excee… #> <int> <int> <int> <dbl> <dbl> <dbl> #> 1 1 7 2 0.286 0.0446 0.0608 #> 2 2 7 1 0.143 0.0538 0.0457 #> 3 3 11 1 0.0909 0.0418 0.0901 #> 4 4 5 3 0.6 0.0261 0.0745 #> 5 5 4 0 0 0 0.0948 #> 6 6 6 3 0.5 0.0206 0.0961 #> 7 7 8 1 0.125 0.0298 0.0868 #> 8 8 8 4 0.5 0.0341 0.0691 #> 9 9 7 2 0.286 0.0377 0.0601 #> 10 10 10 1 0.1 0.0247 0.0803 #> # … with 5 more variables: ale <dbl>, sle_mean <dbl>, sle_median <dbl>, #> # sle_max <dbl>, sle_min <dbl> #>