getConfFromData: getConfFromData

View source: R/getConfFromData.R

getConfFromDataR Documentation

getConfFromData

Description

Generate a configuration list for babsimTools based on the data file and the vector of resources. This function returns the default configuration settings of the babsimTools functions used to run babsimHospital.

Usage

getConfFromData(conf, simData, fieldData)

Arguments

conf

Configuration. Default: babsimToolsConf

simData

Simulation data. Default: dataCovidBeds20200624

fieldData

Field (real) data. Default: dataCovidBeds20200624

Details

Configuration conf is a list of the following settings.

seed

(int) Initial seed. Default: 123

simRepeats

(int) Number of simmer simulation runs. Default: 1

parallel

(logical) Use parallel simulations based on mclapply. Default: FALSE

perCores

(num) Percentage of cores used, if parallel == TRUE. Default: 0.5

ICU

(logical) Use ICU (RKI) data. Default: FALSE.

logLevel

(int) 0 = no logging, >= 1 logging. Default: 0. If larger than 10, shown detailed simmer output.

maxCapacity

(num) Maximum capacity used for babsimHospital resources. Default: 1e6.

dataset

(chr) 'GA' or 'ICU'. Default: 'GA'.

simulationDates

List with the following entries:

StartDate

(chr) Start date of the simulation data (infection data used to generate arrival times), first day. Default: '2020-03-03'

EndDate

(chr) End date of the simulation data, last day. Default: '2020-06-24'

fieldDates

List with the following entries:

StartDate

(chr) Start date of the field (resources) data, first day. Default: '2020-03-03'

EndDate

(chr) End date of the field data, last day. Default: '2020-06-24'

simulationData

(data frame) Data used for the simulation. Default dataCovidBeds20200624

bed

int 2 2 3 3 3 3 3 3 4 4 ...

intensiveBed

int 0 0 0 0 0 0 0 0 0 0 ...

intensiveBedVentilation

int 0 0 0 0 0 0 0 0 0 0 ...

Day

Date, format: '2020-03-03' '2020-03-04' '2020-03-05' '2020-03-06' ...

Infected

num 5 0 0 0 0 0 0 7 2 5 ...

Sick

num 5 5 5 5 5 5 5 12 14 19 ...

fieldEvents

(data frame) Data used for evalution of the simulation. Default GABeds220200624

ressource

chr 'bed' 'bed' 'bed' 'bed' ...

time

int 1 2 3 4 5 6 7 8 9 10 ...

med

int 2 2 3 3 3 3 3 3 4 4 ...

source

int 2 2 3 3 3 3 3 3 4 4 ...

date

Date, format: '2020-03-03' '2020-03-04' '2020-03-05' '2020-03-06' ...

resource

(vector) Resources used in the simulation. Default: c('bed', 'intensiveBed', 'intensiveBedVentilation'). For ICU data use: c('bed', 'intensiveBedVentilation')

ressource

chr 'bed' 'bed' 'bed' 'bed' ...

time

int 1 2 3 4 5 6 7 8 9 10 ...

med

int 2 2 3 3 3 3 3 3 4 4 ...

source

int 2 2 3 3 3 3 3 3 4 4 ...

date

Date, format: '2020-03-03' '2020-03-04' '2020-03-05' '2020-03-06' ...

Value

a list

Examples


conf <- babsimToolsConf()
simData <- babsim.hospital::dataCovidBeds20200624
fieldData <- babsim.hospital::dataCovidBeds20200624
conf <- getConfFromData(
  conf = conf,
  simData = simData,
  fieldData = fieldData
)
# turn on parallel simulation:
conf$parallel <- TRUE
# Change the start date of the simulations
conf$simulationDates$StartDate <- "2020-01-01"

babsim.hospital documentation built on May 30, 2022, 9:05 a.m.