Skip to contents

The initial implementation keeps OM dynamics, observation generation, and implementation outside management procedures. Callbacks must use explicit config/context/state rather than mutable globals. They must return plain, serialisable state, not live RTMB objects, connections, or environments.

Usage

mse_om(initialise, prepare, step, config = list(), id = "custom_om")

Arguments

initialise

Function (scenario, iterations, years, config) returning a context with initial_tacc, optional tacc_history before that TACC, and optional initial_state.

prepare

Function (context, year, years, iterations, config) returning shared read-only annual inputs. Called once per scenario/year.

step

Function (prepared, state, tacc, year, iteration, config) returning state, an observations packet, and a named list of scalar truth metrics. It implements the current TACC, advances the OM, and observes that year. OM errors stop the run, rather than masquerading as successful MP fallbacks.

config

Explicit configuration, including all external input identities.

id

Identifier for the adapter.

Value

A decamod_mse_om object.