run_simulation: Run simulations for a scenario

Description Usage Arguments Value Examples

View source: R/simulate.R

Description

Given a quantitative scenario object of type tidyrisk_scenario, run an OpenFAIR Monte Carlo simulation.

Usage

1
2
3
4
5
6
7
run_simulation(
  scenario,
  iterations = 10000L,
  ale_maximum = NULL,
  verbose = FALSE,
  simulation_count = NULL
)

Arguments

scenario

A tidyrisk_scenario object.

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

Dataframe of results.

Examples

1
2

Example output

# A tibble: 10 x 11
   iteration threat_events loss_events  vuln mean_tc_exceedamean_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>

evaluator documentation built on July 6, 2021, 9:06 a.m.