mac-theobio / McMasterPandemic

SEIR+ model
GNU General Public License v3.0
20 stars 5 forks source link

Update `make_state` avoidance once spec version 0.1.1 is complete #119

Closed stevencarlislewalker closed 2 years ago

stevencarlislewalker commented 2 years ago

This is the key set of lines in run_sim_break:

## Do not need to make_state on the R-side when using
## recent versions of the flexmodel/tmb approach
## FIXME: set spec_ver_gt('0.1.0') once '0.1.1' is sorted out
if(isTRUE(sim_args$use_flex) & (!is.null(sim_args$flexmodel)) & spec_ver_gt('0.0.6')) {
   sim_args = c(
       sim_args,
       nlist(params, state = sim_args$flexmodel$state))
} else {
    sim_args <- c(
        sim_args,
        nlist(params, state = make_state(params = params))
    )
}