run_g3_optim: Wrapper for g3_optim. This is an internal function used by...

View source: R/g3_optim.R

run_g3_optimR Documentation

Wrapper for g3_optim. This is an internal function used by the g3_* functions

Description

Wrapper for g3_optim. This is an internal function used by the g3_* functions

Usage

run_g3_optim(
  model,
  params,
  use_parscale,
  method,
  control,
  serial_compile,
  mc.cores,
  ...
)

Arguments

model

Either a g3 model of class 'g3_cpp', i.e., model <- gadget3::g3_to_tmb(actions), or an objective function from gadget3::g3_tmb_adfun(model, param)

params

A list of parameter templates for a g3_cpp classed model.

use_parscale

Should parscale be used g3_tmb_parscale(params), see optim

method

The optimisation method, see optim

control

List of control options for optim, see optim

serial_compile

g3_tmb_adfun will be run in serial mode (i.e., not in parallel), potentially helping with memory issues

mc.cores

number of cores used, defaults to the number of available cores

...

Further arguments to be passed gadget3::g3_tmb_adfun, see g3_tmb_adfun

Value

A g3_cpp parameter template with optimised values


gadget-framework/gadgetutils documentation built on Nov. 11, 2024, 6:25 p.m.