## 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))
)
}
This is the key set of lines in
run_sim_break
: