Skip to contents

Builds the board configuration that sdt_simulate()'s defaults were tuned against: a 40-casualty cohort on the resource capacities recorded in sdt_reference("defaults")$calibration. Running it over the calibrated horizon reproduces the published end-of-game distribution.

Usage

sdt_reference_scenario(seed = NULL)

Arguments

seed

Optional integer seed for the cohort. Defaults to the calibration seed.

Value

A scenario object.

Details

Use it as a known-good starting point, and as the fixture the calibration test checks, so that "the model still reproduces the reference" is a claim someone can re-run rather than take on trust.

Examples

sc <- sdt_reference_scenario()
sc
#> <scenario> reference: 40 casualties
#> triage mix — red: 18, yellow: 10, green: 12
#> resources — triage: 2, ed_red: 5, ed_yellow: 4, diagnostics: 7, or: 7, recovery: 4, icu_imc: 12, ward: 25, green_area: 12, morgue: 1, external: 1, not_seen: 1
run <- sdt_simulate(sc, replications = 2, seed = 1, verbose = FALSE)
summary(run, reference = TRUE)
#> # A tibble: 8 × 6
#>   area        label                    n proportion reference difference
#>   <chr>       <chr>                <int>      <dbl>     <dbl>      <dbl>
#> 1 triage      Screening                1     0.0125      0.08    -0.0675
#> 2 ed          Emergency department    11     0.138       0.16    -0.0225
#> 3 diagnostics Radiology                4     0.05        0.04     0.01  
#> 4 or          Operating room          12     0.15        0.11     0.04  
#> 5 recovery    Recovery                 0     0           0.01    -0.01  
#> 6 icu_imc     ICU / IMC               16     0.2         0.23    -0.03  
#> 7 ward        Ward                    36     0.45        0.35     0.1   
#> 8 not_seen    Not yet seen             0     0           0        0