babsimHospital {babsim.hospital} | R Documentation |
babsimHospital
Description
Simulate resource allocation in hospitals.
Usage
babsimHospital(arrivalTimes = NULL, conf = list(), para = list(), ...)
Arguments
arrivalTimes |
Arrival times as generated using |
conf |
list with the following entries:
. Values larger than 1 are mapped to 1. |
para |
List with parameter settings. Can be generated with |
... |
additional parameters passed to |
Value
This function returns an env list with:
xbest
Parameters of the best found solution (matrix).
Examples
require("simmer")
require("dplyr")
# Generate simulation data based on number of infected persons per day:
x <- dataCovidBeds20200624
arrivalTimes <- getArrivalTimes(x$Infected)
conf <- babsimToolsConf()
y <- babsimHospital(
arrivalTimes = arrivalTimes,
conf = conf,
para = babsimHospitalPara()
)
resources <- get_mon_resources(y)
# resources <- resources %>% filter(resource != "nurse")
mean(resources$server)
## 2nd example (shows details):
# Generate simulation data based on number of infected persons per day:
x <- dataCovidBeds20200624
arrivalTimes <- getArrivalTimes(x$Infected)
para <- babsimHospitalPara()
conf <- babsimToolsConf()
conf$logLevel <- 1
conf$simRepeats <- 1
para$GammaShapeParameter <- 0.8
y <- babsimHospital(
arrivalTimes = arrivalTimes,
conf = conf,
para = para
)
[Package babsim.hospital version 11.8.8 Index]