Skip to main content

Module uncertainty

Module uncertainty 

Source
Expand description

Uncertainty propagation in ODE solutions.

This module provides tools for propagating parameter uncertainties through ODE solutions. Given an ODE system:

dy/dt = f(t, y, p),  y(t0) = y0

where the parameters p have associated uncertainties sigma_p, this module computes uncertainty bands on the solution trajectory y(t).

Two modes are supported:

  • Trajectory (GUM): First-order Taylor propagation via forward sensitivity equations. At each time t: sigma_y_j(t)^2 = sum_k (dy_j/dp_k)^2 * sigma_p_k^2

  • Monte Carlo: Sample parameters from distributions, solve N times, compute mean and standard deviation of the ensemble.

§Composability

The main entry point solve_with_uncertainty is generic over the solver:

solve_with_uncertainty::<DoPri5, f64>(...) // explicit solver
solve_with_uncertainty::<Radau5, f64>(...) // stiff solver
solve_with_uncertainty::<Tsit5, f64>(...)  // explicit, FSAL

Any solver implementing the Solver<S> trait works without modification. For automatic solver selection on a single problem (without uncertainty quantification), see crate::auto_solve / crate::auto_solve_with_hints.

Author: Moussa Leblouba Date: 9 February 2026 Modified: 2 May 2026

Structs§

UncertainParam
A parameter with uncertainty.
UncertainSolverResult
ODE result with uncertainty bands.

Enums§

UncertaintyMode
Uncertainty propagation mode.

Functions§

solve_monte_carlo
Solve an ODE with uncertainty propagation using Monte Carlo sampling.
solve_trajectory
Solve an ODE with uncertainty propagation using first-order Taylor (GUM) via forward sensitivity equations.
solve_with_uncertainty
Solve an ODE with uncertainty propagation.