numra-dde 0.1.4

Delay differential equation solvers for Numra: method of steps with embedded Runge-Kutta and Hermite history interpolation.
Documentation

numra-dde

Delay differential equation solvers for the Numra workspace — method of steps with embedded Runge-Kutta and Hermite history interpolation.

Crates.io docs.rs

Solves DDEs y'(t) = f(t, y(t), y(t − τ₁), y(t − τ₂), …) with constant or state-dependent delays. The method of steps integrates between delay breakpoints with an embedded RK solver and reconstructs y(t − τ) from a Hermite interpolant of the recorded trajectory.

Example

use numra_dde::{DdeOptions, DdeSolver, DdeSystem, MethodOfSteps};

// Mackey-Glass: y'(t) = β · y(t-τ) / (1 + y(t-τ)^n) - γ · y(t)
struct MackeyGlass { beta: f64, gamma: f64, n: f64, tau: f64 }

impl DdeSystem<f64> for MackeyGlass {
    fn dim(&self) -> usize { 1 }
    fn delays(&self) -> Vec<f64> { vec![self.tau] }
    fn rhs(&self, _t: f64, y: &[f64], y_delayed: &[&[f64]], dydt: &mut [f64]) {
        let y_tau = y_delayed[0][0];
        dydt[0] = self.beta * y_tau / (1.0 + y_tau.powf(self.n)) - self.gamma * y[0];
    }
}

let mg = MackeyGlass { beta: 2.0, gamma: 1.0, n: 9.65, tau: 2.0 };
let history = |_t: f64| vec![0.5];
let opts = DdeOptions::default();
let _ = MethodOfSteps::solve(&mg, 0.0, 100.0, &history, &opts);

What's in this crate

  • MethodOfSteps — embedded-RK method-of-steps solver
  • DdeSystem trait — user-defined RHS with one or more delays, optional state-dependent
  • History / HistoryFunction / HermiteInterpolator — initial-history representation and continuous extension
  • DdeOptions / DdeResult / DdeStats — tolerance / step-control configuration and diagnostics

Composes with

  • numra-ode — the RK steppers that drive between-delay integration
  • numra-stats — descriptive statistics on chaotic attractors (e.g. range, percentile)
  • numra-fft — spectral analysis of long-time DDE solutions
  • numra-interp — post-hoc resampling of the trajectory onto fixed grids

See cross-formalism tests for the DDE-approximates-ODE consistency check.

Install

[dependencies]
numra-dde = "0.1"

Or via the umbrella crate:

[dependencies]
numra = "0.1"

Documentation

License

Numra Academic & Research License (Non-Commercial). Academic and research use is free; commercial use requires a separate license — contact contact@spectralautomata.com. See LICENSE.