prepare

experimental.network_dynamics.prepare(
    dynamics,
    solver,
    t0=0.0,
    t1=1.0,
    dt=0.1,
    n_nodes=1,
    noise=None,
    externals=None,
)

Prepare a bare dynamics model for simulation using Diffrax.

Lightweight alternative to the Network-based prepare() for uncoupled simulations with adaptive time stepping. Coupling inputs are set to zero.

Parameters

Name Type Description Default
dynamics AbstractDynamics Dynamics model instance (e.g. JansenRit, ReducedWongWang) required
solver DiffraxSolver Diffrax integration method (Tsit5, Dopri5, etc.) required
t0 float Start time, by default 0.0 0.0
t1 float End time, by default 1.0 1.0
dt float Initial step size (dt0) for adaptive controller, by default 0.1 0.1
n_nodes int Number of uncoupled nodes, by default 1 1
noise AbstractNoise Noise process (e.g. AdditiveNoise, MultiplicativeNoise) None
externals dict External inputs as {name: AbstractExternalInput} None

Returns

Name Type Description
solve_function Callable Pure JAX function: solve_function(config) -> results
config Bunch Configuration PyTree with dynamics params and initial state