stochasticIntegratorHarness
Shared test helpers for the stochastic-integrator equivalence tests.
Both equivalence suites (test_stochasticIntegratorsJulia.py and
test_stochasticIntegratorsPaper.py) drive a native integrator on a small toy SDE with
a prescribed sequence of Gaussian increments and compare the resulting trajectory against
a committed reference. This module factors out the identical MuJoCo/StatefulSysModel
scaffolding they share, so the per-suite files only supply the SDE (drift f and
per-source diffusion columns gCols) and the reference case dict.
- stochasticIntegratorHarness.buildPrescribedNoiseSim(case: dict, integratorClassName: str, f: Callable, gCols: List[Callable])[source]
Build a MuJoCo simulation that replays a reference case’s prescribed noise.
- Parameters:
case – reference-case dict with keys dt, u0, n_states, n_steps, dW, dZ and (optionally) m.
mdefaults ton_states(the diagonal-noise convention used by the Julia suite).integratorClassName – exact
svIntegratorsclass name to instantiate.f – drift f(t, x) -> length-n array.
gCols – list of m diffusion columns, each g_k(t, x) -> length-n array.
- Returns:
(scSim, stateModel, integrator, stateLogger). Run to case[“tf”] and read
stateLogger.x.