Assembles an ordered casualty cohort and the board resource capacities into
a validated scenario object, the central input to the simulation engine.
Usage
sdt_scenario(cohort, resources = list(), name = NULL, seed = NULL)Arguments
- cohort
A data frame / tibble of casualties, one row per patient, with at least the columns produced by
sdt_patient_card()(id,age,sex,life_points,ventilated,injury_region,triage,therapy,arrival_order).- resources
Named list of integer capacities for board areas, e.g.
list(triage = 1, or = 2, icu_imc = 6, ed_red = 2, ed_yellow = 4, ward = 20). Missing areas default to1.- name
Optional scenario name.
- seed
Optional integer seed recorded in metadata for reproducibility.
Examples
co <- sdt_synthetic_cohort(n = 20, seed = 1)
sdt_scenario(co, resources = list(or = 2, icu_imc = 6), name = "concert")
#> <scenario> concert: 20 casualties
#> triage mix — red: 8, yellow: 6, green: 6
#> resources — triage: 1, ed_red: 1, ed_yellow: 1, diagnostics: 1, or: 2, recovery: 1, icu_imc: 6, ward: 1, green_area: 1, morgue: 1, external: 1, not_seen: 1