Create initial conditions for the basic model. This matches the interface required for mcstate
basic_initial(info, n_particles, pars)
The result of running the $info()
method on an
initialised basic model
The number of particles required. Currently only uniform initial seeding is implemented so this has no effect
A parameter list created by basic_parameters()
; from
this list we will use the population
element.
A numeric vector of initial conditions
p <- basic_parameters(sircovid_date("2020-02-07"), "england")
mod <- basic$new(p, 0, 10)
basic_initial(mod$info(), 10, p)
#> [1] 0 56550138 0 0 0 0 3239447 3539458
#> [9] 3435579 3115871 3472522 3771493 3824652 3738209 3476303 3638639
#> [17] 3875351 3761782 3196813 2784300 2814128 2009992 2855599 0
#> [25] 0 0 0 0 0 0 0 0
#> [33] 0 0 0 0 0 0 0 0
#> [41] 0 0 0 0 0 0 0 0
#> [49] 0 0 0 0 0 0 0 0
#> [57] 0 0 0 0 0 0 0 0
#> [65] 0 0 0 0 0 0 0 0
#> [73] 0 0 0 0 0 0 0 0
#> [81] 0 0 0 0 0 0 0 0
#> [89] 0 0 0 0 0 0 0 0
#> [97] 0 0 0 0 0 0 0 0
#> [105] 0 0 0 0 0 0 0 0
#> [113] 0 0 0 0 0 0 0 0
#> [121] 0 0 0 0 0 0 0 0
#> [129] 0 0 0 0 0 0 0 0
#> [137] 0 0 0 0 0 0 0 0
#> [145] 0 0 0 0 0 0 0 0
#> [153] 0 0 0 0 0 0 0 0
#> [161] 0 0 0 0 0 0 0 0
#> [169] 0 0 0 0 0 0 0 0
#> [177] 0 0 0 0 0 0 0 0
#> [185] 0 0 0 0 0 0 0 0
#> [193] 0 0 0 0 0 0 0 0
#> [201] 0 0 0 0 0 0 0 0
#> [209] 0 0 0 0 0 0 0 0
#> [217] 0 0 0 0 0 0 0 0
#> [225] 0 0 0