RODE Solvers
Packages
The solvers on this page are distributed across the packages below. Add the package(s) you need to your environment.
| Package | Methods | Good for |
|---|---|---|
StochasticDiffEqRODE | RandomEM, RandomTamedEM, RandomHeun | Random ODEs (RODEs); time-dependent random forcing. |
Recommended Methods
RandomEM is the default choice. On a RODE driven by Wiener noise it has strong order 1 under the conditions below, and RandomHeun and RandomTamedEM measure the same order there, so the three differ in cost and error constant rather than in rate. RandomHeun evaluates f twice per step and is second order when f does not depend on the noise. RandomTamedEM keeps every step bounded, for problems where RandomEM blows up. See the RODE tutorial for worked examples.
Full List of Methods
StochasticDiffEq.jl
Each of these solvers uses a fixed time step, so dt must be given, and comes with a linear interpolation. If the problem sets no noise, a Wiener process starting at 0 drives it; any noise process can be passed instead.
StochasticDiffEqRODE.RandomEM- The Euler method for RODEs, withWtaken at the start of each step. Strong order 1 under the conditions of Theorem 7.1 of Kloeden and Rosa, arXiv:2306.15418, which cover Wiener and other semimartingale noise and require, among other things,fto be globally Lipschitz inuwith a constant that does not depend ontorW, and to have bounded first and second derivatives inW. Fixed time step only.StochasticDiffEqRODE.RandomHeun- A two-stage Heun method, withWtaken at the start and at the end of each step. Measured strong order 1 on Wiener noise, and second order whenfdoes not depend onW. Fixed time step only.StochasticDiffEqRODE.RandomTamedEM- A tamed Euler method. Each step is $u + dt\,k / (1 + dt\,\|k\|)$ with $k = f(u, p, t, W)$, so each step movesuby at most about 1 in norm, however largefis. Measured strong order 1 on Wiener noise. Fixed time step only.
Example usage:
using StochasticDiffEq # RODEProblem, RandomEM, RandomHeun, RandomTamedEM
sol = solve(prob, RandomEM(), dt = 1 / 100)