Create initial conditions for the basic model. This matches the interface required for mcstate
basic_initial(info, n_particles, pars)
| info | The result of running the |
|---|---|
| n_particles | The number of particles required. Currently only uniform initial seeding is implemented so this has no effect |
| pars | A parameter list created by |
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)#> $state #> [1] 0 56286961 0 0 0 3299637 3538206 3354246 #> [9] 3090222 3487863 3801409 3807954 3733642 3414297 3715812 3907461 #> [17] 3670651 3111835 2796740 2779326 1940686 2836964 0 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 10 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 0 0 0 0 0 #> [233] 0 0 0 0 0 0 0 0 #> [241] 0 0 0 #> #> $step #> [1] 152 #>