grid_scan: Running model on a grid of parameters/initial states

View source: R/grid_scan.R

grid_scanR Documentation

Running model on a grid of parameters/initial states

Description

This function is useful for running a large scan of parameter combinations for the same model. Typical use cases are probing stability of an attractor, effect of certain parameters on the system, etc.

Usage

grid_scan(
  model_gen,
  grid,
  apply.fn = identity,
  n.core = 2,
  custom.export = NULL,
  ...
)

Arguments

model_gen

Odin model generator, see getOdinGen().

grid

Data frame of the parameter grid.

apply.fn

Function to apply before return (e.g., some summary).

n.core

Number of cores for parallel computing.

custom.export

Names of additional variables used by apply.fn.

...

Model ⁠$run(...)⁠ parameters.

Details

Grid is a data frame whose columns are model parameters. See model$contents() for tunable parameters.

Value

List of model run results.

Examples

vignette("grid-scan", "clockSim")

clockSim documentation built on April 11, 2025, 5:40 p.m.