Simulator Configurations¶
Simulator configurations control how continuous-time trajectories are solved.
Use ODESimulatorConfig for deterministic continuous-time dynamics and
SDESimulatorConfig for stochastic continuous-time dynamics. Discrete-time
simulation samples the transition distribution directly and does not accept a
simulator configuration.
SimulatorConfig¶
ODESimulatorConfig¶
Configuration object for ODE simulators.
Attributes:
| Name | Type | Description |
|---|---|---|
solver |
AbstractSolver
|
Diffrax solver used for integration.
Defaults to |
adjoint |
AbstractAdjoint
|
Strategy used to differentiate
through the solve. Defaults to
|
stepsize_controller |
AbstractStepSizeController
|
Step-size
policy used by Diffrax. Defaults to
|
dt0 |
float | int | Array
|
Initial step size passed to
|
max_steps |
int
|
Maximum number of integration steps permitted by
|
Properties
diffeqsolve_settings (dict[str, Any]): Normalized keyword arguments passed
to diffrax.diffeqsolve; scalar time values are converted to JAX
arrays.
diffeqsolve_settings: dict[str, Any]
property
¶
Return normalized Diffrax settings for diffeqsolve.
SDESimulatorConfig¶
SDE Solver Settings for SDE Simulation. Supports diffrax-based solvers or a faster, hand-rolled Euler-Maruyama scan backend.
!! Note: The choice of solver can imply convergence to different paths
for the same model. For example, the default diffrax.Heun() converges
to the Stratonovich SDE, while diffrax.EulerMaruyama() converges to the Ito SDE.
This likely doesn't matter for most models, but can cause issues with state-dependent diffusions.
Attributes:
| Name | Type | Description |
|---|---|---|
solver |
AbstractSolver
|
Diffrax SDE solver. Defaults to
|
stepsize_controller |
AbstractStepSizeController
|
Diffrax
step-size policy. Defaults to |
adjoint |
AbstractAdjoint
|
Strategy used to differentiate
through the Diffrax solve. Defaults to
|
dt0 |
float | int | Array
|
Integration step size. It is passed to
Diffrax as the initial step size and used as the fixed
Euler-Maruyama step by the |
tol_vbt |
float | int | Array | None
|
Tolerance for Diffrax's
|
max_steps |
int | None
|
Maximum number of Diffrax integration steps.
|
source |
Literal['diffrax', 'em_scan']
|
Simulation backend.
|
Properties
diffeqsolve_settings (dict[str, Any]): Normalized Diffrax keyword
arguments derived from the config; scalar time values are
converted to JAX arrays.
resolved_tol_vbt (jax.Array | None): Effective virtual-Brownian-tree
tolerance for the selected backend. Returns None for "em_scan"
and validates the tolerance for "diffrax".