Construct an objective function in TMB from a flexmodel object. The behaviour of tmb_fun depends on spec_version()

tmb_fun(model)

tmb_fun_args(model)

Arguments

model

flexmodel object