diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index ccdf56fb4..550fc9309 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-13T12:01:46","documenter_version":"1.1.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-13T13:52:15","documenter_version":"1.1.1"}} \ No newline at end of file diff --git a/dev/benchmarks/lotkavolterra/index.html b/dev/benchmarks/lotkavolterra/index.html index 0f64e0111..0efc1a158 100644 --- a/dev/benchmarks/lotkavolterra/index.html +++ b/dev/benchmarks/lotkavolterra/index.html @@ -597,4 +597,4 @@ [3f19e933] p7zip_jll v17.4.0+0 Info Packages marked with ⌃ and ⌅ have new versions available, but those wi th ⌅ are restricted by compatibility constraints from upgrading. To see why - use `status --outdated -m` + use `status --outdated -m` diff --git a/dev/benchmarks/multi-language-wrappers/index.html b/dev/benchmarks/multi-language-wrappers/index.html index 845a09da0..37b3402e7 100644 --- a/dev/benchmarks/multi-language-wrappers/index.html +++ b/dev/benchmarks/multi-language-wrappers/index.html @@ -688,4 +688,4 @@ [3f19e933] p7zip_jll v17.4.0+0 Info Packages marked with ⌃ and ⌅ have new versions available, but those wi th ⌅ are restricted by compatibility constraints from upgrading. To see why - use `status --outdated -m` + use `status --outdated -m` diff --git a/dev/benchmarks/pleiades/index.html b/dev/benchmarks/pleiades/index.html index d38dfbe33..f6ef311f7 100644 --- a/dev/benchmarks/pleiades/index.html +++ b/dev/benchmarks/pleiades/index.html @@ -525,4 +525,4 @@ [3f19e933] p7zip_jll v17.4.0+0 Info Packages marked with ⌃ and ⌅ have new versions available, but those wi th ⌅ are restricted by compatibility constraints from upgrading. To see why - use `status --outdated -m` + use `status --outdated -m` diff --git a/dev/benchmarks/rober/index.html b/dev/benchmarks/rober/index.html index 3eeaac0dd..dd37bcc64 100644 --- a/dev/benchmarks/rober/index.html +++ b/dev/benchmarks/rober/index.html @@ -477,4 +477,4 @@ [3f19e933] p7zip_jll v17.4.0+0 Info Packages marked with ⌃ and ⌅ have new versions available, but those wi th ⌅ are restricted by compatibility constraints from upgrading. To see why - use `status --outdated -m` + use `status --outdated -m` diff --git a/dev/benchmarks/vanderpol/index.html b/dev/benchmarks/vanderpol/index.html index 97c06e62a..15028e4fb 100644 --- a/dev/benchmarks/vanderpol/index.html +++ b/dev/benchmarks/vanderpol/index.html @@ -515,4 +515,4 @@ [3f19e933] p7zip_jll v17.4.0+0 Info Packages marked with ⌃ and ⌅ have new versions available, but those wi th ⌅ are restricted by compatibility constraints from upgrading. To see why - use `status --outdated -m` + use `status --outdated -m` diff --git a/dev/diffusions/index.html b/dev/diffusions/index.html index 3870de18b..e25eea15b 100644 --- a/dev/diffusions/index.html +++ b/dev/diffusions/index.html @@ -5,9 +5,9 @@ \text{d} Y^{(i)}(t) &= Y^{(i+1)}(t) \ \text{d}t, \qquad i = 0, \dots, q-1, \\ \text{d} Y^{(q)}(t) &= \textcolor{#389826}{A} Y(t) \ \text{d}t + \textcolor{#4063D8}{\Gamma} \ \text{d}W(t), \\ Y(0) &\sim \textcolor{purple}{ \mathcal{N} \left( \mu_0, \Sigma_0 \right) }. -\end{aligned}\]

Then $Y^{(i)}(t)$ models the $i$-th derivative of $y(t)$. In this section, we consider choices relating to the "diffusion" $\textcolor{#4063D8}{\Gamma}$. If you're more interested in the drift matrix $\textcolor{#389826}{A}$ check out the Priors section, and for info on the initial distribution $\textcolor{purple}{ \mathcal{N} \left( \mu_0, \Sigma_0 \right) }$ check out the Initialization section.

Diffusion and calibration

We call $\textcolor{#4063D8}{\Gamma}$ the "diffusion" parameter. Since it is typically not known we need to estimate it; this is called "calibration".

There are a few different choices for how to model and estimate $\textcolor{#4063D8}{\Gamma}$:

Or more compactly:

Isotropic:Diagonal (only for the EK0)
Time-varyingDynamicDiffusionDynamicMVDiffusion
Time-fixedFixedDiffusionFixedMVDiffusion

For more details on diffusions and calibration, check out this paper [6].

API

ProbNumDiffEq.DynamicDiffusionType
DynamicDiffusion()

Time-varying, isotropic diffusion, which is quasi-maximum-likelihood-estimated at each step.

This is the recommended diffusion when using adaptive step-size selection, and in particular also when solving stiff systems.

source
ProbNumDiffEq.FixedDiffusionType
FixedDiffusion(; initial_diffusion=1.0, calibrate=true)

Time-fixed, isotropic diffusion, which is (optionally) quasi-maximum-likelihood-estimated.

This is the recommended diffusion when using fixed steps.

By default with calibrate=true, all covariances are re-scaled at the end of the solve with the MLE diffusion. Set calibrate=false to skip this step, e.g. when setting the initial_diffusion and then estimating the diffusion outside of the solver (e.g. with Fenrir.jl).

source
ProbNumDiffEq.DynamicMVDiffusionType
DynamicMVDiffusion()

Time-varying, diagonal diffusion, which is quasi-maximum-likelihood-estimated at each step.

Only works with the EK0!

A multi-variate version of DynamicDiffusion, where instead of an isotropic matrix, a diagonal matrix is estimated. This can be helpful to get more expressive posterior covariances when using the EK0, since the individual dimensions can be adjusted separately.

References

  • [6] Bosch et al, "Calibrated Adaptive Probabilistic ODE Solvers", AISTATS (2021)
source
ProbNumDiffEq.FixedMVDiffusionType
FixedMVDiffusion(; initial_diffusion=1.0, calibrate=true)

Time-fixed, diagonal diffusion, which is quasi-maximum-likelihood-estimated at each step.

Only works with the EK0!

A multi-variate version of FixedDiffusion, where instead of an isotropic matrix, a diagonal matrix is estimated. This can be helpful to get more expressive posterior covariances when using the EK0, since the individual dimensions can be adjusted separately.

References

  • [6] Bosch et al, "Calibrated Adaptive Probabilistic ODE Solvers", AISTATS (2021)
source

References

[6]
+\end{aligned}\]

Then $Y^{(i)}(t)$ models the $i$-th derivative of $y(t)$. In this section, we consider choices relating to the "diffusion" $\textcolor{#4063D8}{\Gamma}$. If you're more interested in the drift matrix $\textcolor{#389826}{A}$ check out the Priors section, and for info on the initial distribution $\textcolor{purple}{ \mathcal{N} \left( \mu_0, \Sigma_0 \right) }$ check out the Initialization section.

Diffusion and calibration

We call $\textcolor{#4063D8}{\Gamma}$ the "diffusion" parameter. Since it is typically not known we need to estimate it; this is called "calibration".

There are a few different choices for how to model and estimate $\textcolor{#4063D8}{\Gamma}$:

Or more compactly:

Isotropic:Diagonal (only for the EK0)
Time-varyingDynamicDiffusionDynamicMVDiffusion
Time-fixedFixedDiffusionFixedMVDiffusion

For more details on diffusions and calibration, check out this paper [6].

API

ProbNumDiffEq.DynamicDiffusionType
DynamicDiffusion()

Time-varying, isotropic diffusion, which is quasi-maximum-likelihood-estimated at each step.

This is the recommended diffusion when using adaptive step-size selection, and in particular also when solving stiff systems.

source
ProbNumDiffEq.FixedDiffusionType
FixedDiffusion(; initial_diffusion=1.0, calibrate=true)

Time-fixed, isotropic diffusion, which is (optionally) quasi-maximum-likelihood-estimated.

This is the recommended diffusion when using fixed steps.

By default with calibrate=true, all covariances are re-scaled at the end of the solve with the MLE diffusion. Set calibrate=false to skip this step, e.g. when setting the initial_diffusion and then estimating the diffusion outside of the solver (e.g. with Fenrir.jl).

source
ProbNumDiffEq.DynamicMVDiffusionType
DynamicMVDiffusion()

Time-varying, diagonal diffusion, which is quasi-maximum-likelihood-estimated at each step.

Only works with the EK0!

A multi-variate version of DynamicDiffusion, where instead of an isotropic matrix, a diagonal matrix is estimated. This can be helpful to get more expressive posterior covariances when using the EK0, since the individual dimensions can be adjusted separately.

References

  • [6] Bosch et al, "Calibrated Adaptive Probabilistic ODE Solvers", AISTATS (2021)
source
ProbNumDiffEq.FixedMVDiffusionType
FixedMVDiffusion(; initial_diffusion=1.0, calibrate=true)

Time-fixed, diagonal diffusion, which is quasi-maximum-likelihood-estimated at each step.

Only works with the EK0!

A multi-variate version of FixedDiffusion, where instead of an isotropic matrix, a diagonal matrix is estimated. This can be helpful to get more expressive posterior covariances when using the EK0, since the individual dimensions can be adjusted separately.

References

  • [6] Bosch et al, "Calibrated Adaptive Probabilistic ODE Solvers", AISTATS (2021)
source

References

[6]
N. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, Proceedings of Machine Learning Research, 3466–3474, PMLR (2021).
-
+ diff --git a/dev/filtering/index.html b/dev/filtering/index.html index a90a88ef6..d5632274b 100644 --- a/dev/filtering/index.html +++ b/dev/filtering/index.html @@ -1,16 +1,16 @@ -Filtering and Smoothing · ProbNumDiffEq.jl

Gaussian Filtering and Smoothing

Predict

ProbNumDiffEq.predictFunction
predict(x::Gaussian, A::AbstractMatrix, Q::AbstractMatrix)

Prediction step in Kalman filtering for linear dynamics models.

Given a Gaussian $x = \mathcal{N}(μ, Σ)$, compute and return $\mathcal{N}(A μ, A Σ A^T + Q)$.

See also the non-allocating square-root version predict!.

source
ProbNumDiffEq.predict!Function
predict!(x_out, x_curr, Ah, Qh, cachemat)

In-place and square-root implementation of predict which saves the result into x_out.

Only works with PSDMatrices.PSDMatrix types as Ah, Qh, and in the covariances of x_curr and x_out (both of type Gaussian). To prevent allocations, a cache matrix cachemat of size $D \times 2D$ (where $D \times D$ is the size of Ah and Qh) needs to be passed.

See also: predict.

source

Update

ProbNumDiffEq.updateFunction
update(x, measurement, H)

Update step in Kalman filtering for linear dynamics models.

Given a Gaussian $x = \mathcal{N}(μ, Σ)$ and a measurement $z = \mathcal{N}(\hat{z}, S)$, with $S = H Σ H^T$, compute

\[\begin{aligned} +Filtering and Smoothing · ProbNumDiffEq.jl

Gaussian Filtering and Smoothing

Predict

ProbNumDiffEq.predictFunction
predict(x::Gaussian, A::AbstractMatrix, Q::AbstractMatrix)

Prediction step in Kalman filtering for linear dynamics models.

Given a Gaussian $x = \mathcal{N}(μ, Σ)$, compute and return $\mathcal{N}(A μ, A Σ A^T + Q)$.

See also the non-allocating square-root version predict!.

source
ProbNumDiffEq.predict!Function
predict!(x_out, x_curr, Ah, Qh, cachemat)

In-place and square-root implementation of predict which saves the result into x_out.

Only works with PSDMatrices.PSDMatrix types as Ah, Qh, and in the covariances of x_curr and x_out (both of type Gaussian). To prevent allocations, a cache matrix cachemat of size $D \times 2D$ (where $D \times D$ is the size of Ah and Qh) needs to be passed.

See also: predict.

source

Update

ProbNumDiffEq.updateFunction
update(x, measurement, H)

Update step in Kalman filtering for linear dynamics models.

Given a Gaussian $x = \mathcal{N}(μ, Σ)$ and a measurement $z = \mathcal{N}(\hat{z}, S)$, with $S = H Σ H^T$, compute

\[\begin{aligned} K &= Σ^P H^T S^{-1}, \\ μ^F &= μ + K (0 - \hat{z}), \\ Σ^F &= Σ - K S K^T, -\end{aligned}\]

and return an updated state \mathcal{N}(μ^F, Σ^F). Note that this assumes zero-measurements. When called with ProbNumDiffEq.SquarerootMatrix type arguments it performs the update in Joseph / square-root form.

For better performance, we recommend to use the non-allocating update!.

source
ProbNumDiffEq.update!Function
update!(x_out, x_pred, measurement, H, K_cache, M_cache, S_cache)

In-place and square-root implementation of update which saves the result into x_out.

Implemented in Joseph Form to retain the PSDMatrix covariances:

\[\begin{aligned} +\end{aligned}\]

and return an updated state \mathcal{N}(μ^F, Σ^F). Note that this assumes zero-measurements. When called with ProbNumDiffEq.SquarerootMatrix type arguments it performs the update in Joseph / square-root form.

For better performance, we recommend to use the non-allocating update!.

source
ProbNumDiffEq.update!Function
update!(x_out, x_pred, measurement, H, K_cache, M_cache, S_cache)

In-place and square-root implementation of update which saves the result into x_out.

Implemented in Joseph Form to retain the PSDMatrix covariances:

\[\begin{aligned} K &= Σ^P H^T S^{-1}, \\ μ^F &= μ + K (0 - \hat{z}), \\ \sqrt{Σ}^F &= (I - KH) \sqrt(Σ), -\end{aligned}\]

where $\sqrt{M}$ denotes the left square-root of a matrix M, i.e. $M = \sqrt{M} \sqrt{M}^T$.

To prevent allocations, write into caches K_cache and M_cache, both of size D × D, and S_cache of same type as measurement.Σ.

See also: update.

source

Smooth

ProbNumDiffEq.smoothFunction
smooth(x_curr, x_next_smoothed, A, Q)

Update step of the Kalman smoother, aka. Rauch-Tung-Striebel smoother, for linear dynamics models.

Given Gaussians $x_n = \mathcal{N}(μ_{n}, Σ_{n})$ and $x_{n+1} = \mathcal{N}(μ_{n+1}^S, Σ_{n+1}^S)$, compute

\[\begin{aligned} +\end{aligned}\]

where $\sqrt{M}$ denotes the left square-root of a matrix M, i.e. $M = \sqrt{M} \sqrt{M}^T$.

To prevent allocations, write into caches K_cache and M_cache, both of size D × D, and S_cache of same type as measurement.Σ.

See also: update.

source

Smooth

ProbNumDiffEq.smoothFunction
smooth(x_curr, x_next_smoothed, A, Q)

Update step of the Kalman smoother, aka. Rauch-Tung-Striebel smoother, for linear dynamics models.

Given Gaussians $x_n = \mathcal{N}(μ_{n}, Σ_{n})$ and $x_{n+1} = \mathcal{N}(μ_{n+1}^S, Σ_{n+1}^S)$, compute

\[\begin{aligned} μ_{n+1}^P &= A μ_n^F, \\ P_{n+1}^P &= A Σ_n^F A + Q, \\ G &= Σ_n^S A^T (Σ_{n+1}^P)^{-1}, \\ μ_n^S &= μ_n^F + G (μ_{n+1}^S - μ_{n+1}^P), \\ Σ_n^S &= (I - G A) Σ_n^F (I - G A)^T + G Q G^T + G Σ_{n+1}^S G^T, -\end{aligned}\]

and return a smoothed state \mathcal{N}(μ_n^S, Σ_n^S). When called with ProbNumDiffEq.SquarerootMatrix type arguments it performs the update in Joseph / square-root form.

For better performance, we recommend to use the non-allocating smooth!.

source
ProbNumDiffEq.smooth!Function
smooth!(x_curr, x_next, Ah, Qh, cache, diffusion=1)

In-place and square-root implementation of smooth which overwrites x_curr.

Implemented in Joseph form to preserve square-root structure. It requires access to the solvers cache to prevent allocations.

See also: smooth.

source
+\end{aligned}\]

and return a smoothed state \mathcal{N}(μ_n^S, Σ_n^S). When called with ProbNumDiffEq.SquarerootMatrix type arguments it performs the update in Joseph / square-root form.

For better performance, we recommend to use the non-allocating smooth!.

source
ProbNumDiffEq.smooth!Function
smooth!(x_curr, x_next, Ah, Qh, cache, diffusion=1)

In-place and square-root implementation of smooth which overwrites x_curr.

Implemented in Joseph form to preserve square-root structure. It requires access to the solvers cache to prevent allocations.

See also: smooth.

source
diff --git a/dev/implementation/index.html b/dev/implementation/index.html index 6c5252a8b..3df205dcf 100644 --- a/dev/implementation/index.html +++ b/dev/implementation/index.html @@ -1,2 +1,2 @@ -Implementation via OrdinaryDiffEq.jl · ProbNumDiffEq.jl

Solver Implementation via OrdinaryDiffEq.jl

ProbNumDiffEq.jl builds directly on OrdinaryDiffEq.jl to benefit from its iterator interface, flexible step-size control, and efficient Jacobian calculations. But, this requires extending non-public APIs. This page is meant to provide an overview on which parts exactly ProbNumDiffEq.jl builds on.

For more discussion on the pros and cons of building on OrdinaryDiffEq.jl, see this thread on discourse.

Building on OrdinaryDiffEq.jl

ProbNumDiffEq.jl shares most of OrdinaryDiffEq.jl's implementation. In particular:

  1. OrdinaryDiffEq.__init builds the cache and the integrator, and calls OrdinaryDiffEq.initialize!
  2. OrdinaryDiffEq.solve! implements the actual iterator structure, with
    • OrdinaryDiffEq.loopheader!
    • OrdinaryDiffEq.perform_step!
    • OrdinaryDiffEq.loopfooter!
    • OrdinaryDiffEq.postamble!

ProbNumDiffEq.jl builds around this structure and overloads some of the parts:

  • Algorithms: EK0/EK1 <: AbstractEK <: OrdinaryDiffEq.OrdinaryDiffEqAdaptiveAlgorithm
    • ./src/algorithms.jl provides the algorithms themselves
    • ./src/alg_utils.jl implements many traits (e.g. relating to autodiff, implicitness, step-size control)
  • Cache: EKCache <: AbstractODEFilterCache <: OrdinaryDiffEq.OrdinaryDiffEqCache
    • ./src/caches.jl implements the cache and its main constructor: OrdinaryDiffEq.alg_cache
  • Initialization and perform_step!: via OrdinaryDiffEq.initialize! and OrdinaryDiffEq.perform_step!. Implemented in ./src/perform_step.jl.
  • Custom postamble by overloading OrdinaryDiffEq.postamble! (which should always call OrdinaryDiffEq._postamble!). This is where we do the "smoothing" of the solution. Implemented in ./src/integrator_utils.jl.
  • Custom saving by overloading OrdinaryDiffEq.savevalues! (which should always call OrdinaryDiffEq._savevalues!). Implemented in ./src/integrator_utils.jl.

Building on DiffEqBase.jl

  • DiffEqBase.__init is currently overloaded to transform OOP problems into IIP problems (in ./src/solve.jl).
  • The solution object: ProbODESolution <: AbstractProbODESolution <: DiffEqBase.AbstractODESolution
    • ./src/solution.jl implements the main parts. Note that the main constructor DiffEqBase.build_solution is called by OrdinaryDiffEq.__init - so OrdinaryDiffEq.jl has control over its inputs.
    • There is also MeanProbODESolution <: DiffEqBase.AbstractODESolution: It allows handling the mean of a probabilistic ODE solution the same way one would handle any "standard" ODE solution - e.g. it is compatible with DiffEqDevTools.appxtrue.
    • AbstractODEFilterPosterior <: DiffEqBase.AbstractDiffEqInterpolation is the current interpolant, but it does not actually fully handle the interpolation right now. This part might be subject to change soon.
    • Plot recipe in ./src/solution_plotting.jl
    • Sampling in ./src/solution_sampling.jl
  • DiffEqBase.prepare_alg(::EK1{0}); closely follows a similar function implemented in OrdinaryDiffEq.jl ./src/alg_utils.jl
    • this also required DiffEqBase.remake(::EK1)

Other packages

  • DiffEqDevTools.appxtrue is overloaded to work with ProbODESolution (by just doing mean(sol)). This also enables DiffEqDevTools.WorkPrecision to work out of th box.
+Implementation via OrdinaryDiffEq.jl · ProbNumDiffEq.jl

Solver Implementation via OrdinaryDiffEq.jl

ProbNumDiffEq.jl builds directly on OrdinaryDiffEq.jl to benefit from its iterator interface, flexible step-size control, and efficient Jacobian calculations. But, this requires extending non-public APIs. This page is meant to provide an overview on which parts exactly ProbNumDiffEq.jl builds on.

For more discussion on the pros and cons of building on OrdinaryDiffEq.jl, see this thread on discourse.

Building on OrdinaryDiffEq.jl

ProbNumDiffEq.jl shares most of OrdinaryDiffEq.jl's implementation. In particular:

  1. OrdinaryDiffEq.__init builds the cache and the integrator, and calls OrdinaryDiffEq.initialize!
  2. OrdinaryDiffEq.solve! implements the actual iterator structure, with
    • OrdinaryDiffEq.loopheader!
    • OrdinaryDiffEq.perform_step!
    • OrdinaryDiffEq.loopfooter!
    • OrdinaryDiffEq.postamble!

ProbNumDiffEq.jl builds around this structure and overloads some of the parts:

  • Algorithms: EK0/EK1 <: AbstractEK <: OrdinaryDiffEq.OrdinaryDiffEqAdaptiveAlgorithm
    • ./src/algorithms.jl provides the algorithms themselves
    • ./src/alg_utils.jl implements many traits (e.g. relating to autodiff, implicitness, step-size control)
  • Cache: EKCache <: AbstractODEFilterCache <: OrdinaryDiffEq.OrdinaryDiffEqCache
    • ./src/caches.jl implements the cache and its main constructor: OrdinaryDiffEq.alg_cache
  • Initialization and perform_step!: via OrdinaryDiffEq.initialize! and OrdinaryDiffEq.perform_step!. Implemented in ./src/perform_step.jl.
  • Custom postamble by overloading OrdinaryDiffEq.postamble! (which should always call OrdinaryDiffEq._postamble!). This is where we do the "smoothing" of the solution. Implemented in ./src/integrator_utils.jl.
  • Custom saving by overloading OrdinaryDiffEq.savevalues! (which should always call OrdinaryDiffEq._savevalues!). Implemented in ./src/integrator_utils.jl.

Building on DiffEqBase.jl

  • DiffEqBase.__init is currently overloaded to transform OOP problems into IIP problems (in ./src/solve.jl).
  • The solution object: ProbODESolution <: AbstractProbODESolution <: DiffEqBase.AbstractODESolution
    • ./src/solution.jl implements the main parts. Note that the main constructor DiffEqBase.build_solution is called by OrdinaryDiffEq.__init - so OrdinaryDiffEq.jl has control over its inputs.
    • There is also MeanProbODESolution <: DiffEqBase.AbstractODESolution: It allows handling the mean of a probabilistic ODE solution the same way one would handle any "standard" ODE solution - e.g. it is compatible with DiffEqDevTools.appxtrue.
    • AbstractODEFilterPosterior <: DiffEqBase.AbstractDiffEqInterpolation is the current interpolant, but it does not actually fully handle the interpolation right now. This part might be subject to change soon.
    • Plot recipe in ./src/solution_plotting.jl
    • Sampling in ./src/solution_sampling.jl
  • DiffEqBase.prepare_alg(::EK1{0}); closely follows a similar function implemented in OrdinaryDiffEq.jl ./src/alg_utils.jl
    • this also required DiffEqBase.remake(::EK1)

Other packages

  • DiffEqDevTools.appxtrue is overloaded to work with ProbODESolution (by just doing mean(sol)). This also enables DiffEqDevTools.WorkPrecision to work out of th box.
diff --git a/dev/index.html b/dev/index.html index cff96103a..de4fa4a9d 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,3 +1,3 @@ Home · ProbNumDiffEq.jl

Probabilistic Numerical Differential Equation Solvers

Banner

ProbNumDiffEq.jl provides probabilistic numerical solvers to the DifferentialEquations.jl ecosystem. The implemented ODE filters solve differential equations via Bayesian filtering and smoothing and compute not just a single point estimate of the true solution, but a posterior distribution that contains an estimate of its numerical approximation error.

For a short intro video, check out our poster presentation at JuliaCon2021.

Installation

Run Julia, enter ] to bring up Julia's package manager, and add the ProbNumDiffEq.jl package:

julia> ]
-(v1.9) pkg> add ProbNumDiffEq

Getting Started

For a quick introduction check out the "Solving ODEs with Probabilistic Numerics" tutorial.

Features

  • probdiffeq: Fast and feature-rich filtering-based probabilistic ODE solvers in JAX.
  • ProbNum: Probabilistic numerics in Python. It has not only probabilistic ODE solvers, but also probabilistic linear solvers, Bayesian quadrature, and many filtering and smoothing implementations.
  • Fenrir.jl: Parameter-inference in ODEs with probabilistic ODE solvers. This package builds on ProbNumDiffEq.jl to provide a negative marginal log-likelihood function, which can then be used with an optimizer or with MCMC for parameter inference.
+(v1.9) pkg> add ProbNumDiffEq

Getting Started

For a quick introduction check out the "Solving ODEs with Probabilistic Numerics" tutorial.

Features

diff --git a/dev/initialization/index.html b/dev/initialization/index.html index f2cc5987f..bb2549674 100644 --- a/dev/initialization/index.html +++ b/dev/initialization/index.html @@ -11,7 +11,7 @@ \end{aligned}\]

It is clear that this contains quite some information for $Y(0)$: The initial value $y_0$ and the vector field $f$ imply

\[\begin{aligned} Y^{(0)}(0) &= y_0, \\ Y^{(1)}(0) &= f(y_0, 0). -\end{aligned}\]

It turns out that we can also compute higher-order derivatives of $y$ with the chain rule, and then use these to better initialize $Y^{(i)}(0)$. This, done efficiently with Taylor-mode autodiff by using TaylorIntegration.jl, is what TaylorModeInit does. See also [1].

In the vast majority of cases, just stick to the exact Taylor-mode initialization TaylorModeInit!

API

ProbNumDiffEq.TaylorModeInitType
TaylorModeInit()

Exact initialization via Taylor-mode automatic differentiation.

This is the recommended initialization method!

It uses TaylorIntegration.jl to efficiently compute the higher-order derivatives of the solution at the initial value, via Taylor-mode automatic differentiation.

In some special cases it can happen that TaylorIntegration.jl is incompatible with the given problem (typically because the problem definition does not allow for elements of type Taylor). If this happens, try ClassicSolverInit.

References

  • [4] Krämer et al, "Stable Implementation of Probabilistic ODE Solvers" (2020)
source
ProbNumDiffEq.ClassicSolverInitType
ClassicSolverInit(; alg=OrdinaryDiffEq.Tsit5(), init_on_ddu=false)

Initialization via regression on a few steps of a classic ODE solver.

In a nutshell, instead of specifying $\mu_0$ exactly and setting $\Sigma_0=0$ (which is what TaylorModeInit does), use a classic ODE solver to compute a few steps of the solution, and then regress on the computed values (by running a smoother) to compute $\mu_0$ and $\Sigma_0$ as the mean and covariance of the smoothing posterior at time 0. See also [2].

The initial value and derivative are set directly from the given initial value problem; optionally the second derivative can also be set via automatic differentiation by setting init_on_ddu=true.

Arguments

  • alg: The solver to be used. Can be any solver from OrdinaryDiffEq.jl.
  • init_on_ddu: If true, the second derivative is also initialized exactly via automatic differentiation with ForwardDiff.jl.

References

  • [4] Krämer et al, "Stable Implementation of Probabilistic ODE Solvers" (2020)
  • [5] Schober et al, "A probabilistic model for the numerical solution of initial value problems", Statistics and Computing (2019)
source

References

[4]
+\end{aligned}\]

It turns out that we can also compute higher-order derivatives of $y$ with the chain rule, and then use these to better initialize $Y^{(i)}(0)$. This, done efficiently with Taylor-mode autodiff by using TaylorIntegration.jl, is what TaylorModeInit does. See also [1].

In the vast majority of cases, just stick to the exact Taylor-mode initialization TaylorModeInit!

API

ProbNumDiffEq.TaylorModeInitType
TaylorModeInit()

Exact initialization via Taylor-mode automatic differentiation.

This is the recommended initialization method!

It uses TaylorIntegration.jl to efficiently compute the higher-order derivatives of the solution at the initial value, via Taylor-mode automatic differentiation.

In some special cases it can happen that TaylorIntegration.jl is incompatible with the given problem (typically because the problem definition does not allow for elements of type Taylor). If this happens, try ClassicSolverInit.

References

  • [4] Krämer et al, "Stable Implementation of Probabilistic ODE Solvers" (2020)
source
ProbNumDiffEq.ClassicSolverInitType
ClassicSolverInit(; alg=OrdinaryDiffEq.Tsit5(), init_on_ddu=false)

Initialization via regression on a few steps of a classic ODE solver.

In a nutshell, instead of specifying $\mu_0$ exactly and setting $\Sigma_0=0$ (which is what TaylorModeInit does), use a classic ODE solver to compute a few steps of the solution, and then regress on the computed values (by running a smoother) to compute $\mu_0$ and $\Sigma_0$ as the mean and covariance of the smoothing posterior at time 0. See also [2].

The initial value and derivative are set directly from the given initial value problem; optionally the second derivative can also be set via automatic differentiation by setting init_on_ddu=true.

Arguments

  • alg: The solver to be used. Can be any solver from OrdinaryDiffEq.jl.
  • init_on_ddu: If true, the second derivative is also initialized exactly via automatic differentiation with ForwardDiff.jl.

References

  • [4] Krämer et al, "Stable Implementation of Probabilistic ODE Solvers" (2020)
  • [5] Schober et al, "A probabilistic model for the numerical solution of initial value problems", Statistics and Computing (2019)
source

References

+ diff --git a/dev/priors/index.html b/dev/priors/index.html index 00acdb062..1d2dfa516 100644 --- a/dev/priors/index.html +++ b/dev/priors/index.html @@ -8,12 +8,12 @@ \end{aligned}\]

Then $Y^{(i)}(t)$ models the $i$-th derivative of $y(t)$. In this section, we consider choices relating to the drift matrix $\textcolor{#389826}{A}$. If you're more interested in the diffusion $\textcolor{#4063D8}{\Gamma}$ check out the Diffusion models and calibration section, and for info on the initial distribution $\textcolor{purple}{ \mathcal{N} \left( \mu_0, \Sigma_0 \right) }$ check out the Initialization section.

If you're unsure which prior to use, just stick to the integrated Wiener process prior IWP! This is also the default choice for all solvers. The other priors are rather experimental / niche at the time of writing.

API

ProbNumDiffEq.IWPType
IWP([wiener_process_dimension::Integer,] num_derivatives::Integer)

Integrated Wiener process.

This is the recommended prior! It is the most well-tested prior, both in this package and in the probabilistic numerics literature in general (see the references). It is also the prior that has the most efficient implementation.

The IWP can be created without specifying the dimension of the Wiener process, in which case it will be inferred from the dimension of the ODE during the solve. This is typically the preferred usage.

In math

\[\begin{aligned} \text{d} Y^{(i)}(t) &= Y^{(i+1)}(t) \ \text{d}t, \qquad i = 0, \dots, q-1 \\ \text{d} Y^{(q)}(t) &= \Gamma \ \text{d}W(t). -\end{aligned}\]

Examples

julia> solve(prob, EK1(prior=IWP(2)))
source
ProbNumDiffEq.IOUPType
IOUP([wiener_process_dimension::Integer,]
+\end{aligned}\]

Examples

julia> solve(prob, EK1(prior=IWP(2)))
source
ProbNumDiffEq.IOUPType
IOUP([wiener_process_dimension::Integer,]
      num_derivatives::Integer,
      rate_parameter::Union{Number,AbstractVector,AbstractMatrix})

Integrated Ornstein–Uhlenbeck process.

As with the IWP, the IOUP can be created without specifying its dimension, in which case it will be inferred from the dimension of the ODE during the solve. This is typically the preferred usage. The rate parameter however always needs to be specified.

In math

\[\begin{aligned} \text{d} Y^{(i)}(t) &= Y^{(i+1)}(t) \ \text{d}t, \qquad i = 0, \dots, q-1 \\ \text{d} Y^{(q)}(t) &= L Y^{(q)}(t) \ \text{d}t + \Gamma \ \text{d}W(t), -\end{aligned}\]

where $L$ is the rate_parameter.

Examples

julia> solve(prob, EK1(prior=IOUP(2, -1)))
source
ProbNumDiffEq.MaternType
Matern([wiener_process_dimension::Integer,]
+\end{aligned}\]

where $L$ is the rate_parameter.

Examples

julia> solve(prob, EK1(prior=IOUP(2, -1)))
source
ProbNumDiffEq.MaternType
Matern([wiener_process_dimension::Integer,]
        num_derivatives::Integer,
        lengthscale::Number)

Matern process.

As with the IWP, the Matern can be created without specifying its dimension, in which case it will be inferred from the dimension of the ODE during the solve. This is typically the preferred usage. The lengthscale parameter however always needs to be specified.

In math

\[\begin{aligned} \text{d} Y^{(i)}(t) &= Y^{(i+1)}(t) \ \text{d}t, \qquad i = 0, \dots, q-1 \\ @@ -21,4 +21,4 @@ \begin{pmatrix} q+1 \\ j \end{pmatrix} \left( \frac{\sqrt{2q - 1}}{l} \right)^{q-j} Y^{(j)}(t) \right) \ \text{d}t + \Gamma \ \text{d}W(t). -\end{aligned}\]

where $l$ is the lengthscale.

Examples

julia> solve(prob, EK1(prior=Matern(2, 1)))
source
+\end{aligned}\]

where $l$ is the lengthscale.

Examples

julia> solve(prob, EK1(prior=Matern(2, 1)))
source diff --git a/dev/references/index.html b/dev/references/index.html index 73235ac4c..05618e37e 100644 --- a/dev/references/index.html +++ b/dev/references/index.html @@ -45,4 +45,4 @@
- + diff --git a/dev/search_index.js b/dev/search_index.js index da1a532f2..1d8bac76f 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"references/#references","page":"References","title":"References","text":"","category":"section"},{"location":"references/","page":"References","title":"References","text":"
[1]
\n
\n
N. Bosch, F. Tronarp and P. Hennig. Pick-and-Mix Information Operators for Probabilistic ODE\n Solvers. In: Proceedings of The 25th International Conference on Artificial\n Intelligence and Statistics, Proceedings of Machine Learning Research, 10015–10027, PMLR (2022).
\n
[2]
\n
\n
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
\n
[3]
\n
\n
F. Tronarp, N. Bosch and P. Hennig. Fenrir: Physics-Enhanced Regression for Initial Value\n Problems. In: Proceedings of the 39th International Conference on Machine\n Learning, Proceedings of Machine Learning Research, 21776–21794, PMLR (2022).
\n
[4]
\n
\n\n
[5]
\n
\n\n
[6]
\n
\n
N. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial\n Intelligence and Statistics, Proceedings of Machine Learning Research, 3466–3474, PMLR (2021).
\n
[7]
\n
\n
P. Hennig, M. A. Osborne and H. P. Kersting. Probabilistic Numerics: Computation as Machine Learning. Cambridge University Press (2022).
\n
[8]
\n
\n
H. Kersting and P. Hennig. Active Uncertainty Calibration in Bayesian ODE Solvers. In: Proceedings of the Thirty-Second Conference on Uncertainty in\n Artificial Intelligence, UAI'16, 309–318, AUAI Press (2016).
\n
[9]
\n
\n\n
[10]
\n
\n
N. Krämer, N. Bosch, J. Schmidt and P. Hennig. Probabilistic ODE Solutions in Millions of Dimensions. In: Proceedings of the 39th International Conference on Machine\n Learning, Proceedings of Machine Learning Research, 11634–11649, PMLR (2022).
\n
[11]
\n
\n\n
[12]
\n
\n\n
\n
","category":"page"},{"location":"benchmarks/vanderpol/#Van-der-Pol-benchmark","page":"Stiff ODE: Van der Pol","title":"Van der Pol benchmark","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"using LinearAlgebra, Statistics\nusing DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Plots\nusing ProbNumDiffEq\n\n# Plotting theme\ntheme(:dao;\n markerstrokewidth=0.5,\n legend=:outertopright,\n bottom_margin=5Plots.mm,\n size = (1000, 400),\n)","category":"page"},{"location":"benchmarks/vanderpol/#Van-der-Pol-problem-definition","page":"Stiff ODE: Van der Pol","title":"Van der Pol problem definition","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"function vanderpol!(du, u, p, t)\n du[1] = u[2]\n du[2] = p[1] * ((1 - u[1]^2) * u[2] - u[1])\nend\np = [1e5]\ntspan = (0.0, 6.3)\nu0 = [2.0, 0.0]\nprob = ODEProblem(vanderpol!, u0, tspan, p)\n\ntest_sol = solve(prob, RadauIIA5(), abstol=1/10^14, reltol=1/10^14, dense=false)\nplot(test_sol, title=\"Van der Pol Solution\", legend=false, ylims=(-2.5, 2.5))","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"(Image: )","category":"page"},{"location":"benchmarks/vanderpol/#EK1-accross-orders","page":"Stiff ODE: Van der Pol","title":"EK1 accross orders","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1($order)\" => Dict(:alg => EK1(order=order, smooth=DENSE))\n for order in 2:6\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (6:13)\nreltols = 1.0 ./ 10.0 .^ (3:10)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, palette=Plots.palette([:blue, :red], length(_setups)), xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"(Image: )","category":"page"},{"location":"benchmarks/vanderpol/#Solving-the-first-vs-second-order-ODE","page":"Stiff ODE: Van der Pol","title":"Solving the first- vs second-order ODE","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"function vanderpol2!(ddu, du, u, p, t)\n ddu[1] = p[1] * ((1 - u[1]^2) * du[1] - u[1])\nend\np = [1e5]\ntspan = (0.0, 6.3)\nu0 = [2.0]\ndu0 = [0.0]\nprob2 = SecondOrderODEProblem(vanderpol2!, du0, u0, tspan, p)\n\ntest_sol2 = solve(prob2, RadauIIA5(), abstol=1/10^14, reltol=1/10^14, dense=false)\nplot(test_sol2, title=\"Van der Pol Solution (2nd order)\", legend=false, ylims=(-2.5, 2.5))","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"(Image: )","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1(2) 1st order\" => Dict(:alg => EK1(order=2, smooth=DENSE))\n \"EK1(3) 1st order\" => Dict(:alg => EK1(order=3, smooth=DENSE))\n \"EK1(4) 1st order\" => Dict(:alg => EK1(order=4, smooth=DENSE))\n \"EK1(5) 1st order\" => Dict(:alg => EK1(order=5, smooth=DENSE))\n \"EK1(3) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=3, smooth=DENSE))\n \"EK1(4) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=4, smooth=DENSE))\n \"EK1(5) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=5, smooth=DENSE))\n \"EK1(5) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=6, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (6:13)\nreltols = 1.0 ./ 10.0 .^ (3:10)\n\nwp = WorkPrecisionSet(\n [prob, prob2], abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = [test_sol, test_sol2],\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, color=[1 1 1 1 2 2 2 2], xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"(Image: )","category":"page"},{"location":"benchmarks/vanderpol/#Conclusion","page":"Stiff ODE: Van der Pol","title":"Conclusion","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Use the EK1 to solve stiff problems, with orders leq 6 depending on the error tolerance.\nWhen the problem is actually a second-order ODE, as is the case for the Van der Pol system here, solve it as a second-order ODE.","category":"page"},{"location":"benchmarks/vanderpol/#Appendix","page":"Stiff ODE: Van der Pol","title":"Appendix","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Computer information:","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"using InteractiveUtils\nInteractiveUtils.versioninfo()","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Julia Version 1.9.3\nCommit bed2cd540a1 (2023-08-24 14:43 UTC)\nBuild Info:\n Official https://julialang.org/ release\nPlatform Info:\n OS: Linux (x86_64-linux-gnu)\n CPU: 12 × Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz\n WORD_SIZE: 64\n LIBM: libopenlibm\n LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)\n Threads: 12 on 12 virtual cores\nEnvironment:\n JULIA_NUM_THREADS = auto\n JULIA_STACKTRACE_MINIMAL = true","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Package Information:","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"using Pkg\nPkg.status()","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml`\n [f3b72e0c] DiffEqDevTools v2.39.0\n [7073ff75] IJulia v1.24.2\n [7f56f5a3] LSODA v0.7.5\n [e6f89c97] LoggingExtras v1.0.3\n [e2752cbe] MATLABDiffEq v1.2.0\n [961ee093] ModelingToolkit v8.72.2\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [65888b18] ParameterizedFunctions v5.16.0\n [91a5bcdd] Plots v1.39.0\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [0bca4576] SciMLBase v2.4.0\n [505e40e9] SciPyDiffEq v0.2.1\n [90137ffa] StaticArrays v1.6.5\n [c3572dad] Sundials v4.20.0\n [44d3d7a6] Weave v0.10.12\n [0518478a] deSolveDiffEq v0.1.1","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"And the full manifest:","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Pkg.status(mode=Pkg.PKGMODE_MANIFEST)","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml`\n [47edcb42] ADTypes v0.2.4\n⌅ [c3fe647b] AbstractAlgebra v0.32.5\n [621f4979] AbstractFFTs v1.5.0\n [1520ce14] AbstractTrees v0.4.4\n [79e6a3ab] Adapt v3.6.2\n [ec485272] ArnoldiMethod v0.2.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.5\n [d1d4a3ce] BitFlags v0.1.7\n [62783981] BitTwiddlingConvenienceFunctions v0.1.5\n⌅ [fa961155] CEnum v0.4.2\n [2a0fbf3d] CPUSummary v0.2.4\n [00ebfdb7] CSTParser v3.3.6\n [49dc2e85] Calculus v0.5.1\n [324d7699] CategoricalArrays v0.10.8\n [d360d2e6] ChainRulesCore v1.16.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.2\n [35d6a980] ColorSchemes v3.24.0\n [3da002f7] ColorTypes v0.11.4\n [c3611d14] ColorVectorSpace v0.10.0\n [5ae59095] Colors v0.12.10\n [861a8166] Combinatorics v1.0.2\n [a80b9123] CommonMark v0.8.12\n [38540f10] CommonSolve v0.2.4\n [bbf7d656] CommonSubexpressions v0.3.0\n [34da2185] Compat v4.10.0\n [b152e2b5] CompositeTypes v0.1.3\n [2569d6c7] ConcreteStructs v0.2.3\n [f0e56b4a] ConcurrentUtilities v2.2.1\n [8f4d0f93] Conda v1.9.1\n [187b0558] ConstructionBase v1.5.4\n [d38c429a] Contour v0.6.2\n [adafc99b] CpuId v0.3.1\n [a8cc5b0e] Crayons v4.1.1\n [717857b8] DSP v0.7.9\n [9a962f9c] DataAPI v1.15.0\n [a93c6f00] DataFrames v1.6.1\n [864edb3b] DataStructures v0.18.15\n [e2d170a0] DataValueInterfaces v1.0.0\n [8bb1440f] DelimitedFiles v1.9.1\n [2b5f629d] DiffEqBase v6.133.1\n [459566f4] DiffEqCallbacks v2.33.0\n [f3b72e0c] DiffEqDevTools v2.39.0\n [77a26b50] DiffEqNoiseProcess v5.19.0\n [163ba53b] DiffResults v1.1.0\n [b552c78f] DiffRules v1.15.1\n [b4f34e82] Distances v0.10.10\n [31c24e10] Distributions v0.25.102\n [ffbed154] DocStringExtensions v0.9.3\n⌅ [5b8099bc] DomainSets v0.6.7\n [fa6b7ba4] DualNumbers v0.6.8\n [7c1d4256] DynamicPolynomials v0.5.3\n [b305315f] Elliptic v1.0.1\n [4e289a0a] EnumX v1.0.4\n [f151be2c] EnzymeCore v0.6.1\n [6912e4f1] Espresso v0.6.1\n [460bff9d] ExceptionUnwrapping v0.1.9\n [d4d017d3] ExponentialUtilities v1.25.0\n [e2ba6199] ExprTools v0.1.10\n [c87230d0] FFMPEG v0.4.1\n [7a1cc6ca] FFTW v1.7.1\n [7034ab61] FastBroadcast v0.2.7\n [9aa1b823] FastClosures v0.3.2\n [442a2c76] FastGaussQuadrature v1.0.0\n [29a986be] FastLapackInterface v2.0.0\n [1a297f60] FillArrays v1.6.1\n [6a86dc24] FiniteDiff v2.21.1\n [53c48c17] FixedPointNumbers v0.8.4\n [59287772] Formatting v0.4.2\n [f6369f11] ForwardDiff v0.10.36\n [069b7b12] FunctionWrappers v1.1.3\n [77dc65aa] FunctionWrappersWrappers v0.1.3\n [d9f16b24] Functors v0.4.5\n [46192b85] GPUArraysCore v0.1.5\n [28b8d3ca] GR v0.72.10\n [43dcc890] GaussianDistributions v0.5.2\n [c145ed77] GenericSchur v0.5.3\n [c27321d9] Glob v1.3.1\n [86223c79] Graphs v1.9.0\n [42e2da0e] Grisu v1.0.2\n [0b43b601] Groebner v0.4.4\n [d5909c97] GroupsCore v0.4.0\n [cd3eb016] HTTP v1.10.0\n [eafb193a] Highlights v0.5.2\n [3e5b6fbb] HostCPUFeatures v0.1.16\n [34004b35] HypergeometricFunctions v0.3.23\n [7073ff75] IJulia v1.24.2\n [615f187c] IfElse v0.1.1\n [d25df0c9] Inflate v0.1.4\n [842dd82b] InlineStrings v1.4.0\n [18e54dd8] IntegerMathUtils v0.1.2\n [8197267c] IntervalSets v0.7.7\n [41ab1584] InvertedIndices v1.3.0\n [92d709cd] IrrationalConstants v0.2.2\n [c8e1da08] IterTools v1.8.0\n [82899510] IteratorInterfaceExtensions v1.0.0\n [1019f520] JLFzf v0.1.5\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.39\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [ba0b0d4f] Krylov v0.9.4\n [7f56f5a3] LSODA v0.7.5\n [b964fa9f] LaTeXStrings v1.3.0\n [2ee39098] LabelledArrays v1.14.0\n [984bce1d] LambertW v0.4.6\n [23fbe1c1] Latexify v0.16.1\n [10f19ff3] LayoutPointers v0.1.14\n [50d2b5c4] Lazy v0.15.1\n [1d6d02ad] LeftChildRightSiblingTrees v0.2.0\n [d3d80556] LineSearches v7.2.0\n [7ed4a6bd] LinearSolve v2.9.2\n [2ab3a3ac] LogExpFunctions v0.3.26\n [e6f89c97] LoggingExtras v1.0.3\n [bdcacae8] LoopVectorization v0.12.165\n [10e44e05] MATLAB v0.8.4\n [e2752cbe] MATLABDiffEq v1.2.0\n [d8e11817] MLStyle v0.4.17\n [1914dd2f] MacroTools v0.5.11\n [d125e4d3] ManualMemory v0.1.8\n [739be429] MbedTLS v1.1.7\n [442fdcdd] Measures v0.3.2\n [e1d29d7a] Missings v1.1.0\n [961ee093] ModelingToolkit v8.72.2\n [46d2c3a1] MuladdMacro v0.2.4\n [102ac46a] MultivariatePolynomials v0.5.2\n [ffc61752] Mustache v1.0.17\n [d8a4904e] MutableArithmetics v1.3.3\n [d41bc354] NLSolversBase v7.8.3\n [2774e3e8] NLsolve v4.5.1\n [77ba4419] NaNMath v1.0.2\n [8913a72c] NonlinearSolve v2.2.1\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [6fd5a793] Octavian v0.3.27\n [6fe1bfb0] OffsetArrays v1.12.10\n [4d8831e6] OpenSSL v1.4.1\n [429524aa] Optim v1.7.8\n [bac558e1] OrderedCollections v1.6.2\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [90014a1f] PDMats v0.11.25\n [fe68d972] PSDMatrices v0.4.4\n [65ce6f38] PackageExtensionCompat v1.0.2\n [65888b18] ParameterizedFunctions v5.16.0\n [d96e819e] Parameters v0.12.3\n [69de0a69] Parsers v2.7.2\n [b98c9c47] Pipe v1.3.0\n [32113eaa] PkgBenchmark v0.2.12\n [ccf2f8ad] PlotThemes v3.1.0\n [995b91a9] PlotUtils v1.3.5\n [91a5bcdd] Plots v1.39.0\n [e409e4f3] PoissonRandom v0.4.4\n [f517fe37] Polyester v0.7.8\n [1d0040c9] PolyesterWeave v0.2.1\n⌅ [f27b6e38] Polynomials v3.2.13\n [2dfb63ee] PooledArrays v1.4.3\n [85a6dd25] PositiveFactorizations v0.2.4\n [d236fae5] PreallocationTools v0.4.12\n [aea7be01] PrecompileTools v1.2.0\n [21216c6a] Preferences v1.4.1\n [08abe8d2] PrettyTables v2.2.7\n [27ebfcd6] Primes v0.5.4\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [33c8b6b6] ProgressLogging v0.1.4\n [438e738f] PyCall v1.96.1\n [1fd47b50] QuadGK v2.9.1\n [6f49c342] RCall v0.13.18\n [74087812] Random123 v1.6.1\n [fb686558] RandomExtensions v0.4.4\n [e6cf234a] RandomNumbers v1.5.3\n [3cdcf5f2] RecipesBase v1.3.4\n [01d81517] RecipesPipeline v0.6.12\n [731186ca] RecursiveArrayTools v2.39.0\n [f2c3362d] RecursiveFactorization v0.2.20\n [189a3867] Reexport v1.2.2\n [05181044] RelocatableFolders v1.0.1\n [ae029012] Requires v1.3.0\n [ae5879a3] ResettableStacks v1.1.1\n [79098fc4] Rmath v0.7.1\n [47965b36] RootedTrees v2.19.2\n [7e49a35a] RuntimeGeneratedFunctions v0.5.12\n [fdea26ae] SIMD v3.4.5\n [94e857df] SIMDTypes v0.1.0\n [476501e8] SLEEFPirates v0.6.39\n [0bca4576] SciMLBase v2.4.0\n [e9a6253c] SciMLNLSolve v0.1.9\n [c0aeaf25] SciMLOperators v0.3.6\n [505e40e9] SciPyDiffEq v0.2.1\n [6c6a2e73] Scratch v1.2.0\n [91c51154] SentinelArrays v1.4.0\n [efcf1570] Setfield v1.1.1\n [1277b4bf] ShiftedArrays v2.0.0\n [992d4aef] Showoff v1.0.3\n [777ac1f9] SimpleBufferStream v1.1.0\n [727e6d20] SimpleNonlinearSolve v0.1.20\n [699a6c99] SimpleTraits v0.9.4\n [ce78b400] SimpleUnPack v1.1.0\n [66db9d55] SnoopPrecompile v1.0.3\n [b85f4697] SoftGlobalScope v1.1.0\n [a2af1166] SortingAlgorithms v1.1.1\n [47a9eef4] SparseDiffTools v2.8.0\n [e56a9233] Sparspak v0.3.9\n [276daf66] SpecialFunctions v2.3.1\n [928aab9d] SpecialMatrices v3.0.0\n [aedffcd0] Static v0.8.8\n [0d7ed370] StaticArrayInterface v1.4.1\n [90137ffa] StaticArrays v1.6.5\n [1e83bf80] StaticArraysCore v1.4.2\n [82ae8749] StatsAPI v1.7.0\n [2913bbd2] StatsBase v0.34.2\n [4c63d2b9] StatsFuns v1.3.0\n [3eaba693] StatsModels v0.7.3\n⌅ [7792a7ef] StrideArraysCore v0.4.17\n [69024149] StringEncodings v0.3.7\n [892a3eda] StringManipulation v0.3.4\n [09ab397b] StructArrays v0.6.16\n [c3572dad] Sundials v4.20.0\n [2efcf032] SymbolicIndexingInterface v0.2.2\n [d1185830] SymbolicUtils v1.4.0\n [0c5d862f] Symbolics v5.9.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.0\n [92b13dbe] TaylorIntegration v0.14.3\n [6aa5eb33] TaylorSeries v0.15.2\n [62fd8b95] TensorCore v0.1.1\n [5d786b92] TerminalLoggers v0.1.7\n [8290d209] ThreadingUtilities v0.5.2\n [a759f4b9] TimerOutputs v0.5.23\n [c751599d] ToeplitzMatrices v0.8.2\n [0796e94c] Tokenize v0.5.25\n [3bb67fe8] TranscodingStreams v0.9.13\n [a2a6695c] TreeViews v0.3.0\n [d5829a12] TriangularSolve v0.1.19\n [410a4b4d] Tricks v0.1.8\n [781d530d] TruncatedStacktraces v1.4.0\n [5c2747f8] URIs v1.5.0\n [3a884ed6] UnPack v1.0.2\n [1cfade01] UnicodeFun v0.4.1\n [1986cc42] Unitful v1.17.0\n [45397f5d] UnitfulLatexify v1.6.3\n [a7c27f48] Unityper v0.1.5\n [41fe7b60] Unzip v0.2.0\n [3d5dd08c] VectorizationBase v0.21.64\n [81def892] VersionParsing v1.3.0\n [19fa3120] VertexSafeGraphs v0.2.0\n [44d3d7a6] Weave v0.10.12\n [1b915085] WinReg v1.0.0\n [ddb6d928] YAML v0.4.9\n [c2297ded] ZMQ v1.2.2\n [700de1a5] ZygoteRules v0.2.3\n [0518478a] deSolveDiffEq v0.1.1\n [6e34b625] Bzip2_jll v1.0.8+0\n [83423d85] Cairo_jll v1.16.1+1\n [2702e6a9] EpollShim_jll v0.0.20230411+0\n [2e619515] Expat_jll v2.5.0+0\n⌃ [b22a6f82] FFMPEG_jll v4.4.2+2\n [f5851436] FFTW_jll v3.3.10+0\n [a3f928ae] Fontconfig_jll v2.13.93+0\n [d7e528f0] FreeType2_jll v2.13.1+0\n [559328eb] FriBidi_jll v1.0.10+0\n [0656b61e] GLFW_jll v3.3.8+0\n [d2c73de3] GR_jll v0.72.10+0\n [78b55507] Gettext_jll v0.21.0+0\n [7746bdde] Glib_jll v2.76.5+0\n [3b182d85] Graphite2_jll v1.3.14+0\n [2e76f6c2] HarfBuzz_jll v2.8.1+1\n [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0\n [aacddb02] JpegTurbo_jll v2.1.91+0\n [c1c5ebd0] LAME_jll v3.100.1+0\n [88015f11] LERC_jll v3.0.0+1\n [1d63c593] LLVMOpenMP_jll v15.0.4+0\n [aae0fff6] LSODA_jll v0.1.2+0\n [dd4b983a] LZO_jll v2.10.1+0\n⌅ [e9f186c6] Libffi_jll v3.2.2+1\n [d4300ac3] Libgcrypt_jll v1.8.7+0\n [7e76a0d4] Libglvnd_jll v1.6.0+0\n [7add5ba3] Libgpg_error_jll v1.42.0+0\n [94ce4f54] Libiconv_jll v1.17.0+0\n [4b2f31a3] Libmount_jll v2.35.0+0\n [89763e89] Libtiff_jll v4.5.1+1\n [38a345b3] Libuuid_jll v2.36.0+0\n [856f044c] MKL_jll v2023.2.0+0\n [c771fb93] ODEInterface_jll v0.0.1+0\n [e7412a2a] Ogg_jll v1.3.5+1\n⌅ [458c3c95] OpenSSL_jll v1.1.23+0\n [efe28fd5] OpenSpecFun_jll v0.5.5+0\n [91d4177d] Opus_jll v1.3.2+0\n [30392449] Pixman_jll v0.42.2+0\n [c0090381] Qt6Base_jll v6.5.2+2\n [f50d1b31] Rmath_jll v0.4.0+0\n⌅ [fb77eaff] Sundials_jll v5.2.1+0\n [a44049a8] Vulkan_Loader_jll v1.3.243+0\n [a2964d1f] Wayland_jll v1.21.0+1\n [2381bf8a] Wayland_protocols_jll v1.25.0+0\n [02c8fc9c] XML2_jll v2.11.5+0\n [aed1982a] XSLT_jll v1.1.34+0\n [ffd25f8a] XZ_jll v5.4.4+0\n [f67eecfb] Xorg_libICE_jll v1.0.10+1\n [c834827a] Xorg_libSM_jll v1.2.3+0\n [4f6342f7] Xorg_libX11_jll v1.8.6+0\n [0c0b7dd1] Xorg_libXau_jll v1.0.11+0\n [935fb764] Xorg_libXcursor_jll v1.2.0+4\n [a3789734] Xorg_libXdmcp_jll v1.1.4+0\n [1082639a] Xorg_libXext_jll v1.3.4+4\n [d091e8ba] Xorg_libXfixes_jll v5.0.3+4\n [a51aa0fd] Xorg_libXi_jll v1.7.10+4\n [d1454406] Xorg_libXinerama_jll v1.1.4+4\n [ec84b674] Xorg_libXrandr_jll v1.5.2+4\n [ea2f1a96] Xorg_libXrender_jll v0.9.10+4\n [14d82f49] Xorg_libpthread_stubs_jll v0.1.1+0\n [c7cfdc94] Xorg_libxcb_jll v1.15.0+0\n [cc61e674] Xorg_libxkbfile_jll v1.1.2+0\n [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0\n [12413925] Xorg_xcb_util_image_jll v0.4.0+1\n [2def613f] Xorg_xcb_util_jll v0.4.0+1\n [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1\n [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1\n [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1\n [35661453] Xorg_xkbcomp_jll v1.4.6+0\n [33bec58e] Xorg_xkeyboard_config_jll v2.39.0+0\n [c5fb5394] Xorg_xtrans_jll v1.5.0+0\n [8f1865be] ZeroMQ_jll v4.3.4+0\n [3161d3a3] Zstd_jll v1.5.5+0\n [35ca27e7] eudev_jll v3.2.9+0\n⌅ [214eeab7] fzf_jll v0.29.0+0\n [1a1c6b14] gperf_jll v3.1.1+0\n [a4ae2306] libaom_jll v3.4.0+0\n [0ac62f75] libass_jll v0.15.1+0\n [2db6ffa8] libevdev_jll v1.11.0+0\n [f638f0a6] libfdk_aac_jll v2.0.2+0\n [36db933b] libinput_jll v1.18.0+0\n [b53b4c65] libpng_jll v1.6.38+0\n [a9144af2] libsodium_jll v1.0.20+0\n [f27f6e37] libvorbis_jll v1.3.7+1\n [009596ad] mtdev_jll v1.1.6+0\n [1270edf5] x264_jll v2021.5.5+0\n [dfaa095f] x265_jll v3.5.0+0\n [d8fb68d0] xkbcommon_jll v1.4.1+1\n [0dad84c5] ArgTools v1.1.1\n [56f22d72] Artifacts\n [2a0f44e3] Base64\n [ade2ca70] Dates\n [8ba89e20] Distributed\n [f43a241f] Downloads v1.6.0\n [7b1f6079] FileWatching\n [9fa8497b] Future\n [b77e0a4c] InteractiveUtils\n [4af54fe1] LazyArtifacts\n [b27032c2] LibCURL v0.6.3\n [76f85450] LibGit2\n [8f399da3] Libdl\n [37e2e46d] LinearAlgebra\n [56ddb016] Logging\n [d6f4376e] Markdown\n [a63ad114] Mmap\n [ca575930] NetworkOptions v1.2.0\n [44cfe95a] Pkg v1.9.2\n [de0858da] Printf\n [9abbd945] Profile\n [3fa0cd96] REPL\n [9a3f8284] Random\n [ea8e919c] SHA v0.7.0\n [9e88b42a] Serialization\n [1a1011a3] SharedArrays\n [6462fe0b] Sockets\n [2f01184e] SparseArrays\n [10745b16] Statistics v1.9.0\n [4607b0f0] SuiteSparse\n [fa267f1f] TOML v1.0.3\n [a4e569a6] Tar v1.10.0\n [8dfed614] Test\n [cf7118a7] UUIDs\n [4ec0a83e] Unicode\n [e66e0078] CompilerSupportLibraries_jll v1.0.5+0\n [deac9b47] LibCURL_jll v7.84.0+0\n [29816b5a] LibSSH2_jll v1.10.2+0\n [c8ffd9c3] MbedTLS_jll v2.28.2+0\n [14a3606d] MozillaCACerts_jll v2022.10.11\n [4536629a] OpenBLAS_jll v0.3.21+4\n [05823500] OpenLibm_jll v0.8.1+0\n [efcefdf7] PCRE2_jll v10.42.0+0\n [bea87d4a] SuiteSparse_jll v5.10.1+6\n [83775a58] Zlib_jll v1.2.13+0\n [8e850b90] libblastrampoline_jll v5.8.0+0\n [8e850ede] nghttp2_jll v1.48.0+0\n [3f19e933] p7zip_jll v17.4.0+0\nInfo Packages marked with ⌃ and ⌅ have new versions available, but those wi\nth ⌅ are restricted by compatibility constraints from upgrading. To see why\n use `status --outdated -m`","category":"page"},{"location":"benchmarks/rober/#ROBER-benchmark","page":"DAE: ROBER","title":"ROBER benchmark","text":"","category":"section"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Adapted from SciMLBenchmarks.jl.","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"using LinearAlgebra, Statistics\nusing DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Sundials, Plots\nusing ModelingToolkit\nusing ProbNumDiffEq\n\n# Plotting theme\ntheme(:dao;\n markerstrokewidth=0.5,\n legend=:outertopright,\n bottom_margin=5Plots.mm,\n size = (1000, 400),\n)","category":"page"},{"location":"benchmarks/rober/#ROBER-problem-definition","page":"DAE: ROBER","title":"ROBER problem definition","text":"","category":"section"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"@variables t y₁(t)=1.0 y₂(t)=0.0 y₃(t)=0.0\n@parameters k₁=0.04 k₂=3e7 k₃=1e4\nD = Differential(t)\neqs = [\n D(y₁) ~ -k₁*y₁ + k₃*y₂*y₃\n D(y₂) ~ k₁*y₁ - k₃*y₂*y₃ - k₂*y₂^2\n 0 ~ y₁ + y₂ + y₃ - 1\n]\n@named sys = ODESystem(eqs)\nmmprob = ODEProblem(sys,[],(0.0,1e5))\ndaeprob = DAEProblem(sys,[D(y₁)=>-0.04, D(y₂)=>0.04, D(y₃)=>0.0],[],(0.0,1e5)) # can't handle this yet\nodaeprob = ODAEProblem(structural_simplify(sys),[],(0.0,1e5)) # can't handle this yet\n\nref_sol = solve(daeprob,IDA(),abstol=1/10^14,reltol=1/10^14,dense=false)\nplot(ref_sol, idxs=[y₁,y₂,y₃], title=\"ROBER Solution\", legend=false, ylims=(0, 1))","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"(Image: )","category":"page"},{"location":"benchmarks/rober/#EK1-accross-orders","page":"DAE: ROBER","title":"EK1 accross orders","text":"","category":"section"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1($order)\" => Dict(:alg => EK1(order=order, smooth=DENSE))\n for order in 1:4\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:9)\nreltols = 1.0 ./ 10.0 .^ (1:6)\n\nwp = WorkPrecisionSet(\n mmprob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = ref_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, palette=Plots.palette([:blue, :red], length(_setups)), xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"(Image: )","category":"page"},{"location":"benchmarks/rober/#Conclusion","page":"DAE: ROBER","title":"Conclusion","text":"","category":"section"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"The EK1 can solve mass-matrix DAEs! But it only really works well for low errors.\nOrder 3 seems to work well here. But the order-to-error-tolerance heuristic should in principle still hold: lower tolerance level rightarrow higher order.","category":"page"},{"location":"benchmarks/rober/#Appendix","page":"DAE: ROBER","title":"Appendix","text":"","category":"section"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Computer information:","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"using InteractiveUtils\nInteractiveUtils.versioninfo()","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Julia Version 1.9.3\nCommit bed2cd540a1 (2023-08-24 14:43 UTC)\nBuild Info:\n Official https://julialang.org/ release\nPlatform Info:\n OS: Linux (x86_64-linux-gnu)\n CPU: 12 × Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz\n WORD_SIZE: 64\n LIBM: libopenlibm\n LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)\n Threads: 12 on 12 virtual cores\nEnvironment:\n JULIA_NUM_THREADS = auto\n JULIA_STACKTRACE_MINIMAL = true","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Package Information:","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"using Pkg\nPkg.status()","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml`\n [f3b72e0c] DiffEqDevTools v2.39.0\n [7073ff75] IJulia v1.24.2\n [7f56f5a3] LSODA v0.7.5\n [e6f89c97] LoggingExtras v1.0.3\n [e2752cbe] MATLABDiffEq v1.2.0\n [961ee093] ModelingToolkit v8.72.2\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [65888b18] ParameterizedFunctions v5.16.0\n [91a5bcdd] Plots v1.39.0\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [0bca4576] SciMLBase v2.4.0\n [505e40e9] SciPyDiffEq v0.2.1\n [90137ffa] StaticArrays v1.6.5\n [c3572dad] Sundials v4.20.0\n [44d3d7a6] Weave v0.10.12\n [0518478a] deSolveDiffEq v0.1.1","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"And the full manifest:","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Pkg.status(mode=Pkg.PKGMODE_MANIFEST)","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml`\n [47edcb42] ADTypes v0.2.4\n⌅ [c3fe647b] AbstractAlgebra v0.32.5\n [621f4979] AbstractFFTs v1.5.0\n [1520ce14] AbstractTrees v0.4.4\n [79e6a3ab] Adapt v3.6.2\n [ec485272] ArnoldiMethod v0.2.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.5\n [d1d4a3ce] BitFlags v0.1.7\n [62783981] BitTwiddlingConvenienceFunctions v0.1.5\n⌅ [fa961155] CEnum v0.4.2\n [2a0fbf3d] CPUSummary v0.2.4\n [00ebfdb7] CSTParser v3.3.6\n [49dc2e85] Calculus v0.5.1\n [324d7699] CategoricalArrays v0.10.8\n [d360d2e6] ChainRulesCore v1.16.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.2\n [35d6a980] ColorSchemes v3.24.0\n [3da002f7] ColorTypes v0.11.4\n [c3611d14] ColorVectorSpace v0.10.0\n [5ae59095] Colors v0.12.10\n [861a8166] Combinatorics v1.0.2\n [a80b9123] CommonMark v0.8.12\n [38540f10] CommonSolve v0.2.4\n [bbf7d656] CommonSubexpressions v0.3.0\n [34da2185] Compat v4.10.0\n [b152e2b5] CompositeTypes v0.1.3\n [2569d6c7] ConcreteStructs v0.2.3\n [f0e56b4a] ConcurrentUtilities v2.2.1\n [8f4d0f93] Conda v1.9.1\n [187b0558] ConstructionBase v1.5.4\n [d38c429a] Contour v0.6.2\n [adafc99b] CpuId v0.3.1\n [a8cc5b0e] Crayons v4.1.1\n [717857b8] DSP v0.7.9\n [9a962f9c] DataAPI v1.15.0\n [a93c6f00] DataFrames v1.6.1\n [864edb3b] DataStructures v0.18.15\n [e2d170a0] DataValueInterfaces v1.0.0\n [8bb1440f] DelimitedFiles v1.9.1\n [2b5f629d] DiffEqBase v6.133.1\n [459566f4] DiffEqCallbacks v2.33.0\n [f3b72e0c] DiffEqDevTools v2.39.0\n [77a26b50] DiffEqNoiseProcess v5.19.0\n [163ba53b] DiffResults v1.1.0\n [b552c78f] DiffRules v1.15.1\n [b4f34e82] Distances v0.10.10\n [31c24e10] Distributions v0.25.102\n [ffbed154] DocStringExtensions v0.9.3\n⌅ [5b8099bc] DomainSets v0.6.7\n [fa6b7ba4] DualNumbers v0.6.8\n [7c1d4256] DynamicPolynomials v0.5.3\n [b305315f] Elliptic v1.0.1\n [4e289a0a] EnumX v1.0.4\n [f151be2c] EnzymeCore v0.6.1\n [6912e4f1] Espresso v0.6.1\n [460bff9d] ExceptionUnwrapping v0.1.9\n [d4d017d3] ExponentialUtilities v1.25.0\n [e2ba6199] ExprTools v0.1.10\n [c87230d0] FFMPEG v0.4.1\n [7a1cc6ca] FFTW v1.7.1\n [7034ab61] FastBroadcast v0.2.7\n [9aa1b823] FastClosures v0.3.2\n [442a2c76] FastGaussQuadrature v1.0.0\n [29a986be] FastLapackInterface v2.0.0\n [1a297f60] FillArrays v1.6.1\n [6a86dc24] FiniteDiff v2.21.1\n [53c48c17] FixedPointNumbers v0.8.4\n [59287772] Formatting v0.4.2\n [f6369f11] ForwardDiff v0.10.36\n [069b7b12] FunctionWrappers v1.1.3\n [77dc65aa] FunctionWrappersWrappers v0.1.3\n [d9f16b24] Functors v0.4.5\n [46192b85] GPUArraysCore v0.1.5\n [28b8d3ca] GR v0.72.10\n [43dcc890] GaussianDistributions v0.5.2\n [c145ed77] GenericSchur v0.5.3\n [c27321d9] Glob v1.3.1\n [86223c79] Graphs v1.9.0\n [42e2da0e] Grisu v1.0.2\n [0b43b601] Groebner v0.4.4\n [d5909c97] GroupsCore v0.4.0\n [cd3eb016] HTTP v1.10.0\n [eafb193a] Highlights v0.5.2\n [3e5b6fbb] HostCPUFeatures v0.1.16\n [34004b35] HypergeometricFunctions v0.3.23\n [7073ff75] IJulia v1.24.2\n [615f187c] IfElse v0.1.1\n [d25df0c9] Inflate v0.1.4\n [842dd82b] InlineStrings v1.4.0\n [18e54dd8] IntegerMathUtils v0.1.2\n [8197267c] IntervalSets v0.7.7\n [41ab1584] InvertedIndices v1.3.0\n [92d709cd] IrrationalConstants v0.2.2\n [c8e1da08] IterTools v1.8.0\n [82899510] IteratorInterfaceExtensions v1.0.0\n [1019f520] JLFzf v0.1.5\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.39\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [ba0b0d4f] Krylov v0.9.4\n [7f56f5a3] LSODA v0.7.5\n [b964fa9f] LaTeXStrings v1.3.0\n [2ee39098] LabelledArrays v1.14.0\n [984bce1d] LambertW v0.4.6\n [23fbe1c1] Latexify v0.16.1\n [10f19ff3] LayoutPointers v0.1.14\n [50d2b5c4] Lazy v0.15.1\n [1d6d02ad] LeftChildRightSiblingTrees v0.2.0\n [d3d80556] LineSearches v7.2.0\n [7ed4a6bd] LinearSolve v2.9.2\n [2ab3a3ac] LogExpFunctions v0.3.26\n [e6f89c97] LoggingExtras v1.0.3\n [bdcacae8] LoopVectorization v0.12.165\n [10e44e05] MATLAB v0.8.4\n [e2752cbe] MATLABDiffEq v1.2.0\n [d8e11817] MLStyle v0.4.17\n [1914dd2f] MacroTools v0.5.11\n [d125e4d3] ManualMemory v0.1.8\n [739be429] MbedTLS v1.1.7\n [442fdcdd] Measures v0.3.2\n [e1d29d7a] Missings v1.1.0\n [961ee093] ModelingToolkit v8.72.2\n [46d2c3a1] MuladdMacro v0.2.4\n [102ac46a] MultivariatePolynomials v0.5.2\n [ffc61752] Mustache v1.0.17\n [d8a4904e] MutableArithmetics v1.3.3\n [d41bc354] NLSolversBase v7.8.3\n [2774e3e8] NLsolve v4.5.1\n [77ba4419] NaNMath v1.0.2\n [8913a72c] NonlinearSolve v2.2.1\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [6fd5a793] Octavian v0.3.27\n [6fe1bfb0] OffsetArrays v1.12.10\n [4d8831e6] OpenSSL v1.4.1\n [429524aa] Optim v1.7.8\n [bac558e1] OrderedCollections v1.6.2\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [90014a1f] PDMats v0.11.25\n [fe68d972] PSDMatrices v0.4.4\n [65ce6f38] PackageExtensionCompat v1.0.2\n [65888b18] ParameterizedFunctions v5.16.0\n [d96e819e] Parameters v0.12.3\n [69de0a69] Parsers v2.7.2\n [b98c9c47] Pipe v1.3.0\n [32113eaa] PkgBenchmark v0.2.12\n [ccf2f8ad] PlotThemes v3.1.0\n [995b91a9] PlotUtils v1.3.5\n [91a5bcdd] Plots v1.39.0\n [e409e4f3] PoissonRandom v0.4.4\n [f517fe37] Polyester v0.7.8\n [1d0040c9] PolyesterWeave v0.2.1\n⌅ [f27b6e38] Polynomials v3.2.13\n [2dfb63ee] PooledArrays v1.4.3\n [85a6dd25] PositiveFactorizations v0.2.4\n [d236fae5] PreallocationTools v0.4.12\n [aea7be01] PrecompileTools v1.2.0\n [21216c6a] Preferences v1.4.1\n [08abe8d2] PrettyTables v2.2.7\n [27ebfcd6] Primes v0.5.4\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [33c8b6b6] ProgressLogging v0.1.4\n [438e738f] PyCall v1.96.1\n [1fd47b50] QuadGK v2.9.1\n [6f49c342] RCall v0.13.18\n [74087812] Random123 v1.6.1\n [fb686558] RandomExtensions v0.4.4\n [e6cf234a] RandomNumbers v1.5.3\n [3cdcf5f2] RecipesBase v1.3.4\n [01d81517] RecipesPipeline v0.6.12\n [731186ca] RecursiveArrayTools v2.39.0\n [f2c3362d] RecursiveFactorization v0.2.20\n [189a3867] Reexport v1.2.2\n [05181044] RelocatableFolders v1.0.1\n [ae029012] Requires v1.3.0\n [ae5879a3] ResettableStacks v1.1.1\n [79098fc4] Rmath v0.7.1\n [47965b36] RootedTrees v2.19.2\n [7e49a35a] RuntimeGeneratedFunctions v0.5.12\n [fdea26ae] SIMD v3.4.5\n [94e857df] SIMDTypes v0.1.0\n [476501e8] SLEEFPirates v0.6.39\n [0bca4576] SciMLBase v2.4.0\n [e9a6253c] SciMLNLSolve v0.1.9\n [c0aeaf25] SciMLOperators v0.3.6\n [505e40e9] SciPyDiffEq v0.2.1\n [6c6a2e73] Scratch v1.2.0\n [91c51154] SentinelArrays v1.4.0\n [efcf1570] Setfield v1.1.1\n [1277b4bf] ShiftedArrays v2.0.0\n [992d4aef] Showoff v1.0.3\n [777ac1f9] SimpleBufferStream v1.1.0\n [727e6d20] SimpleNonlinearSolve v0.1.20\n [699a6c99] SimpleTraits v0.9.4\n [ce78b400] SimpleUnPack v1.1.0\n [66db9d55] SnoopPrecompile v1.0.3\n [b85f4697] SoftGlobalScope v1.1.0\n [a2af1166] SortingAlgorithms v1.1.1\n [47a9eef4] SparseDiffTools v2.8.0\n [e56a9233] Sparspak v0.3.9\n [276daf66] SpecialFunctions v2.3.1\n [928aab9d] SpecialMatrices v3.0.0\n [aedffcd0] Static v0.8.8\n [0d7ed370] StaticArrayInterface v1.4.1\n [90137ffa] StaticArrays v1.6.5\n [1e83bf80] StaticArraysCore v1.4.2\n [82ae8749] StatsAPI v1.7.0\n [2913bbd2] StatsBase v0.34.2\n [4c63d2b9] StatsFuns v1.3.0\n [3eaba693] StatsModels v0.7.3\n⌅ [7792a7ef] StrideArraysCore v0.4.17\n [69024149] StringEncodings v0.3.7\n [892a3eda] StringManipulation v0.3.4\n [09ab397b] StructArrays v0.6.16\n [c3572dad] Sundials v4.20.0\n [2efcf032] SymbolicIndexingInterface v0.2.2\n [d1185830] SymbolicUtils v1.4.0\n [0c5d862f] Symbolics v5.9.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.0\n [92b13dbe] TaylorIntegration v0.14.3\n [6aa5eb33] TaylorSeries v0.15.2\n [62fd8b95] TensorCore v0.1.1\n [5d786b92] TerminalLoggers v0.1.7\n [8290d209] ThreadingUtilities v0.5.2\n [a759f4b9] TimerOutputs v0.5.23\n [c751599d] ToeplitzMatrices v0.8.2\n [0796e94c] Tokenize v0.5.25\n [3bb67fe8] TranscodingStreams v0.9.13\n [a2a6695c] TreeViews v0.3.0\n [d5829a12] TriangularSolve v0.1.19\n [410a4b4d] Tricks v0.1.8\n [781d530d] TruncatedStacktraces v1.4.0\n [5c2747f8] URIs v1.5.0\n [3a884ed6] UnPack v1.0.2\n [1cfade01] UnicodeFun v0.4.1\n [1986cc42] Unitful v1.17.0\n [45397f5d] UnitfulLatexify v1.6.3\n [a7c27f48] Unityper v0.1.5\n [41fe7b60] Unzip v0.2.0\n [3d5dd08c] VectorizationBase v0.21.64\n [81def892] VersionParsing v1.3.0\n [19fa3120] VertexSafeGraphs v0.2.0\n [44d3d7a6] Weave v0.10.12\n [1b915085] WinReg v1.0.0\n [ddb6d928] YAML v0.4.9\n [c2297ded] ZMQ v1.2.2\n [700de1a5] ZygoteRules v0.2.3\n [0518478a] deSolveDiffEq v0.1.1\n [6e34b625] Bzip2_jll v1.0.8+0\n [83423d85] Cairo_jll v1.16.1+1\n [2702e6a9] EpollShim_jll v0.0.20230411+0\n [2e619515] Expat_jll v2.5.0+0\n⌃ [b22a6f82] FFMPEG_jll v4.4.2+2\n [f5851436] FFTW_jll v3.3.10+0\n [a3f928ae] Fontconfig_jll v2.13.93+0\n [d7e528f0] FreeType2_jll v2.13.1+0\n [559328eb] FriBidi_jll v1.0.10+0\n [0656b61e] GLFW_jll v3.3.8+0\n [d2c73de3] GR_jll v0.72.10+0\n [78b55507] Gettext_jll v0.21.0+0\n [7746bdde] Glib_jll v2.76.5+0\n [3b182d85] Graphite2_jll v1.3.14+0\n [2e76f6c2] HarfBuzz_jll v2.8.1+1\n [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0\n [aacddb02] JpegTurbo_jll v2.1.91+0\n [c1c5ebd0] LAME_jll v3.100.1+0\n [88015f11] LERC_jll v3.0.0+1\n [1d63c593] LLVMOpenMP_jll v15.0.4+0\n [aae0fff6] LSODA_jll v0.1.2+0\n [dd4b983a] LZO_jll v2.10.1+0\n⌅ [e9f186c6] Libffi_jll v3.2.2+1\n [d4300ac3] Libgcrypt_jll v1.8.7+0\n [7e76a0d4] Libglvnd_jll v1.6.0+0\n [7add5ba3] Libgpg_error_jll v1.42.0+0\n [94ce4f54] Libiconv_jll v1.17.0+0\n [4b2f31a3] Libmount_jll v2.35.0+0\n [89763e89] Libtiff_jll v4.5.1+1\n [38a345b3] Libuuid_jll v2.36.0+0\n [856f044c] MKL_jll v2023.2.0+0\n [c771fb93] ODEInterface_jll v0.0.1+0\n [e7412a2a] Ogg_jll v1.3.5+1\n⌅ [458c3c95] OpenSSL_jll v1.1.23+0\n [efe28fd5] OpenSpecFun_jll v0.5.5+0\n [91d4177d] Opus_jll v1.3.2+0\n [30392449] Pixman_jll v0.42.2+0\n [c0090381] Qt6Base_jll v6.5.2+2\n [f50d1b31] Rmath_jll v0.4.0+0\n⌅ [fb77eaff] Sundials_jll v5.2.1+0\n [a44049a8] Vulkan_Loader_jll v1.3.243+0\n [a2964d1f] Wayland_jll v1.21.0+1\n [2381bf8a] Wayland_protocols_jll v1.25.0+0\n [02c8fc9c] XML2_jll v2.11.5+0\n [aed1982a] XSLT_jll v1.1.34+0\n [ffd25f8a] XZ_jll v5.4.4+0\n [f67eecfb] Xorg_libICE_jll v1.0.10+1\n [c834827a] Xorg_libSM_jll v1.2.3+0\n [4f6342f7] Xorg_libX11_jll v1.8.6+0\n [0c0b7dd1] Xorg_libXau_jll v1.0.11+0\n [935fb764] Xorg_libXcursor_jll v1.2.0+4\n [a3789734] Xorg_libXdmcp_jll v1.1.4+0\n [1082639a] Xorg_libXext_jll v1.3.4+4\n [d091e8ba] Xorg_libXfixes_jll v5.0.3+4\n [a51aa0fd] Xorg_libXi_jll v1.7.10+4\n [d1454406] Xorg_libXinerama_jll v1.1.4+4\n [ec84b674] Xorg_libXrandr_jll v1.5.2+4\n [ea2f1a96] Xorg_libXrender_jll v0.9.10+4\n [14d82f49] Xorg_libpthread_stubs_jll v0.1.1+0\n [c7cfdc94] Xorg_libxcb_jll v1.15.0+0\n [cc61e674] Xorg_libxkbfile_jll v1.1.2+0\n [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0\n [12413925] Xorg_xcb_util_image_jll v0.4.0+1\n [2def613f] Xorg_xcb_util_jll v0.4.0+1\n [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1\n [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1\n [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1\n [35661453] Xorg_xkbcomp_jll v1.4.6+0\n [33bec58e] Xorg_xkeyboard_config_jll v2.39.0+0\n [c5fb5394] Xorg_xtrans_jll v1.5.0+0\n [8f1865be] ZeroMQ_jll v4.3.4+0\n [3161d3a3] Zstd_jll v1.5.5+0\n [35ca27e7] eudev_jll v3.2.9+0\n⌅ [214eeab7] fzf_jll v0.29.0+0\n [1a1c6b14] gperf_jll v3.1.1+0\n [a4ae2306] libaom_jll v3.4.0+0\n [0ac62f75] libass_jll v0.15.1+0\n [2db6ffa8] libevdev_jll v1.11.0+0\n [f638f0a6] libfdk_aac_jll v2.0.2+0\n [36db933b] libinput_jll v1.18.0+0\n [b53b4c65] libpng_jll v1.6.38+0\n [a9144af2] libsodium_jll v1.0.20+0\n [f27f6e37] libvorbis_jll v1.3.7+1\n [009596ad] mtdev_jll v1.1.6+0\n [1270edf5] x264_jll v2021.5.5+0\n [dfaa095f] x265_jll v3.5.0+0\n [d8fb68d0] xkbcommon_jll v1.4.1+1\n [0dad84c5] ArgTools v1.1.1\n [56f22d72] Artifacts\n [2a0f44e3] Base64\n [ade2ca70] Dates\n [8ba89e20] Distributed\n [f43a241f] Downloads v1.6.0\n [7b1f6079] FileWatching\n [9fa8497b] Future\n [b77e0a4c] InteractiveUtils\n [4af54fe1] LazyArtifacts\n [b27032c2] LibCURL v0.6.3\n [76f85450] LibGit2\n [8f399da3] Libdl\n [37e2e46d] LinearAlgebra\n [56ddb016] Logging\n [d6f4376e] Markdown\n [a63ad114] Mmap\n [ca575930] NetworkOptions v1.2.0\n [44cfe95a] Pkg v1.9.2\n [de0858da] Printf\n [9abbd945] Profile\n [3fa0cd96] REPL\n [9a3f8284] Random\n [ea8e919c] SHA v0.7.0\n [9e88b42a] Serialization\n [1a1011a3] SharedArrays\n [6462fe0b] Sockets\n [2f01184e] SparseArrays\n [10745b16] Statistics v1.9.0\n [4607b0f0] SuiteSparse\n [fa267f1f] TOML v1.0.3\n [a4e569a6] Tar v1.10.0\n [8dfed614] Test\n [cf7118a7] UUIDs\n [4ec0a83e] Unicode\n [e66e0078] CompilerSupportLibraries_jll v1.0.5+0\n [deac9b47] LibCURL_jll v7.84.0+0\n [29816b5a] LibSSH2_jll v1.10.2+0\n [c8ffd9c3] MbedTLS_jll v2.28.2+0\n [14a3606d] MozillaCACerts_jll v2022.10.11\n [4536629a] OpenBLAS_jll v0.3.21+4\n [05823500] OpenLibm_jll v0.8.1+0\n [efcefdf7] PCRE2_jll v10.42.0+0\n [bea87d4a] SuiteSparse_jll v5.10.1+6\n [83775a58] Zlib_jll v1.2.13+0\n [8e850b90] libblastrampoline_jll v5.8.0+0\n [8e850ede] nghttp2_jll v1.48.0+0\n [3f19e933] p7zip_jll v17.4.0+0\nInfo Packages marked with ⌃ and ⌅ have new versions available, but those wi\nth ⌅ are restricted by compatibility constraints from upgrading. To see why\n use `status --outdated -m`","category":"page"},{"location":"filtering/#Gaussian-Filtering-and-Smoothing","page":"Filtering and Smoothing","title":"Gaussian Filtering and Smoothing","text":"","category":"section"},{"location":"filtering/#Predict","page":"Filtering and Smoothing","title":"Predict","text":"","category":"section"},{"location":"filtering/","page":"Filtering and Smoothing","title":"Filtering and Smoothing","text":"ProbNumDiffEq.predict\nProbNumDiffEq.predict!","category":"page"},{"location":"filtering/#ProbNumDiffEq.predict","page":"Filtering and Smoothing","title":"ProbNumDiffEq.predict","text":"predict(x::Gaussian, A::AbstractMatrix, Q::AbstractMatrix)\n\nPrediction step in Kalman filtering for linear dynamics models.\n\nGiven a Gaussian x = mathcalN(μ Σ), compute and return mathcalN(A μ A Σ A^T + Q).\n\nSee also the non-allocating square-root version predict!.\n\n\n\n\n\n","category":"function"},{"location":"filtering/#ProbNumDiffEq.predict!","page":"Filtering and Smoothing","title":"ProbNumDiffEq.predict!","text":"predict!(x_out, x_curr, Ah, Qh, cachemat)\n\nIn-place and square-root implementation of predict which saves the result into x_out.\n\nOnly works with PSDMatrices.PSDMatrix types as Ah, Qh, and in the covariances of x_curr and x_out (both of type Gaussian). To prevent allocations, a cache matrix cachemat of size D times 2D (where D times D is the size of Ah and Qh) needs to be passed.\n\nSee also: predict.\n\n\n\n\n\n","category":"function"},{"location":"filtering/#Update","page":"Filtering and Smoothing","title":"Update","text":"","category":"section"},{"location":"filtering/","page":"Filtering and Smoothing","title":"Filtering and Smoothing","text":"ProbNumDiffEq.update\nProbNumDiffEq.update!","category":"page"},{"location":"filtering/#ProbNumDiffEq.update","page":"Filtering and Smoothing","title":"ProbNumDiffEq.update","text":"update(x, measurement, H)\n\nUpdate step in Kalman filtering for linear dynamics models.\n\nGiven a Gaussian x = mathcalN(μ Σ) and a measurement z = mathcalN(hatz S), with S = H Σ H^T, compute\n\nbeginaligned\nK = Σ^P H^T S^-1 \nμ^F = μ + K (0 - hatz) \nΣ^F = Σ - K S K^T\nendaligned\n\nand return an updated state \\mathcal{N}(μ^F, Σ^F). Note that this assumes zero-measurements. When called with ProbNumDiffEq.SquarerootMatrix type arguments it performs the update in Joseph / square-root form.\n\nFor better performance, we recommend to use the non-allocating update!.\n\n\n\n\n\n","category":"function"},{"location":"filtering/#ProbNumDiffEq.update!","page":"Filtering and Smoothing","title":"ProbNumDiffEq.update!","text":"update!(x_out, x_pred, measurement, H, K_cache, M_cache, S_cache)\n\nIn-place and square-root implementation of update which saves the result into x_out.\n\nImplemented in Joseph Form to retain the PSDMatrix covariances:\n\nbeginaligned\nK = Σ^P H^T S^-1 \nμ^F = μ + K (0 - hatz) \nsqrtΣ^F = (I - KH) sqrt(Σ)\nendaligned\n\nwhere sqrtM denotes the left square-root of a matrix M, i.e. M = sqrtM sqrtM^T.\n\nTo prevent allocations, write into caches K_cache and M_cache, both of size D × D, and S_cache of same type as measurement.Σ.\n\nSee also: update.\n\n\n\n\n\n","category":"function"},{"location":"filtering/#Smooth","page":"Filtering and Smoothing","title":"Smooth","text":"","category":"section"},{"location":"filtering/","page":"Filtering and Smoothing","title":"Filtering and Smoothing","text":"ProbNumDiffEq.smooth\nProbNumDiffEq.smooth!","category":"page"},{"location":"filtering/#ProbNumDiffEq.smooth","page":"Filtering and Smoothing","title":"ProbNumDiffEq.smooth","text":"smooth(x_curr, x_next_smoothed, A, Q)\n\nUpdate step of the Kalman smoother, aka. Rauch-Tung-Striebel smoother, for linear dynamics models.\n\nGiven Gaussians x_n = mathcalN(μ_n Σ_n) and x_n+1 = mathcalN(μ_n+1^S Σ_n+1^S), compute\n\nbeginaligned\nμ_n+1^P = A μ_n^F \nP_n+1^P = A Σ_n^F A + Q \nG = Σ_n^S A^T (Σ_n+1^P)^-1 \nμ_n^S = μ_n^F + G (μ_n+1^S - μ_n+1^P) \nΣ_n^S = (I - G A) Σ_n^F (I - G A)^T + G Q G^T + G Σ_n+1^S G^T\nendaligned\n\nand return a smoothed state \\mathcal{N}(μ_n^S, Σ_n^S). When called with ProbNumDiffEq.SquarerootMatrix type arguments it performs the update in Joseph / square-root form.\n\nFor better performance, we recommend to use the non-allocating smooth!.\n\n\n\n\n\n","category":"function"},{"location":"filtering/#ProbNumDiffEq.smooth!","page":"Filtering and Smoothing","title":"ProbNumDiffEq.smooth!","text":"smooth!(x_curr, x_next, Ah, Qh, cache, diffusion=1)\n\nIn-place and square-root implementation of smooth which overwrites x_curr.\n\nImplemented in Joseph form to preserve square-root structure. It requires access to the solvers cache to prevent allocations.\n\nSee also: smooth.\n\n\n\n\n\n","category":"function"},{"location":"solvers/#Solvers","page":"Solvers","title":"Solvers","text":"","category":"section"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"ProbNumDiffEq.jl provides two solvers: the EK1 and the EK0. Both based on extended Kalman filtering and smoothing, but the latter relies on evaluating the Jacobian of the vector field. For the best results, use the EK1.","category":"page"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"All solvers are compatible with DAEs in mass-matrix ODE form. They also specialize on second-order ODEs: If the problem is of type SecondOrderODEProblem, it solves the second-order problem directly; this is more efficient than solving the transformed first-order problem and provides more meaningful posteriors [1].","category":"page"},{"location":"solvers/#API","page":"Solvers","title":"API","text":"","category":"section"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"EK1\nEK0","category":"page"},{"location":"solvers/#ProbNumDiffEq.EK1","page":"Solvers","title":"ProbNumDiffEq.EK1","text":"EK1(; order=3,\n smooth=true,\n prior=IWP(order),\n diffusionmodel=DynamicDiffusion(),\n initialization=TaylorModeInit(),\n kwargs...)\n\nGaussian ODE filter with first-order vector field linearization.\n\nArguments\n\norder::Integer: Order of the integrated Wiener process (IWP) prior.\nsmooth::Bool: Turn smoothing on/off; smoothing is required for dense output.\nprior::AbstractODEFilterPrior: Prior to be used by the ODE filter. By default, uses a 3-times integrated Wiener process prior IWP(3). See also: Priors.\ndiffusionmodel::ProbNumDiffEq.AbstractDiffusion: See Diffusion models and calibration.\ninitialization::ProbNumDiffEq.InitializationScheme: See Initialization.\n\nSome additional kwargs relating to implicit solvers are supported; check out DifferentialEquations.jl's Extra Options page. Right now, we support autodiff, chunk_size, and diff_type. In particular, autodiff=false can come in handy to use finite differences instead of ForwardDiff.jl to compute Jacobians.\n\nExamples\n\njulia> solve(prob, EK1())\n\nReferences\n\n\n\n\n\n","category":"type"},{"location":"solvers/#ProbNumDiffEq.EK0","page":"Solvers","title":"ProbNumDiffEq.EK0","text":"EK0(; order=3,\n smooth=true,\n prior=IWP(order),\n diffusionmodel=DynamicDiffusion(),\n initialization=TaylorModeInit())\n\nGaussian ODE filter with zeroth-order vector field linearization.\n\nArguments\n\norder::Integer: Order of the integrated Wiener process (IWP) prior.\nsmooth::Bool: Turn smoothing on/off; smoothing is required for dense output.\nprior::AbstractODEFilterPrior: Prior to be used by the ODE filter. By default, uses a 3-times integrated Wiener process prior IWP(3). See also: Priors.\ndiffusionmodel::ProbNumDiffEq.AbstractDiffusion: See Diffusion models and calibration.\ninitialization::ProbNumDiffEq.InitializationScheme: See Initialization.\n\nExamples\n\njulia> solve(prob, EK0())\n\nReferences\n\n\n\n\n\n","category":"type"},{"location":"solvers/#Probabilistic-Exponential-Integrators","page":"Solvers","title":"Probabilistic Exponential Integrators","text":"","category":"section"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"ExpEK\nRosenbrockExpEK","category":"page"},{"location":"solvers/#ProbNumDiffEq.ExpEK","page":"Solvers","title":"ProbNumDiffEq.ExpEK","text":"ExpEK(; L, order=3, kwargs...)\n\nProbabilistic exponential integrator\n\nProbabilistic exponential integrators are a class of integrators for semi-linear stiff ODEs that provide improved stability by essentially solving the linear part of the ODE exactly. In probabilistic numerics, this amounts to including the linear part into the prior model of the solver.\n\nExpEK is therefore just a short-hand for EK0 with IOUP prior:\n\nExpEK(; order=3, L, kwargs...) = EK0(; prior=IOUP(order, L), kwargs...)\n\nSee also RosenbrockExpEK, EK0, EK1.\n\nArguments\n\nSee EK0 for available keyword arguments.\n\nExamples\n\njulia> prob = ODEProblem((du, u, p, t) -> (@. du = - u + sin(u)), [1.0], (0.0, 10.0))\njulia> solve(prob, ExpEK(L=-1))\n\nReference\n\n[2] Bosch et al, \"Probabilistic Exponential Integrators\", arXiv (2021)\n\n\n\n\n\n","category":"function"},{"location":"solvers/#ProbNumDiffEq.RosenbrockExpEK","page":"Solvers","title":"ProbNumDiffEq.RosenbrockExpEK","text":"RosenbrockExpEK(; order=3, kwargs...)\n\nProbabilistic Rosenbrock-type exponential integrator\n\nA probabilistic exponential integrator similar to ExpEK, but with automatic linearization along the mean numerical solution. This brings the advantage that the linearity does not need to be specified manually, and the more accurate local linearization can sometimes also improve stability; but since the \"prior\" is adjusted at each step the probabilistic interpretation becomes more complicated.\n\nRosenbrockExpEK is just a short-hand for EK1 with appropriete IOUP prior:\n\nRosenbrockExpEK(; order=3, kwargs...) = EK1(; prior=IOUP(order, update_rate_parameter=true), kwargs...)\n\nSee also ExpEK, EK0, EK1.\n\nArguments\n\nSee EK1 for available keyword arguments.\n\nExamples\n\njulia> prob = ODEProblem((du, u, p, t) -> (@. du = - u + sin(u)), [1.0], (0.0, 10.0))\njulia> solve(prob, RosenbrockExpEK())\n\nReference\n\n[2] Bosch et al, \"Probabilistic Exponential Integrators\", arXiv (2021)\n\n\n\n\n\n","category":"function"},{"location":"solvers/#solversrefs","page":"Solvers","title":"References","text":"","category":"section"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"
[2]
\n
\n
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
\n
\n
","category":"page"},{"location":"tutorials/exponential_integrators/#Probabilistic-Exponential-Integrators","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"","category":"section"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"Exponential integrators are a class of numerical methods for solving semi-linear ordinary differential equations (ODEs) of the form","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"beginaligned\ndoty(t) = L y(t) + f(y(t) t) quad y(0) = y_0\nendaligned","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"where L is a linear operator and f is a nonlinear function. In a nutshell, exponential integrators solve the linear part of the ODE exactly, and only approximate the nonlinear part. Probabilistic exponential integrators [2] are the probabilistic numerics approach to exponential integrators.","category":"page"},{"location":"tutorials/exponential_integrators/#Example","page":"Probabilistic Exponential Integrators","title":"Example","text":"","category":"section"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"Let's consider a simple semi-linear ODE","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"beginaligned\ndoty(t) = - y(t) + sin(y(t)) quad y(0) = 10\nendaligned","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"We can solve this ODE reasonably well with the standard EK1 and adaptive steps (the default):","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"using ProbNumDiffEq, Plots, LinearAlgebra\ntheme(:default; palette=[\"#4063D8\", \"#389826\", \"#9558B2\", \"#CB3C33\"])\n\nf(du, u, p, t) = (@. du = -u + sin(u))\nu0 = [1.0]\ntspan = (0.0, 20.0)\nprob = ODEProblem(f, u0, tspan)\n\nref = solve(prob, EK1(), abstol=1e-10, reltol=1e-10)\nplot(ref, color=:black, linestyle=:dash, label=\"Reference\")","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"But for fixed (large) step sizes this ODE is more challenging: The explicit EK0 method oscillates and diverges due to the stiffness of the ODE, and the semi-implicit EK1 method is stable but the solution is not very accurate.","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"STEPSIZE = 4\nDM = FixedDiffusion() # recommended for fixed steps\n\n# we don't smooth the EK0 here to show the oscillations more clearly\nsol0 = solve(prob, EK0(smooth=false, diffusionmodel=DM), adaptive=false, dt=STEPSIZE, dense=false)\nsol1 = solve(prob, EK1(diffusionmodel=DM), adaptive=false, dt=STEPSIZE)\n\nplot(ylims=(0.3, 1.05))\nplot!(ref, color=:black, linestyle=:dash, label=\"Reference\")\nplot!(sol0, denseplot=false, marker=:o, markersize=2, label=\"EK0\", color=1)\nplot!(sol1, denseplot=false, marker=:o, markersize=2, label=\"EK1\", color=2)","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"Probabilistic exponential integrators leverage the semi-linearity of the ODE to compute more accurate solutions for the same fixed step size. You can use either the ExpEK method and provide the linear part (with the keyword argument L), or the RosenbrockExpEK to automatically linearize along the mean of the numerical solution:","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"sol_exp = solve(prob, ExpEK(L=-1, diffusionmodel=DM), adaptive=false, dt=STEPSIZE)\nsol_ros = solve(prob, RosenbrockExpEK(diffusionmodel=DM), adaptive=false, dt=STEPSIZE)\n\nplot(ylims=(0.3, 1.05))\nplot!(ref, color=:black, linestyle=:dash, label=\"Reference\")\nplot!(sol_exp, denseplot=false, marker=:o, markersize=2, label=\"ExpEK\", color=3)\nplot!(sol_ros, denseplot=false, marker=:o, markersize=2, label=\"RosenbrockExpEK\", color=4)","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"The solutions are indeed much more accurate than those of the standard EK1, for the same fixed step size!","category":"page"},{"location":"tutorials/exponential_integrators/#Background:-Integrated-Ornstein-Uhlenbeck-priors","page":"Probabilistic Exponential Integrators","title":"Background: Integrated Ornstein-Uhlenbeck priors","text":"","category":"section"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"Probabilistic exponential integrators \"solve the linear part exactly\" by including it into the prior model of the solver. Namely, the solver chooses a (q-times) integrated Ornstein-Uhlenbeck prior with rate parameter equal to the linearity. The ExpEK solver is just a short-hand for an EK0 with appropriate prior:","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"ExpEK(order=3, L=-1) == EK0(prior=IOUP(3, -1))","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"Similarly, the RosenbrockExpEK solver is also just a short-hand:","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"RosenbrockExpEK(order=3) == EK1(prior=IOUP(3, update_rate_parameter=true))","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"This means that you can also construct other probabilistic exponential integrators by hand! In this example the EK1 with IOUP prior with rate parameter -1 performs extremely well:","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"sol_expek1 = solve(prob, EK1(prior=IOUP(3, -1), diffusionmodel=DM), adaptive=false, dt=STEPSIZE)\n\nplot(ylims=(0.3, 1.05))\nplot!(ref, color=:black, linestyle=:dash, label=\"Reference\")\nplot!(sol_expek1, denseplot=false, marker=:o, markersize=2, label=\"EK1 + IOUP\")","category":"page"},{"location":"tutorials/exponential_integrators/#References","page":"Probabilistic Exponential Integrators","title":"References","text":"","category":"section"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"
[2]
\n
\n
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
\n
\n
","category":"page"},{"location":"benchmarks/lotkavolterra/#Lotka-Volterra-benchmark","page":"Non-stiff ODE: Lotka-Volterra","title":"Lotka-Volterra benchmark","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Adapted from SciMLBenchmarks.jl.","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"using LinearAlgebra, Statistics\nusing DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Plots\nusing ProbNumDiffEq\n\n# Plotting theme\ntheme(:dao;\n markerstrokewidth=0.5,\n legend=:outertopright,\n bottom_margin=5Plots.mm,\n size = (1000, 400),\n)","category":"page"},{"location":"benchmarks/lotkavolterra/#Lotka-Volterra-problem-definition","page":"Non-stiff ODE: Lotka-Volterra","title":"Lotka-Volterra problem definition","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"f = @ode_def LotkaVolterra begin\n dx = a*x - b*x*y\n dy = -c*y + d*x*y\nend a b c d\np = [1.5, 1, 3, 1]\ntspan = (0.0, 10.0)\nu0 = [1.0, 1.0]\nprob = ODEProblem{true, SciMLBase.FullSpecialize}(f, u0, tspan, p)\n\ntest_sol = solve(prob, Vern7(), abstol=1/10^14, reltol=1/10^14, dense=false)\nplot(test_sol, title=\"Lotka-Volterra Solution\", legend=false)","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#EK0-accross-orders","page":"Non-stiff ODE: Lotka-Volterra","title":"EK0 accross orders","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK0(order=$order)\" => Dict(:alg => EK0(order=order, smooth=DENSE))\n for order in 1:7\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:13)\nreltols = 1.0 ./ 10.0 .^ (1:10)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, palette=Plots.palette([:blue, :red], length(_setups)), xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#EK1-accross-orders","page":"Non-stiff ODE: Lotka-Volterra","title":"EK1 accross orders","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1(order=$order)\" => Dict(:alg => EK1(order=order, smooth=DENSE))\n for order in 1:7\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:13)\nreltols = 1.0 ./ 10.0 .^ (1:10)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, palette=Plots.palette([:blue, :red], length(_setups)), xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#EK0-vs.-EK1","page":"Non-stiff ODE: Lotka-Volterra","title":"EK0 vs. EK1","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK0(order=2)\" => Dict(:alg => EK0(order=2, smooth=DENSE))\n \"EK0(order=3)\" => Dict(:alg => EK0(order=3, smooth=DENSE))\n \"EK0(order=4)\" => Dict(:alg => EK0(order=4, smooth=DENSE))\n \"EK0(order=5)\" => Dict(:alg => EK0(order=5, smooth=DENSE))\n \"EK1(order=2)\" => Dict(:alg => EK1(order=2, smooth=DENSE))\n \"EK1(order=3)\" => Dict(:alg => EK1(order=3, smooth=DENSE))\n \"EK1(order=4)\" => Dict(:alg => EK1(order=4, smooth=DENSE))\n \"EK1(order=5)\" => Dict(:alg => EK1(order=5, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:14)\nreltols = 1.0 ./ 10.0 .^ (1:11)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, color=[1 1 1 1 2 2 2 2], xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#DynamicDiffusion-vs-FixedDiffusion","page":"Non-stiff ODE: Lotka-Volterra","title":"DynamicDiffusion vs FixedDiffusion","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1(2) dynamic\" => Dict(:alg => EK1(order=2, smooth=DENSE, diffusionmodel=DynamicDiffusion()))\n \"EK1(3) dynamic\" => Dict(:alg => EK1(order=3, smooth=DENSE, diffusionmodel=DynamicDiffusion()))\n \"EK1(5) dynamic\" => Dict(:alg => EK1(order=5, smooth=DENSE, diffusionmodel=DynamicDiffusion()))\n \"EK1(2) fixed\" => Dict(:alg => EK1(order=2, smooth=DENSE, diffusionmodel=FixedDiffusion()))\n \"EK1(3) fixed\" => Dict(:alg => EK1(order=3, smooth=DENSE, diffusionmodel=FixedDiffusion()))\n \"EK1(5) fixed\" => Dict(:alg => EK1(order=5, smooth=DENSE, diffusionmodel=FixedDiffusion()))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:15)\nreltols = 1.0 ./ 10.0 .^ (1:12)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, color=[2 2 2 3 3 3], xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#TaylorModeInit-vs-ClassicSolverInit","page":"Non-stiff ODE: Lotka-Volterra","title":"TaylorModeInit vs ClassicSolverInit","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1(2) TaylorInit\" => Dict(:alg => EK1(order=2, smooth=DENSE, initialization=TaylorModeInit()))\n \"EK1(3) TaylorInit\" => Dict(:alg => EK1(order=3, smooth=DENSE, initialization=TaylorModeInit()))\n \"EK1(5) TaylorInit\" => Dict(:alg => EK1(order=5, smooth=DENSE, initialization=TaylorModeInit()))\n \"EK1(2) Tsit5Init\" => Dict(:alg => EK1(order=2, smooth=DENSE, initialization=ClassicSolverInit()))\n \"EK1(3) Tsit5Init\" => Dict(:alg => EK1(order=3, smooth=DENSE, initialization=ClassicSolverInit()))\n \"EK1(5) Tsit5Init\" => Dict(:alg => EK1(order=5, smooth=DENSE, initialization=ClassicSolverInit()))\n \"EK1(2) Tsit5Init+ddu\" => Dict(:alg => EK1(order=2, smooth=DENSE, initialization=ClassicSolverInit(init_on_ddu=true)))\n \"EK1(3) Tsit5Init+ddu\" => Dict(:alg => EK1(order=3, smooth=DENSE, initialization=ClassicSolverInit(init_on_ddu=true)))\n \"EK1(5) Tsit5Init+ddu\" => Dict(:alg => EK1(order=5, smooth=DENSE, initialization=ClassicSolverInit(init_on_ddu=true)))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:15)\nreltols = 1.0 ./ 10.0 .^ (1:12)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, color=[2 2 2 4 4 4 5 5 5], xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#Conclusion","page":"Non-stiff ODE: Lotka-Volterra","title":"Conclusion","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Use the EK1! It seems to be strictly better than the EK0 here. Though note that by using ParameterizedFunctions.jl, the Jacobian of the vector field is available analytically.\nOrders behave as in classic solvers: Use low order for low accuracy, medium order for medium accuracy, high order for high accuracy.\nMost likely, the default choice of diffusionmodel=DynamicDiffusion and initialization=TaylorModeInit are fine.","category":"page"},{"location":"benchmarks/lotkavolterra/#Appendix","page":"Non-stiff ODE: Lotka-Volterra","title":"Appendix","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Computer information:","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"using InteractiveUtils\nInteractiveUtils.versioninfo()","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Julia Version 1.9.3\nCommit bed2cd540a1 (2023-08-24 14:43 UTC)\nBuild Info:\n Official https://julialang.org/ release\nPlatform Info:\n OS: Linux (x86_64-linux-gnu)\n CPU: 12 × Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz\n WORD_SIZE: 64\n LIBM: libopenlibm\n LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)\n Threads: 12 on 12 virtual cores\nEnvironment:\n JULIA_NUM_THREADS = auto\n JULIA_STACKTRACE_MINIMAL = true","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Package Information:","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"using Pkg\nPkg.status()","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml`\n [f3b72e0c] DiffEqDevTools v2.39.0\n [7073ff75] IJulia v1.24.2\n [7f56f5a3] LSODA v0.7.5\n [e6f89c97] LoggingExtras v1.0.3\n [e2752cbe] MATLABDiffEq v1.2.0\n [961ee093] ModelingToolkit v8.72.2\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [65888b18] ParameterizedFunctions v5.16.0\n [91a5bcdd] Plots v1.39.0\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [0bca4576] SciMLBase v2.4.0\n [505e40e9] SciPyDiffEq v0.2.1\n [90137ffa] StaticArrays v1.6.5\n [c3572dad] Sundials v4.20.0\n [44d3d7a6] Weave v0.10.12\n [0518478a] deSolveDiffEq v0.1.1","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"And the full manifest:","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Pkg.status(mode=Pkg.PKGMODE_MANIFEST)","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml`\n [47edcb42] ADTypes v0.2.4\n⌅ [c3fe647b] AbstractAlgebra v0.32.5\n [621f4979] AbstractFFTs v1.5.0\n [1520ce14] AbstractTrees v0.4.4\n [79e6a3ab] Adapt v3.6.2\n [ec485272] ArnoldiMethod v0.2.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.5\n [d1d4a3ce] BitFlags v0.1.7\n [62783981] BitTwiddlingConvenienceFunctions v0.1.5\n⌅ [fa961155] CEnum v0.4.2\n [2a0fbf3d] CPUSummary v0.2.4\n [00ebfdb7] CSTParser v3.3.6\n [49dc2e85] Calculus v0.5.1\n [324d7699] CategoricalArrays v0.10.8\n [d360d2e6] ChainRulesCore v1.16.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.2\n [35d6a980] ColorSchemes v3.24.0\n [3da002f7] ColorTypes v0.11.4\n [c3611d14] ColorVectorSpace v0.10.0\n [5ae59095] Colors v0.12.10\n [861a8166] Combinatorics v1.0.2\n [a80b9123] CommonMark v0.8.12\n [38540f10] CommonSolve v0.2.4\n [bbf7d656] CommonSubexpressions v0.3.0\n [34da2185] Compat v4.10.0\n [b152e2b5] CompositeTypes v0.1.3\n [2569d6c7] ConcreteStructs v0.2.3\n [f0e56b4a] ConcurrentUtilities v2.2.1\n [8f4d0f93] Conda v1.9.1\n [187b0558] ConstructionBase v1.5.4\n [d38c429a] Contour v0.6.2\n [adafc99b] CpuId v0.3.1\n [a8cc5b0e] Crayons v4.1.1\n [717857b8] DSP v0.7.9\n [9a962f9c] DataAPI v1.15.0\n [a93c6f00] DataFrames v1.6.1\n [864edb3b] DataStructures v0.18.15\n [e2d170a0] DataValueInterfaces v1.0.0\n [8bb1440f] DelimitedFiles v1.9.1\n [2b5f629d] DiffEqBase v6.133.1\n [459566f4] DiffEqCallbacks v2.33.0\n [f3b72e0c] DiffEqDevTools v2.39.0\n [77a26b50] DiffEqNoiseProcess v5.19.0\n [163ba53b] DiffResults v1.1.0\n [b552c78f] DiffRules v1.15.1\n [b4f34e82] Distances v0.10.10\n [31c24e10] Distributions v0.25.102\n [ffbed154] DocStringExtensions v0.9.3\n⌅ [5b8099bc] DomainSets v0.6.7\n [fa6b7ba4] DualNumbers v0.6.8\n [7c1d4256] DynamicPolynomials v0.5.3\n [b305315f] Elliptic v1.0.1\n [4e289a0a] EnumX v1.0.4\n [f151be2c] EnzymeCore v0.6.1\n [6912e4f1] Espresso v0.6.1\n [460bff9d] ExceptionUnwrapping v0.1.9\n [d4d017d3] ExponentialUtilities v1.25.0\n [e2ba6199] ExprTools v0.1.10\n [c87230d0] FFMPEG v0.4.1\n [7a1cc6ca] FFTW v1.7.1\n [7034ab61] FastBroadcast v0.2.7\n [9aa1b823] FastClosures v0.3.2\n [442a2c76] FastGaussQuadrature v1.0.0\n [29a986be] FastLapackInterface v2.0.0\n [1a297f60] FillArrays v1.6.1\n [6a86dc24] FiniteDiff v2.21.1\n [53c48c17] FixedPointNumbers v0.8.4\n [59287772] Formatting v0.4.2\n [f6369f11] ForwardDiff v0.10.36\n [069b7b12] FunctionWrappers v1.1.3\n [77dc65aa] FunctionWrappersWrappers v0.1.3\n [d9f16b24] Functors v0.4.5\n [46192b85] GPUArraysCore v0.1.5\n [28b8d3ca] GR v0.72.10\n [43dcc890] GaussianDistributions v0.5.2\n [c145ed77] GenericSchur v0.5.3\n [c27321d9] Glob v1.3.1\n [86223c79] Graphs v1.9.0\n [42e2da0e] Grisu v1.0.2\n [0b43b601] Groebner v0.4.4\n [d5909c97] GroupsCore v0.4.0\n [cd3eb016] HTTP v1.10.0\n [eafb193a] Highlights v0.5.2\n [3e5b6fbb] HostCPUFeatures v0.1.16\n [34004b35] HypergeometricFunctions v0.3.23\n [7073ff75] IJulia v1.24.2\n [615f187c] IfElse v0.1.1\n [d25df0c9] Inflate v0.1.4\n [842dd82b] InlineStrings v1.4.0\n [18e54dd8] IntegerMathUtils v0.1.2\n [8197267c] IntervalSets v0.7.7\n [41ab1584] InvertedIndices v1.3.0\n [92d709cd] IrrationalConstants v0.2.2\n [c8e1da08] IterTools v1.8.0\n [82899510] IteratorInterfaceExtensions v1.0.0\n [1019f520] JLFzf v0.1.5\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.39\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [ba0b0d4f] Krylov v0.9.4\n [7f56f5a3] LSODA v0.7.5\n [b964fa9f] LaTeXStrings v1.3.0\n [2ee39098] LabelledArrays v1.14.0\n [984bce1d] LambertW v0.4.6\n [23fbe1c1] Latexify v0.16.1\n [10f19ff3] LayoutPointers v0.1.14\n [50d2b5c4] Lazy v0.15.1\n [1d6d02ad] LeftChildRightSiblingTrees v0.2.0\n [d3d80556] LineSearches v7.2.0\n [7ed4a6bd] LinearSolve v2.9.2\n [2ab3a3ac] LogExpFunctions v0.3.26\n [e6f89c97] LoggingExtras v1.0.3\n [bdcacae8] LoopVectorization v0.12.165\n [10e44e05] MATLAB v0.8.4\n [e2752cbe] MATLABDiffEq v1.2.0\n [d8e11817] MLStyle v0.4.17\n [1914dd2f] MacroTools v0.5.11\n [d125e4d3] ManualMemory v0.1.8\n [739be429] MbedTLS v1.1.7\n [442fdcdd] Measures v0.3.2\n [e1d29d7a] Missings v1.1.0\n [961ee093] ModelingToolkit v8.72.2\n [46d2c3a1] MuladdMacro v0.2.4\n [102ac46a] MultivariatePolynomials v0.5.2\n [ffc61752] Mustache v1.0.17\n [d8a4904e] MutableArithmetics v1.3.3\n [d41bc354] NLSolversBase v7.8.3\n [2774e3e8] NLsolve v4.5.1\n [77ba4419] NaNMath v1.0.2\n [8913a72c] NonlinearSolve v2.2.1\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [6fd5a793] Octavian v0.3.27\n [6fe1bfb0] OffsetArrays v1.12.10\n [4d8831e6] OpenSSL v1.4.1\n [429524aa] Optim v1.7.8\n [bac558e1] OrderedCollections v1.6.2\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [90014a1f] PDMats v0.11.25\n [fe68d972] PSDMatrices v0.4.4\n [65ce6f38] PackageExtensionCompat v1.0.2\n [65888b18] ParameterizedFunctions v5.16.0\n [d96e819e] Parameters v0.12.3\n [69de0a69] Parsers v2.7.2\n [b98c9c47] Pipe v1.3.0\n [32113eaa] PkgBenchmark v0.2.12\n [ccf2f8ad] PlotThemes v3.1.0\n [995b91a9] PlotUtils v1.3.5\n [91a5bcdd] Plots v1.39.0\n [e409e4f3] PoissonRandom v0.4.4\n [f517fe37] Polyester v0.7.8\n [1d0040c9] PolyesterWeave v0.2.1\n⌅ [f27b6e38] Polynomials v3.2.13\n [2dfb63ee] PooledArrays v1.4.3\n [85a6dd25] PositiveFactorizations v0.2.4\n [d236fae5] PreallocationTools v0.4.12\n [aea7be01] PrecompileTools v1.2.0\n [21216c6a] Preferences v1.4.1\n [08abe8d2] PrettyTables v2.2.7\n [27ebfcd6] Primes v0.5.4\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [33c8b6b6] ProgressLogging v0.1.4\n [438e738f] PyCall v1.96.1\n [1fd47b50] QuadGK v2.9.1\n [6f49c342] RCall v0.13.18\n [74087812] Random123 v1.6.1\n [fb686558] RandomExtensions v0.4.4\n [e6cf234a] RandomNumbers v1.5.3\n [3cdcf5f2] RecipesBase v1.3.4\n [01d81517] RecipesPipeline v0.6.12\n [731186ca] RecursiveArrayTools v2.39.0\n [f2c3362d] RecursiveFactorization v0.2.20\n [189a3867] Reexport v1.2.2\n [05181044] RelocatableFolders v1.0.1\n [ae029012] Requires v1.3.0\n [ae5879a3] ResettableStacks v1.1.1\n [79098fc4] Rmath v0.7.1\n [47965b36] RootedTrees v2.19.2\n [7e49a35a] RuntimeGeneratedFunctions v0.5.12\n [fdea26ae] SIMD v3.4.5\n [94e857df] SIMDTypes v0.1.0\n [476501e8] SLEEFPirates v0.6.39\n [0bca4576] SciMLBase v2.4.0\n [e9a6253c] SciMLNLSolve v0.1.9\n [c0aeaf25] SciMLOperators v0.3.6\n [505e40e9] SciPyDiffEq v0.2.1\n [6c6a2e73] Scratch v1.2.0\n [91c51154] SentinelArrays v1.4.0\n [efcf1570] Setfield v1.1.1\n [1277b4bf] ShiftedArrays v2.0.0\n [992d4aef] Showoff v1.0.3\n [777ac1f9] SimpleBufferStream v1.1.0\n [727e6d20] SimpleNonlinearSolve v0.1.20\n [699a6c99] SimpleTraits v0.9.4\n [ce78b400] SimpleUnPack v1.1.0\n [66db9d55] SnoopPrecompile v1.0.3\n [b85f4697] SoftGlobalScope v1.1.0\n [a2af1166] SortingAlgorithms v1.1.1\n [47a9eef4] SparseDiffTools v2.8.0\n [e56a9233] Sparspak v0.3.9\n [276daf66] SpecialFunctions v2.3.1\n [928aab9d] SpecialMatrices v3.0.0\n [aedffcd0] Static v0.8.8\n [0d7ed370] StaticArrayInterface v1.4.1\n [90137ffa] StaticArrays v1.6.5\n [1e83bf80] StaticArraysCore v1.4.2\n [82ae8749] StatsAPI v1.7.0\n [2913bbd2] StatsBase v0.34.2\n [4c63d2b9] StatsFuns v1.3.0\n [3eaba693] StatsModels v0.7.3\n⌅ [7792a7ef] StrideArraysCore v0.4.17\n [69024149] StringEncodings v0.3.7\n [892a3eda] StringManipulation v0.3.4\n [09ab397b] StructArrays v0.6.16\n [c3572dad] Sundials v4.20.0\n [2efcf032] SymbolicIndexingInterface v0.2.2\n [d1185830] SymbolicUtils v1.4.0\n [0c5d862f] Symbolics v5.9.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.0\n [92b13dbe] TaylorIntegration v0.14.3\n [6aa5eb33] TaylorSeries v0.15.2\n [62fd8b95] TensorCore v0.1.1\n [5d786b92] TerminalLoggers v0.1.7\n [8290d209] ThreadingUtilities v0.5.2\n [a759f4b9] TimerOutputs v0.5.23\n [c751599d] ToeplitzMatrices v0.8.2\n [0796e94c] Tokenize v0.5.25\n [3bb67fe8] TranscodingStreams v0.9.13\n [a2a6695c] TreeViews v0.3.0\n [d5829a12] TriangularSolve v0.1.19\n [410a4b4d] Tricks v0.1.8\n [781d530d] TruncatedStacktraces v1.4.0\n [5c2747f8] URIs v1.5.0\n [3a884ed6] UnPack v1.0.2\n [1cfade01] UnicodeFun v0.4.1\n [1986cc42] Unitful v1.17.0\n [45397f5d] UnitfulLatexify v1.6.3\n [a7c27f48] Unityper v0.1.5\n [41fe7b60] Unzip v0.2.0\n [3d5dd08c] VectorizationBase v0.21.64\n [81def892] VersionParsing v1.3.0\n [19fa3120] VertexSafeGraphs v0.2.0\n [44d3d7a6] Weave v0.10.12\n [1b915085] WinReg v1.0.0\n [ddb6d928] YAML v0.4.9\n [c2297ded] ZMQ v1.2.2\n [700de1a5] ZygoteRules v0.2.3\n [0518478a] deSolveDiffEq v0.1.1\n [6e34b625] Bzip2_jll v1.0.8+0\n [83423d85] Cairo_jll v1.16.1+1\n [2702e6a9] EpollShim_jll v0.0.20230411+0\n [2e619515] Expat_jll v2.5.0+0\n⌃ [b22a6f82] FFMPEG_jll v4.4.2+2\n [f5851436] FFTW_jll v3.3.10+0\n [a3f928ae] Fontconfig_jll v2.13.93+0\n [d7e528f0] FreeType2_jll v2.13.1+0\n [559328eb] FriBidi_jll v1.0.10+0\n [0656b61e] GLFW_jll v3.3.8+0\n [d2c73de3] GR_jll v0.72.10+0\n [78b55507] Gettext_jll v0.21.0+0\n [7746bdde] Glib_jll v2.76.5+0\n [3b182d85] Graphite2_jll v1.3.14+0\n [2e76f6c2] HarfBuzz_jll v2.8.1+1\n [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0\n [aacddb02] JpegTurbo_jll v2.1.91+0\n [c1c5ebd0] LAME_jll v3.100.1+0\n [88015f11] LERC_jll v3.0.0+1\n [1d63c593] LLVMOpenMP_jll v15.0.4+0\n [aae0fff6] LSODA_jll v0.1.2+0\n [dd4b983a] LZO_jll v2.10.1+0\n⌅ [e9f186c6] Libffi_jll v3.2.2+1\n [d4300ac3] Libgcrypt_jll v1.8.7+0\n [7e76a0d4] Libglvnd_jll v1.6.0+0\n [7add5ba3] Libgpg_error_jll v1.42.0+0\n [94ce4f54] Libiconv_jll v1.17.0+0\n [4b2f31a3] Libmount_jll v2.35.0+0\n [89763e89] Libtiff_jll v4.5.1+1\n [38a345b3] Libuuid_jll v2.36.0+0\n [856f044c] MKL_jll v2023.2.0+0\n [c771fb93] ODEInterface_jll v0.0.1+0\n [e7412a2a] Ogg_jll v1.3.5+1\n⌅ [458c3c95] OpenSSL_jll v1.1.23+0\n [efe28fd5] OpenSpecFun_jll v0.5.5+0\n [91d4177d] Opus_jll v1.3.2+0\n [30392449] Pixman_jll v0.42.2+0\n [c0090381] Qt6Base_jll v6.5.2+2\n [f50d1b31] Rmath_jll v0.4.0+0\n⌅ [fb77eaff] Sundials_jll v5.2.1+0\n [a44049a8] Vulkan_Loader_jll v1.3.243+0\n [a2964d1f] Wayland_jll v1.21.0+1\n [2381bf8a] Wayland_protocols_jll v1.25.0+0\n [02c8fc9c] XML2_jll v2.11.5+0\n [aed1982a] XSLT_jll v1.1.34+0\n [ffd25f8a] XZ_jll v5.4.4+0\n [f67eecfb] Xorg_libICE_jll v1.0.10+1\n [c834827a] Xorg_libSM_jll v1.2.3+0\n [4f6342f7] Xorg_libX11_jll v1.8.6+0\n [0c0b7dd1] Xorg_libXau_jll v1.0.11+0\n [935fb764] Xorg_libXcursor_jll v1.2.0+4\n [a3789734] Xorg_libXdmcp_jll v1.1.4+0\n [1082639a] Xorg_libXext_jll v1.3.4+4\n [d091e8ba] Xorg_libXfixes_jll v5.0.3+4\n [a51aa0fd] Xorg_libXi_jll v1.7.10+4\n [d1454406] Xorg_libXinerama_jll v1.1.4+4\n [ec84b674] Xorg_libXrandr_jll v1.5.2+4\n [ea2f1a96] Xorg_libXrender_jll v0.9.10+4\n [14d82f49] Xorg_libpthread_stubs_jll v0.1.1+0\n [c7cfdc94] Xorg_libxcb_jll v1.15.0+0\n [cc61e674] Xorg_libxkbfile_jll v1.1.2+0\n [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0\n [12413925] Xorg_xcb_util_image_jll v0.4.0+1\n [2def613f] Xorg_xcb_util_jll v0.4.0+1\n [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1\n [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1\n [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1\n [35661453] Xorg_xkbcomp_jll v1.4.6+0\n [33bec58e] Xorg_xkeyboard_config_jll v2.39.0+0\n [c5fb5394] Xorg_xtrans_jll v1.5.0+0\n [8f1865be] ZeroMQ_jll v4.3.4+0\n [3161d3a3] Zstd_jll v1.5.5+0\n [35ca27e7] eudev_jll v3.2.9+0\n⌅ [214eeab7] fzf_jll v0.29.0+0\n [1a1c6b14] gperf_jll v3.1.1+0\n [a4ae2306] libaom_jll v3.4.0+0\n [0ac62f75] libass_jll v0.15.1+0\n [2db6ffa8] libevdev_jll v1.11.0+0\n [f638f0a6] libfdk_aac_jll v2.0.2+0\n [36db933b] libinput_jll v1.18.0+0\n [b53b4c65] libpng_jll v1.6.38+0\n [a9144af2] libsodium_jll v1.0.20+0\n [f27f6e37] libvorbis_jll v1.3.7+1\n [009596ad] mtdev_jll v1.1.6+0\n [1270edf5] x264_jll v2021.5.5+0\n [dfaa095f] x265_jll v3.5.0+0\n [d8fb68d0] xkbcommon_jll v1.4.1+1\n [0dad84c5] ArgTools v1.1.1\n [56f22d72] Artifacts\n [2a0f44e3] Base64\n [ade2ca70] Dates\n [8ba89e20] Distributed\n [f43a241f] Downloads v1.6.0\n [7b1f6079] FileWatching\n [9fa8497b] Future\n [b77e0a4c] InteractiveUtils\n [4af54fe1] LazyArtifacts\n [b27032c2] LibCURL v0.6.3\n [76f85450] LibGit2\n [8f399da3] Libdl\n [37e2e46d] LinearAlgebra\n [56ddb016] Logging\n [d6f4376e] Markdown\n [a63ad114] Mmap\n [ca575930] NetworkOptions v1.2.0\n [44cfe95a] Pkg v1.9.2\n [de0858da] Printf\n [9abbd945] Profile\n [3fa0cd96] REPL\n [9a3f8284] Random\n [ea8e919c] SHA v0.7.0\n [9e88b42a] Serialization\n [1a1011a3] SharedArrays\n [6462fe0b] Sockets\n [2f01184e] SparseArrays\n [10745b16] Statistics v1.9.0\n [4607b0f0] SuiteSparse\n [fa267f1f] TOML v1.0.3\n [a4e569a6] Tar v1.10.0\n [8dfed614] Test\n [cf7118a7] UUIDs\n [4ec0a83e] Unicode\n [e66e0078] CompilerSupportLibraries_jll v1.0.5+0\n [deac9b47] LibCURL_jll v7.84.0+0\n [29816b5a] LibSSH2_jll v1.10.2+0\n [c8ffd9c3] MbedTLS_jll v2.28.2+0\n [14a3606d] MozillaCACerts_jll v2022.10.11\n [4536629a] OpenBLAS_jll v0.3.21+4\n [05823500] OpenLibm_jll v0.8.1+0\n [efcefdf7] PCRE2_jll v10.42.0+0\n [bea87d4a] SuiteSparse_jll v5.10.1+6\n [83775a58] Zlib_jll v1.2.13+0\n [8e850b90] libblastrampoline_jll v5.8.0+0\n [8e850ede] nghttp2_jll v1.48.0+0\n [3f19e933] p7zip_jll v17.4.0+0\nInfo Packages marked with ⌃ and ⌅ have new versions available, but those wi\nth ⌅ are restricted by compatibility constraints from upgrading. To see why\n use `status --outdated -m`","category":"page"},{"location":"initialization/#Initialization","page":"Initialization","title":"Initialization","text":"","category":"section"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"The notion of \"initialization\" relates to the prior part of the model.","category":"page"},{"location":"initialization/#Background:-The-prior","page":"Initialization","title":"Background: The prior","text":"","category":"section"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"We model the ODE solution y(t) with a Gauss–Markov prior. More precisely, let","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"beginaligned\nY(t) = left Y^(0)(t) Y^(1)(t) dots Y^(q)(t) right\nendaligned","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"be the solution to the SDE","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"beginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = textcolor389826A Y(t) textdt + textcolor4063D8Gamma textdW(t) \nY(0) sim textcolor9558B2 mathcalN left( mu_0 Sigma_0 right) \nendaligned","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"Then Y^(i)(t) models the i-th derivative of y(t). In this section, we consider the initial distribution textcolorpurple mathcalN left( mu_0 Sigma_0 right) . If you're more interested in the drift matrix textcolor389826A check out the Priors section, and for more info on the diffusion textcolor4063D8Gamma check out the Diffusion models and calibration section.","category":"page"},{"location":"initialization/#Setting-the-initial-distribution","page":"Initialization","title":"Setting the initial distribution","text":"","category":"section"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"Let's assume an initial value problem of the form","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"beginaligned\ndoty(t) = f(y(t) t) qquad 0 T \ny(0) = y_0\nendaligned","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"It is clear that this contains quite some information for Y(0): The initial value y_0 and the vector field f imply","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"beginaligned\nY^(0)(0) = y_0 \nY^(1)(0) = f(y_0 0)\nendaligned","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"It turns out that we can also compute higher-order derivatives of y with the chain rule, and then use these to better initialize Y^(i)(0). This, done efficiently with Taylor-mode autodiff by using TaylorIntegration.jl, is what TaylorModeInit does. See also [1].","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"In the vast majority of cases, just stick to the exact Taylor-mode initialization TaylorModeInit!","category":"page"},{"location":"initialization/#API","page":"Initialization","title":"API","text":"","category":"section"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"TaylorModeInit\nClassicSolverInit","category":"page"},{"location":"initialization/#ProbNumDiffEq.TaylorModeInit","page":"Initialization","title":"ProbNumDiffEq.TaylorModeInit","text":"TaylorModeInit()\n\nExact initialization via Taylor-mode automatic differentiation.\n\nThis is the recommended initialization method!\n\nIt uses TaylorIntegration.jl to efficiently compute the higher-order derivatives of the solution at the initial value, via Taylor-mode automatic differentiation.\n\nIn some special cases it can happen that TaylorIntegration.jl is incompatible with the given problem (typically because the problem definition does not allow for elements of type Taylor). If this happens, try ClassicSolverInit.\n\nReferences\n\n[4] Krämer et al, \"Stable Implementation of Probabilistic ODE Solvers\" (2020)\n\n\n\n\n\n","category":"type"},{"location":"initialization/#ProbNumDiffEq.ClassicSolverInit","page":"Initialization","title":"ProbNumDiffEq.ClassicSolverInit","text":"ClassicSolverInit(; alg=OrdinaryDiffEq.Tsit5(), init_on_ddu=false)\n\nInitialization via regression on a few steps of a classic ODE solver.\n\nIn a nutshell, instead of specifying mu_0 exactly and setting Sigma_0=0 (which is what TaylorModeInit does), use a classic ODE solver to compute a few steps of the solution, and then regress on the computed values (by running a smoother) to compute mu_0 and Sigma_0 as the mean and covariance of the smoothing posterior at time 0. See also [2].\n\nThe initial value and derivative are set directly from the given initial value problem; optionally the second derivative can also be set via automatic differentiation by setting init_on_ddu=true.\n\nArguments\n\nalg: The solver to be used. Can be any solver from OrdinaryDiffEq.jl.\ninit_on_ddu: If true, the second derivative is also initialized exactly via automatic differentiation with ForwardDiff.jl.\n\nReferences\n\n[4] Krämer et al, \"Stable Implementation of Probabilistic ODE Solvers\" (2020)\n[5] Schober et al, \"A probabilistic model for the numerical solution of initial value problems\", Statistics and Computing (2019)\n\n\n\n\n\n","category":"type"},{"location":"initialization/#initrefs","page":"Initialization","title":"References","text":"","category":"section"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"","category":"page"},{"location":"tutorials/dae/#Solving-DAEs-with-Probabilistic-Numerics","page":"Differential Algebraic Equations","title":"Solving DAEs with Probabilistic Numerics","text":"","category":"section"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"ProbNumDiffEq.jl provides probabilistic numerical solvers for differential algebraic equations (DAEs). Currently, we recommend using the semi-implicit EK1 algorithm.","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"note: Note\nFor a more general tutorial on DAEs check out the DifferentialEquations.jl DAE tutorial.","category":"page"},{"location":"tutorials/dae/#Solving-mass-matrix-DAEs-with-the-EK1","page":"Differential Algebraic Equations","title":"Solving mass-matrix DAEs with the EK1","text":"","category":"section"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"First, define the DAE (here the ROBER problem) as an ODE problem with singular mass matrix:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"using ProbNumDiffEq, Plots, LinearAlgebra, OrdinaryDiffEq, ModelingToolkit\n\nfunction rober(du, u, p, t)\n y₁, y₂, y₃ = u\n k₁, k₂, k₃ = p\n du[1] = -k₁ * y₁ + k₃ * y₂ * y₃\n du[2] = k₁ * y₁ - k₃ * y₂ * y₃ - k₂ * y₂^2\n du[3] = y₁ + y₂ + y₃ - 1\n nothing\nend\nM = [1 0 0\n 0 1 0\n 0 0 0]\nf = ODEFunction(rober, mass_matrix=M)\nprob_mm = ODEProblem(f, [1.0, 0.0, 0.0], (0.0, 1e5), (0.04, 3e7, 1e4))","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"We can solve this problem directly with the EK1:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"sol = solve(prob_mm, EK1(), reltol=1e-8, abstol=1e-8)\nplot(\n sol,\n xscale=:log10,\n tspan=(1e-6, 1e5),\n layout=(3, 1),\n legend=false,\n ylabel=[\"u₁(t)\" \"u₂(t)\" \"u₃(t)\"],\n xlabel=[\"\" \"\" \"t\"],\n denseplot=false,\n)","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"Looks good!","category":"page"},{"location":"tutorials/dae/#Solving-an-Index-3-DAE-directly","page":"Differential Algebraic Equations","title":"Solving an Index-3 DAE directly","text":"","category":"section"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"The following is based on the \"Automatic Index Reduction of DAEs\" tutorial by ModelingToolkit.jl, which demonstrates how the classic Rodas4 solver fails to solve a DAE due to the fact that it is of index 3; which is why ModelingToolkit's automatic index reduction is so useful.","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"It turns out that our probabilistic numerical solvers can directly solve the index-3 DAE!","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"First, define the pendulum problem as in the tutorial:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"function pendulum!(du, u, p, t)\n x, dx, y, dy, T = u\n g, L = p\n du[1] = dx\n du[2] = T * x\n du[3] = dy\n du[4] = T * y - g\n du[5] = x^2 + y^2 - L^2\nend\npendulum_fun! = ODEFunction(pendulum!, mass_matrix=Diagonal([1, 1, 1, 1, 0]))\nu0 = [1.0, 0, 0, 0, 0];\np = [9.8, 1];\ntspan = (0, 5.0);\npendulum_prob = ODEProblem(pendulum_fun!, u0, tspan, p)","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"We can try to solve it directly with one of the classic mass-matrix DAE solvers from OrdinaryDiffEq.jl:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"solve(pendulum_prob, Rodas4())","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"It does not work! This is because of the index of the DAE; see e.g. this explenation from the tutorial.","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"Does this also hold for the EK1 solver? Let's find out:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"sol = solve(pendulum_prob, EK1())","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"Nope! The EK1 is able to solve the index-3 DAE directly. Pretty cool!","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"plot(sol)","category":"page"},{"location":"tutorials/dae/#Is-index-reduction-still-worth-it?","page":"Differential Algebraic Equations","title":"Is index-reduction still worth it?","text":"","category":"section"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"The point of the \"Automatic Index Reduction of DAEs\" tutorial is to demonstrate ModelingToolkit's utility for automatic index reduction, which enables the classic implicit Runge-Kutta solvers such as Rodas5 to solve this DAE. Let's see if that still helps in this context here.","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"First, modelingtoolkitize the problem:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"traced_sys = modelingtoolkitize(pendulum_prob)","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"(how cool is this latex output ?!?)","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"Next, lower the DAE index and simplify it with MTK's dae_index_lowering and structural_simplify:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"simplified_sys = structural_simplify(dae_index_lowering(traced_sys))","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"Let's build two different ODE problems, and check how well we can solve each:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"prob_index3 = ODEProblem(traced_sys, Pair[], tspan)\nprob_index1 = ODEProblem(simplified_sys, Pair[], tspan)\n\nsol3 = solve(prob_index3, EK1())\nsol1 = solve(prob_index1, EK1())\n\ntruesol = solve(prob_index1, Rodas4(), abstol=1e-10, reltol=1e-10)\n\nsol1_final_error = norm(sol1.u[end] - truesol.u[end])\nsol1_f_evals = sol1.stats.nf\nsol3_final_error = norm(sol3.u[end] - truesol.u[end])\nsol3_f_evals = sol3.stats.nf\n@info \"Results\" sol1_final_error sol1_f_evals sol3_final_error sol3_f_evals","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"The error for the index-1 DAE solve is much lower. So it seems that, even if the index-3 DAE could also be solved directly, index lowering might still be beneficial when solving DAEs with the EK1!","category":"page"},{"location":"tutorials/dae/#References","page":"Differential Algebraic Equations","title":"References","text":"","category":"section"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"
[1]
\n
\n
N. Bosch, F. Tronarp and P. Hennig. Pick-and-Mix Information Operators for Probabilistic ODE\n Solvers. In: Proceedings of The 25th International Conference on Artificial\n Intelligence and Statistics, Proceedings of Machine Learning Research, 10015–10027, PMLR (2022).
\n
\n
","category":"page"},{"location":"diffusions/#Diffusion-models-and-calibration","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"","category":"section"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"The notion of \"diffusion\" and \"calibration\" relates to the prior part of the model.","category":"page"},{"location":"diffusions/#Background:-The-prior","page":"Diffusion models and calibration","title":"Background: The prior","text":"","category":"section"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"We model the ODE solution y(t) with a Gauss–Markov prior. More precisely, let","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"beginaligned\nY(t) = left Y^(0)(t) Y^(1)(t) dots Y^(q)(t) right\nendaligned","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"be the solution to the SDE","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"beginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = textcolor389826A Y(t) textdt + textcolor4063D8Gamma textdW(t) \nY(0) sim textcolorpurple mathcalN left( mu_0 Sigma_0 right) \nendaligned","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"Then Y^(i)(t) models the i-th derivative of y(t). In this section, we consider choices relating to the \"diffusion\" textcolor4063D8Gamma. If you're more interested in the drift matrix textcolor389826A check out the Priors section, and for info on the initial distribution textcolorpurple mathcalN left( mu_0 Sigma_0 right) check out the Initialization section.","category":"page"},{"location":"diffusions/#Diffusion-and-calibration","page":"Diffusion models and calibration","title":"Diffusion and calibration","text":"","category":"section"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"We call textcolor4063D8Gamma the \"diffusion\" parameter. Since it is typically not known we need to estimate it; this is called \"calibration\".","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"There are a few different choices for how to model and estimate textcolor4063D8Gamma:","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"FixedDiffusion assumes an isotropic, time-fixed textcolor4063D8Gamma = sigma cdot I_d,\nDynamicDiffusion assumes an isotropic, time-varying textcolor4063D8Gamma(t) = sigma(t) cdot I_d (recommended),\nFixedMVDiffusion assumes a diagonal, time-fixed textcolor4063D8Gamma = operatornamediag(sigma_1 dots sigma_d),\nDynamicMVDiffusion assumes a diagonal, time-varying textcolor4063D8Gamma(t) = operatornamediag(sigma_1(t) dots sigma_d(t)).","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"Or more compactly:","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":" Isotropic: Diagonal (only for the EK0)\nTime-varying DynamicDiffusion DynamicMVDiffusion\nTime-fixed FixedDiffusion FixedMVDiffusion","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"For more details on diffusions and calibration, check out this paper [6].","category":"page"},{"location":"diffusions/#API","page":"Diffusion models and calibration","title":"API","text":"","category":"section"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"DynamicDiffusion\nFixedDiffusion\nDynamicMVDiffusion\nFixedMVDiffusion","category":"page"},{"location":"diffusions/#ProbNumDiffEq.DynamicDiffusion","page":"Diffusion models and calibration","title":"ProbNumDiffEq.DynamicDiffusion","text":"DynamicDiffusion()\n\nTime-varying, isotropic diffusion, which is quasi-maximum-likelihood-estimated at each step.\n\nThis is the recommended diffusion when using adaptive step-size selection, and in particular also when solving stiff systems.\n\n\n\n\n\n","category":"type"},{"location":"diffusions/#ProbNumDiffEq.FixedDiffusion","page":"Diffusion models and calibration","title":"ProbNumDiffEq.FixedDiffusion","text":"FixedDiffusion(; initial_diffusion=1.0, calibrate=true)\n\nTime-fixed, isotropic diffusion, which is (optionally) quasi-maximum-likelihood-estimated.\n\nThis is the recommended diffusion when using fixed steps.\n\nBy default with calibrate=true, all covariances are re-scaled at the end of the solve with the MLE diffusion. Set calibrate=false to skip this step, e.g. when setting the initial_diffusion and then estimating the diffusion outside of the solver (e.g. with Fenrir.jl).\n\n\n\n\n\n","category":"type"},{"location":"diffusions/#ProbNumDiffEq.DynamicMVDiffusion","page":"Diffusion models and calibration","title":"ProbNumDiffEq.DynamicMVDiffusion","text":"DynamicMVDiffusion()\n\nTime-varying, diagonal diffusion, which is quasi-maximum-likelihood-estimated at each step.\n\nOnly works with the EK0!\n\nA multi-variate version of DynamicDiffusion, where instead of an isotropic matrix, a diagonal matrix is estimated. This can be helpful to get more expressive posterior covariances when using the EK0, since the individual dimensions can be adjusted separately.\n\nReferences\n\n[6] Bosch et al, \"Calibrated Adaptive Probabilistic ODE Solvers\", AISTATS (2021)\n\n\n\n\n\n","category":"type"},{"location":"diffusions/#ProbNumDiffEq.FixedMVDiffusion","page":"Diffusion models and calibration","title":"ProbNumDiffEq.FixedMVDiffusion","text":"FixedMVDiffusion(; initial_diffusion=1.0, calibrate=true)\n\nTime-fixed, diagonal diffusion, which is quasi-maximum-likelihood-estimated at each step.\n\nOnly works with the EK0!\n\nA multi-variate version of FixedDiffusion, where instead of an isotropic matrix, a diagonal matrix is estimated. This can be helpful to get more expressive posterior covariances when using the EK0, since the individual dimensions can be adjusted separately.\n\nReferences\n\n[6] Bosch et al, \"Calibrated Adaptive Probabilistic ODE Solvers\", AISTATS (2021)\n\n\n\n\n\n","category":"type"},{"location":"diffusions/#diffusionrefs","page":"Diffusion models and calibration","title":"References","text":"","category":"section"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"
[6]
\n
\n
N. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial\n Intelligence and Statistics, Proceedings of Machine Learning Research, 3466–3474, PMLR (2021).
\n
\n
","category":"page"},{"location":"priors/#Priors","page":"Priors","title":"Priors","text":"","category":"section"},{"location":"priors/","page":"Priors","title":"Priors","text":"We model the ODE solution y(t) with a Gauss–Markov prior. More precisely, let","category":"page"},{"location":"priors/","page":"Priors","title":"Priors","text":"beginaligned\nY(t) = left Y^(0)(t) Y^(1)(t) dots Y^(q)(t) right\nendaligned","category":"page"},{"location":"priors/","page":"Priors","title":"Priors","text":"be the solution to the SDE","category":"page"},{"location":"priors/","page":"Priors","title":"Priors","text":"beginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = textcolor389826A Y(t) textdt + textcolor4063D8Gamma textdW(t) \nY(0) sim textcolorpurple mathcalN left( mu_0 Sigma_0 right) \nendaligned","category":"page"},{"location":"priors/","page":"Priors","title":"Priors","text":"Then Y^(i)(t) models the i-th derivative of y(t). In this section, we consider choices relating to the drift matrix textcolor389826A. If you're more interested in the diffusion textcolor4063D8Gamma check out the Diffusion models and calibration section, and for info on the initial distribution textcolorpurple mathcalN left( mu_0 Sigma_0 right) check out the Initialization section.","category":"page"},{"location":"priors/","page":"Priors","title":"Priors","text":"If you're unsure which prior to use, just stick to the integrated Wiener process prior IWP! This is also the default choice for all solvers. The other priors are rather experimental / niche at the time of writing.","category":"page"},{"location":"priors/#API","page":"Priors","title":"API","text":"","category":"section"},{"location":"priors/","page":"Priors","title":"Priors","text":"IWP\nIOUP\nMatern","category":"page"},{"location":"priors/#ProbNumDiffEq.IWP","page":"Priors","title":"ProbNumDiffEq.IWP","text":"IWP([wiener_process_dimension::Integer,] num_derivatives::Integer)\n\nIntegrated Wiener process.\n\nThis is the recommended prior! It is the most well-tested prior, both in this package and in the probabilistic numerics literature in general (see the references). It is also the prior that has the most efficient implementation.\n\nThe IWP can be created without specifying the dimension of the Wiener process, in which case it will be inferred from the dimension of the ODE during the solve. This is typically the preferred usage.\n\nIn math\n\nbeginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = Gamma textdW(t)\nendaligned\n\nExamples\n\njulia> solve(prob, EK1(prior=IWP(2)))\n\n\n\n\n\n","category":"type"},{"location":"priors/#ProbNumDiffEq.IOUP","page":"Priors","title":"ProbNumDiffEq.IOUP","text":"IOUP([wiener_process_dimension::Integer,]\n num_derivatives::Integer,\n rate_parameter::Union{Number,AbstractVector,AbstractMatrix})\n\nIntegrated Ornstein–Uhlenbeck process.\n\nAs with the IWP, the IOUP can be created without specifying its dimension, in which case it will be inferred from the dimension of the ODE during the solve. This is typically the preferred usage. The rate parameter however always needs to be specified.\n\nIn math\n\nbeginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = L Y^(q)(t) textdt + Gamma textdW(t)\nendaligned\n\nwhere L is the rate_parameter.\n\nExamples\n\njulia> solve(prob, EK1(prior=IOUP(2, -1)))\n\n\n\n\n\n","category":"type"},{"location":"priors/#ProbNumDiffEq.Matern","page":"Priors","title":"ProbNumDiffEq.Matern","text":"Matern([wiener_process_dimension::Integer,]\n num_derivatives::Integer,\n lengthscale::Number)\n\nMatern process.\n\nAs with the IWP, the Matern can be created without specifying its dimension, in which case it will be inferred from the dimension of the ODE during the solve. This is typically the preferred usage. The lengthscale parameter however always needs to be specified.\n\nIn math\n\nbeginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = - sum_j=0^q left(\n beginpmatrix q+1 j endpmatrix\n left( fracsqrt2q - 1l right)^q-j\n Y^(j)(t) right) textdt + Gamma textdW(t)\nendaligned\n\nwhere l is the lengthscale.\n\nExamples\n\njulia> solve(prob, EK1(prior=Matern(2, 1)))\n\n\n\n\n\n","category":"type"},{"location":"tutorials/dynamical_odes/#Second-Order-ODEs-and-Energy-Preservation","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"In this tutorial we consider an energy-preserving, physical dynamical system, given by a second-order ODE.","category":"page"},{"location":"tutorials/dynamical_odes/#TL;DR:","page":"Second Order ODEs and Energy Preservation","title":"TL;DR:","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"To efficiently solve second-order ODEs, just define the problem as a SecondOrderODEProblem.\nTo preserve constant quantities, use the ManifoldUpdate callback; same syntax as DiffEqCallback.jl's ManifoldProjection.","category":"page"},{"location":"tutorials/dynamical_odes/#Simulating-the-Hénon-Heiles-system","page":"Second Order ODEs and Energy Preservation","title":"Simulating the Hénon-Heiles system","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"The Hénon-Heiles model describes the motion of a star around a galactic center, restricted to a plane. It is given by a second-order ODE","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"beginaligned\nddotx = - x - 2 x y \nddoty = y^2 - y - x^2\nendaligned","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"Our goal is to numerically simulate this system on a time span t in 0 T, starting with initial values x(0)=0, y(0) = 01, dotx(0) = 05, doty(0) = 0.","category":"page"},{"location":"tutorials/dynamical_odes/#Transforming-the-problem-into-a-first-order-ODE","page":"Second Order ODEs and Energy Preservation","title":"Transforming the problem into a first-order ODE","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"A very common approach is to first transform the problem into a first-order ODE by introducing a new variable","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"u = dxdyxy","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"to obtain","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"beginaligned\ndotu_1(t) = - u_3 - 2 u_3 u_4 \ndotu_2(t) = u_4^2 - u_4 - u_4^2 \ndotu_3(t) = u_1 \ndotu_4(t) = u_2\nendaligned","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"This first-order ODE can then be solved using any conventional ODE solver - including our EK1:","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"using ProbNumDiffEq, Plots\n\nfunction Hénon_Heiles(du, u, p, t)\n du[1] = -u[3] - 2 * u[3] * u[4]\n du[2] = u[4]^2 - u[4] - u[3]^2\n du[3] = u[1]\n du[4] = u[2]\nend\nu0, du0 = [0.0, 0.1], [0.5, 0.0]\ntspan = (0.0, 100.0)\nprob = ODEProblem(Hénon_Heiles, [du0; u0], tspan)\nsol = solve(prob, EK1());\nplot(sol, vars=(3, 4)) # where `vars=(3,4)` is used to plot x agains y","category":"page"},{"location":"tutorials/dynamical_odes/#Solving-the-second-order-ODE-directly","page":"Second Order ODEs and Energy Preservation","title":"Solving the second-order ODE directly","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"Instead of first transforming the problem, we can also solve it directly as a second-order ODE, by defining it as a SecondOrderODEProblem.","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"note: Note\nThe SecondOrderODEProblem type is not defined in ProbNumDiffEq.jl but is provided by SciMLBase.jl. For more information, check out the DifferentialEquations.jl documentation on Dynamical, Hamiltonian and 2nd Order ODE Problems.","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"function Hénon_Heiles2(ddu, du, u, p, t)\n ddu[1] = -u[1] - 2 * u[1] * u[2]\n ddu[2] = u[2]^2 - u[2] - u[1]^2\nend\nprob2 = SecondOrderODEProblem(Hénon_Heiles2, du0, u0, tspan)\nsol2 = solve(prob2, EK1());\nplot(sol2, vars=(3, 4))","category":"page"},{"location":"tutorials/dynamical_odes/#Benchmark:-Solving-second-order-ODEs-is-*faster*","page":"Second Order ODEs and Energy Preservation","title":"Benchmark: Solving second order ODEs is faster","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"Solving second-order ODEs is not just a matter of convenience - in fact, SciMLBase's SecondOrderODEProblem is neatly designed in such a way that all the classic solvers from OrdinaryDiffEq.jl can handle it by solving the corresponding first-order ODE. But, transforming the ODE to first order increases the dimensionality of the problem, and comes therefore at increased computational cost; this also motivates classic specialized solvers for second-order ODEs.","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"The probabilistic numerical solvers from ProbNumDiffEq.jl have the same internal state representation for first and second order ODEs; all that changes is the measurement model [1]. As a result, we can use the EK1 both for first and second order ODEs, but it automatically specializes on the latter to provide a 2x performance boost:","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"julia> @btime solve(prob, EK1(order=3), adaptive=false, dt=1e-2);\n 766.312 ms (400362 allocations: 173.38 MiB)\n\njulia> @btime solve(prob2, EK1(order=4), adaptive=false, dt=1e-2);\n 388.301 ms (510676 allocations: 102.78 MiB)","category":"page"},{"location":"tutorials/dynamical_odes/#Energy-preservation","page":"Second Order ODEs and Energy Preservation","title":"Energy preservation","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"In addition to the ODE given above, we know that the solution of the Hénon-Heiles model has to preserve energy over time. The total energy can be expressed as the sum of the potential and kinetic energies, given by","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"beginaligned\noperatornamePotentialEnergy(xy) = frac12 left( x^2 + y^2 + 2 x^2 y - frac2y^33 right) \noperatornameKineticEnergy(dotx doty) = frac12 left( dotx^2 + doty^2 right)\nendaligned","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"In code:","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"PotentialEnergy(x, y) = 1 // 2 * (x^2 + y^2 + 2x^2 * y - 2 // 3 * y^3)\nKineticEnergy(dx, dy) = 1 // 2 * (dx^2 + dy^2)\nE(dx, dy, x, y) = PotentialEnergy(x, y) + KineticEnergy(dx, dy)\nE(u) = E(u...); # convenient shorthand","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"So, let's have a look at how the total energy changes over time when we numerically simulate the Hénon-Heiles model over a long period of time: Standard solve","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"longprob = remake(prob2, tspan=(0.0, 1e3))\nlongsol = solve(longprob, EK1(smooth=false), dense=false)\nplot(longsol.t, E.(longsol.u))","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"It visibly loses energy over time, from an initial 0.12967 to a final 0.12899. Let's fix this to get a physically more meaningful solution.","category":"page"},{"location":"tutorials/dynamical_odes/#Energy-preservation-with-the-ManifoldUpdate-callback","page":"Second Order ODEs and Energy Preservation","title":"Energy preservation with the ManifoldUpdate callback","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"In the language of ODE filters, preserving energy over time amounts to just another measurement model [1]. The most convenient way of updating on this additional zero measurement with ProbNumDiffEq.jl is with the ManifoldUpdate callback.","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"note: Note\nThe ManifoldUpdate callback can be thought of a probabilistic counterpart to the ManifoldProjection callback provided by DiffEqCallbacks.jl.","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"To do so, first define a (vector-valued) residual function, here chosen to be the difference between the current energy and the initial energy, and build a ManifoldUpdate callback","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"residual(u) = [E(u) - E(du0..., u0...)]\ncb = ManifoldUpdate(residual)","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"Then, solve the ODE with this callback","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"longsol_preserving = solve(longprob, EK1(smooth=false), dense=false, callback=cb)\nplot(longsol.t, E.(longsol.u))\nplot!(longsol_preserving.t, E.(longsol_preserving.u))","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"Voilà! With the ManifoldUpdate callback we could preserve the energy over time and obtain a more truthful probabilistic numerical long-term simulation of the Hénon-Heiles model.","category":"page"},{"location":"tutorials/dynamical_odes/#References","page":"Second Order ODEs and Energy Preservation","title":"References","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"
[1]
\n
\n
N. Bosch, F. Tronarp and P. Hennig. Pick-and-Mix Information Operators for Probabilistic ODE\n Solvers. In: Proceedings of The 25th International Conference on Artificial\n Intelligence and Statistics, Proceedings of Machine Learning Research, 10015–10027, PMLR (2022).
\n
\n
","category":"page"},{"location":"benchmarks/multi-language-wrappers/#ProbNumDiffEq.jl-vs.-various-solver-packages","page":"Multi-Language Wrapper Benchmark","title":"ProbNumDiffEq.jl vs. various solver packages","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Adapted from SciMLBenchmarks.jl multi-language wrapper benchmark.","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"# Imports\nusing LinearAlgebra, Statistics\nusing StaticArrays, DiffEqDevTools, ParameterizedFunctions, Plots, SciMLBase, OrdinaryDiffEq\nusing ODEInterface, ODEInterfaceDiffEq, Sundials, SciPyDiffEq, deSolveDiffEq, MATLABDiffEq, LSODA\nusing LoggingExtras\n\nusing ProbNumDiffEq","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"# Plotting theme\ntheme(:dao;\n markerstrokewidth=0.5,\n legend=:outertopright,\n bottom_margin=5Plots.mm,\n size = (1000, 400),\n)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"# Constants used throughout this benchmark\nconst DENSE = false # used to decide if we smooth or not\nconst SAVE_EVERYSTEP = false;","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"_COLORS = Dict(\n \"Julia\" => :LightGreen,\n \"Julia (static)\" => :DarkGreen,\n \"Hairer\" => :Red,\n \"MATLAB\" => :Orange,\n \"SciPy\" => :Yellow,\n \"deSolve\" => :Blue,\n \"Sundials\" => :Purple,\n \"liblsoda\" => :Purple,\n \"ProbNumDiffEq\" => :Darkgray,\n)\ntocolor(n) = _COLORS[split(n, ':')[1]];","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"deprecated_filter(log_args) = !contains(log_args.message, \"deprecated\")\nfiltered_logger = ActiveFilteredLogger(deprecated_filter, global_logger());","category":"page"},{"location":"benchmarks/multi-language-wrappers/#Non-Stiff-Problem-1:-Lotka-Volterra","page":"Multi-Language Wrapper Benchmark","title":"Non-Stiff Problem 1: Lotka-Volterra","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"f = @ode_def LotkaVolterra begin\n dx = a*x - b*x*y\n dy = -c*y + d*x*y\nend a b c d\np = [1.5, 1, 3, 1]\ntspan = (0.0, 10.0)\nu0 = [1.0, 1.0]\nprob = ODEProblem{true,SciMLBase.FullSpecialize()}(f,u0,tspan,p)\nstaticprob = ODEProblem{false,SciMLBase.FullSpecialize()}(f,SVector{2}(u0),tspan,SVector{4}(p))\n\nsol = solve(prob,Vern7(),abstol=1/10^14,reltol=1/10^14,dense=false)\ntest_sol = sol\nplot(sol, title=\"Lotka-Volterra Solution\", legend=false)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"_setups = [\n \"Julia: DP5\" => Dict(:alg=>DP5())\n \"Julia: Tsit5\" => Dict(:alg=>Tsit5())\n \"Julia: Vern7\" => Dict(:alg=>Vern7())\n \"Hairer: dopri5\" => Dict(:alg=>ODEInterfaceDiffEq.dopri5())\n \"MATLAB: ode45\" => Dict(:alg=>MATLABDiffEq.ode45())\n \"MATLAB: ode113\" => Dict(:alg=>MATLABDiffEq.ode113())\n \"SciPy: RK45\" => Dict(:alg=>SciPyDiffEq.RK45())\n \"SciPy: LSODA\" => Dict(:alg=>SciPyDiffEq.LSODA())\n \"SciPy: odeint\" => Dict(:alg=>SciPyDiffEq.odeint())\n \"deSolve: lsoda\" => Dict(:alg=>deSolveDiffEq.lsoda())\n \"deSolve: ode45\" => Dict(:alg=>deSolveDiffEq.ode45())\n \"Sundials: Adams\" => Dict(:alg=>Sundials.CVODE_Adams())\n \"ProbNumDiffEq: EK0(2)\" => Dict(:alg=>EK0(order=2, smooth=DENSE))\n \"ProbNumDiffEq: EK0(3)\" => Dict(:alg=>EK0(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(3)\" => Dict(:alg=>EK1(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(5)\" => Dict(:alg=>EK1(order=5, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\ncolors = tocolor.(labels) |> permutedims\n\nabstols = 1.0 ./ 10.0 .^ (6:13)\nreltols = 1.0 ./ 10.0 .^ (3:10)\n\nwp = with_logger(filtered_logger) do\n WorkPrecisionSet(\n [prob, staticprob], abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = [test_sol, test_sol],\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n )\nend\n\nplot(\n wp,\n title = \"Non-stiff 1: Lotka-Volterra\",\n color = colors,\n xticks = 10.0 .^ (-16:1:5),\n yticks = 10.0 .^ (-6:1:5),\n)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/#Non-Stiff-Problem-2:-Rigid-Body","page":"Multi-Language Wrapper Benchmark","title":"Non-Stiff Problem 2: Rigid Body","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"f = @ode_def RigidBodyBench begin\n dy1 = -2*y2*y3\n dy2 = 1.25*y1*y3\n dy3 = -0.5*y1*y2 + 0.25*sin(t)^2\nend\nu0 = [1.0;0.0;0.9]\ntspan = (0.0, 10.0)\nprob = ODEProblem{true,SciMLBase.FullSpecialize()}(f,u0,tspan)\nstaticprob = ODEProblem{false,SciMLBase.FullSpecialize()}(f,SVector{3}(u0),tspan)\nsol = solve(prob,Vern7(),abstol=1/10^14,reltol=1/10^14,dense=false)\ntest_sol = sol\nplot(sol, title=\"Rigid Body Solution\", legend=false)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"_setups = [\n \"Julia: DP5\" => Dict(:alg=>DP5())\n \"Julia: Tsit5\" => Dict(:alg=>Tsit5())\n \"Julia: Vern7\" => Dict(:alg=>Vern7())\n \"Hairer: dopri5\" => Dict(:alg=>dopri5())\n \"MATLAB: ode45\" => Dict(:alg=>MATLABDiffEq.ode45())\n \"MATLAB: ode113\" => Dict(:alg=>MATLABDiffEq.ode113())\n \"SciPy: RK45\" => Dict(:alg=>SciPyDiffEq.RK45())\n \"SciPy: LSODA\" => Dict(:alg=>SciPyDiffEq.LSODA())\n \"SciPy: odeint\" => Dict(:alg=>SciPyDiffEq.odeint())\n \"deSolve: lsoda\" => Dict(:alg=>deSolveDiffEq.lsoda())\n \"deSolve: ode45\" => Dict(:alg=>deSolveDiffEq.ode45())\n \"Sundials: Adams\" => Dict(:alg=>CVODE_Adams())\n \"ProbNumDiffEq: EK0(2)\" => Dict(:alg=>EK0(order=2, smooth=DENSE))\n \"ProbNumDiffEq: EK0(3)\" => Dict(:alg=>EK0(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(3)\" => Dict(:alg=>EK1(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(5)\" => Dict(:alg=>EK1(order=5, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\ncolors = tocolor.(labels) |> permutedims\n\nabstols = 1.0 ./ 10.0 .^ (6:13)\nreltols = 1.0 ./ 10.0 .^ (3:10)\n\nwp = with_logger(filtered_logger) do\n WorkPrecisionSet(\n [prob,staticprob], abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = [test_sol, test_sol],\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false\n )\nend\n\nplot(\n wp,\n title = \"Non-stiff 2: Rigid-Body\",\n color = colors,\n xticks = 10.0 .^ (-12:1:5),\n yticks = 10.0 .^ (-6:1:5),\n)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/#Stiff-Problem-1:-ROBER","page":"Multi-Language Wrapper Benchmark","title":"Stiff Problem 1: ROBER","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"rober = @ode_def begin\n dy₁ = -k₁*y₁+k₃*y₂*y₃\n dy₂ = k₁*y₁-k₂*y₂^2-k₃*y₂*y₃\n dy₃ = k₂*y₂^2\nend k₁ k₂ k₃\nu0 = [1.0,0.0,0.0]\np = [0.04,3e7,1e4]\nprob = ODEProblem{true,SciMLBase.FullSpecialize()}(rober,u0,(0.0,1e5),p)\nstaticprob = ODEProblem{false,SciMLBase.FullSpecialize()}(rober,SVector{3}(u0),(0.0,1e5),SVector{3}(p))\nsol = solve(prob,CVODE_BDF(),abstol=1/10^14,reltol=1/10^14,dense=false)\ntest_sol = sol\nplot(sol, title=\"ROBER Solution\", legend=false, xlims=(1e0, 1e5))","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"_setups = [\n \"Julia: Rosenbrock23\" => Dict(:alg=>Rosenbrock23())\n \"Julia: Rodas4\" => Dict(:alg=>Rodas4())\n \"Julia: Rodas5\" => Dict(:alg=>Rodas5())\n \"Hairer: rodas\" => Dict(:alg=>rodas())\n \"Hairer: radau\" => Dict(:alg=>radau())\n \"MATLAB: ode23s\" => Dict(:alg=>MATLABDiffEq.ode23s())\n \"MATLAB: ode15s\" => Dict(:alg=>MATLABDiffEq.ode15s())\n \"SciPy: LSODA\" => Dict(:alg=>SciPyDiffEq.LSODA())\n \"SciPy: BDF\" => Dict(:alg=>SciPyDiffEq.BDF())\n \"SciPy: odeint\" => Dict(:alg=>SciPyDiffEq.odeint())\n \"deSolve: lsoda\" => Dict(:alg=>deSolveDiffEq.lsoda())\n \"Sundials: CVODE\" => Dict(:alg=>CVODE_BDF())\n \"ProbNumDiffEq: EK1(2)\" => Dict(:alg=>EK1(order=2, smooth=DENSE))\n \"ProbNumDiffEq: EK1(3)\" => Dict(:alg=>EK1(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(5)\" => Dict(:alg=>EK1(order=5, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\ncolors = tocolor.(labels) |> permutedims\n\nabstols = 1.0 ./ 10.0 .^ (5:12)\nreltols = 1.0 ./ 10.0 .^ (2:9)\n\nwp = with_logger(filtered_logger) do\n WorkPrecisionSet(\n [prob, staticprob], abstols, reltols, setups;\n names = labels,\n #print_names = true,\n dense = DENSE,\n verbose = false,\n save_everystep = SAVE_EVERYSTEP,\n appxsol = [test_sol, test_sol],\n maxiters=Int(1e5)\n )\nend\n\nplot(\n wp,\n title = \"Stiff 1: ROBER\",\n color = colors,\n xticks = 10.0 .^ (-16:1:4),\n yticks = 10.0 .^ (-6:1:5),\n)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/#Stiff-Problem-2:-HIRES","page":"Multi-Language Wrapper Benchmark","title":"Stiff Problem 2: HIRES","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"f = @ode_def Hires begin\n dy1 = -1.71*y1 + 0.43*y2 + 8.32*y3 + 0.0007\n dy2 = 1.71*y1 - 8.75*y2\n dy3 = -10.03*y3 + 0.43*y4 + 0.035*y5\n dy4 = 8.32*y2 + 1.71*y3 - 1.12*y4\n dy5 = -1.745*y5 + 0.43*y6 + 0.43*y7\n dy6 = -280.0*y6*y8 + 0.69*y4 + 1.71*y5 -\n 0.43*y6 + 0.69*y7\n dy7 = 280.0*y6*y8 - 1.81*y7\n dy8 = -280.0*y6*y8 + 1.81*y7\nend\n\nu0 = zeros(8)\nu0[1] = 1\nu0[8] = 0.0057\nprob = ODEProblem{true,SciMLBase.FullSpecialize()}(f,u0,(0.0,321.8122))\nstaticprob = ODEProblem{false,SciMLBase.FullSpecialize()}(f,SVector{8}(u0),(0.0,321.8122))\n\nsol = solve(prob,Rodas5(),abstol=1/10^14,reltol=1/10^14, dense=false)\ntest_sol = sol\nplot(sol, title=\"ROBER Solution\", legend=false)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"_setups = [\n \"Julia: Rosenbrock23\" => Dict(:alg=>Rosenbrock23())\n \"Julia: Rodas4\" => Dict(:alg=>Rodas4())\n \"Julia: radau\" => Dict(:alg=>RadauIIA5())\n \"Hairer: rodas\" => Dict(:alg=>rodas())\n \"Hairer: radau\" => Dict(:alg=>radau())\n \"MATLAB: ode23s\" => Dict(:alg=>MATLABDiffEq.ode23s())\n \"MATLAB: ode15s\" => Dict(:alg=>MATLABDiffEq.ode15s())\n \"SciPy: LSODA\" => Dict(:alg=>SciPyDiffEq.LSODA())\n \"SciPy: BDF\" => Dict(:alg=>SciPyDiffEq.BDF())\n \"SciPy: odeint\" => Dict(:alg=>SciPyDiffEq.odeint())\n \"deSolve: lsoda\" => Dict(:alg=>deSolveDiffEq.lsoda())\n \"Sundials: CVODE\" => Dict(:alg=>CVODE_BDF())\n \"ProbNumDiffEq: EK1(2)\" => Dict(:alg=>EK1(order=2, smooth=DENSE))\n \"ProbNumDiffEq: EK1(3)\" => Dict(:alg=>EK1(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(5)\" => Dict(:alg=>EK1(order=5, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\ncolors = tocolor.(labels) |> permutedims\n\nabstols = 1.0 ./ 10.0 .^ (5:10)\nreltols = 1.0 ./ 10.0 .^ (1:6)\n\nwp = with_logger(filtered_logger) do\n WorkPrecisionSet(\n [prob, staticprob], abstols, reltols, setups;\n names = labels,\n #print_names = true,\n dense = false,\n verbose = false,\n save_everystep = false,\n appxsol = [test_sol, test_sol],\n maxiters = Int(1e5),\n numruns=100\n )\nend\n\nplot(\n wp,\n title = \"Stiff 2: Hires\",\n color=colors,\n xticks = 10.0 .^ (-16:1:4),\n yticks = 10.0 .^ (-6:1:5),\n)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/#Appendix","page":"Multi-Language Wrapper Benchmark","title":"Appendix","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Computer information:","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"using InteractiveUtils\nInteractiveUtils.versioninfo()","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Julia Version 1.9.3\nCommit bed2cd540a1 (2023-08-24 14:43 UTC)\nBuild Info:\n Official https://julialang.org/ release\nPlatform Info:\n OS: Linux (x86_64-linux-gnu)\n CPU: 12 × Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz\n WORD_SIZE: 64\n LIBM: libopenlibm\n LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)\n Threads: 12 on 12 virtual cores\nEnvironment:\n JULIA_NUM_THREADS = auto\n JULIA_STACKTRACE_MINIMAL = true","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Package Information:","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"using Pkg\nPkg.status()","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml`\n [f3b72e0c] DiffEqDevTools v2.39.0\n [7073ff75] IJulia v1.24.2\n [7f56f5a3] LSODA v0.7.5\n [e6f89c97] LoggingExtras v1.0.3\n [e2752cbe] MATLABDiffEq v1.2.0\n [961ee093] ModelingToolkit v8.72.2\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [65888b18] ParameterizedFunctions v5.16.0\n [91a5bcdd] Plots v1.39.0\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [0bca4576] SciMLBase v2.4.0\n [505e40e9] SciPyDiffEq v0.2.1\n [90137ffa] StaticArrays v1.6.5\n [c3572dad] Sundials v4.20.0\n [44d3d7a6] Weave v0.10.12\n [0518478a] deSolveDiffEq v0.1.1","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"And the full manifest:","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Pkg.status(mode=Pkg.PKGMODE_MANIFEST)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml`\n [47edcb42] ADTypes v0.2.4\n⌅ [c3fe647b] AbstractAlgebra v0.32.5\n [621f4979] AbstractFFTs v1.5.0\n [1520ce14] AbstractTrees v0.4.4\n [79e6a3ab] Adapt v3.6.2\n [ec485272] ArnoldiMethod v0.2.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.5\n [d1d4a3ce] BitFlags v0.1.7\n [62783981] BitTwiddlingConvenienceFunctions v0.1.5\n⌅ [fa961155] CEnum v0.4.2\n [2a0fbf3d] CPUSummary v0.2.4\n [00ebfdb7] CSTParser v3.3.6\n [49dc2e85] Calculus v0.5.1\n [324d7699] CategoricalArrays v0.10.8\n [d360d2e6] ChainRulesCore v1.16.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.2\n [35d6a980] ColorSchemes v3.24.0\n [3da002f7] ColorTypes v0.11.4\n [c3611d14] ColorVectorSpace v0.10.0\n [5ae59095] Colors v0.12.10\n [861a8166] Combinatorics v1.0.2\n [a80b9123] CommonMark v0.8.12\n [38540f10] CommonSolve v0.2.4\n [bbf7d656] CommonSubexpressions v0.3.0\n [34da2185] Compat v4.10.0\n [b152e2b5] CompositeTypes v0.1.3\n [2569d6c7] ConcreteStructs v0.2.3\n [f0e56b4a] ConcurrentUtilities v2.2.1\n [8f4d0f93] Conda v1.9.1\n [187b0558] ConstructionBase v1.5.4\n [d38c429a] Contour v0.6.2\n [adafc99b] CpuId v0.3.1\n [a8cc5b0e] Crayons v4.1.1\n [717857b8] DSP v0.7.9\n [9a962f9c] DataAPI v1.15.0\n [a93c6f00] DataFrames v1.6.1\n [864edb3b] DataStructures v0.18.15\n [e2d170a0] DataValueInterfaces v1.0.0\n [8bb1440f] DelimitedFiles v1.9.1\n [2b5f629d] DiffEqBase v6.133.1\n [459566f4] DiffEqCallbacks v2.33.0\n [f3b72e0c] DiffEqDevTools v2.39.0\n [77a26b50] DiffEqNoiseProcess v5.19.0\n [163ba53b] DiffResults v1.1.0\n [b552c78f] DiffRules v1.15.1\n [b4f34e82] Distances v0.10.10\n [31c24e10] Distributions v0.25.102\n [ffbed154] DocStringExtensions v0.9.3\n⌅ [5b8099bc] DomainSets v0.6.7\n [fa6b7ba4] DualNumbers v0.6.8\n [7c1d4256] DynamicPolynomials v0.5.3\n [b305315f] Elliptic v1.0.1\n [4e289a0a] EnumX v1.0.4\n [f151be2c] EnzymeCore v0.6.1\n [6912e4f1] Espresso v0.6.1\n [460bff9d] ExceptionUnwrapping v0.1.9\n [d4d017d3] ExponentialUtilities v1.25.0\n [e2ba6199] ExprTools v0.1.10\n [c87230d0] FFMPEG v0.4.1\n [7a1cc6ca] FFTW v1.7.1\n [7034ab61] FastBroadcast v0.2.7\n [9aa1b823] FastClosures v0.3.2\n [442a2c76] FastGaussQuadrature v1.0.0\n [29a986be] FastLapackInterface v2.0.0\n [1a297f60] FillArrays v1.6.1\n [6a86dc24] FiniteDiff v2.21.1\n [53c48c17] FixedPointNumbers v0.8.4\n [59287772] Formatting v0.4.2\n [f6369f11] ForwardDiff v0.10.36\n [069b7b12] FunctionWrappers v1.1.3\n [77dc65aa] FunctionWrappersWrappers v0.1.3\n [d9f16b24] Functors v0.4.5\n [46192b85] GPUArraysCore v0.1.5\n [28b8d3ca] GR v0.72.10\n [43dcc890] GaussianDistributions v0.5.2\n [c145ed77] GenericSchur v0.5.3\n [c27321d9] Glob v1.3.1\n [86223c79] Graphs v1.9.0\n [42e2da0e] Grisu v1.0.2\n [0b43b601] Groebner v0.4.4\n [d5909c97] GroupsCore v0.4.0\n [cd3eb016] HTTP v1.10.0\n [eafb193a] Highlights v0.5.2\n [3e5b6fbb] HostCPUFeatures v0.1.16\n [34004b35] HypergeometricFunctions v0.3.23\n [7073ff75] IJulia v1.24.2\n [615f187c] IfElse v0.1.1\n [d25df0c9] Inflate v0.1.4\n [842dd82b] InlineStrings v1.4.0\n [18e54dd8] IntegerMathUtils v0.1.2\n [8197267c] IntervalSets v0.7.7\n [41ab1584] InvertedIndices v1.3.0\n [92d709cd] IrrationalConstants v0.2.2\n [c8e1da08] IterTools v1.8.0\n [82899510] IteratorInterfaceExtensions v1.0.0\n [1019f520] JLFzf v0.1.5\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.39\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [ba0b0d4f] Krylov v0.9.4\n [7f56f5a3] LSODA v0.7.5\n [b964fa9f] LaTeXStrings v1.3.0\n [2ee39098] LabelledArrays v1.14.0\n [984bce1d] LambertW v0.4.6\n [23fbe1c1] Latexify v0.16.1\n [10f19ff3] LayoutPointers v0.1.14\n [50d2b5c4] Lazy v0.15.1\n [1d6d02ad] LeftChildRightSiblingTrees v0.2.0\n [d3d80556] LineSearches v7.2.0\n [7ed4a6bd] LinearSolve v2.9.2\n [2ab3a3ac] LogExpFunctions v0.3.26\n [e6f89c97] LoggingExtras v1.0.3\n [bdcacae8] LoopVectorization v0.12.165\n [10e44e05] MATLAB v0.8.4\n [e2752cbe] MATLABDiffEq v1.2.0\n [d8e11817] MLStyle v0.4.17\n [1914dd2f] MacroTools v0.5.11\n [d125e4d3] ManualMemory v0.1.8\n [739be429] MbedTLS v1.1.7\n [442fdcdd] Measures v0.3.2\n [e1d29d7a] Missings v1.1.0\n [961ee093] ModelingToolkit v8.72.2\n [46d2c3a1] MuladdMacro v0.2.4\n [102ac46a] MultivariatePolynomials v0.5.2\n [ffc61752] Mustache v1.0.17\n [d8a4904e] MutableArithmetics v1.3.3\n [d41bc354] NLSolversBase v7.8.3\n [2774e3e8] NLsolve v4.5.1\n [77ba4419] NaNMath v1.0.2\n [8913a72c] NonlinearSolve v2.2.1\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [6fd5a793] Octavian v0.3.27\n [6fe1bfb0] OffsetArrays v1.12.10\n [4d8831e6] OpenSSL v1.4.1\n [429524aa] Optim v1.7.8\n [bac558e1] OrderedCollections v1.6.2\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [90014a1f] PDMats v0.11.25\n [fe68d972] PSDMatrices v0.4.4\n [65ce6f38] PackageExtensionCompat v1.0.2\n [65888b18] ParameterizedFunctions v5.16.0\n [d96e819e] Parameters v0.12.3\n [69de0a69] Parsers v2.7.2\n [b98c9c47] Pipe v1.3.0\n [32113eaa] PkgBenchmark v0.2.12\n [ccf2f8ad] PlotThemes v3.1.0\n [995b91a9] PlotUtils v1.3.5\n [91a5bcdd] Plots v1.39.0\n [e409e4f3] PoissonRandom v0.4.4\n [f517fe37] Polyester v0.7.8\n [1d0040c9] PolyesterWeave v0.2.1\n⌅ [f27b6e38] Polynomials v3.2.13\n [2dfb63ee] PooledArrays v1.4.3\n [85a6dd25] PositiveFactorizations v0.2.4\n [d236fae5] PreallocationTools v0.4.12\n [aea7be01] PrecompileTools v1.2.0\n [21216c6a] Preferences v1.4.1\n [08abe8d2] PrettyTables v2.2.7\n [27ebfcd6] Primes v0.5.4\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [33c8b6b6] ProgressLogging v0.1.4\n [438e738f] PyCall v1.96.1\n [1fd47b50] QuadGK v2.9.1\n [6f49c342] RCall v0.13.18\n [74087812] Random123 v1.6.1\n [fb686558] RandomExtensions v0.4.4\n [e6cf234a] RandomNumbers v1.5.3\n [3cdcf5f2] RecipesBase v1.3.4\n [01d81517] RecipesPipeline v0.6.12\n [731186ca] RecursiveArrayTools v2.39.0\n [f2c3362d] RecursiveFactorization v0.2.20\n [189a3867] Reexport v1.2.2\n [05181044] RelocatableFolders v1.0.1\n [ae029012] Requires v1.3.0\n [ae5879a3] ResettableStacks v1.1.1\n [79098fc4] Rmath v0.7.1\n [47965b36] RootedTrees v2.19.2\n [7e49a35a] RuntimeGeneratedFunctions v0.5.12\n [fdea26ae] SIMD v3.4.5\n [94e857df] SIMDTypes v0.1.0\n [476501e8] SLEEFPirates v0.6.39\n [0bca4576] SciMLBase v2.4.0\n [e9a6253c] SciMLNLSolve v0.1.9\n [c0aeaf25] SciMLOperators v0.3.6\n [505e40e9] SciPyDiffEq v0.2.1\n [6c6a2e73] Scratch v1.2.0\n [91c51154] SentinelArrays v1.4.0\n [efcf1570] Setfield v1.1.1\n [1277b4bf] ShiftedArrays v2.0.0\n [992d4aef] Showoff v1.0.3\n [777ac1f9] SimpleBufferStream v1.1.0\n [727e6d20] SimpleNonlinearSolve v0.1.20\n [699a6c99] SimpleTraits v0.9.4\n [ce78b400] SimpleUnPack v1.1.0\n [66db9d55] SnoopPrecompile v1.0.3\n [b85f4697] SoftGlobalScope v1.1.0\n [a2af1166] SortingAlgorithms v1.1.1\n [47a9eef4] SparseDiffTools v2.8.0\n [e56a9233] Sparspak v0.3.9\n [276daf66] SpecialFunctions v2.3.1\n [928aab9d] SpecialMatrices v3.0.0\n [aedffcd0] Static v0.8.8\n [0d7ed370] StaticArrayInterface v1.4.1\n [90137ffa] StaticArrays v1.6.5\n [1e83bf80] StaticArraysCore v1.4.2\n [82ae8749] StatsAPI v1.7.0\n [2913bbd2] StatsBase v0.34.2\n [4c63d2b9] StatsFuns v1.3.0\n [3eaba693] StatsModels v0.7.3\n⌅ [7792a7ef] StrideArraysCore v0.4.17\n [69024149] StringEncodings v0.3.7\n [892a3eda] StringManipulation v0.3.4\n [09ab397b] StructArrays v0.6.16\n [c3572dad] Sundials v4.20.0\n [2efcf032] SymbolicIndexingInterface v0.2.2\n [d1185830] SymbolicUtils v1.4.0\n [0c5d862f] Symbolics v5.9.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.0\n [92b13dbe] TaylorIntegration v0.14.3\n [6aa5eb33] TaylorSeries v0.15.2\n [62fd8b95] TensorCore v0.1.1\n [5d786b92] TerminalLoggers v0.1.7\n [8290d209] ThreadingUtilities v0.5.2\n [a759f4b9] TimerOutputs v0.5.23\n [c751599d] ToeplitzMatrices v0.8.2\n [0796e94c] Tokenize v0.5.25\n [3bb67fe8] TranscodingStreams v0.9.13\n [a2a6695c] TreeViews v0.3.0\n [d5829a12] TriangularSolve v0.1.19\n [410a4b4d] Tricks v0.1.8\n [781d530d] TruncatedStacktraces v1.4.0\n [5c2747f8] URIs v1.5.0\n [3a884ed6] UnPack v1.0.2\n [1cfade01] UnicodeFun v0.4.1\n [1986cc42] Unitful v1.17.0\n [45397f5d] UnitfulLatexify v1.6.3\n [a7c27f48] Unityper v0.1.5\n [41fe7b60] Unzip v0.2.0\n [3d5dd08c] VectorizationBase v0.21.64\n [81def892] VersionParsing v1.3.0\n [19fa3120] VertexSafeGraphs v0.2.0\n [44d3d7a6] Weave v0.10.12\n [1b915085] WinReg v1.0.0\n [ddb6d928] YAML v0.4.9\n [c2297ded] ZMQ v1.2.2\n [700de1a5] ZygoteRules v0.2.3\n [0518478a] deSolveDiffEq v0.1.1\n [6e34b625] Bzip2_jll v1.0.8+0\n [83423d85] Cairo_jll v1.16.1+1\n [2702e6a9] EpollShim_jll v0.0.20230411+0\n [2e619515] Expat_jll v2.5.0+0\n⌃ [b22a6f82] FFMPEG_jll v4.4.2+2\n [f5851436] FFTW_jll v3.3.10+0\n [a3f928ae] Fontconfig_jll v2.13.93+0\n [d7e528f0] FreeType2_jll v2.13.1+0\n [559328eb] FriBidi_jll v1.0.10+0\n [0656b61e] GLFW_jll v3.3.8+0\n [d2c73de3] GR_jll v0.72.10+0\n [78b55507] Gettext_jll v0.21.0+0\n [7746bdde] Glib_jll v2.76.5+0\n [3b182d85] Graphite2_jll v1.3.14+0\n [2e76f6c2] HarfBuzz_jll v2.8.1+1\n [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0\n [aacddb02] JpegTurbo_jll v2.1.91+0\n [c1c5ebd0] LAME_jll v3.100.1+0\n [88015f11] LERC_jll v3.0.0+1\n [1d63c593] LLVMOpenMP_jll v15.0.4+0\n [aae0fff6] LSODA_jll v0.1.2+0\n [dd4b983a] LZO_jll v2.10.1+0\n⌅ [e9f186c6] Libffi_jll v3.2.2+1\n [d4300ac3] Libgcrypt_jll v1.8.7+0\n [7e76a0d4] Libglvnd_jll v1.6.0+0\n [7add5ba3] Libgpg_error_jll v1.42.0+0\n [94ce4f54] Libiconv_jll v1.17.0+0\n [4b2f31a3] Libmount_jll v2.35.0+0\n [89763e89] Libtiff_jll v4.5.1+1\n [38a345b3] Libuuid_jll v2.36.0+0\n [856f044c] MKL_jll v2023.2.0+0\n [c771fb93] ODEInterface_jll v0.0.1+0\n [e7412a2a] Ogg_jll v1.3.5+1\n⌅ [458c3c95] OpenSSL_jll v1.1.23+0\n [efe28fd5] OpenSpecFun_jll v0.5.5+0\n [91d4177d] Opus_jll v1.3.2+0\n [30392449] Pixman_jll v0.42.2+0\n [c0090381] Qt6Base_jll v6.5.2+2\n [f50d1b31] Rmath_jll v0.4.0+0\n⌅ [fb77eaff] Sundials_jll v5.2.1+0\n [a44049a8] Vulkan_Loader_jll v1.3.243+0\n [a2964d1f] Wayland_jll v1.21.0+1\n [2381bf8a] Wayland_protocols_jll v1.25.0+0\n [02c8fc9c] XML2_jll v2.11.5+0\n [aed1982a] XSLT_jll v1.1.34+0\n [ffd25f8a] XZ_jll v5.4.4+0\n [f67eecfb] Xorg_libICE_jll v1.0.10+1\n [c834827a] Xorg_libSM_jll v1.2.3+0\n [4f6342f7] Xorg_libX11_jll v1.8.6+0\n [0c0b7dd1] Xorg_libXau_jll v1.0.11+0\n [935fb764] Xorg_libXcursor_jll v1.2.0+4\n [a3789734] Xorg_libXdmcp_jll v1.1.4+0\n [1082639a] Xorg_libXext_jll v1.3.4+4\n [d091e8ba] Xorg_libXfixes_jll v5.0.3+4\n [a51aa0fd] Xorg_libXi_jll v1.7.10+4\n [d1454406] Xorg_libXinerama_jll v1.1.4+4\n [ec84b674] Xorg_libXrandr_jll v1.5.2+4\n [ea2f1a96] Xorg_libXrender_jll v0.9.10+4\n [14d82f49] Xorg_libpthread_stubs_jll v0.1.1+0\n [c7cfdc94] Xorg_libxcb_jll v1.15.0+0\n [cc61e674] Xorg_libxkbfile_jll v1.1.2+0\n [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0\n [12413925] Xorg_xcb_util_image_jll v0.4.0+1\n [2def613f] Xorg_xcb_util_jll v0.4.0+1\n [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1\n [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1\n [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1\n [35661453] Xorg_xkbcomp_jll v1.4.6+0\n [33bec58e] Xorg_xkeyboard_config_jll v2.39.0+0\n [c5fb5394] Xorg_xtrans_jll v1.5.0+0\n [8f1865be] ZeroMQ_jll v4.3.4+0\n [3161d3a3] Zstd_jll v1.5.5+0\n [35ca27e7] eudev_jll v3.2.9+0\n⌅ [214eeab7] fzf_jll v0.29.0+0\n [1a1c6b14] gperf_jll v3.1.1+0\n [a4ae2306] libaom_jll v3.4.0+0\n [0ac62f75] libass_jll v0.15.1+0\n [2db6ffa8] libevdev_jll v1.11.0+0\n [f638f0a6] libfdk_aac_jll v2.0.2+0\n [36db933b] libinput_jll v1.18.0+0\n [b53b4c65] libpng_jll v1.6.38+0\n [a9144af2] libsodium_jll v1.0.20+0\n [f27f6e37] libvorbis_jll v1.3.7+1\n [009596ad] mtdev_jll v1.1.6+0\n [1270edf5] x264_jll v2021.5.5+0\n [dfaa095f] x265_jll v3.5.0+0\n [d8fb68d0] xkbcommon_jll v1.4.1+1\n [0dad84c5] ArgTools v1.1.1\n [56f22d72] Artifacts\n [2a0f44e3] Base64\n [ade2ca70] Dates\n [8ba89e20] Distributed\n [f43a241f] Downloads v1.6.0\n [7b1f6079] FileWatching\n [9fa8497b] Future\n [b77e0a4c] InteractiveUtils\n [4af54fe1] LazyArtifacts\n [b27032c2] LibCURL v0.6.3\n [76f85450] LibGit2\n [8f399da3] Libdl\n [37e2e46d] LinearAlgebra\n [56ddb016] Logging\n [d6f4376e] Markdown\n [a63ad114] Mmap\n [ca575930] NetworkOptions v1.2.0\n [44cfe95a] Pkg v1.9.2\n [de0858da] Printf\n [9abbd945] Profile\n [3fa0cd96] REPL\n [9a3f8284] Random\n [ea8e919c] SHA v0.7.0\n [9e88b42a] Serialization\n [1a1011a3] SharedArrays\n [6462fe0b] Sockets\n [2f01184e] SparseArrays\n [10745b16] Statistics v1.9.0\n [4607b0f0] SuiteSparse\n [fa267f1f] TOML v1.0.3\n [a4e569a6] Tar v1.10.0\n [8dfed614] Test\n [cf7118a7] UUIDs\n [4ec0a83e] Unicode\n [e66e0078] CompilerSupportLibraries_jll v1.0.5+0\n [deac9b47] LibCURL_jll v7.84.0+0\n [29816b5a] LibSSH2_jll v1.10.2+0\n [c8ffd9c3] MbedTLS_jll v2.28.2+0\n [14a3606d] MozillaCACerts_jll v2022.10.11\n [4536629a] OpenBLAS_jll v0.3.21+4\n [05823500] OpenLibm_jll v0.8.1+0\n [efcefdf7] PCRE2_jll v10.42.0+0\n [bea87d4a] SuiteSparse_jll v5.10.1+6\n [83775a58] Zlib_jll v1.2.13+0\n [8e850b90] libblastrampoline_jll v5.8.0+0\n [8e850ede] nghttp2_jll v1.48.0+0\n [3f19e933] p7zip_jll v17.4.0+0\nInfo Packages marked with ⌃ and ⌅ have new versions available, but those wi\nth ⌅ are restricted by compatibility constraints from upgrading. To see why\n use `status --outdated -m`","category":"page"},{"location":"benchmarks/pleiades/#Pleiades-benchmark","page":"Second order ODE: Pleiades","title":"Pleiades benchmark","text":"","category":"section"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"using LinearAlgebra, Statistics\nusing DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Sundials, Plots\nusing ModelingToolkit\nusing ProbNumDiffEq\n\n# Plotting theme\ntheme(:dao;\n markerstrokewidth=0.5,\n legend=:outertopright,\n bottom_margin=5Plots.mm,\n size = (1000, 400),\n)","category":"page"},{"location":"benchmarks/pleiades/#Pleiades-problem-definition","page":"Second order ODE: Pleiades","title":"Pleiades problem definition","text":"","category":"section"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"# first-order ODE\n@fastmath function pleiades(du, u, p, t)\n v = view(u, 1:7) # x\n w = view(u, 8:14) # y\n x = view(u, 15:21) # x′\n y = view(u, 22:28) # y′\n du[15:21] .= v\n du[22:28] .= w\n @inbounds @simd ivdep for i in 1:14\n du[i] = zero(eltype(u))\n end\n @inbounds @simd ivdep for i in 1:7\n @inbounds @simd ivdep for j in 1:7\n if i != j\n r = ((x[i] - x[j])^2 + (y[i] - y[j])^2)^(3 / 2)\n du[i] += j * (x[j] - x[i]) / r\n du[7+i] += j * (y[j] - y[i]) / r\n end\n end\n end\nend\nx0 = [3.0, 3.0, -1.0, -3.0, 2.0, -2.0, 2.0]\ny0 = [3.0, -3.0, 2.0, 0, 0, -4.0, 4.0]\ndx0 = [0, 0, 0, 0, 0, 1.75, -1.5]\ndy0 = [0, 0, 0, -1.25, 1, 0, 0]\nu0 = [dx0; dy0; x0; y0]\ntspan = (0.0, 3.0)\nprob1 = ODEProblem(pleiades, u0, tspan)\n\n# second-order ODE\nfunction pleiades2(ddu, du, u, p, t)\n x = view(u, 1:7)\n y = view(u, 8:14)\n for i in 1:14\n ddu[i] = zero(eltype(u))\n end\n for i in 1:7, j in 1:7\n if i != j\n r = ((x[i] - x[j])^2 + (y[i] - y[j])^2)^(3 / 2)\n ddu[i] += j * (x[j] - x[i]) / r\n ddu[7+i] += j * (y[j] - y[i]) / r\n end\n end\nend\nu0 = [x0; y0]\ndu0 = [dx0; dy0]\nprob2 = SecondOrderODEProblem(pleiades2, du0, u0, tspan)\nprobs = [prob1, prob2]\n\nref_sol1 = solve(prob1, Vern9(), abstol=1/10^14, reltol=1/10^14, dense=false)\nref_sol2 = solve(prob2, Vern9(), abstol=1/10^14, reltol=1/10^14, dense=false)\nref_sols = [ref_sol1, ref_sol2]\n\nplot(ref_sol1, idxs=[(14+i,21+i) for i in 1:7], title=\"Pleiades Solution\", legend=false)\nscatter!(ref_sol1.u[end][15:21], ref_sol1.u[end][22:end], color=1:7)","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"(Image: )","category":"page"},{"location":"benchmarks/pleiades/#First-order-ODE-vs.-second-order-ODE","page":"Second order ODE: Pleiades","title":"First-order ODE vs. second-order ODE","text":"","category":"section"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK0(3) (1st order ODE)\" => Dict(:alg => EK0(order=3, smooth=DENSE), :prob_choice => 1)\n \"EK0(5) (1st order ODE)\" => Dict(:alg => EK0(order=5, smooth=DENSE), :prob_choice => 1)\n \"EK1(3) (1st order ODE)\" => Dict(:alg => EK1(order=3, smooth=DENSE), :prob_choice => 1)\n \"EK1(5) (1st order ODE)\" => Dict(:alg => EK1(order=5, smooth=DENSE), :prob_choice => 1)\n \"EK0(4) (2nd order ODE)\" => Dict(:alg => EK0(order=4, smooth=DENSE), :prob_choice => 2)\n \"EK0(6) (2nd order ODE)\" => Dict(:alg => EK0(order=6, smooth=DENSE), :prob_choice => 2)\n \"EK1(4) (2nd order ODE)\" => Dict(:alg => EK1(order=4, smooth=DENSE), :prob_choice => 2)\n \"EK1(6) (2nd order ODE)\" => Dict(:alg => EK1(order=6, smooth=DENSE), :prob_choice => 2)\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (6:11)\nreltols = 1.0 ./ 10.0 .^ (3:8)\n\nwp = WorkPrecisionSet(\n probs, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = ref_sols,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, color=[1 1 2 2 3 3 4 4],\n # xticks = 10.0 .^ (-16:1:5)\n)","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"(Image: )","category":"page"},{"location":"benchmarks/pleiades/#Conclusion","page":"Second order ODE: Pleiades","title":"Conclusion","text":"","category":"section"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"If the problem is a second-order ODE, implement it as a second-order ODE!","category":"page"},{"location":"benchmarks/pleiades/#Appendix","page":"Second order ODE: Pleiades","title":"Appendix","text":"","category":"section"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Computer information:","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"using InteractiveUtils\nInteractiveUtils.versioninfo()","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Julia Version 1.9.3\nCommit bed2cd540a1 (2023-08-24 14:43 UTC)\nBuild Info:\n Official https://julialang.org/ release\nPlatform Info:\n OS: Linux (x86_64-linux-gnu)\n CPU: 12 × Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz\n WORD_SIZE: 64\n LIBM: libopenlibm\n LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)\n Threads: 12 on 12 virtual cores\nEnvironment:\n JULIA_NUM_THREADS = auto\n JULIA_STACKTRACE_MINIMAL = true","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Package Information:","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"using Pkg\nPkg.status()","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml`\n [f3b72e0c] DiffEqDevTools v2.39.0\n [7073ff75] IJulia v1.24.2\n [7f56f5a3] LSODA v0.7.5\n [e6f89c97] LoggingExtras v1.0.3\n [e2752cbe] MATLABDiffEq v1.2.0\n [961ee093] ModelingToolkit v8.72.2\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [65888b18] ParameterizedFunctions v5.16.0\n [91a5bcdd] Plots v1.39.0\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [0bca4576] SciMLBase v2.4.0\n [505e40e9] SciPyDiffEq v0.2.1\n [90137ffa] StaticArrays v1.6.5\n [c3572dad] Sundials v4.20.0\n [44d3d7a6] Weave v0.10.12\n [0518478a] deSolveDiffEq v0.1.1","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"And the full manifest:","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Pkg.status(mode=Pkg.PKGMODE_MANIFEST)","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml`\n [47edcb42] ADTypes v0.2.4\n⌅ [c3fe647b] AbstractAlgebra v0.32.5\n [621f4979] AbstractFFTs v1.5.0\n [1520ce14] AbstractTrees v0.4.4\n [79e6a3ab] Adapt v3.6.2\n [ec485272] ArnoldiMethod v0.2.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.5\n [d1d4a3ce] BitFlags v0.1.7\n [62783981] BitTwiddlingConvenienceFunctions v0.1.5\n⌅ [fa961155] CEnum v0.4.2\n [2a0fbf3d] CPUSummary v0.2.4\n [00ebfdb7] CSTParser v3.3.6\n [49dc2e85] Calculus v0.5.1\n [324d7699] CategoricalArrays v0.10.8\n [d360d2e6] ChainRulesCore v1.16.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.2\n [35d6a980] ColorSchemes v3.24.0\n [3da002f7] ColorTypes v0.11.4\n [c3611d14] ColorVectorSpace v0.10.0\n [5ae59095] Colors v0.12.10\n [861a8166] Combinatorics v1.0.2\n [a80b9123] CommonMark v0.8.12\n [38540f10] CommonSolve v0.2.4\n [bbf7d656] CommonSubexpressions v0.3.0\n [34da2185] Compat v4.10.0\n [b152e2b5] CompositeTypes v0.1.3\n [2569d6c7] ConcreteStructs v0.2.3\n [f0e56b4a] ConcurrentUtilities v2.2.1\n [8f4d0f93] Conda v1.9.1\n [187b0558] ConstructionBase v1.5.4\n [d38c429a] Contour v0.6.2\n [adafc99b] CpuId v0.3.1\n [a8cc5b0e] Crayons v4.1.1\n [717857b8] DSP v0.7.9\n [9a962f9c] DataAPI v1.15.0\n [a93c6f00] DataFrames v1.6.1\n [864edb3b] DataStructures v0.18.15\n [e2d170a0] DataValueInterfaces v1.0.0\n [8bb1440f] DelimitedFiles v1.9.1\n [2b5f629d] DiffEqBase v6.133.1\n [459566f4] DiffEqCallbacks v2.33.0\n [f3b72e0c] DiffEqDevTools v2.39.0\n [77a26b50] DiffEqNoiseProcess v5.19.0\n [163ba53b] DiffResults v1.1.0\n [b552c78f] DiffRules v1.15.1\n [b4f34e82] Distances v0.10.10\n [31c24e10] Distributions v0.25.102\n [ffbed154] DocStringExtensions v0.9.3\n⌅ [5b8099bc] DomainSets v0.6.7\n [fa6b7ba4] DualNumbers v0.6.8\n [7c1d4256] DynamicPolynomials v0.5.3\n [b305315f] Elliptic v1.0.1\n [4e289a0a] EnumX v1.0.4\n [f151be2c] EnzymeCore v0.6.1\n [6912e4f1] Espresso v0.6.1\n [460bff9d] ExceptionUnwrapping v0.1.9\n [d4d017d3] ExponentialUtilities v1.25.0\n [e2ba6199] ExprTools v0.1.10\n [c87230d0] FFMPEG v0.4.1\n [7a1cc6ca] FFTW v1.7.1\n [7034ab61] FastBroadcast v0.2.7\n [9aa1b823] FastClosures v0.3.2\n [442a2c76] FastGaussQuadrature v1.0.0\n [29a986be] FastLapackInterface v2.0.0\n [1a297f60] FillArrays v1.6.1\n [6a86dc24] FiniteDiff v2.21.1\n [53c48c17] FixedPointNumbers v0.8.4\n [59287772] Formatting v0.4.2\n [f6369f11] ForwardDiff v0.10.36\n [069b7b12] FunctionWrappers v1.1.3\n [77dc65aa] FunctionWrappersWrappers v0.1.3\n [d9f16b24] Functors v0.4.5\n [46192b85] GPUArraysCore v0.1.5\n [28b8d3ca] GR v0.72.10\n [43dcc890] GaussianDistributions v0.5.2\n [c145ed77] GenericSchur v0.5.3\n [c27321d9] Glob v1.3.1\n [86223c79] Graphs v1.9.0\n [42e2da0e] Grisu v1.0.2\n [0b43b601] Groebner v0.4.4\n [d5909c97] GroupsCore v0.4.0\n [cd3eb016] HTTP v1.10.0\n [eafb193a] Highlights v0.5.2\n [3e5b6fbb] HostCPUFeatures v0.1.16\n [34004b35] HypergeometricFunctions v0.3.23\n [7073ff75] IJulia v1.24.2\n [615f187c] IfElse v0.1.1\n [d25df0c9] Inflate v0.1.4\n [842dd82b] InlineStrings v1.4.0\n [18e54dd8] IntegerMathUtils v0.1.2\n [8197267c] IntervalSets v0.7.7\n [41ab1584] InvertedIndices v1.3.0\n [92d709cd] IrrationalConstants v0.2.2\n [c8e1da08] IterTools v1.8.0\n [82899510] IteratorInterfaceExtensions v1.0.0\n [1019f520] JLFzf v0.1.5\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.39\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [ba0b0d4f] Krylov v0.9.4\n [7f56f5a3] LSODA v0.7.5\n [b964fa9f] LaTeXStrings v1.3.0\n [2ee39098] LabelledArrays v1.14.0\n [984bce1d] LambertW v0.4.6\n [23fbe1c1] Latexify v0.16.1\n [10f19ff3] LayoutPointers v0.1.14\n [50d2b5c4] Lazy v0.15.1\n [1d6d02ad] LeftChildRightSiblingTrees v0.2.0\n [d3d80556] LineSearches v7.2.0\n [7ed4a6bd] LinearSolve v2.9.2\n [2ab3a3ac] LogExpFunctions v0.3.26\n [e6f89c97] LoggingExtras v1.0.3\n [bdcacae8] LoopVectorization v0.12.165\n [10e44e05] MATLAB v0.8.4\n [e2752cbe] MATLABDiffEq v1.2.0\n [d8e11817] MLStyle v0.4.17\n [1914dd2f] MacroTools v0.5.11\n [d125e4d3] ManualMemory v0.1.8\n [739be429] MbedTLS v1.1.7\n [442fdcdd] Measures v0.3.2\n [e1d29d7a] Missings v1.1.0\n [961ee093] ModelingToolkit v8.72.2\n [46d2c3a1] MuladdMacro v0.2.4\n [102ac46a] MultivariatePolynomials v0.5.2\n [ffc61752] Mustache v1.0.17\n [d8a4904e] MutableArithmetics v1.3.3\n [d41bc354] NLSolversBase v7.8.3\n [2774e3e8] NLsolve v4.5.1\n [77ba4419] NaNMath v1.0.2\n [8913a72c] NonlinearSolve v2.2.1\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [6fd5a793] Octavian v0.3.27\n [6fe1bfb0] OffsetArrays v1.12.10\n [4d8831e6] OpenSSL v1.4.1\n [429524aa] Optim v1.7.8\n [bac558e1] OrderedCollections v1.6.2\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [90014a1f] PDMats v0.11.25\n [fe68d972] PSDMatrices v0.4.4\n [65ce6f38] PackageExtensionCompat v1.0.2\n [65888b18] ParameterizedFunctions v5.16.0\n [d96e819e] Parameters v0.12.3\n [69de0a69] Parsers v2.7.2\n [b98c9c47] Pipe v1.3.0\n [32113eaa] PkgBenchmark v0.2.12\n [ccf2f8ad] PlotThemes v3.1.0\n [995b91a9] PlotUtils v1.3.5\n [91a5bcdd] Plots v1.39.0\n [e409e4f3] PoissonRandom v0.4.4\n [f517fe37] Polyester v0.7.8\n [1d0040c9] PolyesterWeave v0.2.1\n⌅ [f27b6e38] Polynomials v3.2.13\n [2dfb63ee] PooledArrays v1.4.3\n [85a6dd25] PositiveFactorizations v0.2.4\n [d236fae5] PreallocationTools v0.4.12\n [aea7be01] PrecompileTools v1.2.0\n [21216c6a] Preferences v1.4.1\n [08abe8d2] PrettyTables v2.2.7\n [27ebfcd6] Primes v0.5.4\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [33c8b6b6] ProgressLogging v0.1.4\n [438e738f] PyCall v1.96.1\n [1fd47b50] QuadGK v2.9.1\n [6f49c342] RCall v0.13.18\n [74087812] Random123 v1.6.1\n [fb686558] RandomExtensions v0.4.4\n [e6cf234a] RandomNumbers v1.5.3\n [3cdcf5f2] RecipesBase v1.3.4\n [01d81517] RecipesPipeline v0.6.12\n [731186ca] RecursiveArrayTools v2.39.0\n [f2c3362d] RecursiveFactorization v0.2.20\n [189a3867] Reexport v1.2.2\n [05181044] RelocatableFolders v1.0.1\n [ae029012] Requires v1.3.0\n [ae5879a3] ResettableStacks v1.1.1\n [79098fc4] Rmath v0.7.1\n [47965b36] RootedTrees v2.19.2\n [7e49a35a] RuntimeGeneratedFunctions v0.5.12\n [fdea26ae] SIMD v3.4.5\n [94e857df] SIMDTypes v0.1.0\n [476501e8] SLEEFPirates v0.6.39\n [0bca4576] SciMLBase v2.4.0\n [e9a6253c] SciMLNLSolve v0.1.9\n [c0aeaf25] SciMLOperators v0.3.6\n [505e40e9] SciPyDiffEq v0.2.1\n [6c6a2e73] Scratch v1.2.0\n [91c51154] SentinelArrays v1.4.0\n [efcf1570] Setfield v1.1.1\n [1277b4bf] ShiftedArrays v2.0.0\n [992d4aef] Showoff v1.0.3\n [777ac1f9] SimpleBufferStream v1.1.0\n [727e6d20] SimpleNonlinearSolve v0.1.20\n [699a6c99] SimpleTraits v0.9.4\n [ce78b400] SimpleUnPack v1.1.0\n [66db9d55] SnoopPrecompile v1.0.3\n [b85f4697] SoftGlobalScope v1.1.0\n [a2af1166] SortingAlgorithms v1.1.1\n [47a9eef4] SparseDiffTools v2.8.0\n [e56a9233] Sparspak v0.3.9\n [276daf66] SpecialFunctions v2.3.1\n [928aab9d] SpecialMatrices v3.0.0\n [aedffcd0] Static v0.8.8\n [0d7ed370] StaticArrayInterface v1.4.1\n [90137ffa] StaticArrays v1.6.5\n [1e83bf80] StaticArraysCore v1.4.2\n [82ae8749] StatsAPI v1.7.0\n [2913bbd2] StatsBase v0.34.2\n [4c63d2b9] StatsFuns v1.3.0\n [3eaba693] StatsModels v0.7.3\n⌅ [7792a7ef] StrideArraysCore v0.4.17\n [69024149] StringEncodings v0.3.7\n [892a3eda] StringManipulation v0.3.4\n [09ab397b] StructArrays v0.6.16\n [c3572dad] Sundials v4.20.0\n [2efcf032] SymbolicIndexingInterface v0.2.2\n [d1185830] SymbolicUtils v1.4.0\n [0c5d862f] Symbolics v5.9.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.0\n [92b13dbe] TaylorIntegration v0.14.3\n [6aa5eb33] TaylorSeries v0.15.2\n [62fd8b95] TensorCore v0.1.1\n [5d786b92] TerminalLoggers v0.1.7\n [8290d209] ThreadingUtilities v0.5.2\n [a759f4b9] TimerOutputs v0.5.23\n [c751599d] ToeplitzMatrices v0.8.2\n [0796e94c] Tokenize v0.5.25\n [3bb67fe8] TranscodingStreams v0.9.13\n [a2a6695c] TreeViews v0.3.0\n [d5829a12] TriangularSolve v0.1.19\n [410a4b4d] Tricks v0.1.8\n [781d530d] TruncatedStacktraces v1.4.0\n [5c2747f8] URIs v1.5.0\n [3a884ed6] UnPack v1.0.2\n [1cfade01] UnicodeFun v0.4.1\n [1986cc42] Unitful v1.17.0\n [45397f5d] UnitfulLatexify v1.6.3\n [a7c27f48] Unityper v0.1.5\n [41fe7b60] Unzip v0.2.0\n [3d5dd08c] VectorizationBase v0.21.64\n [81def892] VersionParsing v1.3.0\n [19fa3120] VertexSafeGraphs v0.2.0\n [44d3d7a6] Weave v0.10.12\n [1b915085] WinReg v1.0.0\n [ddb6d928] YAML v0.4.9\n [c2297ded] ZMQ v1.2.2\n [700de1a5] ZygoteRules v0.2.3\n [0518478a] deSolveDiffEq v0.1.1\n [6e34b625] Bzip2_jll v1.0.8+0\n [83423d85] Cairo_jll v1.16.1+1\n [2702e6a9] EpollShim_jll v0.0.20230411+0\n [2e619515] Expat_jll v2.5.0+0\n⌃ [b22a6f82] FFMPEG_jll v4.4.2+2\n [f5851436] FFTW_jll v3.3.10+0\n [a3f928ae] Fontconfig_jll v2.13.93+0\n [d7e528f0] FreeType2_jll v2.13.1+0\n [559328eb] FriBidi_jll v1.0.10+0\n [0656b61e] GLFW_jll v3.3.8+0\n [d2c73de3] GR_jll v0.72.10+0\n [78b55507] Gettext_jll v0.21.0+0\n [7746bdde] Glib_jll v2.76.5+0\n [3b182d85] Graphite2_jll v1.3.14+0\n [2e76f6c2] HarfBuzz_jll v2.8.1+1\n [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0\n [aacddb02] JpegTurbo_jll v2.1.91+0\n [c1c5ebd0] LAME_jll v3.100.1+0\n [88015f11] LERC_jll v3.0.0+1\n [1d63c593] LLVMOpenMP_jll v15.0.4+0\n [aae0fff6] LSODA_jll v0.1.2+0\n [dd4b983a] LZO_jll v2.10.1+0\n⌅ [e9f186c6] Libffi_jll v3.2.2+1\n [d4300ac3] Libgcrypt_jll v1.8.7+0\n [7e76a0d4] Libglvnd_jll v1.6.0+0\n [7add5ba3] Libgpg_error_jll v1.42.0+0\n [94ce4f54] Libiconv_jll v1.17.0+0\n [4b2f31a3] Libmount_jll v2.35.0+0\n [89763e89] Libtiff_jll v4.5.1+1\n [38a345b3] Libuuid_jll v2.36.0+0\n [856f044c] MKL_jll v2023.2.0+0\n [c771fb93] ODEInterface_jll v0.0.1+0\n [e7412a2a] Ogg_jll v1.3.5+1\n⌅ [458c3c95] OpenSSL_jll v1.1.23+0\n [efe28fd5] OpenSpecFun_jll v0.5.5+0\n [91d4177d] Opus_jll v1.3.2+0\n [30392449] Pixman_jll v0.42.2+0\n [c0090381] Qt6Base_jll v6.5.2+2\n [f50d1b31] Rmath_jll v0.4.0+0\n⌅ [fb77eaff] Sundials_jll v5.2.1+0\n [a44049a8] Vulkan_Loader_jll v1.3.243+0\n [a2964d1f] Wayland_jll v1.21.0+1\n [2381bf8a] Wayland_protocols_jll v1.25.0+0\n [02c8fc9c] XML2_jll v2.11.5+0\n [aed1982a] XSLT_jll v1.1.34+0\n [ffd25f8a] XZ_jll v5.4.4+0\n [f67eecfb] Xorg_libICE_jll v1.0.10+1\n [c834827a] Xorg_libSM_jll v1.2.3+0\n [4f6342f7] Xorg_libX11_jll v1.8.6+0\n [0c0b7dd1] Xorg_libXau_jll v1.0.11+0\n [935fb764] Xorg_libXcursor_jll v1.2.0+4\n [a3789734] Xorg_libXdmcp_jll v1.1.4+0\n [1082639a] Xorg_libXext_jll v1.3.4+4\n [d091e8ba] Xorg_libXfixes_jll v5.0.3+4\n [a51aa0fd] Xorg_libXi_jll v1.7.10+4\n [d1454406] Xorg_libXinerama_jll v1.1.4+4\n [ec84b674] Xorg_libXrandr_jll v1.5.2+4\n [ea2f1a96] Xorg_libXrender_jll v0.9.10+4\n [14d82f49] Xorg_libpthread_stubs_jll v0.1.1+0\n [c7cfdc94] Xorg_libxcb_jll v1.15.0+0\n [cc61e674] Xorg_libxkbfile_jll v1.1.2+0\n [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0\n [12413925] Xorg_xcb_util_image_jll v0.4.0+1\n [2def613f] Xorg_xcb_util_jll v0.4.0+1\n [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1\n [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1\n [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1\n [35661453] Xorg_xkbcomp_jll v1.4.6+0\n [33bec58e] Xorg_xkeyboard_config_jll v2.39.0+0\n [c5fb5394] Xorg_xtrans_jll v1.5.0+0\n [8f1865be] ZeroMQ_jll v4.3.4+0\n [3161d3a3] Zstd_jll v1.5.5+0\n [35ca27e7] eudev_jll v3.2.9+0\n⌅ [214eeab7] fzf_jll v0.29.0+0\n [1a1c6b14] gperf_jll v3.1.1+0\n [a4ae2306] libaom_jll v3.4.0+0\n [0ac62f75] libass_jll v0.15.1+0\n [2db6ffa8] libevdev_jll v1.11.0+0\n [f638f0a6] libfdk_aac_jll v2.0.2+0\n [36db933b] libinput_jll v1.18.0+0\n [b53b4c65] libpng_jll v1.6.38+0\n [a9144af2] libsodium_jll v1.0.20+0\n [f27f6e37] libvorbis_jll v1.3.7+1\n [009596ad] mtdev_jll v1.1.6+0\n [1270edf5] x264_jll v2021.5.5+0\n [dfaa095f] x265_jll v3.5.0+0\n [d8fb68d0] xkbcommon_jll v1.4.1+1\n [0dad84c5] ArgTools v1.1.1\n [56f22d72] Artifacts\n [2a0f44e3] Base64\n [ade2ca70] Dates\n [8ba89e20] Distributed\n [f43a241f] Downloads v1.6.0\n [7b1f6079] FileWatching\n [9fa8497b] Future\n [b77e0a4c] InteractiveUtils\n [4af54fe1] LazyArtifacts\n [b27032c2] LibCURL v0.6.3\n [76f85450] LibGit2\n [8f399da3] Libdl\n [37e2e46d] LinearAlgebra\n [56ddb016] Logging\n [d6f4376e] Markdown\n [a63ad114] Mmap\n [ca575930] NetworkOptions v1.2.0\n [44cfe95a] Pkg v1.9.2\n [de0858da] Printf\n [9abbd945] Profile\n [3fa0cd96] REPL\n [9a3f8284] Random\n [ea8e919c] SHA v0.7.0\n [9e88b42a] Serialization\n [1a1011a3] SharedArrays\n [6462fe0b] Sockets\n [2f01184e] SparseArrays\n [10745b16] Statistics v1.9.0\n [4607b0f0] SuiteSparse\n [fa267f1f] TOML v1.0.3\n [a4e569a6] Tar v1.10.0\n [8dfed614] Test\n [cf7118a7] UUIDs\n [4ec0a83e] Unicode\n [e66e0078] CompilerSupportLibraries_jll v1.0.5+0\n [deac9b47] LibCURL_jll v7.84.0+0\n [29816b5a] LibSSH2_jll v1.10.2+0\n [c8ffd9c3] MbedTLS_jll v2.28.2+0\n [14a3606d] MozillaCACerts_jll v2022.10.11\n [4536629a] OpenBLAS_jll v0.3.21+4\n [05823500] OpenLibm_jll v0.8.1+0\n [efcefdf7] PCRE2_jll v10.42.0+0\n [bea87d4a] SuiteSparse_jll v5.10.1+6\n [83775a58] Zlib_jll v1.2.13+0\n [8e850b90] libblastrampoline_jll v5.8.0+0\n [8e850ede] nghttp2_jll v1.48.0+0\n [3f19e933] p7zip_jll v17.4.0+0\nInfo Packages marked with ⌃ and ⌅ have new versions available, but those wi\nth ⌅ are restricted by compatibility constraints from upgrading. To see why\n use `status --outdated -m`","category":"page"},{"location":"tutorials/getting_started/#Solving-ODEs-with-Probabilistic-Numerics","page":"Getting Started","title":"Solving ODEs with Probabilistic Numerics","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"In this tutorial we solve a simple non-linear ordinary differential equation (ODE) with the probabilistic numerical ODE solvers implemented in this package.","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"note: Note\nIf you never used DifferentialEquations.jl, check out their \"Getting Started with Differential Equations in Julia\" tutorial. It explains how to define and solve ODE problems and how to analyze the solution, so it's a great starting point. Most of ProbNumDiffEq.jl works exaclty as you would expect from DifferentialEquations.jl – just with some added uncertainties and related functionality on top!","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"In this tutorial, we consider a Fitzhugh-Nagumo model described by an ODE of the form","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"beginaligned\ndoty_1 = c (y_1 - fracy_1^33 + y_2) \ndoty_2 = -frac1c (y_1 - a - b y_2)\nendaligned","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"on a time span t in 0 T, with initial value y(0) = y_0. In the following, we","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"define the problem with explicit choices of initial values, integration domains, and parameters,\nsolve the problem with our ODE filters, and\nvisualize the results and the corresponding uncertainties.","category":"page"},{"location":"tutorials/getting_started/#TL;DR:-Just-use-DifferentialEquations.jl-with-the-EK1-algorithm","page":"Getting Started","title":"TL;DR: Just use DifferentialEquations.jl with the EK1 algorithm","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"using ProbNumDiffEq, Plots\n\nfunction fitz(du, u, p, t)\n a, b, c = p\n du[1] = c * (u[1] - u[1]^3 / 3 + u[2])\n du[2] = -(1 / c) * (u[1] - a - b * u[2])\nend\nu0 = [-1.0; 1.0]\ntspan = (0.0, 20.0)\np = (0.2, 0.2, 3.0)\nprob = ODEProblem(fitz, u0, tspan, p)\n\nusing Logging; Logging.disable_logging(Logging.Warn); # hide\nsol = solve(prob, EK1())\nLogging.disable_logging(Logging.Debug) # hide\nplot(sol)","category":"page"},{"location":"tutorials/getting_started/#Step-1:-Define-the-problem","page":"Getting Started","title":"Step 1: Define the problem","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"First, import ProbNumDiffEq.jl","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"using ProbNumDiffEq","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"Then, set up the ODEProblem exactly as you would in DifferentialEquations.jl. Define the vector field","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"function fitz(du, u, p, t)\n a, b, c = p\n du[1] = c * (u[1] - u[1]^3 / 3 + u[2])\n du[2] = -(1 / c) * (u[1] - a - b * u[2])\nend\nnothing # hide","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"and then the ODEProblem, with initial value u0, time span tspan, and parameters p","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"u0 = [-1.0; 1.0]\ntspan = (0.0, 20.0)\np = (0.2, 0.2, 3.0)\nprob = ODEProblem(fitz, u0, tspan, p)\nnothing # hide","category":"page"},{"location":"tutorials/getting_started/#Step-2:-Solve-the-problem","page":"Getting Started","title":"Step 2: Solve the problem","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"To solve the ODE we just use DifferentialEquations.jl's solve interface, together with one of the algorithms implemented in this package. For now, let's use EK1:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"sol = solve(prob, EK1())\n# nothing # hide","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"That's it! we just computed a probabilistic numerical ODE solution!","category":"page"},{"location":"tutorials/getting_started/#Step-3:-Analyze-the-solution","page":"Getting Started","title":"Step 3: Analyze the solution","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"Let's plot the result with Plots.jl.","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"using Plots\nplot(sol)","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"Looks good! Looks like the EK1 managed to solve the Fitzhugh-Nagumo problem quite well.","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"tip: Tip\nTo learn more about plotting ODE solutions, check out the plotting tutorial for DifferentialEquations.jl + Plots.jl provided here. Most of that works exactly as expected with ProbNumDiffEq.jl.","category":"page"},{"location":"tutorials/getting_started/#Plot-the-probabilistic-error-estimates","page":"Getting Started","title":"Plot the probabilistic error estimates","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"The plot above looks like a standard ODE solution – but it's not! The numerical errors are just so small that we can't see them in the plot, and the probabilistic error estimates are too. We can visualize them by plotting the errors and error estimates directly:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"using OrdinaryDiffEq, Statistics\nreference = solve(prob, Vern9(), abstol=1e-9, reltol=1e-9, saveat=sol.t)\nerrors = reduce(hcat, mean.(sol.pu) .- reference.u)'\nerror_estimates = reduce(hcat, std.(sol.pu))'\nplot(sol.t, errors, label=\"error\", color=[1 2], xlabel=\"t\", ylabel=\"err\")\nplot!(sol.t, zero(errors), ribbon=3error_estimates, label=\"error estimate\",\n color=[1 2], alpha=0.2)","category":"page"},{"location":"tutorials/getting_started/#More-about-the-ProbabilisticODESolution","page":"Getting Started","title":"More about the ProbabilisticODESolution","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"The solution object returned by ProbNumDiffEq.jl mostly behaves just like any other ODESolution in DifferentialEquations.jl – with some added uncertainties and related functionality on top. So, sol can be indexed","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"sol[1]\nsol[end]","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"and has fields sol.t and sol.u which store the time points and mean estimates:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"sol.t[end]\nsol.u[end]","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"But since sol is a probabilistic numerical ODE solution, it contains a Gaussian distributions over solution values. The marginals of this posterior are stored in sol.pu:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"sol.pu[end]","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"You can compute means, covariances, and standard deviations via Statistics.jl:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"using Statistics\nmean(sol.pu[5])\ncov(sol.pu[5])\nstd(sol.pu[5])","category":"page"},{"location":"tutorials/getting_started/#Dense-output","page":"Getting Started","title":"Dense output","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"Probabilistic numerical ODE solvers approximate the posterior distribution","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"p Big( y(t) big y(0) = y_0 doty(t_i) = f_theta(y(t_i) t_i) Big)","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"which describes a posterior not just for the discrete steps but for any t in the continuous space t in 0 T; in classic ODE solvers, this is also known as \"interpolation\" or \"dense output\". The probabilistic solutions returned by our solvers can be interpolated as usual by treating them as functions, but they return Gaussian distributions","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"sol(0.45)\nmean(sol(0.45))","category":"page"},{"location":"tutorials/getting_started/#Next-steps","page":"Getting Started","title":"Next steps","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"Check out one of the other tutorials:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"\"Second Order ODEs and Energy Preservation\" explains how to solve second-order ODEs more efficiently while also better perserving energy or other conserved quantities;\n\"Solving DAEs with Probabilistic Numerics\" demonstrates how to solve differential algebraic equatios in a probabilistic numerical way.","category":"page"},{"location":"tutorials/fenrir/#Parameter-Inference-with-ProbNumDiffEq.jl-and-Fenrir.jl","page":"Parameter Inference","title":"Parameter Inference with ProbNumDiffEq.jl and Fenrir.jl","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"note: Note\nThis is mostly just a copy from the tutorial included in the Fenrir.jl documentation, so have a look there too!","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"using LinearAlgebra\nusing OrdinaryDiffEq, ProbNumDiffEq, Plots\nusing Fenrir\nusing Optimization, OptimizationOptimJL\nstack(x) = copy(reduce(hcat, x)') # convenient\nnothing # hide","category":"page"},{"location":"tutorials/fenrir/#The-parameter-inference-problem-in-general","page":"Parameter Inference","title":"The parameter inference problem in general","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Let's assume we have an initial value problem (IVP)","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"beginaligned\ndoty = f_theta(y t) qquad y(t_0) = y_0\nendaligned","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"which we observe through a set mathcalD = u(t_n)_n=1^N of noisy data points","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"beginaligned\nu(t_n) = H y(t_n) + v_n qquad v_n sim mathcalN(0 R)\nendaligned","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"The question of interest is: How can we compute the marginal likelihood p(mathcalD mid theta)? Short answer: We can't. It's intractable, because computing the true IVP solution exactly y(t) is intractable. What we can do however is compute an approximate marginal likelihood. This is what Fenrir.jl provides. For details, check out the paper.","category":"page"},{"location":"tutorials/fenrir/#The-specific-problem,-in-code","page":"Parameter Inference","title":"The specific problem, in code","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Let's assume that the true underlying dynamics are given by a FitzHugh-Nagumo model","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"function f(du, u, p, t)\n a, b, c = p\n du[1] = c*(u[1] - u[1]^3/3 + u[2])\n du[2] = -(1/c)*(u[1] - a - b*u[2])\nend\nu0 = [-1.0, 1.0]\ntspan = (0.0, 20.0)\np = (0.2, 0.2, 3.0)\ntrue_prob = ODEProblem(f, u0, tspan, p)","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"from which we generate some artificial noisy data","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"true_sol = solve(true_prob, Vern9(), abstol=1e-10, reltol=1e-10)\n\ntimes = 1:0.5:20\nobservation_noise_var = 1e-1\nodedata = [true_sol(t) .+ sqrt(observation_noise_var) * randn(length(u0)) for t in times]\n\nplot(true_sol, color=:black, linestyle=:dash, label=[\"True Solution\" \"\"])\nscatter!(times, stack(odedata), markersize=2, markerstrokewidth=0.1, color=1, label=[\"Noisy Data\" \"\"])","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Our goal is then to recover the true parameter p (and thus also the true trajectoy plotted above) the noisy data.","category":"page"},{"location":"tutorials/fenrir/#Computing-the-negative-log-likelihood","page":"Parameter Inference","title":"Computing the negative log-likelihood","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"To do parameter inference - be it maximum-likelihod, maximum a posteriori, or full Bayesian inference with MCMC - we need to evaluate the likelihood of given a parameter estimate theta_textest. This is exactly what Fenrir.jl's fenrir_nll provides:","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"p_est = (0.1, 0.1, 2.0)\nprob = remake(true_prob, p=p_est)\ndata = (t=times, u=odedata)\nκ² = 1e10\nnll, _, _ = fenrir_nll(prob, data, observation_noise_var, κ²; dt=1e-1)\nnll","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"This is the negative marginal log-likelihood of the parameter p_est. You can use it as any other NLL: Optimize it to compute maximum-likelihood estimates or MAPs, or plug it into MCMC to sample from the posterior. In our paper [3] we compute MLEs by pairing Fenrir with Optimization.jl and ForwardDiff.jl. Let's quickly explore how to do this next.","category":"page"},{"location":"tutorials/fenrir/#Maximum-likelihood-parameter-inference","page":"Parameter Inference","title":"Maximum-likelihood parameter inference","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"To compute a maximum-likelihood estimate (MLE), we just need to maximize theta to p(mathcalD mid theta) - that is, minimize the nll from above. We use Optimization.jl for this. First, define a loss function and create an OptimizationProblem","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"function loss(x, _)\n ode_params = x[begin:end-1]\n prob = remake(true_prob, p=ode_params)\n κ² = exp(x[end]) # the diffusion parameter of the EK1\n return fenrir_nll(prob, data, observation_noise_var, κ²; dt=1e-1)\nend\n\nfun = OptimizationFunction(loss, Optimization.AutoForwardDiff())\noptprob = OptimizationProblem(\n fun, [p_est..., 1e0];\n lb=[0.0, 0.0, 0.0, -10], ub=[1.0, 1.0, 5.0, 20] # lower and upper bounds\n)","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Then, just solve it! Here we use LBFGS:","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"optsol = solve(optprob, LBFGS())\np_mle = optsol.u[1:3]\np_mle # hide","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Success! The computed MLE is quite close to the true parameter which we used to generate the data. As a final step, let's plot the true solution, the data, and the result of the MLE:","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"plot(true_sol, color=:black, linestyle=:dash, label=[\"True Solution\" \"\"])\nscatter!(times, stack(odedata), markersize=2, markerstrokewidth=0.1, color=1, label=[\"Noisy Data\" \"\"])\nmle_sol = solve(remake(true_prob, p=p_mle), EK1())\nplot!(mle_sol, color=3, label=[\"MLE-parameter Solution\" \"\"])","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Looks good!","category":"page"},{"location":"tutorials/fenrir/#Reference","page":"Parameter Inference","title":"Reference","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"
[3]
\n
\n
F. Tronarp, N. Bosch and P. Hennig. Fenrir: Physics-Enhanced Regression for Initial Value\n Problems. In: Proceedings of the 39th International Conference on Machine\n Learning, Proceedings of Machine Learning Research, 21776–21794, PMLR (2022).
\n
\n
","category":"page"},{"location":"#Probabilistic-Numerical-Differential-Equation-Solvers","page":"Home","title":"Probabilistic Numerical Differential Equation Solvers","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"(Image: Banner)","category":"page"},{"location":"","page":"Home","title":"Home","text":"ProbNumDiffEq.jl provides probabilistic numerical solvers to the DifferentialEquations.jl ecosystem. The implemented ODE filters solve differential equations via Bayesian filtering and smoothing and compute not just a single point estimate of the true solution, but a posterior distribution that contains an estimate of its numerical approximation error.","category":"page"},{"location":"","page":"Home","title":"Home","text":"For a short intro video, check out our poster presentation at JuliaCon2021.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Run Julia, enter ] to bring up Julia's package manager, and add the ProbNumDiffEq.jl package:","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> ]\n(v1.9) pkg> add ProbNumDiffEq","category":"page"},{"location":"#Getting-Started","page":"Home","title":"Getting Started","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"For a quick introduction check out the \"Solving ODEs with Probabilistic Numerics\" tutorial.","category":"page"},{"location":"#Features","page":"Home","title":"Features","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Two extended Kalman filtering-based probabilistic solvers: the explicit EK0 and semi-implicit EK1.\nAdaptive step-size selection with PI control; fully compatible with DifferentialEquations.jl's timestepping options\nOnline uncertainty calibration for multiple different diffusion models (see \"Diffusion models and calibration\")\nDense output\nSampling from the solution\nCallback support\nConvenient plotting through a Plots.jl recipe\nAutomatic differentiation via ForwardDiff.jl\nArbitrary precision via Julia's built-in arbitrary precision arithmetic\nSpecialized solvers for second-order ODEs (see Second Order ODEs and Energy Preservation)\nCompatible with DAEs in mass-matrix ODE form (see Solving DAEs with Probabilistic Numerics)","category":"page"},{"location":"#Related-packages","page":"Home","title":"Related packages","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"probdiffeq: Fast and feature-rich filtering-based probabilistic ODE solvers in JAX.\nProbNum: Probabilistic numerics in Python. It has not only probabilistic ODE solvers, but also probabilistic linear solvers, Bayesian quadrature, and many filtering and smoothing implementations.\nFenrir.jl: Parameter-inference in ODEs with probabilistic ODE solvers. This package builds on ProbNumDiffEq.jl to provide a negative marginal log-likelihood function, which can then be used with an optimizer or with MCMC for parameter inference.","category":"page"},{"location":"implementation/#Solver-Implementation-via-OrdinaryDiffEq.jl","page":"Implementation via OrdinaryDiffEq.jl","title":"Solver Implementation via OrdinaryDiffEq.jl","text":"","category":"section"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"ProbNumDiffEq.jl builds directly on OrdinaryDiffEq.jl to benefit from its iterator interface, flexible step-size control, and efficient Jacobian calculations. But, this requires extending non-public APIs. This page is meant to provide an overview on which parts exactly ProbNumDiffEq.jl builds on.","category":"page"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"For more discussion on the pros and cons of building on OrdinaryDiffEq.jl, see this thread on discourse.","category":"page"},{"location":"implementation/#Building-on-OrdinaryDiffEq.jl","page":"Implementation via OrdinaryDiffEq.jl","title":"Building on OrdinaryDiffEq.jl","text":"","category":"section"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"ProbNumDiffEq.jl shares most of OrdinaryDiffEq.jl's implementation. In particular:","category":"page"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"OrdinaryDiffEq.__init builds the cache and the integrator, and calls OrdinaryDiffEq.initialize!\nOrdinaryDiffEq.solve! implements the actual iterator structure, with\nOrdinaryDiffEq.loopheader!\nOrdinaryDiffEq.perform_step!\nOrdinaryDiffEq.loopfooter!\nOrdinaryDiffEq.postamble!","category":"page"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"ProbNumDiffEq.jl builds around this structure and overloads some of the parts:","category":"page"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"Algorithms: EK0/EK1 <: AbstractEK <: OrdinaryDiffEq.OrdinaryDiffEqAdaptiveAlgorithm\n./src/algorithms.jl provides the algorithms themselves\n./src/alg_utils.jl implements many traits (e.g. relating to autodiff, implicitness, step-size control)\nCache: EKCache <: AbstractODEFilterCache <: OrdinaryDiffEq.OrdinaryDiffEqCache\n./src/caches.jl implements the cache and its main constructor: OrdinaryDiffEq.alg_cache\nInitialization and perform_step!: via OrdinaryDiffEq.initialize! and OrdinaryDiffEq.perform_step!. Implemented in ./src/perform_step.jl.\nCustom postamble by overloading OrdinaryDiffEq.postamble! (which should always call OrdinaryDiffEq._postamble!). This is where we do the \"smoothing\" of the solution. Implemented in ./src/integrator_utils.jl. \nCustom saving by overloading OrdinaryDiffEq.savevalues! (which should always call OrdinaryDiffEq._savevalues!). Implemented in ./src/integrator_utils.jl.","category":"page"},{"location":"implementation/#Building-on-DiffEqBase.jl","page":"Implementation via OrdinaryDiffEq.jl","title":"Building on DiffEqBase.jl","text":"","category":"section"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"DiffEqBase.__init is currently overloaded to transform OOP problems into IIP problems (in ./src/solve.jl).\nThe solution object: ProbODESolution <: AbstractProbODESolution <: DiffEqBase.AbstractODESolution\n./src/solution.jl implements the main parts. Note that the main constructor DiffEqBase.build_solution is called by OrdinaryDiffEq.__init - so OrdinaryDiffEq.jl has control over its inputs.\nThere is also MeanProbODESolution <: DiffEqBase.AbstractODESolution: It allows handling the mean of a probabilistic ODE solution the same way one would handle any \"standard\" ODE solution - e.g. it is compatible with DiffEqDevTools.appxtrue.\nAbstractODEFilterPosterior <: DiffEqBase.AbstractDiffEqInterpolation is the current interpolant, but it does not actually fully handle the interpolation right now. This part might be subject to change soon.\nPlot recipe in ./src/solution_plotting.jl\nSampling in ./src/solution_sampling.jl\nDiffEqBase.prepare_alg(::EK1{0}); closely follows a similar function implemented in OrdinaryDiffEq.jl ./src/alg_utils.jl\nthis also required DiffEqBase.remake(::EK1)","category":"page"},{"location":"implementation/#Other-packages","page":"Implementation via OrdinaryDiffEq.jl","title":"Other packages","text":"","category":"section"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"DiffEqDevTools.appxtrue is overloaded to work with ProbODESolution (by just doing mean(sol)). This also enables DiffEqDevTools.WorkPrecision to work out of th box.","category":"page"}] +[{"location":"references/#references","page":"References","title":"References","text":"","category":"section"},{"location":"references/","page":"References","title":"References","text":"
[1]
\n
\n
N. Bosch, F. Tronarp and P. Hennig. Pick-and-Mix Information Operators for Probabilistic ODE\n Solvers. In: Proceedings of The 25th International Conference on Artificial\n Intelligence and Statistics, Proceedings of Machine Learning Research, 10015–10027, PMLR (2022).
\n
[2]
\n
\n
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
\n
[3]
\n
\n
F. Tronarp, N. Bosch and P. Hennig. Fenrir: Physics-Enhanced Regression for Initial Value\n Problems. In: Proceedings of the 39th International Conference on Machine\n Learning, Proceedings of Machine Learning Research, 21776–21794, PMLR (2022).
\n
[4]
\n
\n\n
[5]
\n
\n\n
[6]
\n
\n
N. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial\n Intelligence and Statistics, Proceedings of Machine Learning Research, 3466–3474, PMLR (2021).
\n
[7]
\n
\n
P. Hennig, M. A. Osborne and H. P. Kersting. Probabilistic Numerics: Computation as Machine Learning. Cambridge University Press (2022).
\n
[8]
\n
\n
H. Kersting and P. Hennig. Active Uncertainty Calibration in Bayesian ODE Solvers. In: Proceedings of the Thirty-Second Conference on Uncertainty in\n Artificial Intelligence, UAI'16, 309–318, AUAI Press (2016).
\n
[9]
\n
\n\n
[10]
\n
\n
N. Krämer, N. Bosch, J. Schmidt and P. Hennig. Probabilistic ODE Solutions in Millions of Dimensions. In: Proceedings of the 39th International Conference on Machine\n Learning, Proceedings of Machine Learning Research, 11634–11649, PMLR (2022).
\n
[11]
\n
\n\n
[12]
\n
\n\n
\n
","category":"page"},{"location":"benchmarks/vanderpol/#Van-der-Pol-benchmark","page":"Stiff ODE: Van der Pol","title":"Van der Pol benchmark","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"using LinearAlgebra, Statistics\nusing DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Plots\nusing ProbNumDiffEq\n\n# Plotting theme\ntheme(:dao;\n markerstrokewidth=0.5,\n legend=:outertopright,\n bottom_margin=5Plots.mm,\n size = (1000, 400),\n)","category":"page"},{"location":"benchmarks/vanderpol/#Van-der-Pol-problem-definition","page":"Stiff ODE: Van der Pol","title":"Van der Pol problem definition","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"function vanderpol!(du, u, p, t)\n du[1] = u[2]\n du[2] = p[1] * ((1 - u[1]^2) * u[2] - u[1])\nend\np = [1e5]\ntspan = (0.0, 6.3)\nu0 = [2.0, 0.0]\nprob = ODEProblem(vanderpol!, u0, tspan, p)\n\ntest_sol = solve(prob, RadauIIA5(), abstol=1/10^14, reltol=1/10^14, dense=false)\nplot(test_sol, title=\"Van der Pol Solution\", legend=false, ylims=(-2.5, 2.5))","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"(Image: )","category":"page"},{"location":"benchmarks/vanderpol/#EK1-accross-orders","page":"Stiff ODE: Van der Pol","title":"EK1 accross orders","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1($order)\" => Dict(:alg => EK1(order=order, smooth=DENSE))\n for order in 2:6\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (6:13)\nreltols = 1.0 ./ 10.0 .^ (3:10)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, palette=Plots.palette([:blue, :red], length(_setups)), xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"(Image: )","category":"page"},{"location":"benchmarks/vanderpol/#Solving-the-first-vs-second-order-ODE","page":"Stiff ODE: Van der Pol","title":"Solving the first- vs second-order ODE","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"function vanderpol2!(ddu, du, u, p, t)\n ddu[1] = p[1] * ((1 - u[1]^2) * du[1] - u[1])\nend\np = [1e5]\ntspan = (0.0, 6.3)\nu0 = [2.0]\ndu0 = [0.0]\nprob2 = SecondOrderODEProblem(vanderpol2!, du0, u0, tspan, p)\n\ntest_sol2 = solve(prob2, RadauIIA5(), abstol=1/10^14, reltol=1/10^14, dense=false)\nplot(test_sol2, title=\"Van der Pol Solution (2nd order)\", legend=false, ylims=(-2.5, 2.5))","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"(Image: )","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1(2) 1st order\" => Dict(:alg => EK1(order=2, smooth=DENSE))\n \"EK1(3) 1st order\" => Dict(:alg => EK1(order=3, smooth=DENSE))\n \"EK1(4) 1st order\" => Dict(:alg => EK1(order=4, smooth=DENSE))\n \"EK1(5) 1st order\" => Dict(:alg => EK1(order=5, smooth=DENSE))\n \"EK1(3) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=3, smooth=DENSE))\n \"EK1(4) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=4, smooth=DENSE))\n \"EK1(5) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=5, smooth=DENSE))\n \"EK1(5) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=6, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (6:13)\nreltols = 1.0 ./ 10.0 .^ (3:10)\n\nwp = WorkPrecisionSet(\n [prob, prob2], abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = [test_sol, test_sol2],\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, color=[1 1 1 1 2 2 2 2], xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"(Image: )","category":"page"},{"location":"benchmarks/vanderpol/#Conclusion","page":"Stiff ODE: Van der Pol","title":"Conclusion","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Use the EK1 to solve stiff problems, with orders leq 6 depending on the error tolerance.\nWhen the problem is actually a second-order ODE, as is the case for the Van der Pol system here, solve it as a second-order ODE.","category":"page"},{"location":"benchmarks/vanderpol/#Appendix","page":"Stiff ODE: Van der Pol","title":"Appendix","text":"","category":"section"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Computer information:","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"using InteractiveUtils\nInteractiveUtils.versioninfo()","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Julia Version 1.9.3\nCommit bed2cd540a1 (2023-08-24 14:43 UTC)\nBuild Info:\n Official https://julialang.org/ release\nPlatform Info:\n OS: Linux (x86_64-linux-gnu)\n CPU: 12 × Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz\n WORD_SIZE: 64\n LIBM: libopenlibm\n LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)\n Threads: 12 on 12 virtual cores\nEnvironment:\n JULIA_NUM_THREADS = auto\n JULIA_STACKTRACE_MINIMAL = true","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Package Information:","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"using Pkg\nPkg.status()","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml`\n [f3b72e0c] DiffEqDevTools v2.39.0\n [7073ff75] IJulia v1.24.2\n [7f56f5a3] LSODA v0.7.5\n [e6f89c97] LoggingExtras v1.0.3\n [e2752cbe] MATLABDiffEq v1.2.0\n [961ee093] ModelingToolkit v8.72.2\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [65888b18] ParameterizedFunctions v5.16.0\n [91a5bcdd] Plots v1.39.0\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [0bca4576] SciMLBase v2.4.0\n [505e40e9] SciPyDiffEq v0.2.1\n [90137ffa] StaticArrays v1.6.5\n [c3572dad] Sundials v4.20.0\n [44d3d7a6] Weave v0.10.12\n [0518478a] deSolveDiffEq v0.1.1","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"And the full manifest:","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Pkg.status(mode=Pkg.PKGMODE_MANIFEST)","category":"page"},{"location":"benchmarks/vanderpol/","page":"Stiff ODE: Van der Pol","title":"Stiff ODE: Van der Pol","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml`\n [47edcb42] ADTypes v0.2.4\n⌅ [c3fe647b] AbstractAlgebra v0.32.5\n [621f4979] AbstractFFTs v1.5.0\n [1520ce14] AbstractTrees v0.4.4\n [79e6a3ab] Adapt v3.6.2\n [ec485272] ArnoldiMethod v0.2.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.5\n [d1d4a3ce] BitFlags v0.1.7\n [62783981] BitTwiddlingConvenienceFunctions v0.1.5\n⌅ [fa961155] CEnum v0.4.2\n [2a0fbf3d] CPUSummary v0.2.4\n [00ebfdb7] CSTParser v3.3.6\n [49dc2e85] Calculus v0.5.1\n [324d7699] CategoricalArrays v0.10.8\n [d360d2e6] ChainRulesCore v1.16.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.2\n [35d6a980] ColorSchemes v3.24.0\n [3da002f7] ColorTypes v0.11.4\n [c3611d14] ColorVectorSpace v0.10.0\n [5ae59095] Colors v0.12.10\n [861a8166] Combinatorics v1.0.2\n [a80b9123] CommonMark v0.8.12\n [38540f10] CommonSolve v0.2.4\n [bbf7d656] CommonSubexpressions v0.3.0\n [34da2185] Compat v4.10.0\n [b152e2b5] CompositeTypes v0.1.3\n [2569d6c7] ConcreteStructs v0.2.3\n [f0e56b4a] ConcurrentUtilities v2.2.1\n [8f4d0f93] Conda v1.9.1\n [187b0558] ConstructionBase v1.5.4\n [d38c429a] Contour v0.6.2\n [adafc99b] CpuId v0.3.1\n [a8cc5b0e] Crayons v4.1.1\n [717857b8] DSP v0.7.9\n [9a962f9c] DataAPI v1.15.0\n [a93c6f00] DataFrames v1.6.1\n [864edb3b] DataStructures v0.18.15\n [e2d170a0] DataValueInterfaces v1.0.0\n [8bb1440f] DelimitedFiles v1.9.1\n [2b5f629d] DiffEqBase v6.133.1\n [459566f4] DiffEqCallbacks v2.33.0\n [f3b72e0c] DiffEqDevTools v2.39.0\n [77a26b50] DiffEqNoiseProcess v5.19.0\n [163ba53b] DiffResults v1.1.0\n [b552c78f] DiffRules v1.15.1\n [b4f34e82] Distances v0.10.10\n [31c24e10] Distributions v0.25.102\n [ffbed154] DocStringExtensions v0.9.3\n⌅ [5b8099bc] DomainSets v0.6.7\n [fa6b7ba4] DualNumbers v0.6.8\n [7c1d4256] DynamicPolynomials v0.5.3\n [b305315f] Elliptic v1.0.1\n [4e289a0a] EnumX v1.0.4\n [f151be2c] EnzymeCore v0.6.1\n [6912e4f1] Espresso v0.6.1\n [460bff9d] ExceptionUnwrapping v0.1.9\n [d4d017d3] ExponentialUtilities v1.25.0\n [e2ba6199] ExprTools v0.1.10\n [c87230d0] FFMPEG v0.4.1\n [7a1cc6ca] FFTW v1.7.1\n [7034ab61] FastBroadcast v0.2.7\n [9aa1b823] FastClosures v0.3.2\n [442a2c76] FastGaussQuadrature v1.0.0\n [29a986be] FastLapackInterface v2.0.0\n [1a297f60] FillArrays v1.6.1\n [6a86dc24] FiniteDiff v2.21.1\n [53c48c17] FixedPointNumbers v0.8.4\n [59287772] Formatting v0.4.2\n [f6369f11] ForwardDiff v0.10.36\n [069b7b12] FunctionWrappers v1.1.3\n [77dc65aa] FunctionWrappersWrappers v0.1.3\n [d9f16b24] Functors v0.4.5\n [46192b85] GPUArraysCore v0.1.5\n [28b8d3ca] GR v0.72.10\n [43dcc890] GaussianDistributions v0.5.2\n [c145ed77] GenericSchur v0.5.3\n [c27321d9] Glob v1.3.1\n [86223c79] Graphs v1.9.0\n [42e2da0e] Grisu v1.0.2\n [0b43b601] Groebner v0.4.4\n [d5909c97] GroupsCore v0.4.0\n [cd3eb016] HTTP v1.10.0\n [eafb193a] Highlights v0.5.2\n [3e5b6fbb] HostCPUFeatures v0.1.16\n [34004b35] HypergeometricFunctions v0.3.23\n [7073ff75] IJulia v1.24.2\n [615f187c] IfElse v0.1.1\n [d25df0c9] Inflate v0.1.4\n [842dd82b] InlineStrings v1.4.0\n [18e54dd8] IntegerMathUtils v0.1.2\n [8197267c] IntervalSets v0.7.7\n [41ab1584] InvertedIndices v1.3.0\n [92d709cd] IrrationalConstants v0.2.2\n [c8e1da08] IterTools v1.8.0\n [82899510] IteratorInterfaceExtensions v1.0.0\n [1019f520] JLFzf v0.1.5\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.39\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [ba0b0d4f] Krylov v0.9.4\n [7f56f5a3] LSODA v0.7.5\n [b964fa9f] LaTeXStrings v1.3.0\n [2ee39098] LabelledArrays v1.14.0\n [984bce1d] LambertW v0.4.6\n [23fbe1c1] Latexify v0.16.1\n [10f19ff3] LayoutPointers v0.1.14\n [50d2b5c4] Lazy v0.15.1\n [1d6d02ad] LeftChildRightSiblingTrees v0.2.0\n [d3d80556] LineSearches v7.2.0\n [7ed4a6bd] LinearSolve v2.9.2\n [2ab3a3ac] LogExpFunctions v0.3.26\n [e6f89c97] LoggingExtras v1.0.3\n [bdcacae8] LoopVectorization v0.12.165\n [10e44e05] MATLAB v0.8.4\n [e2752cbe] MATLABDiffEq v1.2.0\n [d8e11817] MLStyle v0.4.17\n [1914dd2f] MacroTools v0.5.11\n [d125e4d3] ManualMemory v0.1.8\n [739be429] MbedTLS v1.1.7\n [442fdcdd] Measures v0.3.2\n [e1d29d7a] Missings v1.1.0\n [961ee093] ModelingToolkit v8.72.2\n [46d2c3a1] MuladdMacro v0.2.4\n [102ac46a] MultivariatePolynomials v0.5.2\n [ffc61752] Mustache v1.0.17\n [d8a4904e] MutableArithmetics v1.3.3\n [d41bc354] NLSolversBase v7.8.3\n [2774e3e8] NLsolve v4.5.1\n [77ba4419] NaNMath v1.0.2\n [8913a72c] NonlinearSolve v2.2.1\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [6fd5a793] Octavian v0.3.27\n [6fe1bfb0] OffsetArrays v1.12.10\n [4d8831e6] OpenSSL v1.4.1\n [429524aa] Optim v1.7.8\n [bac558e1] OrderedCollections v1.6.2\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [90014a1f] PDMats v0.11.25\n [fe68d972] PSDMatrices v0.4.4\n [65ce6f38] PackageExtensionCompat v1.0.2\n [65888b18] ParameterizedFunctions v5.16.0\n [d96e819e] Parameters v0.12.3\n [69de0a69] Parsers v2.7.2\n [b98c9c47] Pipe v1.3.0\n [32113eaa] PkgBenchmark v0.2.12\n [ccf2f8ad] PlotThemes v3.1.0\n [995b91a9] PlotUtils v1.3.5\n [91a5bcdd] Plots v1.39.0\n [e409e4f3] PoissonRandom v0.4.4\n [f517fe37] Polyester v0.7.8\n [1d0040c9] PolyesterWeave v0.2.1\n⌅ [f27b6e38] Polynomials v3.2.13\n [2dfb63ee] PooledArrays v1.4.3\n [85a6dd25] PositiveFactorizations v0.2.4\n [d236fae5] PreallocationTools v0.4.12\n [aea7be01] PrecompileTools v1.2.0\n [21216c6a] Preferences v1.4.1\n [08abe8d2] PrettyTables v2.2.7\n [27ebfcd6] Primes v0.5.4\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [33c8b6b6] ProgressLogging v0.1.4\n [438e738f] PyCall v1.96.1\n [1fd47b50] QuadGK v2.9.1\n [6f49c342] RCall v0.13.18\n [74087812] Random123 v1.6.1\n [fb686558] RandomExtensions v0.4.4\n [e6cf234a] RandomNumbers v1.5.3\n [3cdcf5f2] RecipesBase v1.3.4\n [01d81517] RecipesPipeline v0.6.12\n [731186ca] RecursiveArrayTools v2.39.0\n [f2c3362d] RecursiveFactorization v0.2.20\n [189a3867] Reexport v1.2.2\n [05181044] RelocatableFolders v1.0.1\n [ae029012] Requires v1.3.0\n [ae5879a3] ResettableStacks v1.1.1\n [79098fc4] Rmath v0.7.1\n [47965b36] RootedTrees v2.19.2\n [7e49a35a] RuntimeGeneratedFunctions v0.5.12\n [fdea26ae] SIMD v3.4.5\n [94e857df] SIMDTypes v0.1.0\n [476501e8] SLEEFPirates v0.6.39\n [0bca4576] SciMLBase v2.4.0\n [e9a6253c] SciMLNLSolve v0.1.9\n [c0aeaf25] SciMLOperators v0.3.6\n [505e40e9] SciPyDiffEq v0.2.1\n [6c6a2e73] Scratch v1.2.0\n [91c51154] SentinelArrays v1.4.0\n [efcf1570] Setfield v1.1.1\n [1277b4bf] ShiftedArrays v2.0.0\n [992d4aef] Showoff v1.0.3\n [777ac1f9] SimpleBufferStream v1.1.0\n [727e6d20] SimpleNonlinearSolve v0.1.20\n [699a6c99] SimpleTraits v0.9.4\n [ce78b400] SimpleUnPack v1.1.0\n [66db9d55] SnoopPrecompile v1.0.3\n [b85f4697] SoftGlobalScope v1.1.0\n [a2af1166] SortingAlgorithms v1.1.1\n [47a9eef4] SparseDiffTools v2.8.0\n [e56a9233] Sparspak v0.3.9\n [276daf66] SpecialFunctions v2.3.1\n [928aab9d] SpecialMatrices v3.0.0\n [aedffcd0] Static v0.8.8\n [0d7ed370] StaticArrayInterface v1.4.1\n [90137ffa] StaticArrays v1.6.5\n [1e83bf80] StaticArraysCore v1.4.2\n [82ae8749] StatsAPI v1.7.0\n [2913bbd2] StatsBase v0.34.2\n [4c63d2b9] StatsFuns v1.3.0\n [3eaba693] StatsModels v0.7.3\n⌅ [7792a7ef] StrideArraysCore v0.4.17\n [69024149] StringEncodings v0.3.7\n [892a3eda] StringManipulation v0.3.4\n [09ab397b] StructArrays v0.6.16\n [c3572dad] Sundials v4.20.0\n [2efcf032] SymbolicIndexingInterface v0.2.2\n [d1185830] SymbolicUtils v1.4.0\n [0c5d862f] Symbolics v5.9.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.0\n [92b13dbe] TaylorIntegration v0.14.3\n [6aa5eb33] TaylorSeries v0.15.2\n [62fd8b95] TensorCore v0.1.1\n [5d786b92] TerminalLoggers v0.1.7\n [8290d209] ThreadingUtilities v0.5.2\n [a759f4b9] TimerOutputs v0.5.23\n [c751599d] ToeplitzMatrices v0.8.2\n [0796e94c] Tokenize v0.5.25\n [3bb67fe8] TranscodingStreams v0.9.13\n [a2a6695c] TreeViews v0.3.0\n [d5829a12] TriangularSolve v0.1.19\n [410a4b4d] Tricks v0.1.8\n [781d530d] TruncatedStacktraces v1.4.0\n [5c2747f8] URIs v1.5.0\n [3a884ed6] UnPack v1.0.2\n [1cfade01] UnicodeFun v0.4.1\n [1986cc42] Unitful v1.17.0\n [45397f5d] UnitfulLatexify v1.6.3\n [a7c27f48] Unityper v0.1.5\n [41fe7b60] Unzip v0.2.0\n [3d5dd08c] VectorizationBase v0.21.64\n [81def892] VersionParsing v1.3.0\n [19fa3120] VertexSafeGraphs v0.2.0\n [44d3d7a6] Weave v0.10.12\n [1b915085] WinReg v1.0.0\n [ddb6d928] YAML v0.4.9\n [c2297ded] ZMQ v1.2.2\n [700de1a5] ZygoteRules v0.2.3\n [0518478a] deSolveDiffEq v0.1.1\n [6e34b625] Bzip2_jll v1.0.8+0\n [83423d85] Cairo_jll v1.16.1+1\n [2702e6a9] EpollShim_jll v0.0.20230411+0\n [2e619515] Expat_jll v2.5.0+0\n⌃ [b22a6f82] FFMPEG_jll v4.4.2+2\n [f5851436] FFTW_jll v3.3.10+0\n [a3f928ae] Fontconfig_jll v2.13.93+0\n [d7e528f0] FreeType2_jll v2.13.1+0\n [559328eb] FriBidi_jll v1.0.10+0\n [0656b61e] GLFW_jll v3.3.8+0\n [d2c73de3] GR_jll v0.72.10+0\n [78b55507] Gettext_jll v0.21.0+0\n [7746bdde] Glib_jll v2.76.5+0\n [3b182d85] Graphite2_jll v1.3.14+0\n [2e76f6c2] HarfBuzz_jll v2.8.1+1\n [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0\n [aacddb02] JpegTurbo_jll v2.1.91+0\n [c1c5ebd0] LAME_jll v3.100.1+0\n [88015f11] LERC_jll v3.0.0+1\n [1d63c593] LLVMOpenMP_jll v15.0.4+0\n [aae0fff6] LSODA_jll v0.1.2+0\n [dd4b983a] LZO_jll v2.10.1+0\n⌅ [e9f186c6] Libffi_jll v3.2.2+1\n [d4300ac3] Libgcrypt_jll v1.8.7+0\n [7e76a0d4] Libglvnd_jll v1.6.0+0\n [7add5ba3] Libgpg_error_jll v1.42.0+0\n [94ce4f54] Libiconv_jll v1.17.0+0\n [4b2f31a3] Libmount_jll v2.35.0+0\n [89763e89] Libtiff_jll v4.5.1+1\n [38a345b3] Libuuid_jll v2.36.0+0\n [856f044c] MKL_jll v2023.2.0+0\n [c771fb93] ODEInterface_jll v0.0.1+0\n [e7412a2a] Ogg_jll v1.3.5+1\n⌅ [458c3c95] OpenSSL_jll v1.1.23+0\n [efe28fd5] OpenSpecFun_jll v0.5.5+0\n [91d4177d] Opus_jll v1.3.2+0\n [30392449] Pixman_jll v0.42.2+0\n [c0090381] Qt6Base_jll v6.5.2+2\n [f50d1b31] Rmath_jll v0.4.0+0\n⌅ [fb77eaff] Sundials_jll v5.2.1+0\n [a44049a8] Vulkan_Loader_jll v1.3.243+0\n [a2964d1f] Wayland_jll v1.21.0+1\n [2381bf8a] Wayland_protocols_jll v1.25.0+0\n [02c8fc9c] XML2_jll v2.11.5+0\n [aed1982a] XSLT_jll v1.1.34+0\n [ffd25f8a] XZ_jll v5.4.4+0\n [f67eecfb] Xorg_libICE_jll v1.0.10+1\n [c834827a] Xorg_libSM_jll v1.2.3+0\n [4f6342f7] Xorg_libX11_jll v1.8.6+0\n [0c0b7dd1] Xorg_libXau_jll v1.0.11+0\n [935fb764] Xorg_libXcursor_jll v1.2.0+4\n [a3789734] Xorg_libXdmcp_jll v1.1.4+0\n [1082639a] Xorg_libXext_jll v1.3.4+4\n [d091e8ba] Xorg_libXfixes_jll v5.0.3+4\n [a51aa0fd] Xorg_libXi_jll v1.7.10+4\n [d1454406] Xorg_libXinerama_jll v1.1.4+4\n [ec84b674] Xorg_libXrandr_jll v1.5.2+4\n [ea2f1a96] Xorg_libXrender_jll v0.9.10+4\n [14d82f49] Xorg_libpthread_stubs_jll v0.1.1+0\n [c7cfdc94] Xorg_libxcb_jll v1.15.0+0\n [cc61e674] Xorg_libxkbfile_jll v1.1.2+0\n [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0\n [12413925] Xorg_xcb_util_image_jll v0.4.0+1\n [2def613f] Xorg_xcb_util_jll v0.4.0+1\n [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1\n [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1\n [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1\n [35661453] Xorg_xkbcomp_jll v1.4.6+0\n [33bec58e] Xorg_xkeyboard_config_jll v2.39.0+0\n [c5fb5394] Xorg_xtrans_jll v1.5.0+0\n [8f1865be] ZeroMQ_jll v4.3.4+0\n [3161d3a3] Zstd_jll v1.5.5+0\n [35ca27e7] eudev_jll v3.2.9+0\n⌅ [214eeab7] fzf_jll v0.29.0+0\n [1a1c6b14] gperf_jll v3.1.1+0\n [a4ae2306] libaom_jll v3.4.0+0\n [0ac62f75] libass_jll v0.15.1+0\n [2db6ffa8] libevdev_jll v1.11.0+0\n [f638f0a6] libfdk_aac_jll v2.0.2+0\n [36db933b] libinput_jll v1.18.0+0\n [b53b4c65] libpng_jll v1.6.38+0\n [a9144af2] libsodium_jll v1.0.20+0\n [f27f6e37] libvorbis_jll v1.3.7+1\n [009596ad] mtdev_jll v1.1.6+0\n [1270edf5] x264_jll v2021.5.5+0\n [dfaa095f] x265_jll v3.5.0+0\n [d8fb68d0] xkbcommon_jll v1.4.1+1\n [0dad84c5] ArgTools v1.1.1\n [56f22d72] Artifacts\n [2a0f44e3] Base64\n [ade2ca70] Dates\n [8ba89e20] Distributed\n [f43a241f] Downloads v1.6.0\n [7b1f6079] FileWatching\n [9fa8497b] Future\n [b77e0a4c] InteractiveUtils\n [4af54fe1] LazyArtifacts\n [b27032c2] LibCURL v0.6.3\n [76f85450] LibGit2\n [8f399da3] Libdl\n [37e2e46d] LinearAlgebra\n [56ddb016] Logging\n [d6f4376e] Markdown\n [a63ad114] Mmap\n [ca575930] NetworkOptions v1.2.0\n [44cfe95a] Pkg v1.9.2\n [de0858da] Printf\n [9abbd945] Profile\n [3fa0cd96] REPL\n [9a3f8284] Random\n [ea8e919c] SHA v0.7.0\n [9e88b42a] Serialization\n [1a1011a3] SharedArrays\n [6462fe0b] Sockets\n [2f01184e] SparseArrays\n [10745b16] Statistics v1.9.0\n [4607b0f0] SuiteSparse\n [fa267f1f] TOML v1.0.3\n [a4e569a6] Tar v1.10.0\n [8dfed614] Test\n [cf7118a7] UUIDs\n [4ec0a83e] Unicode\n [e66e0078] CompilerSupportLibraries_jll v1.0.5+0\n [deac9b47] LibCURL_jll v7.84.0+0\n [29816b5a] LibSSH2_jll v1.10.2+0\n [c8ffd9c3] MbedTLS_jll v2.28.2+0\n [14a3606d] MozillaCACerts_jll v2022.10.11\n [4536629a] OpenBLAS_jll v0.3.21+4\n [05823500] OpenLibm_jll v0.8.1+0\n [efcefdf7] PCRE2_jll v10.42.0+0\n [bea87d4a] SuiteSparse_jll v5.10.1+6\n [83775a58] Zlib_jll v1.2.13+0\n [8e850b90] libblastrampoline_jll v5.8.0+0\n [8e850ede] nghttp2_jll v1.48.0+0\n [3f19e933] p7zip_jll v17.4.0+0\nInfo Packages marked with ⌃ and ⌅ have new versions available, but those wi\nth ⌅ are restricted by compatibility constraints from upgrading. To see why\n use `status --outdated -m`","category":"page"},{"location":"benchmarks/rober/#ROBER-benchmark","page":"DAE: ROBER","title":"ROBER benchmark","text":"","category":"section"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Adapted from SciMLBenchmarks.jl.","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"using LinearAlgebra, Statistics\nusing DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Sundials, Plots\nusing ModelingToolkit\nusing ProbNumDiffEq\n\n# Plotting theme\ntheme(:dao;\n markerstrokewidth=0.5,\n legend=:outertopright,\n bottom_margin=5Plots.mm,\n size = (1000, 400),\n)","category":"page"},{"location":"benchmarks/rober/#ROBER-problem-definition","page":"DAE: ROBER","title":"ROBER problem definition","text":"","category":"section"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"@variables t y₁(t)=1.0 y₂(t)=0.0 y₃(t)=0.0\n@parameters k₁=0.04 k₂=3e7 k₃=1e4\nD = Differential(t)\neqs = [\n D(y₁) ~ -k₁*y₁ + k₃*y₂*y₃\n D(y₂) ~ k₁*y₁ - k₃*y₂*y₃ - k₂*y₂^2\n 0 ~ y₁ + y₂ + y₃ - 1\n]\n@named sys = ODESystem(eqs)\nmmprob = ODEProblem(sys,[],(0.0,1e5))\ndaeprob = DAEProblem(sys,[D(y₁)=>-0.04, D(y₂)=>0.04, D(y₃)=>0.0],[],(0.0,1e5)) # can't handle this yet\nodaeprob = ODAEProblem(structural_simplify(sys),[],(0.0,1e5)) # can't handle this yet\n\nref_sol = solve(daeprob,IDA(),abstol=1/10^14,reltol=1/10^14,dense=false)\nplot(ref_sol, idxs=[y₁,y₂,y₃], title=\"ROBER Solution\", legend=false, ylims=(0, 1))","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"(Image: )","category":"page"},{"location":"benchmarks/rober/#EK1-accross-orders","page":"DAE: ROBER","title":"EK1 accross orders","text":"","category":"section"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1($order)\" => Dict(:alg => EK1(order=order, smooth=DENSE))\n for order in 1:4\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:9)\nreltols = 1.0 ./ 10.0 .^ (1:6)\n\nwp = WorkPrecisionSet(\n mmprob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = ref_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, palette=Plots.palette([:blue, :red], length(_setups)), xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"(Image: )","category":"page"},{"location":"benchmarks/rober/#Conclusion","page":"DAE: ROBER","title":"Conclusion","text":"","category":"section"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"The EK1 can solve mass-matrix DAEs! But it only really works well for low errors.\nOrder 3 seems to work well here. But the order-to-error-tolerance heuristic should in principle still hold: lower tolerance level rightarrow higher order.","category":"page"},{"location":"benchmarks/rober/#Appendix","page":"DAE: ROBER","title":"Appendix","text":"","category":"section"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Computer information:","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"using InteractiveUtils\nInteractiveUtils.versioninfo()","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Julia Version 1.9.3\nCommit bed2cd540a1 (2023-08-24 14:43 UTC)\nBuild Info:\n Official https://julialang.org/ release\nPlatform Info:\n OS: Linux (x86_64-linux-gnu)\n CPU: 12 × Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz\n WORD_SIZE: 64\n LIBM: libopenlibm\n LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)\n Threads: 12 on 12 virtual cores\nEnvironment:\n JULIA_NUM_THREADS = auto\n JULIA_STACKTRACE_MINIMAL = true","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Package Information:","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"using Pkg\nPkg.status()","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml`\n [f3b72e0c] DiffEqDevTools v2.39.0\n [7073ff75] IJulia v1.24.2\n [7f56f5a3] LSODA v0.7.5\n [e6f89c97] LoggingExtras v1.0.3\n [e2752cbe] MATLABDiffEq v1.2.0\n [961ee093] ModelingToolkit v8.72.2\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [65888b18] ParameterizedFunctions v5.16.0\n [91a5bcdd] Plots v1.39.0\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [0bca4576] SciMLBase v2.4.0\n [505e40e9] SciPyDiffEq v0.2.1\n [90137ffa] StaticArrays v1.6.5\n [c3572dad] Sundials v4.20.0\n [44d3d7a6] Weave v0.10.12\n [0518478a] deSolveDiffEq v0.1.1","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"And the full manifest:","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Pkg.status(mode=Pkg.PKGMODE_MANIFEST)","category":"page"},{"location":"benchmarks/rober/","page":"DAE: ROBER","title":"DAE: ROBER","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml`\n [47edcb42] ADTypes v0.2.4\n⌅ [c3fe647b] AbstractAlgebra v0.32.5\n [621f4979] AbstractFFTs v1.5.0\n [1520ce14] AbstractTrees v0.4.4\n [79e6a3ab] Adapt v3.6.2\n [ec485272] ArnoldiMethod v0.2.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.5\n [d1d4a3ce] BitFlags v0.1.7\n [62783981] BitTwiddlingConvenienceFunctions v0.1.5\n⌅ [fa961155] CEnum v0.4.2\n [2a0fbf3d] CPUSummary v0.2.4\n [00ebfdb7] CSTParser v3.3.6\n [49dc2e85] Calculus v0.5.1\n [324d7699] CategoricalArrays v0.10.8\n [d360d2e6] ChainRulesCore v1.16.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.2\n [35d6a980] ColorSchemes v3.24.0\n [3da002f7] ColorTypes v0.11.4\n [c3611d14] ColorVectorSpace v0.10.0\n [5ae59095] Colors v0.12.10\n [861a8166] Combinatorics v1.0.2\n [a80b9123] CommonMark v0.8.12\n [38540f10] CommonSolve v0.2.4\n [bbf7d656] CommonSubexpressions v0.3.0\n [34da2185] Compat v4.10.0\n [b152e2b5] CompositeTypes v0.1.3\n [2569d6c7] ConcreteStructs v0.2.3\n [f0e56b4a] ConcurrentUtilities v2.2.1\n [8f4d0f93] Conda v1.9.1\n [187b0558] ConstructionBase v1.5.4\n [d38c429a] Contour v0.6.2\n [adafc99b] CpuId v0.3.1\n [a8cc5b0e] Crayons v4.1.1\n [717857b8] DSP v0.7.9\n [9a962f9c] DataAPI v1.15.0\n [a93c6f00] DataFrames v1.6.1\n [864edb3b] DataStructures v0.18.15\n [e2d170a0] DataValueInterfaces v1.0.0\n [8bb1440f] DelimitedFiles v1.9.1\n [2b5f629d] DiffEqBase v6.133.1\n [459566f4] DiffEqCallbacks v2.33.0\n [f3b72e0c] DiffEqDevTools v2.39.0\n [77a26b50] DiffEqNoiseProcess v5.19.0\n [163ba53b] DiffResults v1.1.0\n [b552c78f] DiffRules v1.15.1\n [b4f34e82] Distances v0.10.10\n [31c24e10] Distributions v0.25.102\n [ffbed154] DocStringExtensions v0.9.3\n⌅ [5b8099bc] DomainSets v0.6.7\n [fa6b7ba4] DualNumbers v0.6.8\n [7c1d4256] DynamicPolynomials v0.5.3\n [b305315f] Elliptic v1.0.1\n [4e289a0a] EnumX v1.0.4\n [f151be2c] EnzymeCore v0.6.1\n [6912e4f1] Espresso v0.6.1\n [460bff9d] ExceptionUnwrapping v0.1.9\n [d4d017d3] ExponentialUtilities v1.25.0\n [e2ba6199] ExprTools v0.1.10\n [c87230d0] FFMPEG v0.4.1\n [7a1cc6ca] FFTW v1.7.1\n [7034ab61] FastBroadcast v0.2.7\n [9aa1b823] FastClosures v0.3.2\n [442a2c76] FastGaussQuadrature v1.0.0\n [29a986be] FastLapackInterface v2.0.0\n [1a297f60] FillArrays v1.6.1\n [6a86dc24] FiniteDiff v2.21.1\n [53c48c17] FixedPointNumbers v0.8.4\n [59287772] Formatting v0.4.2\n [f6369f11] ForwardDiff v0.10.36\n [069b7b12] FunctionWrappers v1.1.3\n [77dc65aa] FunctionWrappersWrappers v0.1.3\n [d9f16b24] Functors v0.4.5\n [46192b85] GPUArraysCore v0.1.5\n [28b8d3ca] GR v0.72.10\n [43dcc890] GaussianDistributions v0.5.2\n [c145ed77] GenericSchur v0.5.3\n [c27321d9] Glob v1.3.1\n [86223c79] Graphs v1.9.0\n [42e2da0e] Grisu v1.0.2\n [0b43b601] Groebner v0.4.4\n [d5909c97] GroupsCore v0.4.0\n [cd3eb016] HTTP v1.10.0\n [eafb193a] Highlights v0.5.2\n [3e5b6fbb] HostCPUFeatures v0.1.16\n [34004b35] HypergeometricFunctions v0.3.23\n [7073ff75] IJulia v1.24.2\n [615f187c] IfElse v0.1.1\n [d25df0c9] Inflate v0.1.4\n [842dd82b] InlineStrings v1.4.0\n [18e54dd8] IntegerMathUtils v0.1.2\n [8197267c] IntervalSets v0.7.7\n [41ab1584] InvertedIndices v1.3.0\n [92d709cd] IrrationalConstants v0.2.2\n [c8e1da08] IterTools v1.8.0\n [82899510] IteratorInterfaceExtensions v1.0.0\n [1019f520] JLFzf v0.1.5\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.39\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [ba0b0d4f] Krylov v0.9.4\n [7f56f5a3] LSODA v0.7.5\n [b964fa9f] LaTeXStrings v1.3.0\n [2ee39098] LabelledArrays v1.14.0\n [984bce1d] LambertW v0.4.6\n [23fbe1c1] Latexify v0.16.1\n [10f19ff3] LayoutPointers v0.1.14\n [50d2b5c4] Lazy v0.15.1\n [1d6d02ad] LeftChildRightSiblingTrees v0.2.0\n [d3d80556] LineSearches v7.2.0\n [7ed4a6bd] LinearSolve v2.9.2\n [2ab3a3ac] LogExpFunctions v0.3.26\n [e6f89c97] LoggingExtras v1.0.3\n [bdcacae8] LoopVectorization v0.12.165\n [10e44e05] MATLAB v0.8.4\n [e2752cbe] MATLABDiffEq v1.2.0\n [d8e11817] MLStyle v0.4.17\n [1914dd2f] MacroTools v0.5.11\n [d125e4d3] ManualMemory v0.1.8\n [739be429] MbedTLS v1.1.7\n [442fdcdd] Measures v0.3.2\n [e1d29d7a] Missings v1.1.0\n [961ee093] ModelingToolkit v8.72.2\n [46d2c3a1] MuladdMacro v0.2.4\n [102ac46a] MultivariatePolynomials v0.5.2\n [ffc61752] Mustache v1.0.17\n [d8a4904e] MutableArithmetics v1.3.3\n [d41bc354] NLSolversBase v7.8.3\n [2774e3e8] NLsolve v4.5.1\n [77ba4419] NaNMath v1.0.2\n [8913a72c] NonlinearSolve v2.2.1\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [6fd5a793] Octavian v0.3.27\n [6fe1bfb0] OffsetArrays v1.12.10\n [4d8831e6] OpenSSL v1.4.1\n [429524aa] Optim v1.7.8\n [bac558e1] OrderedCollections v1.6.2\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [90014a1f] PDMats v0.11.25\n [fe68d972] PSDMatrices v0.4.4\n [65ce6f38] PackageExtensionCompat v1.0.2\n [65888b18] ParameterizedFunctions v5.16.0\n [d96e819e] Parameters v0.12.3\n [69de0a69] Parsers v2.7.2\n [b98c9c47] Pipe v1.3.0\n [32113eaa] PkgBenchmark v0.2.12\n [ccf2f8ad] PlotThemes v3.1.0\n [995b91a9] PlotUtils v1.3.5\n [91a5bcdd] Plots v1.39.0\n [e409e4f3] PoissonRandom v0.4.4\n [f517fe37] Polyester v0.7.8\n [1d0040c9] PolyesterWeave v0.2.1\n⌅ [f27b6e38] Polynomials v3.2.13\n [2dfb63ee] PooledArrays v1.4.3\n [85a6dd25] PositiveFactorizations v0.2.4\n [d236fae5] PreallocationTools v0.4.12\n [aea7be01] PrecompileTools v1.2.0\n [21216c6a] Preferences v1.4.1\n [08abe8d2] PrettyTables v2.2.7\n [27ebfcd6] Primes v0.5.4\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [33c8b6b6] ProgressLogging v0.1.4\n [438e738f] PyCall v1.96.1\n [1fd47b50] QuadGK v2.9.1\n [6f49c342] RCall v0.13.18\n [74087812] Random123 v1.6.1\n [fb686558] RandomExtensions v0.4.4\n [e6cf234a] RandomNumbers v1.5.3\n [3cdcf5f2] RecipesBase v1.3.4\n [01d81517] RecipesPipeline v0.6.12\n [731186ca] RecursiveArrayTools v2.39.0\n [f2c3362d] RecursiveFactorization v0.2.20\n [189a3867] Reexport v1.2.2\n [05181044] RelocatableFolders v1.0.1\n [ae029012] Requires v1.3.0\n [ae5879a3] ResettableStacks v1.1.1\n [79098fc4] Rmath v0.7.1\n [47965b36] RootedTrees v2.19.2\n [7e49a35a] RuntimeGeneratedFunctions v0.5.12\n [fdea26ae] SIMD v3.4.5\n [94e857df] SIMDTypes v0.1.0\n [476501e8] SLEEFPirates v0.6.39\n [0bca4576] SciMLBase v2.4.0\n [e9a6253c] SciMLNLSolve v0.1.9\n [c0aeaf25] SciMLOperators v0.3.6\n [505e40e9] SciPyDiffEq v0.2.1\n [6c6a2e73] Scratch v1.2.0\n [91c51154] SentinelArrays v1.4.0\n [efcf1570] Setfield v1.1.1\n [1277b4bf] ShiftedArrays v2.0.0\n [992d4aef] Showoff v1.0.3\n [777ac1f9] SimpleBufferStream v1.1.0\n [727e6d20] SimpleNonlinearSolve v0.1.20\n [699a6c99] SimpleTraits v0.9.4\n [ce78b400] SimpleUnPack v1.1.0\n [66db9d55] SnoopPrecompile v1.0.3\n [b85f4697] SoftGlobalScope v1.1.0\n [a2af1166] SortingAlgorithms v1.1.1\n [47a9eef4] SparseDiffTools v2.8.0\n [e56a9233] Sparspak v0.3.9\n [276daf66] SpecialFunctions v2.3.1\n [928aab9d] SpecialMatrices v3.0.0\n [aedffcd0] Static v0.8.8\n [0d7ed370] StaticArrayInterface v1.4.1\n [90137ffa] StaticArrays v1.6.5\n [1e83bf80] StaticArraysCore v1.4.2\n [82ae8749] StatsAPI v1.7.0\n [2913bbd2] StatsBase v0.34.2\n [4c63d2b9] StatsFuns v1.3.0\n [3eaba693] StatsModels v0.7.3\n⌅ [7792a7ef] StrideArraysCore v0.4.17\n [69024149] StringEncodings v0.3.7\n [892a3eda] StringManipulation v0.3.4\n [09ab397b] StructArrays v0.6.16\n [c3572dad] Sundials v4.20.0\n [2efcf032] SymbolicIndexingInterface v0.2.2\n [d1185830] SymbolicUtils v1.4.0\n [0c5d862f] Symbolics v5.9.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.0\n [92b13dbe] TaylorIntegration v0.14.3\n [6aa5eb33] TaylorSeries v0.15.2\n [62fd8b95] TensorCore v0.1.1\n [5d786b92] TerminalLoggers v0.1.7\n [8290d209] ThreadingUtilities v0.5.2\n [a759f4b9] TimerOutputs v0.5.23\n [c751599d] ToeplitzMatrices v0.8.2\n [0796e94c] Tokenize v0.5.25\n [3bb67fe8] TranscodingStreams v0.9.13\n [a2a6695c] TreeViews v0.3.0\n [d5829a12] TriangularSolve v0.1.19\n [410a4b4d] Tricks v0.1.8\n [781d530d] TruncatedStacktraces v1.4.0\n [5c2747f8] URIs v1.5.0\n [3a884ed6] UnPack v1.0.2\n [1cfade01] UnicodeFun v0.4.1\n [1986cc42] Unitful v1.17.0\n [45397f5d] UnitfulLatexify v1.6.3\n [a7c27f48] Unityper v0.1.5\n [41fe7b60] Unzip v0.2.0\n [3d5dd08c] VectorizationBase v0.21.64\n [81def892] VersionParsing v1.3.0\n [19fa3120] VertexSafeGraphs v0.2.0\n [44d3d7a6] Weave v0.10.12\n [1b915085] WinReg v1.0.0\n [ddb6d928] YAML v0.4.9\n [c2297ded] ZMQ v1.2.2\n [700de1a5] ZygoteRules v0.2.3\n [0518478a] deSolveDiffEq v0.1.1\n [6e34b625] Bzip2_jll v1.0.8+0\n [83423d85] Cairo_jll v1.16.1+1\n [2702e6a9] EpollShim_jll v0.0.20230411+0\n [2e619515] Expat_jll v2.5.0+0\n⌃ [b22a6f82] FFMPEG_jll v4.4.2+2\n [f5851436] FFTW_jll v3.3.10+0\n [a3f928ae] Fontconfig_jll v2.13.93+0\n [d7e528f0] FreeType2_jll v2.13.1+0\n [559328eb] FriBidi_jll v1.0.10+0\n [0656b61e] GLFW_jll v3.3.8+0\n [d2c73de3] GR_jll v0.72.10+0\n [78b55507] Gettext_jll v0.21.0+0\n [7746bdde] Glib_jll v2.76.5+0\n [3b182d85] Graphite2_jll v1.3.14+0\n [2e76f6c2] HarfBuzz_jll v2.8.1+1\n [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0\n [aacddb02] JpegTurbo_jll v2.1.91+0\n [c1c5ebd0] LAME_jll v3.100.1+0\n [88015f11] LERC_jll v3.0.0+1\n [1d63c593] LLVMOpenMP_jll v15.0.4+0\n [aae0fff6] LSODA_jll v0.1.2+0\n [dd4b983a] LZO_jll v2.10.1+0\n⌅ [e9f186c6] Libffi_jll v3.2.2+1\n [d4300ac3] Libgcrypt_jll v1.8.7+0\n [7e76a0d4] Libglvnd_jll v1.6.0+0\n [7add5ba3] Libgpg_error_jll v1.42.0+0\n [94ce4f54] Libiconv_jll v1.17.0+0\n [4b2f31a3] Libmount_jll v2.35.0+0\n [89763e89] Libtiff_jll v4.5.1+1\n [38a345b3] Libuuid_jll v2.36.0+0\n [856f044c] MKL_jll v2023.2.0+0\n [c771fb93] ODEInterface_jll v0.0.1+0\n [e7412a2a] Ogg_jll v1.3.5+1\n⌅ [458c3c95] OpenSSL_jll v1.1.23+0\n [efe28fd5] OpenSpecFun_jll v0.5.5+0\n [91d4177d] Opus_jll v1.3.2+0\n [30392449] Pixman_jll v0.42.2+0\n [c0090381] Qt6Base_jll v6.5.2+2\n [f50d1b31] Rmath_jll v0.4.0+0\n⌅ [fb77eaff] Sundials_jll v5.2.1+0\n [a44049a8] Vulkan_Loader_jll v1.3.243+0\n [a2964d1f] Wayland_jll v1.21.0+1\n [2381bf8a] Wayland_protocols_jll v1.25.0+0\n [02c8fc9c] XML2_jll v2.11.5+0\n [aed1982a] XSLT_jll v1.1.34+0\n [ffd25f8a] XZ_jll v5.4.4+0\n [f67eecfb] Xorg_libICE_jll v1.0.10+1\n [c834827a] Xorg_libSM_jll v1.2.3+0\n [4f6342f7] Xorg_libX11_jll v1.8.6+0\n [0c0b7dd1] Xorg_libXau_jll v1.0.11+0\n [935fb764] Xorg_libXcursor_jll v1.2.0+4\n [a3789734] Xorg_libXdmcp_jll v1.1.4+0\n [1082639a] Xorg_libXext_jll v1.3.4+4\n [d091e8ba] Xorg_libXfixes_jll v5.0.3+4\n [a51aa0fd] Xorg_libXi_jll v1.7.10+4\n [d1454406] Xorg_libXinerama_jll v1.1.4+4\n [ec84b674] Xorg_libXrandr_jll v1.5.2+4\n [ea2f1a96] Xorg_libXrender_jll v0.9.10+4\n [14d82f49] Xorg_libpthread_stubs_jll v0.1.1+0\n [c7cfdc94] Xorg_libxcb_jll v1.15.0+0\n [cc61e674] Xorg_libxkbfile_jll v1.1.2+0\n [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0\n [12413925] Xorg_xcb_util_image_jll v0.4.0+1\n [2def613f] Xorg_xcb_util_jll v0.4.0+1\n [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1\n [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1\n [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1\n [35661453] Xorg_xkbcomp_jll v1.4.6+0\n [33bec58e] Xorg_xkeyboard_config_jll v2.39.0+0\n [c5fb5394] Xorg_xtrans_jll v1.5.0+0\n [8f1865be] ZeroMQ_jll v4.3.4+0\n [3161d3a3] Zstd_jll v1.5.5+0\n [35ca27e7] eudev_jll v3.2.9+0\n⌅ [214eeab7] fzf_jll v0.29.0+0\n [1a1c6b14] gperf_jll v3.1.1+0\n [a4ae2306] libaom_jll v3.4.0+0\n [0ac62f75] libass_jll v0.15.1+0\n [2db6ffa8] libevdev_jll v1.11.0+0\n [f638f0a6] libfdk_aac_jll v2.0.2+0\n [36db933b] libinput_jll v1.18.0+0\n [b53b4c65] libpng_jll v1.6.38+0\n [a9144af2] libsodium_jll v1.0.20+0\n [f27f6e37] libvorbis_jll v1.3.7+1\n [009596ad] mtdev_jll v1.1.6+0\n [1270edf5] x264_jll v2021.5.5+0\n [dfaa095f] x265_jll v3.5.0+0\n [d8fb68d0] xkbcommon_jll v1.4.1+1\n [0dad84c5] ArgTools v1.1.1\n [56f22d72] Artifacts\n [2a0f44e3] Base64\n [ade2ca70] Dates\n [8ba89e20] Distributed\n [f43a241f] Downloads v1.6.0\n [7b1f6079] FileWatching\n [9fa8497b] Future\n [b77e0a4c] InteractiveUtils\n [4af54fe1] LazyArtifacts\n [b27032c2] LibCURL v0.6.3\n [76f85450] LibGit2\n [8f399da3] Libdl\n [37e2e46d] LinearAlgebra\n [56ddb016] Logging\n [d6f4376e] Markdown\n [a63ad114] Mmap\n [ca575930] NetworkOptions v1.2.0\n [44cfe95a] Pkg v1.9.2\n [de0858da] Printf\n [9abbd945] Profile\n [3fa0cd96] REPL\n [9a3f8284] Random\n [ea8e919c] SHA v0.7.0\n [9e88b42a] Serialization\n [1a1011a3] SharedArrays\n [6462fe0b] Sockets\n [2f01184e] SparseArrays\n [10745b16] Statistics v1.9.0\n [4607b0f0] SuiteSparse\n [fa267f1f] TOML v1.0.3\n [a4e569a6] Tar v1.10.0\n [8dfed614] Test\n [cf7118a7] UUIDs\n [4ec0a83e] Unicode\n [e66e0078] CompilerSupportLibraries_jll v1.0.5+0\n [deac9b47] LibCURL_jll v7.84.0+0\n [29816b5a] LibSSH2_jll v1.10.2+0\n [c8ffd9c3] MbedTLS_jll v2.28.2+0\n [14a3606d] MozillaCACerts_jll v2022.10.11\n [4536629a] OpenBLAS_jll v0.3.21+4\n [05823500] OpenLibm_jll v0.8.1+0\n [efcefdf7] PCRE2_jll v10.42.0+0\n [bea87d4a] SuiteSparse_jll v5.10.1+6\n [83775a58] Zlib_jll v1.2.13+0\n [8e850b90] libblastrampoline_jll v5.8.0+0\n [8e850ede] nghttp2_jll v1.48.0+0\n [3f19e933] p7zip_jll v17.4.0+0\nInfo Packages marked with ⌃ and ⌅ have new versions available, but those wi\nth ⌅ are restricted by compatibility constraints from upgrading. To see why\n use `status --outdated -m`","category":"page"},{"location":"filtering/#Gaussian-Filtering-and-Smoothing","page":"Filtering and Smoothing","title":"Gaussian Filtering and Smoothing","text":"","category":"section"},{"location":"filtering/#Predict","page":"Filtering and Smoothing","title":"Predict","text":"","category":"section"},{"location":"filtering/","page":"Filtering and Smoothing","title":"Filtering and Smoothing","text":"ProbNumDiffEq.predict\nProbNumDiffEq.predict!","category":"page"},{"location":"filtering/#ProbNumDiffEq.predict","page":"Filtering and Smoothing","title":"ProbNumDiffEq.predict","text":"predict(x::Gaussian, A::AbstractMatrix, Q::AbstractMatrix)\n\nPrediction step in Kalman filtering for linear dynamics models.\n\nGiven a Gaussian x = mathcalN(μ Σ), compute and return mathcalN(A μ A Σ A^T + Q).\n\nSee also the non-allocating square-root version predict!.\n\n\n\n\n\n","category":"function"},{"location":"filtering/#ProbNumDiffEq.predict!","page":"Filtering and Smoothing","title":"ProbNumDiffEq.predict!","text":"predict!(x_out, x_curr, Ah, Qh, cachemat)\n\nIn-place and square-root implementation of predict which saves the result into x_out.\n\nOnly works with PSDMatrices.PSDMatrix types as Ah, Qh, and in the covariances of x_curr and x_out (both of type Gaussian). To prevent allocations, a cache matrix cachemat of size D times 2D (where D times D is the size of Ah and Qh) needs to be passed.\n\nSee also: predict.\n\n\n\n\n\n","category":"function"},{"location":"filtering/#Update","page":"Filtering and Smoothing","title":"Update","text":"","category":"section"},{"location":"filtering/","page":"Filtering and Smoothing","title":"Filtering and Smoothing","text":"ProbNumDiffEq.update\nProbNumDiffEq.update!","category":"page"},{"location":"filtering/#ProbNumDiffEq.update","page":"Filtering and Smoothing","title":"ProbNumDiffEq.update","text":"update(x, measurement, H)\n\nUpdate step in Kalman filtering for linear dynamics models.\n\nGiven a Gaussian x = mathcalN(μ Σ) and a measurement z = mathcalN(hatz S), with S = H Σ H^T, compute\n\nbeginaligned\nK = Σ^P H^T S^-1 \nμ^F = μ + K (0 - hatz) \nΣ^F = Σ - K S K^T\nendaligned\n\nand return an updated state \\mathcal{N}(μ^F, Σ^F). Note that this assumes zero-measurements. When called with ProbNumDiffEq.SquarerootMatrix type arguments it performs the update in Joseph / square-root form.\n\nFor better performance, we recommend to use the non-allocating update!.\n\n\n\n\n\n","category":"function"},{"location":"filtering/#ProbNumDiffEq.update!","page":"Filtering and Smoothing","title":"ProbNumDiffEq.update!","text":"update!(x_out, x_pred, measurement, H, K_cache, M_cache, S_cache)\n\nIn-place and square-root implementation of update which saves the result into x_out.\n\nImplemented in Joseph Form to retain the PSDMatrix covariances:\n\nbeginaligned\nK = Σ^P H^T S^-1 \nμ^F = μ + K (0 - hatz) \nsqrtΣ^F = (I - KH) sqrt(Σ)\nendaligned\n\nwhere sqrtM denotes the left square-root of a matrix M, i.e. M = sqrtM sqrtM^T.\n\nTo prevent allocations, write into caches K_cache and M_cache, both of size D × D, and S_cache of same type as measurement.Σ.\n\nSee also: update.\n\n\n\n\n\n","category":"function"},{"location":"filtering/#Smooth","page":"Filtering and Smoothing","title":"Smooth","text":"","category":"section"},{"location":"filtering/","page":"Filtering and Smoothing","title":"Filtering and Smoothing","text":"ProbNumDiffEq.smooth\nProbNumDiffEq.smooth!","category":"page"},{"location":"filtering/#ProbNumDiffEq.smooth","page":"Filtering and Smoothing","title":"ProbNumDiffEq.smooth","text":"smooth(x_curr, x_next_smoothed, A, Q)\n\nUpdate step of the Kalman smoother, aka. Rauch-Tung-Striebel smoother, for linear dynamics models.\n\nGiven Gaussians x_n = mathcalN(μ_n Σ_n) and x_n+1 = mathcalN(μ_n+1^S Σ_n+1^S), compute\n\nbeginaligned\nμ_n+1^P = A μ_n^F \nP_n+1^P = A Σ_n^F A + Q \nG = Σ_n^S A^T (Σ_n+1^P)^-1 \nμ_n^S = μ_n^F + G (μ_n+1^S - μ_n+1^P) \nΣ_n^S = (I - G A) Σ_n^F (I - G A)^T + G Q G^T + G Σ_n+1^S G^T\nendaligned\n\nand return a smoothed state \\mathcal{N}(μ_n^S, Σ_n^S). When called with ProbNumDiffEq.SquarerootMatrix type arguments it performs the update in Joseph / square-root form.\n\nFor better performance, we recommend to use the non-allocating smooth!.\n\n\n\n\n\n","category":"function"},{"location":"filtering/#ProbNumDiffEq.smooth!","page":"Filtering and Smoothing","title":"ProbNumDiffEq.smooth!","text":"smooth!(x_curr, x_next, Ah, Qh, cache, diffusion=1)\n\nIn-place and square-root implementation of smooth which overwrites x_curr.\n\nImplemented in Joseph form to preserve square-root structure. It requires access to the solvers cache to prevent allocations.\n\nSee also: smooth.\n\n\n\n\n\n","category":"function"},{"location":"solvers/#Solvers","page":"Solvers","title":"Solvers","text":"","category":"section"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"ProbNumDiffEq.jl provides two solvers: the EK1 and the EK0. Both based on extended Kalman filtering and smoothing, but the latter relies on evaluating the Jacobian of the vector field. For the best results, use the EK1.","category":"page"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"All solvers are compatible with DAEs in mass-matrix ODE form. They also specialize on second-order ODEs: If the problem is of type SecondOrderODEProblem, it solves the second-order problem directly; this is more efficient than solving the transformed first-order problem and provides more meaningful posteriors [1].","category":"page"},{"location":"solvers/#API","page":"Solvers","title":"API","text":"","category":"section"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"EK1\nEK0","category":"page"},{"location":"solvers/#ProbNumDiffEq.EK1","page":"Solvers","title":"ProbNumDiffEq.EK1","text":"EK1(; order=3,\n smooth=true,\n prior=IWP(order),\n diffusionmodel=DynamicDiffusion(),\n initialization=TaylorModeInit(),\n kwargs...)\n\nGaussian ODE filter with first-order vector field linearization.\n\nArguments\n\norder::Integer: Order of the integrated Wiener process (IWP) prior.\nsmooth::Bool: Turn smoothing on/off; smoothing is required for dense output.\nprior::AbstractODEFilterPrior: Prior to be used by the ODE filter. By default, uses a 3-times integrated Wiener process prior IWP(3). See also: Priors.\ndiffusionmodel::ProbNumDiffEq.AbstractDiffusion: See Diffusion models and calibration.\ninitialization::ProbNumDiffEq.InitializationScheme: See Initialization.\n\nSome additional kwargs relating to implicit solvers are supported; check out DifferentialEquations.jl's Extra Options page. Right now, we support autodiff, chunk_size, and diff_type. In particular, autodiff=false can come in handy to use finite differences instead of ForwardDiff.jl to compute Jacobians.\n\nExamples\n\njulia> solve(prob, EK1())\n\nReferences\n\n\n\n\n\n","category":"type"},{"location":"solvers/#ProbNumDiffEq.EK0","page":"Solvers","title":"ProbNumDiffEq.EK0","text":"EK0(; order=3,\n smooth=true,\n prior=IWP(order),\n diffusionmodel=DynamicDiffusion(),\n initialization=TaylorModeInit())\n\nGaussian ODE filter with zeroth-order vector field linearization.\n\nArguments\n\norder::Integer: Order of the integrated Wiener process (IWP) prior.\nsmooth::Bool: Turn smoothing on/off; smoothing is required for dense output.\nprior::AbstractODEFilterPrior: Prior to be used by the ODE filter. By default, uses a 3-times integrated Wiener process prior IWP(3). See also: Priors.\ndiffusionmodel::ProbNumDiffEq.AbstractDiffusion: See Diffusion models and calibration.\ninitialization::ProbNumDiffEq.InitializationScheme: See Initialization.\n\nExamples\n\njulia> solve(prob, EK0())\n\nReferences\n\n\n\n\n\n","category":"type"},{"location":"solvers/#Probabilistic-Exponential-Integrators","page":"Solvers","title":"Probabilistic Exponential Integrators","text":"","category":"section"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"ExpEK\nRosenbrockExpEK","category":"page"},{"location":"solvers/#ProbNumDiffEq.ExpEK","page":"Solvers","title":"ProbNumDiffEq.ExpEK","text":"ExpEK(; L, order=3, kwargs...)\n\nProbabilistic exponential integrator\n\nProbabilistic exponential integrators are a class of integrators for semi-linear stiff ODEs that provide improved stability by essentially solving the linear part of the ODE exactly. In probabilistic numerics, this amounts to including the linear part into the prior model of the solver.\n\nExpEK is therefore just a short-hand for EK0 with IOUP prior:\n\nExpEK(; order=3, L, kwargs...) = EK0(; prior=IOUP(order, L), kwargs...)\n\nSee also RosenbrockExpEK, EK0, EK1.\n\nArguments\n\nSee EK0 for available keyword arguments.\n\nExamples\n\njulia> prob = ODEProblem((du, u, p, t) -> (@. du = - u + sin(u)), [1.0], (0.0, 10.0))\njulia> solve(prob, ExpEK(L=-1))\n\nReference\n\n[2] Bosch et al, \"Probabilistic Exponential Integrators\", arXiv (2021)\n\n\n\n\n\n","category":"function"},{"location":"solvers/#ProbNumDiffEq.RosenbrockExpEK","page":"Solvers","title":"ProbNumDiffEq.RosenbrockExpEK","text":"RosenbrockExpEK(; order=3, kwargs...)\n\nProbabilistic Rosenbrock-type exponential integrator\n\nA probabilistic exponential integrator similar to ExpEK, but with automatic linearization along the mean numerical solution. This brings the advantage that the linearity does not need to be specified manually, and the more accurate local linearization can sometimes also improve stability; but since the \"prior\" is adjusted at each step the probabilistic interpretation becomes more complicated.\n\nRosenbrockExpEK is just a short-hand for EK1 with appropriete IOUP prior:\n\nRosenbrockExpEK(; order=3, kwargs...) = EK1(; prior=IOUP(order, update_rate_parameter=true), kwargs...)\n\nSee also ExpEK, EK0, EK1.\n\nArguments\n\nSee EK1 for available keyword arguments.\n\nExamples\n\njulia> prob = ODEProblem((du, u, p, t) -> (@. du = - u + sin(u)), [1.0], (0.0, 10.0))\njulia> solve(prob, RosenbrockExpEK())\n\nReference\n\n[2] Bosch et al, \"Probabilistic Exponential Integrators\", arXiv (2021)\n\n\n\n\n\n","category":"function"},{"location":"solvers/#solversrefs","page":"Solvers","title":"References","text":"","category":"section"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"
[2]
\n
\n
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
\n
\n
","category":"page"},{"location":"tutorials/exponential_integrators/#Probabilistic-Exponential-Integrators","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"","category":"section"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"Exponential integrators are a class of numerical methods for solving semi-linear ordinary differential equations (ODEs) of the form","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"beginaligned\ndoty(t) = L y(t) + f(y(t) t) quad y(0) = y_0\nendaligned","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"where L is a linear operator and f is a nonlinear function. In a nutshell, exponential integrators solve the linear part of the ODE exactly, and only approximate the nonlinear part. Probabilistic exponential integrators [2] are the probabilistic numerics approach to exponential integrators.","category":"page"},{"location":"tutorials/exponential_integrators/#Example","page":"Probabilistic Exponential Integrators","title":"Example","text":"","category":"section"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"Let's consider a simple semi-linear ODE","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"beginaligned\ndoty(t) = - y(t) + sin(y(t)) quad y(0) = 10\nendaligned","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"We can solve this ODE reasonably well with the standard EK1 and adaptive steps (the default):","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"using ProbNumDiffEq, Plots, LinearAlgebra\ntheme(:default; palette=[\"#4063D8\", \"#389826\", \"#9558B2\", \"#CB3C33\"])\n\nf(du, u, p, t) = (@. du = -u + sin(u))\nu0 = [1.0]\ntspan = (0.0, 20.0)\nprob = ODEProblem(f, u0, tspan)\n\nref = solve(prob, EK1(), abstol=1e-10, reltol=1e-10)\nplot(ref, color=:black, linestyle=:dash, label=\"Reference\")","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"But for fixed (large) step sizes this ODE is more challenging: The explicit EK0 method oscillates and diverges due to the stiffness of the ODE, and the semi-implicit EK1 method is stable but the solution is not very accurate.","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"STEPSIZE = 4\nDM = FixedDiffusion() # recommended for fixed steps\n\n# we don't smooth the EK0 here to show the oscillations more clearly\nsol0 = solve(prob, EK0(smooth=false, diffusionmodel=DM), adaptive=false, dt=STEPSIZE, dense=false)\nsol1 = solve(prob, EK1(diffusionmodel=DM), adaptive=false, dt=STEPSIZE)\n\nplot(ylims=(0.3, 1.05))\nplot!(ref, color=:black, linestyle=:dash, label=\"Reference\")\nplot!(sol0, denseplot=false, marker=:o, markersize=2, label=\"EK0\", color=1)\nplot!(sol1, denseplot=false, marker=:o, markersize=2, label=\"EK1\", color=2)","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"Probabilistic exponential integrators leverage the semi-linearity of the ODE to compute more accurate solutions for the same fixed step size. You can use either the ExpEK method and provide the linear part (with the keyword argument L), or the RosenbrockExpEK to automatically linearize along the mean of the numerical solution:","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"sol_exp = solve(prob, ExpEK(L=-1, diffusionmodel=DM), adaptive=false, dt=STEPSIZE)\nsol_ros = solve(prob, RosenbrockExpEK(diffusionmodel=DM), adaptive=false, dt=STEPSIZE)\n\nplot(ylims=(0.3, 1.05))\nplot!(ref, color=:black, linestyle=:dash, label=\"Reference\")\nplot!(sol_exp, denseplot=false, marker=:o, markersize=2, label=\"ExpEK\", color=3)\nplot!(sol_ros, denseplot=false, marker=:o, markersize=2, label=\"RosenbrockExpEK\", color=4)","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"The solutions are indeed much more accurate than those of the standard EK1, for the same fixed step size!","category":"page"},{"location":"tutorials/exponential_integrators/#Background:-Integrated-Ornstein-Uhlenbeck-priors","page":"Probabilistic Exponential Integrators","title":"Background: Integrated Ornstein-Uhlenbeck priors","text":"","category":"section"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"Probabilistic exponential integrators \"solve the linear part exactly\" by including it into the prior model of the solver. Namely, the solver chooses a (q-times) integrated Ornstein-Uhlenbeck prior with rate parameter equal to the linearity. The ExpEK solver is just a short-hand for an EK0 with appropriate prior:","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"ExpEK(order=3, L=-1) == EK0(prior=IOUP(3, -1))","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"Similarly, the RosenbrockExpEK solver is also just a short-hand:","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"RosenbrockExpEK(order=3) == EK1(prior=IOUP(3, update_rate_parameter=true))","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"This means that you can also construct other probabilistic exponential integrators by hand! In this example the EK1 with IOUP prior with rate parameter -1 performs extremely well:","category":"page"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"sol_expek1 = solve(prob, EK1(prior=IOUP(3, -1), diffusionmodel=DM), adaptive=false, dt=STEPSIZE)\n\nplot(ylims=(0.3, 1.05))\nplot!(ref, color=:black, linestyle=:dash, label=\"Reference\")\nplot!(sol_expek1, denseplot=false, marker=:o, markersize=2, label=\"EK1 + IOUP\")","category":"page"},{"location":"tutorials/exponential_integrators/#References","page":"Probabilistic Exponential Integrators","title":"References","text":"","category":"section"},{"location":"tutorials/exponential_integrators/","page":"Probabilistic Exponential Integrators","title":"Probabilistic Exponential Integrators","text":"
[2]
\n
\n
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
\n
\n
","category":"page"},{"location":"benchmarks/lotkavolterra/#Lotka-Volterra-benchmark","page":"Non-stiff ODE: Lotka-Volterra","title":"Lotka-Volterra benchmark","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Adapted from SciMLBenchmarks.jl.","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"using LinearAlgebra, Statistics\nusing DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Plots\nusing ProbNumDiffEq\n\n# Plotting theme\ntheme(:dao;\n markerstrokewidth=0.5,\n legend=:outertopright,\n bottom_margin=5Plots.mm,\n size = (1000, 400),\n)","category":"page"},{"location":"benchmarks/lotkavolterra/#Lotka-Volterra-problem-definition","page":"Non-stiff ODE: Lotka-Volterra","title":"Lotka-Volterra problem definition","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"f = @ode_def LotkaVolterra begin\n dx = a*x - b*x*y\n dy = -c*y + d*x*y\nend a b c d\np = [1.5, 1, 3, 1]\ntspan = (0.0, 10.0)\nu0 = [1.0, 1.0]\nprob = ODEProblem{true, SciMLBase.FullSpecialize}(f, u0, tspan, p)\n\ntest_sol = solve(prob, Vern7(), abstol=1/10^14, reltol=1/10^14, dense=false)\nplot(test_sol, title=\"Lotka-Volterra Solution\", legend=false)","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#EK0-accross-orders","page":"Non-stiff ODE: Lotka-Volterra","title":"EK0 accross orders","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK0(order=$order)\" => Dict(:alg => EK0(order=order, smooth=DENSE))\n for order in 1:7\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:13)\nreltols = 1.0 ./ 10.0 .^ (1:10)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, palette=Plots.palette([:blue, :red], length(_setups)), xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#EK1-accross-orders","page":"Non-stiff ODE: Lotka-Volterra","title":"EK1 accross orders","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1(order=$order)\" => Dict(:alg => EK1(order=order, smooth=DENSE))\n for order in 1:7\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:13)\nreltols = 1.0 ./ 10.0 .^ (1:10)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, palette=Plots.palette([:blue, :red], length(_setups)), xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#EK0-vs.-EK1","page":"Non-stiff ODE: Lotka-Volterra","title":"EK0 vs. EK1","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK0(order=2)\" => Dict(:alg => EK0(order=2, smooth=DENSE))\n \"EK0(order=3)\" => Dict(:alg => EK0(order=3, smooth=DENSE))\n \"EK0(order=4)\" => Dict(:alg => EK0(order=4, smooth=DENSE))\n \"EK0(order=5)\" => Dict(:alg => EK0(order=5, smooth=DENSE))\n \"EK1(order=2)\" => Dict(:alg => EK1(order=2, smooth=DENSE))\n \"EK1(order=3)\" => Dict(:alg => EK1(order=3, smooth=DENSE))\n \"EK1(order=4)\" => Dict(:alg => EK1(order=4, smooth=DENSE))\n \"EK1(order=5)\" => Dict(:alg => EK1(order=5, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:14)\nreltols = 1.0 ./ 10.0 .^ (1:11)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, color=[1 1 1 1 2 2 2 2], xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#DynamicDiffusion-vs-FixedDiffusion","page":"Non-stiff ODE: Lotka-Volterra","title":"DynamicDiffusion vs FixedDiffusion","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1(2) dynamic\" => Dict(:alg => EK1(order=2, smooth=DENSE, diffusionmodel=DynamicDiffusion()))\n \"EK1(3) dynamic\" => Dict(:alg => EK1(order=3, smooth=DENSE, diffusionmodel=DynamicDiffusion()))\n \"EK1(5) dynamic\" => Dict(:alg => EK1(order=5, smooth=DENSE, diffusionmodel=DynamicDiffusion()))\n \"EK1(2) fixed\" => Dict(:alg => EK1(order=2, smooth=DENSE, diffusionmodel=FixedDiffusion()))\n \"EK1(3) fixed\" => Dict(:alg => EK1(order=3, smooth=DENSE, diffusionmodel=FixedDiffusion()))\n \"EK1(5) fixed\" => Dict(:alg => EK1(order=5, smooth=DENSE, diffusionmodel=FixedDiffusion()))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:15)\nreltols = 1.0 ./ 10.0 .^ (1:12)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, color=[2 2 2 3 3 3], xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#TaylorModeInit-vs-ClassicSolverInit","page":"Non-stiff ODE: Lotka-Volterra","title":"TaylorModeInit vs ClassicSolverInit","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK1(2) TaylorInit\" => Dict(:alg => EK1(order=2, smooth=DENSE, initialization=TaylorModeInit()))\n \"EK1(3) TaylorInit\" => Dict(:alg => EK1(order=3, smooth=DENSE, initialization=TaylorModeInit()))\n \"EK1(5) TaylorInit\" => Dict(:alg => EK1(order=5, smooth=DENSE, initialization=TaylorModeInit()))\n \"EK1(2) Tsit5Init\" => Dict(:alg => EK1(order=2, smooth=DENSE, initialization=ClassicSolverInit()))\n \"EK1(3) Tsit5Init\" => Dict(:alg => EK1(order=3, smooth=DENSE, initialization=ClassicSolverInit()))\n \"EK1(5) Tsit5Init\" => Dict(:alg => EK1(order=5, smooth=DENSE, initialization=ClassicSolverInit()))\n \"EK1(2) Tsit5Init+ddu\" => Dict(:alg => EK1(order=2, smooth=DENSE, initialization=ClassicSolverInit(init_on_ddu=true)))\n \"EK1(3) Tsit5Init+ddu\" => Dict(:alg => EK1(order=3, smooth=DENSE, initialization=ClassicSolverInit(init_on_ddu=true)))\n \"EK1(5) Tsit5Init+ddu\" => Dict(:alg => EK1(order=5, smooth=DENSE, initialization=ClassicSolverInit(init_on_ddu=true)))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:15)\nreltols = 1.0 ./ 10.0 .^ (1:12)\n\nwp = WorkPrecisionSet(\n prob, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = test_sol,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, color=[2 2 2 4 4 4 5 5 5], xticks = 10.0 .^ (-16:1:5))","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"(Image: )","category":"page"},{"location":"benchmarks/lotkavolterra/#Conclusion","page":"Non-stiff ODE: Lotka-Volterra","title":"Conclusion","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Use the EK1! It seems to be strictly better than the EK0 here. Though note that by using ParameterizedFunctions.jl, the Jacobian of the vector field is available analytically.\nOrders behave as in classic solvers: Use low order for low accuracy, medium order for medium accuracy, high order for high accuracy.\nMost likely, the default choice of diffusionmodel=DynamicDiffusion and initialization=TaylorModeInit are fine.","category":"page"},{"location":"benchmarks/lotkavolterra/#Appendix","page":"Non-stiff ODE: Lotka-Volterra","title":"Appendix","text":"","category":"section"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Computer information:","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"using InteractiveUtils\nInteractiveUtils.versioninfo()","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Julia Version 1.9.3\nCommit bed2cd540a1 (2023-08-24 14:43 UTC)\nBuild Info:\n Official https://julialang.org/ release\nPlatform Info:\n OS: Linux (x86_64-linux-gnu)\n CPU: 12 × Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz\n WORD_SIZE: 64\n LIBM: libopenlibm\n LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)\n Threads: 12 on 12 virtual cores\nEnvironment:\n JULIA_NUM_THREADS = auto\n JULIA_STACKTRACE_MINIMAL = true","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Package Information:","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"using Pkg\nPkg.status()","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml`\n [f3b72e0c] DiffEqDevTools v2.39.0\n [7073ff75] IJulia v1.24.2\n [7f56f5a3] LSODA v0.7.5\n [e6f89c97] LoggingExtras v1.0.3\n [e2752cbe] MATLABDiffEq v1.2.0\n [961ee093] ModelingToolkit v8.72.2\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [65888b18] ParameterizedFunctions v5.16.0\n [91a5bcdd] Plots v1.39.0\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [0bca4576] SciMLBase v2.4.0\n [505e40e9] SciPyDiffEq v0.2.1\n [90137ffa] StaticArrays v1.6.5\n [c3572dad] Sundials v4.20.0\n [44d3d7a6] Weave v0.10.12\n [0518478a] deSolveDiffEq v0.1.1","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"And the full manifest:","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Pkg.status(mode=Pkg.PKGMODE_MANIFEST)","category":"page"},{"location":"benchmarks/lotkavolterra/","page":"Non-stiff ODE: Lotka-Volterra","title":"Non-stiff ODE: Lotka-Volterra","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml`\n [47edcb42] ADTypes v0.2.4\n⌅ [c3fe647b] AbstractAlgebra v0.32.5\n [621f4979] AbstractFFTs v1.5.0\n [1520ce14] AbstractTrees v0.4.4\n [79e6a3ab] Adapt v3.6.2\n [ec485272] ArnoldiMethod v0.2.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.5\n [d1d4a3ce] BitFlags v0.1.7\n [62783981] BitTwiddlingConvenienceFunctions v0.1.5\n⌅ [fa961155] CEnum v0.4.2\n [2a0fbf3d] CPUSummary v0.2.4\n [00ebfdb7] CSTParser v3.3.6\n [49dc2e85] Calculus v0.5.1\n [324d7699] CategoricalArrays v0.10.8\n [d360d2e6] ChainRulesCore v1.16.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.2\n [35d6a980] ColorSchemes v3.24.0\n [3da002f7] ColorTypes v0.11.4\n [c3611d14] ColorVectorSpace v0.10.0\n [5ae59095] Colors v0.12.10\n [861a8166] Combinatorics v1.0.2\n [a80b9123] CommonMark v0.8.12\n [38540f10] CommonSolve v0.2.4\n [bbf7d656] CommonSubexpressions v0.3.0\n [34da2185] Compat v4.10.0\n [b152e2b5] CompositeTypes v0.1.3\n [2569d6c7] ConcreteStructs v0.2.3\n [f0e56b4a] ConcurrentUtilities v2.2.1\n [8f4d0f93] Conda v1.9.1\n [187b0558] ConstructionBase v1.5.4\n [d38c429a] Contour v0.6.2\n [adafc99b] CpuId v0.3.1\n [a8cc5b0e] Crayons v4.1.1\n [717857b8] DSP v0.7.9\n [9a962f9c] DataAPI v1.15.0\n [a93c6f00] DataFrames v1.6.1\n [864edb3b] DataStructures v0.18.15\n [e2d170a0] DataValueInterfaces v1.0.0\n [8bb1440f] DelimitedFiles v1.9.1\n [2b5f629d] DiffEqBase v6.133.1\n [459566f4] DiffEqCallbacks v2.33.0\n [f3b72e0c] DiffEqDevTools v2.39.0\n [77a26b50] DiffEqNoiseProcess v5.19.0\n [163ba53b] DiffResults v1.1.0\n [b552c78f] DiffRules v1.15.1\n [b4f34e82] Distances v0.10.10\n [31c24e10] Distributions v0.25.102\n [ffbed154] DocStringExtensions v0.9.3\n⌅ [5b8099bc] DomainSets v0.6.7\n [fa6b7ba4] DualNumbers v0.6.8\n [7c1d4256] DynamicPolynomials v0.5.3\n [b305315f] Elliptic v1.0.1\n [4e289a0a] EnumX v1.0.4\n [f151be2c] EnzymeCore v0.6.1\n [6912e4f1] Espresso v0.6.1\n [460bff9d] ExceptionUnwrapping v0.1.9\n [d4d017d3] ExponentialUtilities v1.25.0\n [e2ba6199] ExprTools v0.1.10\n [c87230d0] FFMPEG v0.4.1\n [7a1cc6ca] FFTW v1.7.1\n [7034ab61] FastBroadcast v0.2.7\n [9aa1b823] FastClosures v0.3.2\n [442a2c76] FastGaussQuadrature v1.0.0\n [29a986be] FastLapackInterface v2.0.0\n [1a297f60] FillArrays v1.6.1\n [6a86dc24] FiniteDiff v2.21.1\n [53c48c17] FixedPointNumbers v0.8.4\n [59287772] Formatting v0.4.2\n [f6369f11] ForwardDiff v0.10.36\n [069b7b12] FunctionWrappers v1.1.3\n [77dc65aa] FunctionWrappersWrappers v0.1.3\n [d9f16b24] Functors v0.4.5\n [46192b85] GPUArraysCore v0.1.5\n [28b8d3ca] GR v0.72.10\n [43dcc890] GaussianDistributions v0.5.2\n [c145ed77] GenericSchur v0.5.3\n [c27321d9] Glob v1.3.1\n [86223c79] Graphs v1.9.0\n [42e2da0e] Grisu v1.0.2\n [0b43b601] Groebner v0.4.4\n [d5909c97] GroupsCore v0.4.0\n [cd3eb016] HTTP v1.10.0\n [eafb193a] Highlights v0.5.2\n [3e5b6fbb] HostCPUFeatures v0.1.16\n [34004b35] HypergeometricFunctions v0.3.23\n [7073ff75] IJulia v1.24.2\n [615f187c] IfElse v0.1.1\n [d25df0c9] Inflate v0.1.4\n [842dd82b] InlineStrings v1.4.0\n [18e54dd8] IntegerMathUtils v0.1.2\n [8197267c] IntervalSets v0.7.7\n [41ab1584] InvertedIndices v1.3.0\n [92d709cd] IrrationalConstants v0.2.2\n [c8e1da08] IterTools v1.8.0\n [82899510] IteratorInterfaceExtensions v1.0.0\n [1019f520] JLFzf v0.1.5\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.39\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [ba0b0d4f] Krylov v0.9.4\n [7f56f5a3] LSODA v0.7.5\n [b964fa9f] LaTeXStrings v1.3.0\n [2ee39098] LabelledArrays v1.14.0\n [984bce1d] LambertW v0.4.6\n [23fbe1c1] Latexify v0.16.1\n [10f19ff3] LayoutPointers v0.1.14\n [50d2b5c4] Lazy v0.15.1\n [1d6d02ad] LeftChildRightSiblingTrees v0.2.0\n [d3d80556] LineSearches v7.2.0\n [7ed4a6bd] LinearSolve v2.9.2\n [2ab3a3ac] LogExpFunctions v0.3.26\n [e6f89c97] LoggingExtras v1.0.3\n [bdcacae8] LoopVectorization v0.12.165\n [10e44e05] MATLAB v0.8.4\n [e2752cbe] MATLABDiffEq v1.2.0\n [d8e11817] MLStyle v0.4.17\n [1914dd2f] MacroTools v0.5.11\n [d125e4d3] ManualMemory v0.1.8\n [739be429] MbedTLS v1.1.7\n [442fdcdd] Measures v0.3.2\n [e1d29d7a] Missings v1.1.0\n [961ee093] ModelingToolkit v8.72.2\n [46d2c3a1] MuladdMacro v0.2.4\n [102ac46a] MultivariatePolynomials v0.5.2\n [ffc61752] Mustache v1.0.17\n [d8a4904e] MutableArithmetics v1.3.3\n [d41bc354] NLSolversBase v7.8.3\n [2774e3e8] NLsolve v4.5.1\n [77ba4419] NaNMath v1.0.2\n [8913a72c] NonlinearSolve v2.2.1\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [6fd5a793] Octavian v0.3.27\n [6fe1bfb0] OffsetArrays v1.12.10\n [4d8831e6] OpenSSL v1.4.1\n [429524aa] Optim v1.7.8\n [bac558e1] OrderedCollections v1.6.2\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [90014a1f] PDMats v0.11.25\n [fe68d972] PSDMatrices v0.4.4\n [65ce6f38] PackageExtensionCompat v1.0.2\n [65888b18] ParameterizedFunctions v5.16.0\n [d96e819e] Parameters v0.12.3\n [69de0a69] Parsers v2.7.2\n [b98c9c47] Pipe v1.3.0\n [32113eaa] PkgBenchmark v0.2.12\n [ccf2f8ad] PlotThemes v3.1.0\n [995b91a9] PlotUtils v1.3.5\n [91a5bcdd] Plots v1.39.0\n [e409e4f3] PoissonRandom v0.4.4\n [f517fe37] Polyester v0.7.8\n [1d0040c9] PolyesterWeave v0.2.1\n⌅ [f27b6e38] Polynomials v3.2.13\n [2dfb63ee] PooledArrays v1.4.3\n [85a6dd25] PositiveFactorizations v0.2.4\n [d236fae5] PreallocationTools v0.4.12\n [aea7be01] PrecompileTools v1.2.0\n [21216c6a] Preferences v1.4.1\n [08abe8d2] PrettyTables v2.2.7\n [27ebfcd6] Primes v0.5.4\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [33c8b6b6] ProgressLogging v0.1.4\n [438e738f] PyCall v1.96.1\n [1fd47b50] QuadGK v2.9.1\n [6f49c342] RCall v0.13.18\n [74087812] Random123 v1.6.1\n [fb686558] RandomExtensions v0.4.4\n [e6cf234a] RandomNumbers v1.5.3\n [3cdcf5f2] RecipesBase v1.3.4\n [01d81517] RecipesPipeline v0.6.12\n [731186ca] RecursiveArrayTools v2.39.0\n [f2c3362d] RecursiveFactorization v0.2.20\n [189a3867] Reexport v1.2.2\n [05181044] RelocatableFolders v1.0.1\n [ae029012] Requires v1.3.0\n [ae5879a3] ResettableStacks v1.1.1\n [79098fc4] Rmath v0.7.1\n [47965b36] RootedTrees v2.19.2\n [7e49a35a] RuntimeGeneratedFunctions v0.5.12\n [fdea26ae] SIMD v3.4.5\n [94e857df] SIMDTypes v0.1.0\n [476501e8] SLEEFPirates v0.6.39\n [0bca4576] SciMLBase v2.4.0\n [e9a6253c] SciMLNLSolve v0.1.9\n [c0aeaf25] SciMLOperators v0.3.6\n [505e40e9] SciPyDiffEq v0.2.1\n [6c6a2e73] Scratch v1.2.0\n [91c51154] SentinelArrays v1.4.0\n [efcf1570] Setfield v1.1.1\n [1277b4bf] ShiftedArrays v2.0.0\n [992d4aef] Showoff v1.0.3\n [777ac1f9] SimpleBufferStream v1.1.0\n [727e6d20] SimpleNonlinearSolve v0.1.20\n [699a6c99] SimpleTraits v0.9.4\n [ce78b400] SimpleUnPack v1.1.0\n [66db9d55] SnoopPrecompile v1.0.3\n [b85f4697] SoftGlobalScope v1.1.0\n [a2af1166] SortingAlgorithms v1.1.1\n [47a9eef4] SparseDiffTools v2.8.0\n [e56a9233] Sparspak v0.3.9\n [276daf66] SpecialFunctions v2.3.1\n [928aab9d] SpecialMatrices v3.0.0\n [aedffcd0] Static v0.8.8\n [0d7ed370] StaticArrayInterface v1.4.1\n [90137ffa] StaticArrays v1.6.5\n [1e83bf80] StaticArraysCore v1.4.2\n [82ae8749] StatsAPI v1.7.0\n [2913bbd2] StatsBase v0.34.2\n [4c63d2b9] StatsFuns v1.3.0\n [3eaba693] StatsModels v0.7.3\n⌅ [7792a7ef] StrideArraysCore v0.4.17\n [69024149] StringEncodings v0.3.7\n [892a3eda] StringManipulation v0.3.4\n [09ab397b] StructArrays v0.6.16\n [c3572dad] Sundials v4.20.0\n [2efcf032] SymbolicIndexingInterface v0.2.2\n [d1185830] SymbolicUtils v1.4.0\n [0c5d862f] Symbolics v5.9.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.0\n [92b13dbe] TaylorIntegration v0.14.3\n [6aa5eb33] TaylorSeries v0.15.2\n [62fd8b95] TensorCore v0.1.1\n [5d786b92] TerminalLoggers v0.1.7\n [8290d209] ThreadingUtilities v0.5.2\n [a759f4b9] TimerOutputs v0.5.23\n [c751599d] ToeplitzMatrices v0.8.2\n [0796e94c] Tokenize v0.5.25\n [3bb67fe8] TranscodingStreams v0.9.13\n [a2a6695c] TreeViews v0.3.0\n [d5829a12] TriangularSolve v0.1.19\n [410a4b4d] Tricks v0.1.8\n [781d530d] TruncatedStacktraces v1.4.0\n [5c2747f8] URIs v1.5.0\n [3a884ed6] UnPack v1.0.2\n [1cfade01] UnicodeFun v0.4.1\n [1986cc42] Unitful v1.17.0\n [45397f5d] UnitfulLatexify v1.6.3\n [a7c27f48] Unityper v0.1.5\n [41fe7b60] Unzip v0.2.0\n [3d5dd08c] VectorizationBase v0.21.64\n [81def892] VersionParsing v1.3.0\n [19fa3120] VertexSafeGraphs v0.2.0\n [44d3d7a6] Weave v0.10.12\n [1b915085] WinReg v1.0.0\n [ddb6d928] YAML v0.4.9\n [c2297ded] ZMQ v1.2.2\n [700de1a5] ZygoteRules v0.2.3\n [0518478a] deSolveDiffEq v0.1.1\n [6e34b625] Bzip2_jll v1.0.8+0\n [83423d85] Cairo_jll v1.16.1+1\n [2702e6a9] EpollShim_jll v0.0.20230411+0\n [2e619515] Expat_jll v2.5.0+0\n⌃ [b22a6f82] FFMPEG_jll v4.4.2+2\n [f5851436] FFTW_jll v3.3.10+0\n [a3f928ae] Fontconfig_jll v2.13.93+0\n [d7e528f0] FreeType2_jll v2.13.1+0\n [559328eb] FriBidi_jll v1.0.10+0\n [0656b61e] GLFW_jll v3.3.8+0\n [d2c73de3] GR_jll v0.72.10+0\n [78b55507] Gettext_jll v0.21.0+0\n [7746bdde] Glib_jll v2.76.5+0\n [3b182d85] Graphite2_jll v1.3.14+0\n [2e76f6c2] HarfBuzz_jll v2.8.1+1\n [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0\n [aacddb02] JpegTurbo_jll v2.1.91+0\n [c1c5ebd0] LAME_jll v3.100.1+0\n [88015f11] LERC_jll v3.0.0+1\n [1d63c593] LLVMOpenMP_jll v15.0.4+0\n [aae0fff6] LSODA_jll v0.1.2+0\n [dd4b983a] LZO_jll v2.10.1+0\n⌅ [e9f186c6] Libffi_jll v3.2.2+1\n [d4300ac3] Libgcrypt_jll v1.8.7+0\n [7e76a0d4] Libglvnd_jll v1.6.0+0\n [7add5ba3] Libgpg_error_jll v1.42.0+0\n [94ce4f54] Libiconv_jll v1.17.0+0\n [4b2f31a3] Libmount_jll v2.35.0+0\n [89763e89] Libtiff_jll v4.5.1+1\n [38a345b3] Libuuid_jll v2.36.0+0\n [856f044c] MKL_jll v2023.2.0+0\n [c771fb93] ODEInterface_jll v0.0.1+0\n [e7412a2a] Ogg_jll v1.3.5+1\n⌅ [458c3c95] OpenSSL_jll v1.1.23+0\n [efe28fd5] OpenSpecFun_jll v0.5.5+0\n [91d4177d] Opus_jll v1.3.2+0\n [30392449] Pixman_jll v0.42.2+0\n [c0090381] Qt6Base_jll v6.5.2+2\n [f50d1b31] Rmath_jll v0.4.0+0\n⌅ [fb77eaff] Sundials_jll v5.2.1+0\n [a44049a8] Vulkan_Loader_jll v1.3.243+0\n [a2964d1f] Wayland_jll v1.21.0+1\n [2381bf8a] Wayland_protocols_jll v1.25.0+0\n [02c8fc9c] XML2_jll v2.11.5+0\n [aed1982a] XSLT_jll v1.1.34+0\n [ffd25f8a] XZ_jll v5.4.4+0\n [f67eecfb] Xorg_libICE_jll v1.0.10+1\n [c834827a] Xorg_libSM_jll v1.2.3+0\n [4f6342f7] Xorg_libX11_jll v1.8.6+0\n [0c0b7dd1] Xorg_libXau_jll v1.0.11+0\n [935fb764] Xorg_libXcursor_jll v1.2.0+4\n [a3789734] Xorg_libXdmcp_jll v1.1.4+0\n [1082639a] Xorg_libXext_jll v1.3.4+4\n [d091e8ba] Xorg_libXfixes_jll v5.0.3+4\n [a51aa0fd] Xorg_libXi_jll v1.7.10+4\n [d1454406] Xorg_libXinerama_jll v1.1.4+4\n [ec84b674] Xorg_libXrandr_jll v1.5.2+4\n [ea2f1a96] Xorg_libXrender_jll v0.9.10+4\n [14d82f49] Xorg_libpthread_stubs_jll v0.1.1+0\n [c7cfdc94] Xorg_libxcb_jll v1.15.0+0\n [cc61e674] Xorg_libxkbfile_jll v1.1.2+0\n [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0\n [12413925] Xorg_xcb_util_image_jll v0.4.0+1\n [2def613f] Xorg_xcb_util_jll v0.4.0+1\n [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1\n [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1\n [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1\n [35661453] Xorg_xkbcomp_jll v1.4.6+0\n [33bec58e] Xorg_xkeyboard_config_jll v2.39.0+0\n [c5fb5394] Xorg_xtrans_jll v1.5.0+0\n [8f1865be] ZeroMQ_jll v4.3.4+0\n [3161d3a3] Zstd_jll v1.5.5+0\n [35ca27e7] eudev_jll v3.2.9+0\n⌅ [214eeab7] fzf_jll v0.29.0+0\n [1a1c6b14] gperf_jll v3.1.1+0\n [a4ae2306] libaom_jll v3.4.0+0\n [0ac62f75] libass_jll v0.15.1+0\n [2db6ffa8] libevdev_jll v1.11.0+0\n [f638f0a6] libfdk_aac_jll v2.0.2+0\n [36db933b] libinput_jll v1.18.0+0\n [b53b4c65] libpng_jll v1.6.38+0\n [a9144af2] libsodium_jll v1.0.20+0\n [f27f6e37] libvorbis_jll v1.3.7+1\n [009596ad] mtdev_jll v1.1.6+0\n [1270edf5] x264_jll v2021.5.5+0\n [dfaa095f] x265_jll v3.5.0+0\n [d8fb68d0] xkbcommon_jll v1.4.1+1\n [0dad84c5] ArgTools v1.1.1\n [56f22d72] Artifacts\n [2a0f44e3] Base64\n [ade2ca70] Dates\n [8ba89e20] Distributed\n [f43a241f] Downloads v1.6.0\n [7b1f6079] FileWatching\n [9fa8497b] Future\n [b77e0a4c] InteractiveUtils\n [4af54fe1] LazyArtifacts\n [b27032c2] LibCURL v0.6.3\n [76f85450] LibGit2\n [8f399da3] Libdl\n [37e2e46d] LinearAlgebra\n [56ddb016] Logging\n [d6f4376e] Markdown\n [a63ad114] Mmap\n [ca575930] NetworkOptions v1.2.0\n [44cfe95a] Pkg v1.9.2\n [de0858da] Printf\n [9abbd945] Profile\n [3fa0cd96] REPL\n [9a3f8284] Random\n [ea8e919c] SHA v0.7.0\n [9e88b42a] Serialization\n [1a1011a3] SharedArrays\n [6462fe0b] Sockets\n [2f01184e] SparseArrays\n [10745b16] Statistics v1.9.0\n [4607b0f0] SuiteSparse\n [fa267f1f] TOML v1.0.3\n [a4e569a6] Tar v1.10.0\n [8dfed614] Test\n [cf7118a7] UUIDs\n [4ec0a83e] Unicode\n [e66e0078] CompilerSupportLibraries_jll v1.0.5+0\n [deac9b47] LibCURL_jll v7.84.0+0\n [29816b5a] LibSSH2_jll v1.10.2+0\n [c8ffd9c3] MbedTLS_jll v2.28.2+0\n [14a3606d] MozillaCACerts_jll v2022.10.11\n [4536629a] OpenBLAS_jll v0.3.21+4\n [05823500] OpenLibm_jll v0.8.1+0\n [efcefdf7] PCRE2_jll v10.42.0+0\n [bea87d4a] SuiteSparse_jll v5.10.1+6\n [83775a58] Zlib_jll v1.2.13+0\n [8e850b90] libblastrampoline_jll v5.8.0+0\n [8e850ede] nghttp2_jll v1.48.0+0\n [3f19e933] p7zip_jll v17.4.0+0\nInfo Packages marked with ⌃ and ⌅ have new versions available, but those wi\nth ⌅ are restricted by compatibility constraints from upgrading. To see why\n use `status --outdated -m`","category":"page"},{"location":"initialization/#Initialization","page":"Initialization","title":"Initialization","text":"","category":"section"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"The notion of \"initialization\" relates to the prior part of the model.","category":"page"},{"location":"initialization/#Background:-The-prior","page":"Initialization","title":"Background: The prior","text":"","category":"section"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"We model the ODE solution y(t) with a Gauss–Markov prior. More precisely, let","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"beginaligned\nY(t) = left Y^(0)(t) Y^(1)(t) dots Y^(q)(t) right\nendaligned","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"be the solution to the SDE","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"beginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = textcolor389826A Y(t) textdt + textcolor4063D8Gamma textdW(t) \nY(0) sim textcolor9558B2 mathcalN left( mu_0 Sigma_0 right) \nendaligned","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"Then Y^(i)(t) models the i-th derivative of y(t). In this section, we consider the initial distribution textcolorpurple mathcalN left( mu_0 Sigma_0 right) . If you're more interested in the drift matrix textcolor389826A check out the Priors section, and for more info on the diffusion textcolor4063D8Gamma check out the Diffusion models and calibration section.","category":"page"},{"location":"initialization/#Setting-the-initial-distribution","page":"Initialization","title":"Setting the initial distribution","text":"","category":"section"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"Let's assume an initial value problem of the form","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"beginaligned\ndoty(t) = f(y(t) t) qquad 0 T \ny(0) = y_0\nendaligned","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"It is clear that this contains quite some information for Y(0): The initial value y_0 and the vector field f imply","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"beginaligned\nY^(0)(0) = y_0 \nY^(1)(0) = f(y_0 0)\nendaligned","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"It turns out that we can also compute higher-order derivatives of y with the chain rule, and then use these to better initialize Y^(i)(0). This, done efficiently with Taylor-mode autodiff by using TaylorIntegration.jl, is what TaylorModeInit does. See also [1].","category":"page"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"In the vast majority of cases, just stick to the exact Taylor-mode initialization TaylorModeInit!","category":"page"},{"location":"initialization/#API","page":"Initialization","title":"API","text":"","category":"section"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"TaylorModeInit\nClassicSolverInit","category":"page"},{"location":"initialization/#ProbNumDiffEq.TaylorModeInit","page":"Initialization","title":"ProbNumDiffEq.TaylorModeInit","text":"TaylorModeInit()\n\nExact initialization via Taylor-mode automatic differentiation.\n\nThis is the recommended initialization method!\n\nIt uses TaylorIntegration.jl to efficiently compute the higher-order derivatives of the solution at the initial value, via Taylor-mode automatic differentiation.\n\nIn some special cases it can happen that TaylorIntegration.jl is incompatible with the given problem (typically because the problem definition does not allow for elements of type Taylor). If this happens, try ClassicSolverInit.\n\nReferences\n\n[4] Krämer et al, \"Stable Implementation of Probabilistic ODE Solvers\" (2020)\n\n\n\n\n\n","category":"type"},{"location":"initialization/#ProbNumDiffEq.ClassicSolverInit","page":"Initialization","title":"ProbNumDiffEq.ClassicSolverInit","text":"ClassicSolverInit(; alg=OrdinaryDiffEq.Tsit5(), init_on_ddu=false)\n\nInitialization via regression on a few steps of a classic ODE solver.\n\nIn a nutshell, instead of specifying mu_0 exactly and setting Sigma_0=0 (which is what TaylorModeInit does), use a classic ODE solver to compute a few steps of the solution, and then regress on the computed values (by running a smoother) to compute mu_0 and Sigma_0 as the mean and covariance of the smoothing posterior at time 0. See also [2].\n\nThe initial value and derivative are set directly from the given initial value problem; optionally the second derivative can also be set via automatic differentiation by setting init_on_ddu=true.\n\nArguments\n\nalg: The solver to be used. Can be any solver from OrdinaryDiffEq.jl.\ninit_on_ddu: If true, the second derivative is also initialized exactly via automatic differentiation with ForwardDiff.jl.\n\nReferences\n\n[4] Krämer et al, \"Stable Implementation of Probabilistic ODE Solvers\" (2020)\n[5] Schober et al, \"A probabilistic model for the numerical solution of initial value problems\", Statistics and Computing (2019)\n\n\n\n\n\n","category":"type"},{"location":"initialization/#initrefs","page":"Initialization","title":"References","text":"","category":"section"},{"location":"initialization/","page":"Initialization","title":"Initialization","text":"","category":"page"},{"location":"tutorials/dae/#Solving-DAEs-with-Probabilistic-Numerics","page":"Differential Algebraic Equations","title":"Solving DAEs with Probabilistic Numerics","text":"","category":"section"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"ProbNumDiffEq.jl provides probabilistic numerical solvers for differential algebraic equations (DAEs). Currently, we recommend using the semi-implicit EK1 algorithm.","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"note: Note\nFor a more general tutorial on DAEs check out the DifferentialEquations.jl DAE tutorial.","category":"page"},{"location":"tutorials/dae/#Solving-mass-matrix-DAEs-with-the-EK1","page":"Differential Algebraic Equations","title":"Solving mass-matrix DAEs with the EK1","text":"","category":"section"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"First, define the DAE (here the ROBER problem) as an ODE problem with singular mass matrix:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"using ProbNumDiffEq, Plots, LinearAlgebra, OrdinaryDiffEq, ModelingToolkit\n\nfunction rober(du, u, p, t)\n y₁, y₂, y₃ = u\n k₁, k₂, k₃ = p\n du[1] = -k₁ * y₁ + k₃ * y₂ * y₃\n du[2] = k₁ * y₁ - k₃ * y₂ * y₃ - k₂ * y₂^2\n du[3] = y₁ + y₂ + y₃ - 1\n nothing\nend\nM = [1 0 0\n 0 1 0\n 0 0 0]\nf = ODEFunction(rober, mass_matrix=M)\nprob_mm = ODEProblem(f, [1.0, 0.0, 0.0], (0.0, 1e5), (0.04, 3e7, 1e4))","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"We can solve this problem directly with the EK1:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"sol = solve(prob_mm, EK1(), reltol=1e-8, abstol=1e-8)\nplot(\n sol,\n xscale=:log10,\n tspan=(1e-6, 1e5),\n layout=(3, 1),\n legend=false,\n ylabel=[\"u₁(t)\" \"u₂(t)\" \"u₃(t)\"],\n xlabel=[\"\" \"\" \"t\"],\n denseplot=false,\n)","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"Looks good!","category":"page"},{"location":"tutorials/dae/#Solving-an-Index-3-DAE-directly","page":"Differential Algebraic Equations","title":"Solving an Index-3 DAE directly","text":"","category":"section"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"The following is based on the \"Automatic Index Reduction of DAEs\" tutorial by ModelingToolkit.jl, which demonstrates how the classic Rodas4 solver fails to solve a DAE due to the fact that it is of index 3; which is why ModelingToolkit's automatic index reduction is so useful.","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"It turns out that our probabilistic numerical solvers can directly solve the index-3 DAE!","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"First, define the pendulum problem as in the tutorial:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"function pendulum!(du, u, p, t)\n x, dx, y, dy, T = u\n g, L = p\n du[1] = dx\n du[2] = T * x\n du[3] = dy\n du[4] = T * y - g\n du[5] = x^2 + y^2 - L^2\nend\npendulum_fun! = ODEFunction(pendulum!, mass_matrix=Diagonal([1, 1, 1, 1, 0]))\nu0 = [1.0, 0, 0, 0, 0];\np = [9.8, 1];\ntspan = (0, 5.0);\npendulum_prob = ODEProblem(pendulum_fun!, u0, tspan, p)","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"We can try to solve it directly with one of the classic mass-matrix DAE solvers from OrdinaryDiffEq.jl:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"solve(pendulum_prob, Rodas4())","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"It does not work! This is because of the index of the DAE; see e.g. this explenation from the tutorial.","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"Does this also hold for the EK1 solver? Let's find out:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"sol = solve(pendulum_prob, EK1())","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"Nope! The EK1 is able to solve the index-3 DAE directly. Pretty cool!","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"plot(sol)","category":"page"},{"location":"tutorials/dae/#Is-index-reduction-still-worth-it?","page":"Differential Algebraic Equations","title":"Is index-reduction still worth it?","text":"","category":"section"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"The point of the \"Automatic Index Reduction of DAEs\" tutorial is to demonstrate ModelingToolkit's utility for automatic index reduction, which enables the classic implicit Runge-Kutta solvers such as Rodas5 to solve this DAE. Let's see if that still helps in this context here.","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"First, modelingtoolkitize the problem:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"traced_sys = modelingtoolkitize(pendulum_prob)","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"(how cool is this latex output ?!?)","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"Next, lower the DAE index and simplify it with MTK's dae_index_lowering and structural_simplify:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"simplified_sys = structural_simplify(dae_index_lowering(traced_sys))","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"Let's build two different ODE problems, and check how well we can solve each:","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"prob_index3 = ODEProblem(traced_sys, Pair[], tspan)\nprob_index1 = ODEProblem(simplified_sys, Pair[], tspan)\n\nsol3 = solve(prob_index3, EK1())\nsol1 = solve(prob_index1, EK1())\n\ntruesol = solve(prob_index1, Rodas4(), abstol=1e-10, reltol=1e-10)\n\nsol1_final_error = norm(sol1.u[end] - truesol.u[end])\nsol1_f_evals = sol1.stats.nf\nsol3_final_error = norm(sol3.u[end] - truesol.u[end])\nsol3_f_evals = sol3.stats.nf\n@info \"Results\" sol1_final_error sol1_f_evals sol3_final_error sol3_f_evals","category":"page"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"The error for the index-1 DAE solve is much lower. So it seems that, even if the index-3 DAE could also be solved directly, index lowering might still be beneficial when solving DAEs with the EK1!","category":"page"},{"location":"tutorials/dae/#References","page":"Differential Algebraic Equations","title":"References","text":"","category":"section"},{"location":"tutorials/dae/","page":"Differential Algebraic Equations","title":"Differential Algebraic Equations","text":"
[1]
\n
\n
N. Bosch, F. Tronarp and P. Hennig. Pick-and-Mix Information Operators for Probabilistic ODE\n Solvers. In: Proceedings of The 25th International Conference on Artificial\n Intelligence and Statistics, Proceedings of Machine Learning Research, 10015–10027, PMLR (2022).
\n
\n
","category":"page"},{"location":"diffusions/#Diffusion-models-and-calibration","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"","category":"section"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"The notion of \"diffusion\" and \"calibration\" relates to the prior part of the model.","category":"page"},{"location":"diffusions/#Background:-The-prior","page":"Diffusion models and calibration","title":"Background: The prior","text":"","category":"section"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"We model the ODE solution y(t) with a Gauss–Markov prior. More precisely, let","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"beginaligned\nY(t) = left Y^(0)(t) Y^(1)(t) dots Y^(q)(t) right\nendaligned","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"be the solution to the SDE","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"beginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = textcolor389826A Y(t) textdt + textcolor4063D8Gamma textdW(t) \nY(0) sim textcolorpurple mathcalN left( mu_0 Sigma_0 right) \nendaligned","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"Then Y^(i)(t) models the i-th derivative of y(t). In this section, we consider choices relating to the \"diffusion\" textcolor4063D8Gamma. If you're more interested in the drift matrix textcolor389826A check out the Priors section, and for info on the initial distribution textcolorpurple mathcalN left( mu_0 Sigma_0 right) check out the Initialization section.","category":"page"},{"location":"diffusions/#Diffusion-and-calibration","page":"Diffusion models and calibration","title":"Diffusion and calibration","text":"","category":"section"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"We call textcolor4063D8Gamma the \"diffusion\" parameter. Since it is typically not known we need to estimate it; this is called \"calibration\".","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"There are a few different choices for how to model and estimate textcolor4063D8Gamma:","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"FixedDiffusion assumes an isotropic, time-fixed textcolor4063D8Gamma = sigma cdot I_d,\nDynamicDiffusion assumes an isotropic, time-varying textcolor4063D8Gamma(t) = sigma(t) cdot I_d (recommended),\nFixedMVDiffusion assumes a diagonal, time-fixed textcolor4063D8Gamma = operatornamediag(sigma_1 dots sigma_d),\nDynamicMVDiffusion assumes a diagonal, time-varying textcolor4063D8Gamma(t) = operatornamediag(sigma_1(t) dots sigma_d(t)).","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"Or more compactly:","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":" Isotropic: Diagonal (only for the EK0)\nTime-varying DynamicDiffusion DynamicMVDiffusion\nTime-fixed FixedDiffusion FixedMVDiffusion","category":"page"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"For more details on diffusions and calibration, check out this paper [6].","category":"page"},{"location":"diffusions/#API","page":"Diffusion models and calibration","title":"API","text":"","category":"section"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"DynamicDiffusion\nFixedDiffusion\nDynamicMVDiffusion\nFixedMVDiffusion","category":"page"},{"location":"diffusions/#ProbNumDiffEq.DynamicDiffusion","page":"Diffusion models and calibration","title":"ProbNumDiffEq.DynamicDiffusion","text":"DynamicDiffusion()\n\nTime-varying, isotropic diffusion, which is quasi-maximum-likelihood-estimated at each step.\n\nThis is the recommended diffusion when using adaptive step-size selection, and in particular also when solving stiff systems.\n\n\n\n\n\n","category":"type"},{"location":"diffusions/#ProbNumDiffEq.FixedDiffusion","page":"Diffusion models and calibration","title":"ProbNumDiffEq.FixedDiffusion","text":"FixedDiffusion(; initial_diffusion=1.0, calibrate=true)\n\nTime-fixed, isotropic diffusion, which is (optionally) quasi-maximum-likelihood-estimated.\n\nThis is the recommended diffusion when using fixed steps.\n\nBy default with calibrate=true, all covariances are re-scaled at the end of the solve with the MLE diffusion. Set calibrate=false to skip this step, e.g. when setting the initial_diffusion and then estimating the diffusion outside of the solver (e.g. with Fenrir.jl).\n\n\n\n\n\n","category":"type"},{"location":"diffusions/#ProbNumDiffEq.DynamicMVDiffusion","page":"Diffusion models and calibration","title":"ProbNumDiffEq.DynamicMVDiffusion","text":"DynamicMVDiffusion()\n\nTime-varying, diagonal diffusion, which is quasi-maximum-likelihood-estimated at each step.\n\nOnly works with the EK0!\n\nA multi-variate version of DynamicDiffusion, where instead of an isotropic matrix, a diagonal matrix is estimated. This can be helpful to get more expressive posterior covariances when using the EK0, since the individual dimensions can be adjusted separately.\n\nReferences\n\n[6] Bosch et al, \"Calibrated Adaptive Probabilistic ODE Solvers\", AISTATS (2021)\n\n\n\n\n\n","category":"type"},{"location":"diffusions/#ProbNumDiffEq.FixedMVDiffusion","page":"Diffusion models and calibration","title":"ProbNumDiffEq.FixedMVDiffusion","text":"FixedMVDiffusion(; initial_diffusion=1.0, calibrate=true)\n\nTime-fixed, diagonal diffusion, which is quasi-maximum-likelihood-estimated at each step.\n\nOnly works with the EK0!\n\nA multi-variate version of FixedDiffusion, where instead of an isotropic matrix, a diagonal matrix is estimated. This can be helpful to get more expressive posterior covariances when using the EK0, since the individual dimensions can be adjusted separately.\n\nReferences\n\n[6] Bosch et al, \"Calibrated Adaptive Probabilistic ODE Solvers\", AISTATS (2021)\n\n\n\n\n\n","category":"type"},{"location":"diffusions/#diffusionrefs","page":"Diffusion models and calibration","title":"References","text":"","category":"section"},{"location":"diffusions/","page":"Diffusion models and calibration","title":"Diffusion models and calibration","text":"
[6]
\n
\n
N. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial\n Intelligence and Statistics, Proceedings of Machine Learning Research, 3466–3474, PMLR (2021).
\n
\n
","category":"page"},{"location":"priors/#Priors","page":"Priors","title":"Priors","text":"","category":"section"},{"location":"priors/","page":"Priors","title":"Priors","text":"We model the ODE solution y(t) with a Gauss–Markov prior. More precisely, let","category":"page"},{"location":"priors/","page":"Priors","title":"Priors","text":"beginaligned\nY(t) = left Y^(0)(t) Y^(1)(t) dots Y^(q)(t) right\nendaligned","category":"page"},{"location":"priors/","page":"Priors","title":"Priors","text":"be the solution to the SDE","category":"page"},{"location":"priors/","page":"Priors","title":"Priors","text":"beginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = textcolor389826A Y(t) textdt + textcolor4063D8Gamma textdW(t) \nY(0) sim textcolorpurple mathcalN left( mu_0 Sigma_0 right) \nendaligned","category":"page"},{"location":"priors/","page":"Priors","title":"Priors","text":"Then Y^(i)(t) models the i-th derivative of y(t). In this section, we consider choices relating to the drift matrix textcolor389826A. If you're more interested in the diffusion textcolor4063D8Gamma check out the Diffusion models and calibration section, and for info on the initial distribution textcolorpurple mathcalN left( mu_0 Sigma_0 right) check out the Initialization section.","category":"page"},{"location":"priors/","page":"Priors","title":"Priors","text":"If you're unsure which prior to use, just stick to the integrated Wiener process prior IWP! This is also the default choice for all solvers. The other priors are rather experimental / niche at the time of writing.","category":"page"},{"location":"priors/#API","page":"Priors","title":"API","text":"","category":"section"},{"location":"priors/","page":"Priors","title":"Priors","text":"IWP\nIOUP\nMatern","category":"page"},{"location":"priors/#ProbNumDiffEq.IWP","page":"Priors","title":"ProbNumDiffEq.IWP","text":"IWP([wiener_process_dimension::Integer,] num_derivatives::Integer)\n\nIntegrated Wiener process.\n\nThis is the recommended prior! It is the most well-tested prior, both in this package and in the probabilistic numerics literature in general (see the references). It is also the prior that has the most efficient implementation.\n\nThe IWP can be created without specifying the dimension of the Wiener process, in which case it will be inferred from the dimension of the ODE during the solve. This is typically the preferred usage.\n\nIn math\n\nbeginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = Gamma textdW(t)\nendaligned\n\nExamples\n\njulia> solve(prob, EK1(prior=IWP(2)))\n\n\n\n\n\n","category":"type"},{"location":"priors/#ProbNumDiffEq.IOUP","page":"Priors","title":"ProbNumDiffEq.IOUP","text":"IOUP([wiener_process_dimension::Integer,]\n num_derivatives::Integer,\n rate_parameter::Union{Number,AbstractVector,AbstractMatrix})\n\nIntegrated Ornstein–Uhlenbeck process.\n\nAs with the IWP, the IOUP can be created without specifying its dimension, in which case it will be inferred from the dimension of the ODE during the solve. This is typically the preferred usage. The rate parameter however always needs to be specified.\n\nIn math\n\nbeginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = L Y^(q)(t) textdt + Gamma textdW(t)\nendaligned\n\nwhere L is the rate_parameter.\n\nExamples\n\njulia> solve(prob, EK1(prior=IOUP(2, -1)))\n\n\n\n\n\n","category":"type"},{"location":"priors/#ProbNumDiffEq.Matern","page":"Priors","title":"ProbNumDiffEq.Matern","text":"Matern([wiener_process_dimension::Integer,]\n num_derivatives::Integer,\n lengthscale::Number)\n\nMatern process.\n\nAs with the IWP, the Matern can be created without specifying its dimension, in which case it will be inferred from the dimension of the ODE during the solve. This is typically the preferred usage. The lengthscale parameter however always needs to be specified.\n\nIn math\n\nbeginaligned\ntextd Y^(i)(t) = Y^(i+1)(t) textdt qquad i = 0 dots q-1 \ntextd Y^(q)(t) = - sum_j=0^q left(\n beginpmatrix q+1 j endpmatrix\n left( fracsqrt2q - 1l right)^q-j\n Y^(j)(t) right) textdt + Gamma textdW(t)\nendaligned\n\nwhere l is the lengthscale.\n\nExamples\n\njulia> solve(prob, EK1(prior=Matern(2, 1)))\n\n\n\n\n\n","category":"type"},{"location":"tutorials/dynamical_odes/#Second-Order-ODEs-and-Energy-Preservation","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"In this tutorial we consider an energy-preserving, physical dynamical system, given by a second-order ODE.","category":"page"},{"location":"tutorials/dynamical_odes/#TL;DR:","page":"Second Order ODEs and Energy Preservation","title":"TL;DR:","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"To efficiently solve second-order ODEs, just define the problem as a SecondOrderODEProblem.\nTo preserve constant quantities, use the ManifoldUpdate callback; same syntax as DiffEqCallback.jl's ManifoldProjection.","category":"page"},{"location":"tutorials/dynamical_odes/#Simulating-the-Hénon-Heiles-system","page":"Second Order ODEs and Energy Preservation","title":"Simulating the Hénon-Heiles system","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"The Hénon-Heiles model describes the motion of a star around a galactic center, restricted to a plane. It is given by a second-order ODE","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"beginaligned\nddotx = - x - 2 x y \nddoty = y^2 - y - x^2\nendaligned","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"Our goal is to numerically simulate this system on a time span t in 0 T, starting with initial values x(0)=0, y(0) = 01, dotx(0) = 05, doty(0) = 0.","category":"page"},{"location":"tutorials/dynamical_odes/#Transforming-the-problem-into-a-first-order-ODE","page":"Second Order ODEs and Energy Preservation","title":"Transforming the problem into a first-order ODE","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"A very common approach is to first transform the problem into a first-order ODE by introducing a new variable","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"u = dxdyxy","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"to obtain","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"beginaligned\ndotu_1(t) = - u_3 - 2 u_3 u_4 \ndotu_2(t) = u_4^2 - u_4 - u_4^2 \ndotu_3(t) = u_1 \ndotu_4(t) = u_2\nendaligned","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"This first-order ODE can then be solved using any conventional ODE solver - including our EK1:","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"using ProbNumDiffEq, Plots\n\nfunction Hénon_Heiles(du, u, p, t)\n du[1] = -u[3] - 2 * u[3] * u[4]\n du[2] = u[4]^2 - u[4] - u[3]^2\n du[3] = u[1]\n du[4] = u[2]\nend\nu0, du0 = [0.0, 0.1], [0.5, 0.0]\ntspan = (0.0, 100.0)\nprob = ODEProblem(Hénon_Heiles, [du0; u0], tspan)\nsol = solve(prob, EK1());\nplot(sol, idxs=(3, 4)) # where `idxs=(3,4)` is used to plot x agains y","category":"page"},{"location":"tutorials/dynamical_odes/#Solving-the-second-order-ODE-directly","page":"Second Order ODEs and Energy Preservation","title":"Solving the second-order ODE directly","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"Instead of first transforming the problem, we can also solve it directly as a second-order ODE, by defining it as a SecondOrderODEProblem.","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"note: Note\nThe SecondOrderODEProblem type is not defined in ProbNumDiffEq.jl but is provided by SciMLBase.jl. For more information, check out the DifferentialEquations.jl documentation on Dynamical, Hamiltonian and 2nd Order ODE Problems.","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"function Hénon_Heiles2(ddu, du, u, p, t)\n ddu[1] = -u[1] - 2 * u[1] * u[2]\n ddu[2] = u[2]^2 - u[2] - u[1]^2\nend\nprob2 = SecondOrderODEProblem(Hénon_Heiles2, du0, u0, tspan)\nsol2 = solve(prob2, EK1());\nplot(sol2, idxs=(3, 4))","category":"page"},{"location":"tutorials/dynamical_odes/#Benchmark:-Solving-second-order-ODEs-is-*faster*","page":"Second Order ODEs and Energy Preservation","title":"Benchmark: Solving second order ODEs is faster","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"Solving second-order ODEs is not just a matter of convenience - in fact, SciMLBase's SecondOrderODEProblem is neatly designed in such a way that all the classic solvers from OrdinaryDiffEq.jl can handle it by solving the corresponding first-order ODE. But, transforming the ODE to first order increases the dimensionality of the problem, and comes therefore at increased computational cost; this also motivates classic specialized solvers for second-order ODEs.","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"The probabilistic numerical solvers from ProbNumDiffEq.jl have the same internal state representation for first and second order ODEs; all that changes is the measurement model [1]. As a result, we can use the EK1 both for first and second order ODEs, but it automatically specializes on the latter to provide a 2x performance boost:","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"julia> @btime solve(prob, EK1(order=3), adaptive=false, dt=1e-2);\n 766.312 ms (400362 allocations: 173.38 MiB)\n\njulia> @btime solve(prob2, EK1(order=4), adaptive=false, dt=1e-2);\n 388.301 ms (510676 allocations: 102.78 MiB)","category":"page"},{"location":"tutorials/dynamical_odes/#Energy-preservation","page":"Second Order ODEs and Energy Preservation","title":"Energy preservation","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"In addition to the ODE given above, we know that the solution of the Hénon-Heiles model has to preserve energy over time. The total energy can be expressed as the sum of the potential and kinetic energies, given by","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"beginaligned\noperatornamePotentialEnergy(xy) = frac12 left( x^2 + y^2 + 2 x^2 y - frac2y^33 right) \noperatornameKineticEnergy(dotx doty) = frac12 left( dotx^2 + doty^2 right)\nendaligned","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"In code:","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"PotentialEnergy(x, y) = 1 // 2 * (x^2 + y^2 + 2x^2 * y - 2 // 3 * y^3)\nKineticEnergy(dx, dy) = 1 // 2 * (dx^2 + dy^2)\nE(dx, dy, x, y) = PotentialEnergy(x, y) + KineticEnergy(dx, dy)\nE(u) = E(u...); # convenient shorthand","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"So, let's have a look at how the total energy changes over time when we numerically simulate the Hénon-Heiles model over a long period of time: Standard solve","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"longprob = remake(prob2, tspan=(0.0, 1e3))\nlongsol = solve(longprob, EK1(smooth=false), dense=false)\nplot(longsol.t, E.(longsol.u))","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"It visibly loses energy over time, from an initial 0.12967 to a final 0.12899. Let's fix this to get a physically more meaningful solution.","category":"page"},{"location":"tutorials/dynamical_odes/#Energy-preservation-with-the-ManifoldUpdate-callback","page":"Second Order ODEs and Energy Preservation","title":"Energy preservation with the ManifoldUpdate callback","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"In the language of ODE filters, preserving energy over time amounts to just another measurement model [1]. The most convenient way of updating on this additional zero measurement with ProbNumDiffEq.jl is with the ManifoldUpdate callback.","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"note: Note\nThe ManifoldUpdate callback can be thought of a probabilistic counterpart to the ManifoldProjection callback provided by DiffEqCallbacks.jl.","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"To do so, first define a (vector-valued) residual function, here chosen to be the difference between the current energy and the initial energy, and build a ManifoldUpdate callback","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"residual(u) = [E(u) - E(du0..., u0...)]\ncb = ManifoldUpdate(residual)","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"Then, solve the ODE with this callback","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"longsol_preserving = solve(longprob, EK1(smooth=false), dense=false, callback=cb)\nplot(longsol.t, E.(longsol.u))\nplot!(longsol_preserving.t, E.(longsol_preserving.u))","category":"page"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"Voilà! With the ManifoldUpdate callback we could preserve the energy over time and obtain a more truthful probabilistic numerical long-term simulation of the Hénon-Heiles model.","category":"page"},{"location":"tutorials/dynamical_odes/#References","page":"Second Order ODEs and Energy Preservation","title":"References","text":"","category":"section"},{"location":"tutorials/dynamical_odes/","page":"Second Order ODEs and Energy Preservation","title":"Second Order ODEs and Energy Preservation","text":"
[1]
\n
\n
N. Bosch, F. Tronarp and P. Hennig. Pick-and-Mix Information Operators for Probabilistic ODE\n Solvers. In: Proceedings of The 25th International Conference on Artificial\n Intelligence and Statistics, Proceedings of Machine Learning Research, 10015–10027, PMLR (2022).
\n
\n
","category":"page"},{"location":"benchmarks/multi-language-wrappers/#ProbNumDiffEq.jl-vs.-various-solver-packages","page":"Multi-Language Wrapper Benchmark","title":"ProbNumDiffEq.jl vs. various solver packages","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Adapted from SciMLBenchmarks.jl multi-language wrapper benchmark.","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"# Imports\nusing LinearAlgebra, Statistics\nusing StaticArrays, DiffEqDevTools, ParameterizedFunctions, Plots, SciMLBase, OrdinaryDiffEq\nusing ODEInterface, ODEInterfaceDiffEq, Sundials, SciPyDiffEq, deSolveDiffEq, MATLABDiffEq, LSODA\nusing LoggingExtras\n\nusing ProbNumDiffEq","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"# Plotting theme\ntheme(:dao;\n markerstrokewidth=0.5,\n legend=:outertopright,\n bottom_margin=5Plots.mm,\n size = (1000, 400),\n)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"# Constants used throughout this benchmark\nconst DENSE = false # used to decide if we smooth or not\nconst SAVE_EVERYSTEP = false;","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"_COLORS = Dict(\n \"Julia\" => :LightGreen,\n \"Julia (static)\" => :DarkGreen,\n \"Hairer\" => :Red,\n \"MATLAB\" => :Orange,\n \"SciPy\" => :Yellow,\n \"deSolve\" => :Blue,\n \"Sundials\" => :Purple,\n \"liblsoda\" => :Purple,\n \"ProbNumDiffEq\" => :Darkgray,\n)\ntocolor(n) = _COLORS[split(n, ':')[1]];","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"deprecated_filter(log_args) = !contains(log_args.message, \"deprecated\")\nfiltered_logger = ActiveFilteredLogger(deprecated_filter, global_logger());","category":"page"},{"location":"benchmarks/multi-language-wrappers/#Non-Stiff-Problem-1:-Lotka-Volterra","page":"Multi-Language Wrapper Benchmark","title":"Non-Stiff Problem 1: Lotka-Volterra","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"f = @ode_def LotkaVolterra begin\n dx = a*x - b*x*y\n dy = -c*y + d*x*y\nend a b c d\np = [1.5, 1, 3, 1]\ntspan = (0.0, 10.0)\nu0 = [1.0, 1.0]\nprob = ODEProblem{true,SciMLBase.FullSpecialize()}(f,u0,tspan,p)\nstaticprob = ODEProblem{false,SciMLBase.FullSpecialize()}(f,SVector{2}(u0),tspan,SVector{4}(p))\n\nsol = solve(prob,Vern7(),abstol=1/10^14,reltol=1/10^14,dense=false)\ntest_sol = sol\nplot(sol, title=\"Lotka-Volterra Solution\", legend=false)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"_setups = [\n \"Julia: DP5\" => Dict(:alg=>DP5())\n \"Julia: Tsit5\" => Dict(:alg=>Tsit5())\n \"Julia: Vern7\" => Dict(:alg=>Vern7())\n \"Hairer: dopri5\" => Dict(:alg=>ODEInterfaceDiffEq.dopri5())\n \"MATLAB: ode45\" => Dict(:alg=>MATLABDiffEq.ode45())\n \"MATLAB: ode113\" => Dict(:alg=>MATLABDiffEq.ode113())\n \"SciPy: RK45\" => Dict(:alg=>SciPyDiffEq.RK45())\n \"SciPy: LSODA\" => Dict(:alg=>SciPyDiffEq.LSODA())\n \"SciPy: odeint\" => Dict(:alg=>SciPyDiffEq.odeint())\n \"deSolve: lsoda\" => Dict(:alg=>deSolveDiffEq.lsoda())\n \"deSolve: ode45\" => Dict(:alg=>deSolveDiffEq.ode45())\n \"Sundials: Adams\" => Dict(:alg=>Sundials.CVODE_Adams())\n \"ProbNumDiffEq: EK0(2)\" => Dict(:alg=>EK0(order=2, smooth=DENSE))\n \"ProbNumDiffEq: EK0(3)\" => Dict(:alg=>EK0(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(3)\" => Dict(:alg=>EK1(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(5)\" => Dict(:alg=>EK1(order=5, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\ncolors = tocolor.(labels) |> permutedims\n\nabstols = 1.0 ./ 10.0 .^ (6:13)\nreltols = 1.0 ./ 10.0 .^ (3:10)\n\nwp = with_logger(filtered_logger) do\n WorkPrecisionSet(\n [prob, staticprob], abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = [test_sol, test_sol],\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n )\nend\n\nplot(\n wp,\n title = \"Non-stiff 1: Lotka-Volterra\",\n color = colors,\n xticks = 10.0 .^ (-16:1:5),\n yticks = 10.0 .^ (-6:1:5),\n)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/#Non-Stiff-Problem-2:-Rigid-Body","page":"Multi-Language Wrapper Benchmark","title":"Non-Stiff Problem 2: Rigid Body","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"f = @ode_def RigidBodyBench begin\n dy1 = -2*y2*y3\n dy2 = 1.25*y1*y3\n dy3 = -0.5*y1*y2 + 0.25*sin(t)^2\nend\nu0 = [1.0;0.0;0.9]\ntspan = (0.0, 10.0)\nprob = ODEProblem{true,SciMLBase.FullSpecialize()}(f,u0,tspan)\nstaticprob = ODEProblem{false,SciMLBase.FullSpecialize()}(f,SVector{3}(u0),tspan)\nsol = solve(prob,Vern7(),abstol=1/10^14,reltol=1/10^14,dense=false)\ntest_sol = sol\nplot(sol, title=\"Rigid Body Solution\", legend=false)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"_setups = [\n \"Julia: DP5\" => Dict(:alg=>DP5())\n \"Julia: Tsit5\" => Dict(:alg=>Tsit5())\n \"Julia: Vern7\" => Dict(:alg=>Vern7())\n \"Hairer: dopri5\" => Dict(:alg=>dopri5())\n \"MATLAB: ode45\" => Dict(:alg=>MATLABDiffEq.ode45())\n \"MATLAB: ode113\" => Dict(:alg=>MATLABDiffEq.ode113())\n \"SciPy: RK45\" => Dict(:alg=>SciPyDiffEq.RK45())\n \"SciPy: LSODA\" => Dict(:alg=>SciPyDiffEq.LSODA())\n \"SciPy: odeint\" => Dict(:alg=>SciPyDiffEq.odeint())\n \"deSolve: lsoda\" => Dict(:alg=>deSolveDiffEq.lsoda())\n \"deSolve: ode45\" => Dict(:alg=>deSolveDiffEq.ode45())\n \"Sundials: Adams\" => Dict(:alg=>CVODE_Adams())\n \"ProbNumDiffEq: EK0(2)\" => Dict(:alg=>EK0(order=2, smooth=DENSE))\n \"ProbNumDiffEq: EK0(3)\" => Dict(:alg=>EK0(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(3)\" => Dict(:alg=>EK1(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(5)\" => Dict(:alg=>EK1(order=5, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\ncolors = tocolor.(labels) |> permutedims\n\nabstols = 1.0 ./ 10.0 .^ (6:13)\nreltols = 1.0 ./ 10.0 .^ (3:10)\n\nwp = with_logger(filtered_logger) do\n WorkPrecisionSet(\n [prob,staticprob], abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = [test_sol, test_sol],\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false\n )\nend\n\nplot(\n wp,\n title = \"Non-stiff 2: Rigid-Body\",\n color = colors,\n xticks = 10.0 .^ (-12:1:5),\n yticks = 10.0 .^ (-6:1:5),\n)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/#Stiff-Problem-1:-ROBER","page":"Multi-Language Wrapper Benchmark","title":"Stiff Problem 1: ROBER","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"rober = @ode_def begin\n dy₁ = -k₁*y₁+k₃*y₂*y₃\n dy₂ = k₁*y₁-k₂*y₂^2-k₃*y₂*y₃\n dy₃ = k₂*y₂^2\nend k₁ k₂ k₃\nu0 = [1.0,0.0,0.0]\np = [0.04,3e7,1e4]\nprob = ODEProblem{true,SciMLBase.FullSpecialize()}(rober,u0,(0.0,1e5),p)\nstaticprob = ODEProblem{false,SciMLBase.FullSpecialize()}(rober,SVector{3}(u0),(0.0,1e5),SVector{3}(p))\nsol = solve(prob,CVODE_BDF(),abstol=1/10^14,reltol=1/10^14,dense=false)\ntest_sol = sol\nplot(sol, title=\"ROBER Solution\", legend=false, xlims=(1e0, 1e5))","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"_setups = [\n \"Julia: Rosenbrock23\" => Dict(:alg=>Rosenbrock23())\n \"Julia: Rodas4\" => Dict(:alg=>Rodas4())\n \"Julia: Rodas5\" => Dict(:alg=>Rodas5())\n \"Hairer: rodas\" => Dict(:alg=>rodas())\n \"Hairer: radau\" => Dict(:alg=>radau())\n \"MATLAB: ode23s\" => Dict(:alg=>MATLABDiffEq.ode23s())\n \"MATLAB: ode15s\" => Dict(:alg=>MATLABDiffEq.ode15s())\n \"SciPy: LSODA\" => Dict(:alg=>SciPyDiffEq.LSODA())\n \"SciPy: BDF\" => Dict(:alg=>SciPyDiffEq.BDF())\n \"SciPy: odeint\" => Dict(:alg=>SciPyDiffEq.odeint())\n \"deSolve: lsoda\" => Dict(:alg=>deSolveDiffEq.lsoda())\n \"Sundials: CVODE\" => Dict(:alg=>CVODE_BDF())\n \"ProbNumDiffEq: EK1(2)\" => Dict(:alg=>EK1(order=2, smooth=DENSE))\n \"ProbNumDiffEq: EK1(3)\" => Dict(:alg=>EK1(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(5)\" => Dict(:alg=>EK1(order=5, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\ncolors = tocolor.(labels) |> permutedims\n\nabstols = 1.0 ./ 10.0 .^ (5:12)\nreltols = 1.0 ./ 10.0 .^ (2:9)\n\nwp = with_logger(filtered_logger) do\n WorkPrecisionSet(\n [prob, staticprob], abstols, reltols, setups;\n names = labels,\n #print_names = true,\n dense = DENSE,\n verbose = false,\n save_everystep = SAVE_EVERYSTEP,\n appxsol = [test_sol, test_sol],\n maxiters=Int(1e5)\n )\nend\n\nplot(\n wp,\n title = \"Stiff 1: ROBER\",\n color = colors,\n xticks = 10.0 .^ (-16:1:4),\n yticks = 10.0 .^ (-6:1:5),\n)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/#Stiff-Problem-2:-HIRES","page":"Multi-Language Wrapper Benchmark","title":"Stiff Problem 2: HIRES","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"f = @ode_def Hires begin\n dy1 = -1.71*y1 + 0.43*y2 + 8.32*y3 + 0.0007\n dy2 = 1.71*y1 - 8.75*y2\n dy3 = -10.03*y3 + 0.43*y4 + 0.035*y5\n dy4 = 8.32*y2 + 1.71*y3 - 1.12*y4\n dy5 = -1.745*y5 + 0.43*y6 + 0.43*y7\n dy6 = -280.0*y6*y8 + 0.69*y4 + 1.71*y5 -\n 0.43*y6 + 0.69*y7\n dy7 = 280.0*y6*y8 - 1.81*y7\n dy8 = -280.0*y6*y8 + 1.81*y7\nend\n\nu0 = zeros(8)\nu0[1] = 1\nu0[8] = 0.0057\nprob = ODEProblem{true,SciMLBase.FullSpecialize()}(f,u0,(0.0,321.8122))\nstaticprob = ODEProblem{false,SciMLBase.FullSpecialize()}(f,SVector{8}(u0),(0.0,321.8122))\n\nsol = solve(prob,Rodas5(),abstol=1/10^14,reltol=1/10^14, dense=false)\ntest_sol = sol\nplot(sol, title=\"ROBER Solution\", legend=false)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"_setups = [\n \"Julia: Rosenbrock23\" => Dict(:alg=>Rosenbrock23())\n \"Julia: Rodas4\" => Dict(:alg=>Rodas4())\n \"Julia: radau\" => Dict(:alg=>RadauIIA5())\n \"Hairer: rodas\" => Dict(:alg=>rodas())\n \"Hairer: radau\" => Dict(:alg=>radau())\n \"MATLAB: ode23s\" => Dict(:alg=>MATLABDiffEq.ode23s())\n \"MATLAB: ode15s\" => Dict(:alg=>MATLABDiffEq.ode15s())\n \"SciPy: LSODA\" => Dict(:alg=>SciPyDiffEq.LSODA())\n \"SciPy: BDF\" => Dict(:alg=>SciPyDiffEq.BDF())\n \"SciPy: odeint\" => Dict(:alg=>SciPyDiffEq.odeint())\n \"deSolve: lsoda\" => Dict(:alg=>deSolveDiffEq.lsoda())\n \"Sundials: CVODE\" => Dict(:alg=>CVODE_BDF())\n \"ProbNumDiffEq: EK1(2)\" => Dict(:alg=>EK1(order=2, smooth=DENSE))\n \"ProbNumDiffEq: EK1(3)\" => Dict(:alg=>EK1(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK1(5)\" => Dict(:alg=>EK1(order=5, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\ncolors = tocolor.(labels) |> permutedims\n\nabstols = 1.0 ./ 10.0 .^ (5:10)\nreltols = 1.0 ./ 10.0 .^ (1:6)\n\nwp = with_logger(filtered_logger) do\n WorkPrecisionSet(\n [prob, staticprob], abstols, reltols, setups;\n names = labels,\n #print_names = true,\n dense = false,\n verbose = false,\n save_everystep = false,\n appxsol = [test_sol, test_sol],\n maxiters = Int(1e5),\n numruns=100\n )\nend\n\nplot(\n wp,\n title = \"Stiff 2: Hires\",\n color=colors,\n xticks = 10.0 .^ (-16:1:4),\n yticks = 10.0 .^ (-6:1:5),\n)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"(Image: )","category":"page"},{"location":"benchmarks/multi-language-wrappers/#Appendix","page":"Multi-Language Wrapper Benchmark","title":"Appendix","text":"","category":"section"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Computer information:","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"using InteractiveUtils\nInteractiveUtils.versioninfo()","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Julia Version 1.9.3\nCommit bed2cd540a1 (2023-08-24 14:43 UTC)\nBuild Info:\n Official https://julialang.org/ release\nPlatform Info:\n OS: Linux (x86_64-linux-gnu)\n CPU: 12 × Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz\n WORD_SIZE: 64\n LIBM: libopenlibm\n LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)\n Threads: 12 on 12 virtual cores\nEnvironment:\n JULIA_NUM_THREADS = auto\n JULIA_STACKTRACE_MINIMAL = true","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Package Information:","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"using Pkg\nPkg.status()","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml`\n [f3b72e0c] DiffEqDevTools v2.39.0\n [7073ff75] IJulia v1.24.2\n [7f56f5a3] LSODA v0.7.5\n [e6f89c97] LoggingExtras v1.0.3\n [e2752cbe] MATLABDiffEq v1.2.0\n [961ee093] ModelingToolkit v8.72.2\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [65888b18] ParameterizedFunctions v5.16.0\n [91a5bcdd] Plots v1.39.0\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [0bca4576] SciMLBase v2.4.0\n [505e40e9] SciPyDiffEq v0.2.1\n [90137ffa] StaticArrays v1.6.5\n [c3572dad] Sundials v4.20.0\n [44d3d7a6] Weave v0.10.12\n [0518478a] deSolveDiffEq v0.1.1","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"And the full manifest:","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Pkg.status(mode=Pkg.PKGMODE_MANIFEST)","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml`\n [47edcb42] ADTypes v0.2.4\n⌅ [c3fe647b] AbstractAlgebra v0.32.5\n [621f4979] AbstractFFTs v1.5.0\n [1520ce14] AbstractTrees v0.4.4\n [79e6a3ab] Adapt v3.6.2\n [ec485272] ArnoldiMethod v0.2.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.5\n [d1d4a3ce] BitFlags v0.1.7\n [62783981] BitTwiddlingConvenienceFunctions v0.1.5\n⌅ [fa961155] CEnum v0.4.2\n [2a0fbf3d] CPUSummary v0.2.4\n [00ebfdb7] CSTParser v3.3.6\n [49dc2e85] Calculus v0.5.1\n [324d7699] CategoricalArrays v0.10.8\n [d360d2e6] ChainRulesCore v1.16.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.2\n [35d6a980] ColorSchemes v3.24.0\n [3da002f7] ColorTypes v0.11.4\n [c3611d14] ColorVectorSpace v0.10.0\n [5ae59095] Colors v0.12.10\n [861a8166] Combinatorics v1.0.2\n [a80b9123] CommonMark v0.8.12\n [38540f10] CommonSolve v0.2.4\n [bbf7d656] CommonSubexpressions v0.3.0\n [34da2185] Compat v4.10.0\n [b152e2b5] CompositeTypes v0.1.3\n [2569d6c7] ConcreteStructs v0.2.3\n [f0e56b4a] ConcurrentUtilities v2.2.1\n [8f4d0f93] Conda v1.9.1\n [187b0558] ConstructionBase v1.5.4\n [d38c429a] Contour v0.6.2\n [adafc99b] CpuId v0.3.1\n [a8cc5b0e] Crayons v4.1.1\n [717857b8] DSP v0.7.9\n [9a962f9c] DataAPI v1.15.0\n [a93c6f00] DataFrames v1.6.1\n [864edb3b] DataStructures v0.18.15\n [e2d170a0] DataValueInterfaces v1.0.0\n [8bb1440f] DelimitedFiles v1.9.1\n [2b5f629d] DiffEqBase v6.133.1\n [459566f4] DiffEqCallbacks v2.33.0\n [f3b72e0c] DiffEqDevTools v2.39.0\n [77a26b50] DiffEqNoiseProcess v5.19.0\n [163ba53b] DiffResults v1.1.0\n [b552c78f] DiffRules v1.15.1\n [b4f34e82] Distances v0.10.10\n [31c24e10] Distributions v0.25.102\n [ffbed154] DocStringExtensions v0.9.3\n⌅ [5b8099bc] DomainSets v0.6.7\n [fa6b7ba4] DualNumbers v0.6.8\n [7c1d4256] DynamicPolynomials v0.5.3\n [b305315f] Elliptic v1.0.1\n [4e289a0a] EnumX v1.0.4\n [f151be2c] EnzymeCore v0.6.1\n [6912e4f1] Espresso v0.6.1\n [460bff9d] ExceptionUnwrapping v0.1.9\n [d4d017d3] ExponentialUtilities v1.25.0\n [e2ba6199] ExprTools v0.1.10\n [c87230d0] FFMPEG v0.4.1\n [7a1cc6ca] FFTW v1.7.1\n [7034ab61] FastBroadcast v0.2.7\n [9aa1b823] FastClosures v0.3.2\n [442a2c76] FastGaussQuadrature v1.0.0\n [29a986be] FastLapackInterface v2.0.0\n [1a297f60] FillArrays v1.6.1\n [6a86dc24] FiniteDiff v2.21.1\n [53c48c17] FixedPointNumbers v0.8.4\n [59287772] Formatting v0.4.2\n [f6369f11] ForwardDiff v0.10.36\n [069b7b12] FunctionWrappers v1.1.3\n [77dc65aa] FunctionWrappersWrappers v0.1.3\n [d9f16b24] Functors v0.4.5\n [46192b85] GPUArraysCore v0.1.5\n [28b8d3ca] GR v0.72.10\n [43dcc890] GaussianDistributions v0.5.2\n [c145ed77] GenericSchur v0.5.3\n [c27321d9] Glob v1.3.1\n [86223c79] Graphs v1.9.0\n [42e2da0e] Grisu v1.0.2\n [0b43b601] Groebner v0.4.4\n [d5909c97] GroupsCore v0.4.0\n [cd3eb016] HTTP v1.10.0\n [eafb193a] Highlights v0.5.2\n [3e5b6fbb] HostCPUFeatures v0.1.16\n [34004b35] HypergeometricFunctions v0.3.23\n [7073ff75] IJulia v1.24.2\n [615f187c] IfElse v0.1.1\n [d25df0c9] Inflate v0.1.4\n [842dd82b] InlineStrings v1.4.0\n [18e54dd8] IntegerMathUtils v0.1.2\n [8197267c] IntervalSets v0.7.7\n [41ab1584] InvertedIndices v1.3.0\n [92d709cd] IrrationalConstants v0.2.2\n [c8e1da08] IterTools v1.8.0\n [82899510] IteratorInterfaceExtensions v1.0.0\n [1019f520] JLFzf v0.1.5\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.39\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [ba0b0d4f] Krylov v0.9.4\n [7f56f5a3] LSODA v0.7.5\n [b964fa9f] LaTeXStrings v1.3.0\n [2ee39098] LabelledArrays v1.14.0\n [984bce1d] LambertW v0.4.6\n [23fbe1c1] Latexify v0.16.1\n [10f19ff3] LayoutPointers v0.1.14\n [50d2b5c4] Lazy v0.15.1\n [1d6d02ad] LeftChildRightSiblingTrees v0.2.0\n [d3d80556] LineSearches v7.2.0\n [7ed4a6bd] LinearSolve v2.9.2\n [2ab3a3ac] LogExpFunctions v0.3.26\n [e6f89c97] LoggingExtras v1.0.3\n [bdcacae8] LoopVectorization v0.12.165\n [10e44e05] MATLAB v0.8.4\n [e2752cbe] MATLABDiffEq v1.2.0\n [d8e11817] MLStyle v0.4.17\n [1914dd2f] MacroTools v0.5.11\n [d125e4d3] ManualMemory v0.1.8\n [739be429] MbedTLS v1.1.7\n [442fdcdd] Measures v0.3.2\n [e1d29d7a] Missings v1.1.0\n [961ee093] ModelingToolkit v8.72.2\n [46d2c3a1] MuladdMacro v0.2.4\n [102ac46a] MultivariatePolynomials v0.5.2\n [ffc61752] Mustache v1.0.17\n [d8a4904e] MutableArithmetics v1.3.3\n [d41bc354] NLSolversBase v7.8.3\n [2774e3e8] NLsolve v4.5.1\n [77ba4419] NaNMath v1.0.2\n [8913a72c] NonlinearSolve v2.2.1\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [6fd5a793] Octavian v0.3.27\n [6fe1bfb0] OffsetArrays v1.12.10\n [4d8831e6] OpenSSL v1.4.1\n [429524aa] Optim v1.7.8\n [bac558e1] OrderedCollections v1.6.2\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [90014a1f] PDMats v0.11.25\n [fe68d972] PSDMatrices v0.4.4\n [65ce6f38] PackageExtensionCompat v1.0.2\n [65888b18] ParameterizedFunctions v5.16.0\n [d96e819e] Parameters v0.12.3\n [69de0a69] Parsers v2.7.2\n [b98c9c47] Pipe v1.3.0\n [32113eaa] PkgBenchmark v0.2.12\n [ccf2f8ad] PlotThemes v3.1.0\n [995b91a9] PlotUtils v1.3.5\n [91a5bcdd] Plots v1.39.0\n [e409e4f3] PoissonRandom v0.4.4\n [f517fe37] Polyester v0.7.8\n [1d0040c9] PolyesterWeave v0.2.1\n⌅ [f27b6e38] Polynomials v3.2.13\n [2dfb63ee] PooledArrays v1.4.3\n [85a6dd25] PositiveFactorizations v0.2.4\n [d236fae5] PreallocationTools v0.4.12\n [aea7be01] PrecompileTools v1.2.0\n [21216c6a] Preferences v1.4.1\n [08abe8d2] PrettyTables v2.2.7\n [27ebfcd6] Primes v0.5.4\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [33c8b6b6] ProgressLogging v0.1.4\n [438e738f] PyCall v1.96.1\n [1fd47b50] QuadGK v2.9.1\n [6f49c342] RCall v0.13.18\n [74087812] Random123 v1.6.1\n [fb686558] RandomExtensions v0.4.4\n [e6cf234a] RandomNumbers v1.5.3\n [3cdcf5f2] RecipesBase v1.3.4\n [01d81517] RecipesPipeline v0.6.12\n [731186ca] RecursiveArrayTools v2.39.0\n [f2c3362d] RecursiveFactorization v0.2.20\n [189a3867] Reexport v1.2.2\n [05181044] RelocatableFolders v1.0.1\n [ae029012] Requires v1.3.0\n [ae5879a3] ResettableStacks v1.1.1\n [79098fc4] Rmath v0.7.1\n [47965b36] RootedTrees v2.19.2\n [7e49a35a] RuntimeGeneratedFunctions v0.5.12\n [fdea26ae] SIMD v3.4.5\n [94e857df] SIMDTypes v0.1.0\n [476501e8] SLEEFPirates v0.6.39\n [0bca4576] SciMLBase v2.4.0\n [e9a6253c] SciMLNLSolve v0.1.9\n [c0aeaf25] SciMLOperators v0.3.6\n [505e40e9] SciPyDiffEq v0.2.1\n [6c6a2e73] Scratch v1.2.0\n [91c51154] SentinelArrays v1.4.0\n [efcf1570] Setfield v1.1.1\n [1277b4bf] ShiftedArrays v2.0.0\n [992d4aef] Showoff v1.0.3\n [777ac1f9] SimpleBufferStream v1.1.0\n [727e6d20] SimpleNonlinearSolve v0.1.20\n [699a6c99] SimpleTraits v0.9.4\n [ce78b400] SimpleUnPack v1.1.0\n [66db9d55] SnoopPrecompile v1.0.3\n [b85f4697] SoftGlobalScope v1.1.0\n [a2af1166] SortingAlgorithms v1.1.1\n [47a9eef4] SparseDiffTools v2.8.0\n [e56a9233] Sparspak v0.3.9\n [276daf66] SpecialFunctions v2.3.1\n [928aab9d] SpecialMatrices v3.0.0\n [aedffcd0] Static v0.8.8\n [0d7ed370] StaticArrayInterface v1.4.1\n [90137ffa] StaticArrays v1.6.5\n [1e83bf80] StaticArraysCore v1.4.2\n [82ae8749] StatsAPI v1.7.0\n [2913bbd2] StatsBase v0.34.2\n [4c63d2b9] StatsFuns v1.3.0\n [3eaba693] StatsModels v0.7.3\n⌅ [7792a7ef] StrideArraysCore v0.4.17\n [69024149] StringEncodings v0.3.7\n [892a3eda] StringManipulation v0.3.4\n [09ab397b] StructArrays v0.6.16\n [c3572dad] Sundials v4.20.0\n [2efcf032] SymbolicIndexingInterface v0.2.2\n [d1185830] SymbolicUtils v1.4.0\n [0c5d862f] Symbolics v5.9.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.0\n [92b13dbe] TaylorIntegration v0.14.3\n [6aa5eb33] TaylorSeries v0.15.2\n [62fd8b95] TensorCore v0.1.1\n [5d786b92] TerminalLoggers v0.1.7\n [8290d209] ThreadingUtilities v0.5.2\n [a759f4b9] TimerOutputs v0.5.23\n [c751599d] ToeplitzMatrices v0.8.2\n [0796e94c] Tokenize v0.5.25\n [3bb67fe8] TranscodingStreams v0.9.13\n [a2a6695c] TreeViews v0.3.0\n [d5829a12] TriangularSolve v0.1.19\n [410a4b4d] Tricks v0.1.8\n [781d530d] TruncatedStacktraces v1.4.0\n [5c2747f8] URIs v1.5.0\n [3a884ed6] UnPack v1.0.2\n [1cfade01] UnicodeFun v0.4.1\n [1986cc42] Unitful v1.17.0\n [45397f5d] UnitfulLatexify v1.6.3\n [a7c27f48] Unityper v0.1.5\n [41fe7b60] Unzip v0.2.0\n [3d5dd08c] VectorizationBase v0.21.64\n [81def892] VersionParsing v1.3.0\n [19fa3120] VertexSafeGraphs v0.2.0\n [44d3d7a6] Weave v0.10.12\n [1b915085] WinReg v1.0.0\n [ddb6d928] YAML v0.4.9\n [c2297ded] ZMQ v1.2.2\n [700de1a5] ZygoteRules v0.2.3\n [0518478a] deSolveDiffEq v0.1.1\n [6e34b625] Bzip2_jll v1.0.8+0\n [83423d85] Cairo_jll v1.16.1+1\n [2702e6a9] EpollShim_jll v0.0.20230411+0\n [2e619515] Expat_jll v2.5.0+0\n⌃ [b22a6f82] FFMPEG_jll v4.4.2+2\n [f5851436] FFTW_jll v3.3.10+0\n [a3f928ae] Fontconfig_jll v2.13.93+0\n [d7e528f0] FreeType2_jll v2.13.1+0\n [559328eb] FriBidi_jll v1.0.10+0\n [0656b61e] GLFW_jll v3.3.8+0\n [d2c73de3] GR_jll v0.72.10+0\n [78b55507] Gettext_jll v0.21.0+0\n [7746bdde] Glib_jll v2.76.5+0\n [3b182d85] Graphite2_jll v1.3.14+0\n [2e76f6c2] HarfBuzz_jll v2.8.1+1\n [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0\n [aacddb02] JpegTurbo_jll v2.1.91+0\n [c1c5ebd0] LAME_jll v3.100.1+0\n [88015f11] LERC_jll v3.0.0+1\n [1d63c593] LLVMOpenMP_jll v15.0.4+0\n [aae0fff6] LSODA_jll v0.1.2+0\n [dd4b983a] LZO_jll v2.10.1+0\n⌅ [e9f186c6] Libffi_jll v3.2.2+1\n [d4300ac3] Libgcrypt_jll v1.8.7+0\n [7e76a0d4] Libglvnd_jll v1.6.0+0\n [7add5ba3] Libgpg_error_jll v1.42.0+0\n [94ce4f54] Libiconv_jll v1.17.0+0\n [4b2f31a3] Libmount_jll v2.35.0+0\n [89763e89] Libtiff_jll v4.5.1+1\n [38a345b3] Libuuid_jll v2.36.0+0\n [856f044c] MKL_jll v2023.2.0+0\n [c771fb93] ODEInterface_jll v0.0.1+0\n [e7412a2a] Ogg_jll v1.3.5+1\n⌅ [458c3c95] OpenSSL_jll v1.1.23+0\n [efe28fd5] OpenSpecFun_jll v0.5.5+0\n [91d4177d] Opus_jll v1.3.2+0\n [30392449] Pixman_jll v0.42.2+0\n [c0090381] Qt6Base_jll v6.5.2+2\n [f50d1b31] Rmath_jll v0.4.0+0\n⌅ [fb77eaff] Sundials_jll v5.2.1+0\n [a44049a8] Vulkan_Loader_jll v1.3.243+0\n [a2964d1f] Wayland_jll v1.21.0+1\n [2381bf8a] Wayland_protocols_jll v1.25.0+0\n [02c8fc9c] XML2_jll v2.11.5+0\n [aed1982a] XSLT_jll v1.1.34+0\n [ffd25f8a] XZ_jll v5.4.4+0\n [f67eecfb] Xorg_libICE_jll v1.0.10+1\n [c834827a] Xorg_libSM_jll v1.2.3+0\n [4f6342f7] Xorg_libX11_jll v1.8.6+0\n [0c0b7dd1] Xorg_libXau_jll v1.0.11+0\n [935fb764] Xorg_libXcursor_jll v1.2.0+4\n [a3789734] Xorg_libXdmcp_jll v1.1.4+0\n [1082639a] Xorg_libXext_jll v1.3.4+4\n [d091e8ba] Xorg_libXfixes_jll v5.0.3+4\n [a51aa0fd] Xorg_libXi_jll v1.7.10+4\n [d1454406] Xorg_libXinerama_jll v1.1.4+4\n [ec84b674] Xorg_libXrandr_jll v1.5.2+4\n [ea2f1a96] Xorg_libXrender_jll v0.9.10+4\n [14d82f49] Xorg_libpthread_stubs_jll v0.1.1+0\n [c7cfdc94] Xorg_libxcb_jll v1.15.0+0\n [cc61e674] Xorg_libxkbfile_jll v1.1.2+0\n [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0\n [12413925] Xorg_xcb_util_image_jll v0.4.0+1\n [2def613f] Xorg_xcb_util_jll v0.4.0+1\n [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1\n [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1\n [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1\n [35661453] Xorg_xkbcomp_jll v1.4.6+0\n [33bec58e] Xorg_xkeyboard_config_jll v2.39.0+0\n [c5fb5394] Xorg_xtrans_jll v1.5.0+0\n [8f1865be] ZeroMQ_jll v4.3.4+0\n [3161d3a3] Zstd_jll v1.5.5+0\n [35ca27e7] eudev_jll v3.2.9+0\n⌅ [214eeab7] fzf_jll v0.29.0+0\n [1a1c6b14] gperf_jll v3.1.1+0\n [a4ae2306] libaom_jll v3.4.0+0\n [0ac62f75] libass_jll v0.15.1+0\n [2db6ffa8] libevdev_jll v1.11.0+0\n [f638f0a6] libfdk_aac_jll v2.0.2+0\n [36db933b] libinput_jll v1.18.0+0\n [b53b4c65] libpng_jll v1.6.38+0\n [a9144af2] libsodium_jll v1.0.20+0\n [f27f6e37] libvorbis_jll v1.3.7+1\n [009596ad] mtdev_jll v1.1.6+0\n [1270edf5] x264_jll v2021.5.5+0\n [dfaa095f] x265_jll v3.5.0+0\n [d8fb68d0] xkbcommon_jll v1.4.1+1\n [0dad84c5] ArgTools v1.1.1\n [56f22d72] Artifacts\n [2a0f44e3] Base64\n [ade2ca70] Dates\n [8ba89e20] Distributed\n [f43a241f] Downloads v1.6.0\n [7b1f6079] FileWatching\n [9fa8497b] Future\n [b77e0a4c] InteractiveUtils\n [4af54fe1] LazyArtifacts\n [b27032c2] LibCURL v0.6.3\n [76f85450] LibGit2\n [8f399da3] Libdl\n [37e2e46d] LinearAlgebra\n [56ddb016] Logging\n [d6f4376e] Markdown\n [a63ad114] Mmap\n [ca575930] NetworkOptions v1.2.0\n [44cfe95a] Pkg v1.9.2\n [de0858da] Printf\n [9abbd945] Profile\n [3fa0cd96] REPL\n [9a3f8284] Random\n [ea8e919c] SHA v0.7.0\n [9e88b42a] Serialization\n [1a1011a3] SharedArrays\n [6462fe0b] Sockets\n [2f01184e] SparseArrays\n [10745b16] Statistics v1.9.0\n [4607b0f0] SuiteSparse\n [fa267f1f] TOML v1.0.3\n [a4e569a6] Tar v1.10.0\n [8dfed614] Test\n [cf7118a7] UUIDs\n [4ec0a83e] Unicode\n [e66e0078] CompilerSupportLibraries_jll v1.0.5+0\n [deac9b47] LibCURL_jll v7.84.0+0\n [29816b5a] LibSSH2_jll v1.10.2+0\n [c8ffd9c3] MbedTLS_jll v2.28.2+0\n [14a3606d] MozillaCACerts_jll v2022.10.11\n [4536629a] OpenBLAS_jll v0.3.21+4\n [05823500] OpenLibm_jll v0.8.1+0\n [efcefdf7] PCRE2_jll v10.42.0+0\n [bea87d4a] SuiteSparse_jll v5.10.1+6\n [83775a58] Zlib_jll v1.2.13+0\n [8e850b90] libblastrampoline_jll v5.8.0+0\n [8e850ede] nghttp2_jll v1.48.0+0\n [3f19e933] p7zip_jll v17.4.0+0\nInfo Packages marked with ⌃ and ⌅ have new versions available, but those wi\nth ⌅ are restricted by compatibility constraints from upgrading. To see why\n use `status --outdated -m`","category":"page"},{"location":"benchmarks/pleiades/#Pleiades-benchmark","page":"Second order ODE: Pleiades","title":"Pleiades benchmark","text":"","category":"section"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"using LinearAlgebra, Statistics\nusing DiffEqDevTools, ParameterizedFunctions, SciMLBase, OrdinaryDiffEq, Sundials, Plots\nusing ModelingToolkit\nusing ProbNumDiffEq\n\n# Plotting theme\ntheme(:dao;\n markerstrokewidth=0.5,\n legend=:outertopright,\n bottom_margin=5Plots.mm,\n size = (1000, 400),\n)","category":"page"},{"location":"benchmarks/pleiades/#Pleiades-problem-definition","page":"Second order ODE: Pleiades","title":"Pleiades problem definition","text":"","category":"section"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"# first-order ODE\n@fastmath function pleiades(du, u, p, t)\n v = view(u, 1:7) # x\n w = view(u, 8:14) # y\n x = view(u, 15:21) # x′\n y = view(u, 22:28) # y′\n du[15:21] .= v\n du[22:28] .= w\n @inbounds @simd ivdep for i in 1:14\n du[i] = zero(eltype(u))\n end\n @inbounds @simd ivdep for i in 1:7\n @inbounds @simd ivdep for j in 1:7\n if i != j\n r = ((x[i] - x[j])^2 + (y[i] - y[j])^2)^(3 / 2)\n du[i] += j * (x[j] - x[i]) / r\n du[7+i] += j * (y[j] - y[i]) / r\n end\n end\n end\nend\nx0 = [3.0, 3.0, -1.0, -3.0, 2.0, -2.0, 2.0]\ny0 = [3.0, -3.0, 2.0, 0, 0, -4.0, 4.0]\ndx0 = [0, 0, 0, 0, 0, 1.75, -1.5]\ndy0 = [0, 0, 0, -1.25, 1, 0, 0]\nu0 = [dx0; dy0; x0; y0]\ntspan = (0.0, 3.0)\nprob1 = ODEProblem(pleiades, u0, tspan)\n\n# second-order ODE\nfunction pleiades2(ddu, du, u, p, t)\n x = view(u, 1:7)\n y = view(u, 8:14)\n for i in 1:14\n ddu[i] = zero(eltype(u))\n end\n for i in 1:7, j in 1:7\n if i != j\n r = ((x[i] - x[j])^2 + (y[i] - y[j])^2)^(3 / 2)\n ddu[i] += j * (x[j] - x[i]) / r\n ddu[7+i] += j * (y[j] - y[i]) / r\n end\n end\nend\nu0 = [x0; y0]\ndu0 = [dx0; dy0]\nprob2 = SecondOrderODEProblem(pleiades2, du0, u0, tspan)\nprobs = [prob1, prob2]\n\nref_sol1 = solve(prob1, Vern9(), abstol=1/10^14, reltol=1/10^14, dense=false)\nref_sol2 = solve(prob2, Vern9(), abstol=1/10^14, reltol=1/10^14, dense=false)\nref_sols = [ref_sol1, ref_sol2]\n\nplot(ref_sol1, idxs=[(14+i,21+i) for i in 1:7], title=\"Pleiades Solution\", legend=false)\nscatter!(ref_sol1.u[end][15:21], ref_sol1.u[end][22:end], color=1:7)","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"(Image: )","category":"page"},{"location":"benchmarks/pleiades/#First-order-ODE-vs.-second-order-ODE","page":"Second order ODE: Pleiades","title":"First-order ODE vs. second-order ODE","text":"","category":"section"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"DENSE = false;\nSAVE_EVERYSTEP = false;\n\n_setups = [\n \"EK0(3) (1st order ODE)\" => Dict(:alg => EK0(order=3, smooth=DENSE), :prob_choice => 1)\n \"EK0(5) (1st order ODE)\" => Dict(:alg => EK0(order=5, smooth=DENSE), :prob_choice => 1)\n \"EK1(3) (1st order ODE)\" => Dict(:alg => EK1(order=3, smooth=DENSE), :prob_choice => 1)\n \"EK1(5) (1st order ODE)\" => Dict(:alg => EK1(order=5, smooth=DENSE), :prob_choice => 1)\n \"EK0(4) (2nd order ODE)\" => Dict(:alg => EK0(order=4, smooth=DENSE), :prob_choice => 2)\n \"EK0(6) (2nd order ODE)\" => Dict(:alg => EK0(order=6, smooth=DENSE), :prob_choice => 2)\n \"EK1(4) (2nd order ODE)\" => Dict(:alg => EK1(order=4, smooth=DENSE), :prob_choice => 2)\n \"EK1(6) (2nd order ODE)\" => Dict(:alg => EK1(order=6, smooth=DENSE), :prob_choice => 2)\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (6:11)\nreltols = 1.0 ./ 10.0 .^ (3:8)\n\nwp = WorkPrecisionSet(\n probs, abstols, reltols, setups;\n names = labels,\n #print_names = true,\n appxsol = ref_sols,\n dense = DENSE,\n save_everystep = SAVE_EVERYSTEP,\n numruns = 10,\n maxiters = Int(1e7),\n timeseries_errors = false,\n verbose = false,\n)\n\nplot(wp, color=[1 1 2 2 3 3 4 4],\n # xticks = 10.0 .^ (-16:1:5)\n)","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"(Image: )","category":"page"},{"location":"benchmarks/pleiades/#Conclusion","page":"Second order ODE: Pleiades","title":"Conclusion","text":"","category":"section"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"If the problem is a second-order ODE, implement it as a second-order ODE!","category":"page"},{"location":"benchmarks/pleiades/#Appendix","page":"Second order ODE: Pleiades","title":"Appendix","text":"","category":"section"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Computer information:","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"using InteractiveUtils\nInteractiveUtils.versioninfo()","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Julia Version 1.9.3\nCommit bed2cd540a1 (2023-08-24 14:43 UTC)\nBuild Info:\n Official https://julialang.org/ release\nPlatform Info:\n OS: Linux (x86_64-linux-gnu)\n CPU: 12 × Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz\n WORD_SIZE: 64\n LIBM: libopenlibm\n LLVM: libLLVM-14.0.6 (ORCJIT, broadwell)\n Threads: 12 on 12 virtual cores\nEnvironment:\n JULIA_NUM_THREADS = auto\n JULIA_STACKTRACE_MINIMAL = true","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Package Information:","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"using Pkg\nPkg.status()","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml`\n [f3b72e0c] DiffEqDevTools v2.39.0\n [7073ff75] IJulia v1.24.2\n [7f56f5a3] LSODA v0.7.5\n [e6f89c97] LoggingExtras v1.0.3\n [e2752cbe] MATLABDiffEq v1.2.0\n [961ee093] ModelingToolkit v8.72.2\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [65888b18] ParameterizedFunctions v5.16.0\n [91a5bcdd] Plots v1.39.0\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [0bca4576] SciMLBase v2.4.0\n [505e40e9] SciPyDiffEq v0.2.1\n [90137ffa] StaticArrays v1.6.5\n [c3572dad] Sundials v4.20.0\n [44d3d7a6] Weave v0.10.12\n [0518478a] deSolveDiffEq v0.1.1","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"And the full manifest:","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Pkg.status(mode=Pkg.PKGMODE_MANIFEST)","category":"page"},{"location":"benchmarks/pleiades/","page":"Second order ODE: Pleiades","title":"Second order ODE: Pleiades","text":"Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml`\n [47edcb42] ADTypes v0.2.4\n⌅ [c3fe647b] AbstractAlgebra v0.32.5\n [621f4979] AbstractFFTs v1.5.0\n [1520ce14] AbstractTrees v0.4.4\n [79e6a3ab] Adapt v3.6.2\n [ec485272] ArnoldiMethod v0.2.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.5\n [d1d4a3ce] BitFlags v0.1.7\n [62783981] BitTwiddlingConvenienceFunctions v0.1.5\n⌅ [fa961155] CEnum v0.4.2\n [2a0fbf3d] CPUSummary v0.2.4\n [00ebfdb7] CSTParser v3.3.6\n [49dc2e85] Calculus v0.5.1\n [324d7699] CategoricalArrays v0.10.8\n [d360d2e6] ChainRulesCore v1.16.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.2\n [35d6a980] ColorSchemes v3.24.0\n [3da002f7] ColorTypes v0.11.4\n [c3611d14] ColorVectorSpace v0.10.0\n [5ae59095] Colors v0.12.10\n [861a8166] Combinatorics v1.0.2\n [a80b9123] CommonMark v0.8.12\n [38540f10] CommonSolve v0.2.4\n [bbf7d656] CommonSubexpressions v0.3.0\n [34da2185] Compat v4.10.0\n [b152e2b5] CompositeTypes v0.1.3\n [2569d6c7] ConcreteStructs v0.2.3\n [f0e56b4a] ConcurrentUtilities v2.2.1\n [8f4d0f93] Conda v1.9.1\n [187b0558] ConstructionBase v1.5.4\n [d38c429a] Contour v0.6.2\n [adafc99b] CpuId v0.3.1\n [a8cc5b0e] Crayons v4.1.1\n [717857b8] DSP v0.7.9\n [9a962f9c] DataAPI v1.15.0\n [a93c6f00] DataFrames v1.6.1\n [864edb3b] DataStructures v0.18.15\n [e2d170a0] DataValueInterfaces v1.0.0\n [8bb1440f] DelimitedFiles v1.9.1\n [2b5f629d] DiffEqBase v6.133.1\n [459566f4] DiffEqCallbacks v2.33.0\n [f3b72e0c] DiffEqDevTools v2.39.0\n [77a26b50] DiffEqNoiseProcess v5.19.0\n [163ba53b] DiffResults v1.1.0\n [b552c78f] DiffRules v1.15.1\n [b4f34e82] Distances v0.10.10\n [31c24e10] Distributions v0.25.102\n [ffbed154] DocStringExtensions v0.9.3\n⌅ [5b8099bc] DomainSets v0.6.7\n [fa6b7ba4] DualNumbers v0.6.8\n [7c1d4256] DynamicPolynomials v0.5.3\n [b305315f] Elliptic v1.0.1\n [4e289a0a] EnumX v1.0.4\n [f151be2c] EnzymeCore v0.6.1\n [6912e4f1] Espresso v0.6.1\n [460bff9d] ExceptionUnwrapping v0.1.9\n [d4d017d3] ExponentialUtilities v1.25.0\n [e2ba6199] ExprTools v0.1.10\n [c87230d0] FFMPEG v0.4.1\n [7a1cc6ca] FFTW v1.7.1\n [7034ab61] FastBroadcast v0.2.7\n [9aa1b823] FastClosures v0.3.2\n [442a2c76] FastGaussQuadrature v1.0.0\n [29a986be] FastLapackInterface v2.0.0\n [1a297f60] FillArrays v1.6.1\n [6a86dc24] FiniteDiff v2.21.1\n [53c48c17] FixedPointNumbers v0.8.4\n [59287772] Formatting v0.4.2\n [f6369f11] ForwardDiff v0.10.36\n [069b7b12] FunctionWrappers v1.1.3\n [77dc65aa] FunctionWrappersWrappers v0.1.3\n [d9f16b24] Functors v0.4.5\n [46192b85] GPUArraysCore v0.1.5\n [28b8d3ca] GR v0.72.10\n [43dcc890] GaussianDistributions v0.5.2\n [c145ed77] GenericSchur v0.5.3\n [c27321d9] Glob v1.3.1\n [86223c79] Graphs v1.9.0\n [42e2da0e] Grisu v1.0.2\n [0b43b601] Groebner v0.4.4\n [d5909c97] GroupsCore v0.4.0\n [cd3eb016] HTTP v1.10.0\n [eafb193a] Highlights v0.5.2\n [3e5b6fbb] HostCPUFeatures v0.1.16\n [34004b35] HypergeometricFunctions v0.3.23\n [7073ff75] IJulia v1.24.2\n [615f187c] IfElse v0.1.1\n [d25df0c9] Inflate v0.1.4\n [842dd82b] InlineStrings v1.4.0\n [18e54dd8] IntegerMathUtils v0.1.2\n [8197267c] IntervalSets v0.7.7\n [41ab1584] InvertedIndices v1.3.0\n [92d709cd] IrrationalConstants v0.2.2\n [c8e1da08] IterTools v1.8.0\n [82899510] IteratorInterfaceExtensions v1.0.0\n [1019f520] JLFzf v0.1.5\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.39\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [ba0b0d4f] Krylov v0.9.4\n [7f56f5a3] LSODA v0.7.5\n [b964fa9f] LaTeXStrings v1.3.0\n [2ee39098] LabelledArrays v1.14.0\n [984bce1d] LambertW v0.4.6\n [23fbe1c1] Latexify v0.16.1\n [10f19ff3] LayoutPointers v0.1.14\n [50d2b5c4] Lazy v0.15.1\n [1d6d02ad] LeftChildRightSiblingTrees v0.2.0\n [d3d80556] LineSearches v7.2.0\n [7ed4a6bd] LinearSolve v2.9.2\n [2ab3a3ac] LogExpFunctions v0.3.26\n [e6f89c97] LoggingExtras v1.0.3\n [bdcacae8] LoopVectorization v0.12.165\n [10e44e05] MATLAB v0.8.4\n [e2752cbe] MATLABDiffEq v1.2.0\n [d8e11817] MLStyle v0.4.17\n [1914dd2f] MacroTools v0.5.11\n [d125e4d3] ManualMemory v0.1.8\n [739be429] MbedTLS v1.1.7\n [442fdcdd] Measures v0.3.2\n [e1d29d7a] Missings v1.1.0\n [961ee093] ModelingToolkit v8.72.2\n [46d2c3a1] MuladdMacro v0.2.4\n [102ac46a] MultivariatePolynomials v0.5.2\n [ffc61752] Mustache v1.0.17\n [d8a4904e] MutableArithmetics v1.3.3\n [d41bc354] NLSolversBase v7.8.3\n [2774e3e8] NLsolve v4.5.1\n [77ba4419] NaNMath v1.0.2\n [8913a72c] NonlinearSolve v2.2.1\n [54ca160b] ODEInterface v0.5.0\n [09606e27] ODEInterfaceDiffEq v3.13.3\n [6fd5a793] Octavian v0.3.27\n [6fe1bfb0] OffsetArrays v1.12.10\n [4d8831e6] OpenSSL v1.4.1\n [429524aa] Optim v1.7.8\n [bac558e1] OrderedCollections v1.6.2\n [1dea7af3] OrdinaryDiffEq v6.58.0\n [90014a1f] PDMats v0.11.25\n [fe68d972] PSDMatrices v0.4.4\n [65ce6f38] PackageExtensionCompat v1.0.2\n [65888b18] ParameterizedFunctions v5.16.0\n [d96e819e] Parameters v0.12.3\n [69de0a69] Parsers v2.7.2\n [b98c9c47] Pipe v1.3.0\n [32113eaa] PkgBenchmark v0.2.12\n [ccf2f8ad] PlotThemes v3.1.0\n [995b91a9] PlotUtils v1.3.5\n [91a5bcdd] Plots v1.39.0\n [e409e4f3] PoissonRandom v0.4.4\n [f517fe37] Polyester v0.7.8\n [1d0040c9] PolyesterWeave v0.2.1\n⌅ [f27b6e38] Polynomials v3.2.13\n [2dfb63ee] PooledArrays v1.4.3\n [85a6dd25] PositiveFactorizations v0.2.4\n [d236fae5] PreallocationTools v0.4.12\n [aea7be01] PrecompileTools v1.2.0\n [21216c6a] Preferences v1.4.1\n [08abe8d2] PrettyTables v2.2.7\n [27ebfcd6] Primes v0.5.4\n [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`\n [33c8b6b6] ProgressLogging v0.1.4\n [438e738f] PyCall v1.96.1\n [1fd47b50] QuadGK v2.9.1\n [6f49c342] RCall v0.13.18\n [74087812] Random123 v1.6.1\n [fb686558] RandomExtensions v0.4.4\n [e6cf234a] RandomNumbers v1.5.3\n [3cdcf5f2] RecipesBase v1.3.4\n [01d81517] RecipesPipeline v0.6.12\n [731186ca] RecursiveArrayTools v2.39.0\n [f2c3362d] RecursiveFactorization v0.2.20\n [189a3867] Reexport v1.2.2\n [05181044] RelocatableFolders v1.0.1\n [ae029012] Requires v1.3.0\n [ae5879a3] ResettableStacks v1.1.1\n [79098fc4] Rmath v0.7.1\n [47965b36] RootedTrees v2.19.2\n [7e49a35a] RuntimeGeneratedFunctions v0.5.12\n [fdea26ae] SIMD v3.4.5\n [94e857df] SIMDTypes v0.1.0\n [476501e8] SLEEFPirates v0.6.39\n [0bca4576] SciMLBase v2.4.0\n [e9a6253c] SciMLNLSolve v0.1.9\n [c0aeaf25] SciMLOperators v0.3.6\n [505e40e9] SciPyDiffEq v0.2.1\n [6c6a2e73] Scratch v1.2.0\n [91c51154] SentinelArrays v1.4.0\n [efcf1570] Setfield v1.1.1\n [1277b4bf] ShiftedArrays v2.0.0\n [992d4aef] Showoff v1.0.3\n [777ac1f9] SimpleBufferStream v1.1.0\n [727e6d20] SimpleNonlinearSolve v0.1.20\n [699a6c99] SimpleTraits v0.9.4\n [ce78b400] SimpleUnPack v1.1.0\n [66db9d55] SnoopPrecompile v1.0.3\n [b85f4697] SoftGlobalScope v1.1.0\n [a2af1166] SortingAlgorithms v1.1.1\n [47a9eef4] SparseDiffTools v2.8.0\n [e56a9233] Sparspak v0.3.9\n [276daf66] SpecialFunctions v2.3.1\n [928aab9d] SpecialMatrices v3.0.0\n [aedffcd0] Static v0.8.8\n [0d7ed370] StaticArrayInterface v1.4.1\n [90137ffa] StaticArrays v1.6.5\n [1e83bf80] StaticArraysCore v1.4.2\n [82ae8749] StatsAPI v1.7.0\n [2913bbd2] StatsBase v0.34.2\n [4c63d2b9] StatsFuns v1.3.0\n [3eaba693] StatsModels v0.7.3\n⌅ [7792a7ef] StrideArraysCore v0.4.17\n [69024149] StringEncodings v0.3.7\n [892a3eda] StringManipulation v0.3.4\n [09ab397b] StructArrays v0.6.16\n [c3572dad] Sundials v4.20.0\n [2efcf032] SymbolicIndexingInterface v0.2.2\n [d1185830] SymbolicUtils v1.4.0\n [0c5d862f] Symbolics v5.9.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.0\n [92b13dbe] TaylorIntegration v0.14.3\n [6aa5eb33] TaylorSeries v0.15.2\n [62fd8b95] TensorCore v0.1.1\n [5d786b92] TerminalLoggers v0.1.7\n [8290d209] ThreadingUtilities v0.5.2\n [a759f4b9] TimerOutputs v0.5.23\n [c751599d] ToeplitzMatrices v0.8.2\n [0796e94c] Tokenize v0.5.25\n [3bb67fe8] TranscodingStreams v0.9.13\n [a2a6695c] TreeViews v0.3.0\n [d5829a12] TriangularSolve v0.1.19\n [410a4b4d] Tricks v0.1.8\n [781d530d] TruncatedStacktraces v1.4.0\n [5c2747f8] URIs v1.5.0\n [3a884ed6] UnPack v1.0.2\n [1cfade01] UnicodeFun v0.4.1\n [1986cc42] Unitful v1.17.0\n [45397f5d] UnitfulLatexify v1.6.3\n [a7c27f48] Unityper v0.1.5\n [41fe7b60] Unzip v0.2.0\n [3d5dd08c] VectorizationBase v0.21.64\n [81def892] VersionParsing v1.3.0\n [19fa3120] VertexSafeGraphs v0.2.0\n [44d3d7a6] Weave v0.10.12\n [1b915085] WinReg v1.0.0\n [ddb6d928] YAML v0.4.9\n [c2297ded] ZMQ v1.2.2\n [700de1a5] ZygoteRules v0.2.3\n [0518478a] deSolveDiffEq v0.1.1\n [6e34b625] Bzip2_jll v1.0.8+0\n [83423d85] Cairo_jll v1.16.1+1\n [2702e6a9] EpollShim_jll v0.0.20230411+0\n [2e619515] Expat_jll v2.5.0+0\n⌃ [b22a6f82] FFMPEG_jll v4.4.2+2\n [f5851436] FFTW_jll v3.3.10+0\n [a3f928ae] Fontconfig_jll v2.13.93+0\n [d7e528f0] FreeType2_jll v2.13.1+0\n [559328eb] FriBidi_jll v1.0.10+0\n [0656b61e] GLFW_jll v3.3.8+0\n [d2c73de3] GR_jll v0.72.10+0\n [78b55507] Gettext_jll v0.21.0+0\n [7746bdde] Glib_jll v2.76.5+0\n [3b182d85] Graphite2_jll v1.3.14+0\n [2e76f6c2] HarfBuzz_jll v2.8.1+1\n [1d5cc7b8] IntelOpenMP_jll v2023.2.0+0\n [aacddb02] JpegTurbo_jll v2.1.91+0\n [c1c5ebd0] LAME_jll v3.100.1+0\n [88015f11] LERC_jll v3.0.0+1\n [1d63c593] LLVMOpenMP_jll v15.0.4+0\n [aae0fff6] LSODA_jll v0.1.2+0\n [dd4b983a] LZO_jll v2.10.1+0\n⌅ [e9f186c6] Libffi_jll v3.2.2+1\n [d4300ac3] Libgcrypt_jll v1.8.7+0\n [7e76a0d4] Libglvnd_jll v1.6.0+0\n [7add5ba3] Libgpg_error_jll v1.42.0+0\n [94ce4f54] Libiconv_jll v1.17.0+0\n [4b2f31a3] Libmount_jll v2.35.0+0\n [89763e89] Libtiff_jll v4.5.1+1\n [38a345b3] Libuuid_jll v2.36.0+0\n [856f044c] MKL_jll v2023.2.0+0\n [c771fb93] ODEInterface_jll v0.0.1+0\n [e7412a2a] Ogg_jll v1.3.5+1\n⌅ [458c3c95] OpenSSL_jll v1.1.23+0\n [efe28fd5] OpenSpecFun_jll v0.5.5+0\n [91d4177d] Opus_jll v1.3.2+0\n [30392449] Pixman_jll v0.42.2+0\n [c0090381] Qt6Base_jll v6.5.2+2\n [f50d1b31] Rmath_jll v0.4.0+0\n⌅ [fb77eaff] Sundials_jll v5.2.1+0\n [a44049a8] Vulkan_Loader_jll v1.3.243+0\n [a2964d1f] Wayland_jll v1.21.0+1\n [2381bf8a] Wayland_protocols_jll v1.25.0+0\n [02c8fc9c] XML2_jll v2.11.5+0\n [aed1982a] XSLT_jll v1.1.34+0\n [ffd25f8a] XZ_jll v5.4.4+0\n [f67eecfb] Xorg_libICE_jll v1.0.10+1\n [c834827a] Xorg_libSM_jll v1.2.3+0\n [4f6342f7] Xorg_libX11_jll v1.8.6+0\n [0c0b7dd1] Xorg_libXau_jll v1.0.11+0\n [935fb764] Xorg_libXcursor_jll v1.2.0+4\n [a3789734] Xorg_libXdmcp_jll v1.1.4+0\n [1082639a] Xorg_libXext_jll v1.3.4+4\n [d091e8ba] Xorg_libXfixes_jll v5.0.3+4\n [a51aa0fd] Xorg_libXi_jll v1.7.10+4\n [d1454406] Xorg_libXinerama_jll v1.1.4+4\n [ec84b674] Xorg_libXrandr_jll v1.5.2+4\n [ea2f1a96] Xorg_libXrender_jll v0.9.10+4\n [14d82f49] Xorg_libpthread_stubs_jll v0.1.1+0\n [c7cfdc94] Xorg_libxcb_jll v1.15.0+0\n [cc61e674] Xorg_libxkbfile_jll v1.1.2+0\n [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0\n [12413925] Xorg_xcb_util_image_jll v0.4.0+1\n [2def613f] Xorg_xcb_util_jll v0.4.0+1\n [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1\n [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1\n [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1\n [35661453] Xorg_xkbcomp_jll v1.4.6+0\n [33bec58e] Xorg_xkeyboard_config_jll v2.39.0+0\n [c5fb5394] Xorg_xtrans_jll v1.5.0+0\n [8f1865be] ZeroMQ_jll v4.3.4+0\n [3161d3a3] Zstd_jll v1.5.5+0\n [35ca27e7] eudev_jll v3.2.9+0\n⌅ [214eeab7] fzf_jll v0.29.0+0\n [1a1c6b14] gperf_jll v3.1.1+0\n [a4ae2306] libaom_jll v3.4.0+0\n [0ac62f75] libass_jll v0.15.1+0\n [2db6ffa8] libevdev_jll v1.11.0+0\n [f638f0a6] libfdk_aac_jll v2.0.2+0\n [36db933b] libinput_jll v1.18.0+0\n [b53b4c65] libpng_jll v1.6.38+0\n [a9144af2] libsodium_jll v1.0.20+0\n [f27f6e37] libvorbis_jll v1.3.7+1\n [009596ad] mtdev_jll v1.1.6+0\n [1270edf5] x264_jll v2021.5.5+0\n [dfaa095f] x265_jll v3.5.0+0\n [d8fb68d0] xkbcommon_jll v1.4.1+1\n [0dad84c5] ArgTools v1.1.1\n [56f22d72] Artifacts\n [2a0f44e3] Base64\n [ade2ca70] Dates\n [8ba89e20] Distributed\n [f43a241f] Downloads v1.6.0\n [7b1f6079] FileWatching\n [9fa8497b] Future\n [b77e0a4c] InteractiveUtils\n [4af54fe1] LazyArtifacts\n [b27032c2] LibCURL v0.6.3\n [76f85450] LibGit2\n [8f399da3] Libdl\n [37e2e46d] LinearAlgebra\n [56ddb016] Logging\n [d6f4376e] Markdown\n [a63ad114] Mmap\n [ca575930] NetworkOptions v1.2.0\n [44cfe95a] Pkg v1.9.2\n [de0858da] Printf\n [9abbd945] Profile\n [3fa0cd96] REPL\n [9a3f8284] Random\n [ea8e919c] SHA v0.7.0\n [9e88b42a] Serialization\n [1a1011a3] SharedArrays\n [6462fe0b] Sockets\n [2f01184e] SparseArrays\n [10745b16] Statistics v1.9.0\n [4607b0f0] SuiteSparse\n [fa267f1f] TOML v1.0.3\n [a4e569a6] Tar v1.10.0\n [8dfed614] Test\n [cf7118a7] UUIDs\n [4ec0a83e] Unicode\n [e66e0078] CompilerSupportLibraries_jll v1.0.5+0\n [deac9b47] LibCURL_jll v7.84.0+0\n [29816b5a] LibSSH2_jll v1.10.2+0\n [c8ffd9c3] MbedTLS_jll v2.28.2+0\n [14a3606d] MozillaCACerts_jll v2022.10.11\n [4536629a] OpenBLAS_jll v0.3.21+4\n [05823500] OpenLibm_jll v0.8.1+0\n [efcefdf7] PCRE2_jll v10.42.0+0\n [bea87d4a] SuiteSparse_jll v5.10.1+6\n [83775a58] Zlib_jll v1.2.13+0\n [8e850b90] libblastrampoline_jll v5.8.0+0\n [8e850ede] nghttp2_jll v1.48.0+0\n [3f19e933] p7zip_jll v17.4.0+0\nInfo Packages marked with ⌃ and ⌅ have new versions available, but those wi\nth ⌅ are restricted by compatibility constraints from upgrading. To see why\n use `status --outdated -m`","category":"page"},{"location":"tutorials/getting_started/#Solving-ODEs-with-Probabilistic-Numerics","page":"Getting Started","title":"Solving ODEs with Probabilistic Numerics","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"In this tutorial we solve a simple non-linear ordinary differential equation (ODE) with the probabilistic numerical ODE solvers implemented in this package.","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"note: Note\nIf you never used DifferentialEquations.jl, check out their \"Getting Started with Differential Equations in Julia\" tutorial. It explains how to define and solve ODE problems and how to analyze the solution, so it's a great starting point. Most of ProbNumDiffEq.jl works exaclty as you would expect from DifferentialEquations.jl – just with some added uncertainties and related functionality on top!","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"In this tutorial, we consider a Fitzhugh-Nagumo model described by an ODE of the form","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"beginaligned\ndoty_1 = c (y_1 - fracy_1^33 + y_2) \ndoty_2 = -frac1c (y_1 - a - b y_2)\nendaligned","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"on a time span t in 0 T, with initial value y(0) = y_0. In the following, we","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"define the problem with explicit choices of initial values, integration domains, and parameters,\nsolve the problem with our ODE filters, and\nvisualize the results and the corresponding uncertainties.","category":"page"},{"location":"tutorials/getting_started/#TL;DR:-Just-use-DifferentialEquations.jl-with-the-EK1-algorithm","page":"Getting Started","title":"TL;DR: Just use DifferentialEquations.jl with the EK1 algorithm","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"using ProbNumDiffEq, Plots\n\nfunction fitz(du, u, p, t)\n a, b, c = p\n du[1] = c * (u[1] - u[1]^3 / 3 + u[2])\n du[2] = -(1 / c) * (u[1] - a - b * u[2])\nend\nu0 = [-1.0; 1.0]\ntspan = (0.0, 20.0)\np = (0.2, 0.2, 3.0)\nprob = ODEProblem(fitz, u0, tspan, p)\n\nusing Logging; Logging.disable_logging(Logging.Warn); # hide\nsol = solve(prob, EK1())\nLogging.disable_logging(Logging.Debug) # hide\nplot(sol)","category":"page"},{"location":"tutorials/getting_started/#Step-1:-Define-the-problem","page":"Getting Started","title":"Step 1: Define the problem","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"First, import ProbNumDiffEq.jl","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"using ProbNumDiffEq","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"Then, set up the ODEProblem exactly as you would in DifferentialEquations.jl. Define the vector field","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"function fitz(du, u, p, t)\n a, b, c = p\n du[1] = c * (u[1] - u[1]^3 / 3 + u[2])\n du[2] = -(1 / c) * (u[1] - a - b * u[2])\nend\nnothing # hide","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"and then the ODEProblem, with initial value u0, time span tspan, and parameters p","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"u0 = [-1.0; 1.0]\ntspan = (0.0, 20.0)\np = (0.2, 0.2, 3.0)\nprob = ODEProblem(fitz, u0, tspan, p)\nnothing # hide","category":"page"},{"location":"tutorials/getting_started/#Step-2:-Solve-the-problem","page":"Getting Started","title":"Step 2: Solve the problem","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"To solve the ODE we just use DifferentialEquations.jl's solve interface, together with one of the algorithms implemented in this package. For now, let's use EK1:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"sol = solve(prob, EK1())\n# nothing # hide","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"That's it! we just computed a probabilistic numerical ODE solution!","category":"page"},{"location":"tutorials/getting_started/#Step-3:-Analyze-the-solution","page":"Getting Started","title":"Step 3: Analyze the solution","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"Let's plot the result with Plots.jl.","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"using Plots\nplot(sol)","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"Looks good! Looks like the EK1 managed to solve the Fitzhugh-Nagumo problem quite well.","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"tip: Tip\nTo learn more about plotting ODE solutions, check out the plotting tutorial for DifferentialEquations.jl + Plots.jl provided here. Most of that works exactly as expected with ProbNumDiffEq.jl.","category":"page"},{"location":"tutorials/getting_started/#Plot-the-probabilistic-error-estimates","page":"Getting Started","title":"Plot the probabilistic error estimates","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"The plot above looks like a standard ODE solution – but it's not! The numerical errors are just so small that we can't see them in the plot, and the probabilistic error estimates are too. We can visualize them by plotting the errors and error estimates directly:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"using OrdinaryDiffEq, Statistics\nreference = solve(prob, Vern9(), abstol=1e-9, reltol=1e-9, saveat=sol.t)\nerrors = reduce(hcat, mean.(sol.pu) .- reference.u)'\nerror_estimates = reduce(hcat, std.(sol.pu))'\nplot(sol.t, errors, label=\"error\", color=[1 2], xlabel=\"t\", ylabel=\"err\")\nplot!(sol.t, zero(errors), ribbon=3error_estimates, label=\"error estimate\",\n color=[1 2], alpha=0.2)","category":"page"},{"location":"tutorials/getting_started/#More-about-the-ProbabilisticODESolution","page":"Getting Started","title":"More about the ProbabilisticODESolution","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"The solution object returned by ProbNumDiffEq.jl mostly behaves just like any other ODESolution in DifferentialEquations.jl – with some added uncertainties and related functionality on top. So, sol can be indexed","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"sol[1]\nsol[end]","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"and has fields sol.t and sol.u which store the time points and mean estimates:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"sol.t[end]\nsol.u[end]","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"But since sol is a probabilistic numerical ODE solution, it contains a Gaussian distributions over solution values. The marginals of this posterior are stored in sol.pu:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"sol.pu[end]","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"You can compute means, covariances, and standard deviations via Statistics.jl:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"using Statistics\nmean(sol.pu[5])\ncov(sol.pu[5])\nstd(sol.pu[5])","category":"page"},{"location":"tutorials/getting_started/#Dense-output","page":"Getting Started","title":"Dense output","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"Probabilistic numerical ODE solvers approximate the posterior distribution","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"p Big( y(t) big y(0) = y_0 doty(t_i) = f_theta(y(t_i) t_i) Big)","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"which describes a posterior not just for the discrete steps but for any t in the continuous space t in 0 T; in classic ODE solvers, this is also known as \"interpolation\" or \"dense output\". The probabilistic solutions returned by our solvers can be interpolated as usual by treating them as functions, but they return Gaussian distributions","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"sol(0.45)\nmean(sol(0.45))","category":"page"},{"location":"tutorials/getting_started/#Next-steps","page":"Getting Started","title":"Next steps","text":"","category":"section"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"Check out one of the other tutorials:","category":"page"},{"location":"tutorials/getting_started/","page":"Getting Started","title":"Getting Started","text":"\"Second Order ODEs and Energy Preservation\" explains how to solve second-order ODEs more efficiently while also better perserving energy or other conserved quantities;\n\"Solving DAEs with Probabilistic Numerics\" demonstrates how to solve differential algebraic equatios in a probabilistic numerical way.","category":"page"},{"location":"tutorials/fenrir/#Parameter-Inference-with-ProbNumDiffEq.jl-and-Fenrir.jl","page":"Parameter Inference","title":"Parameter Inference with ProbNumDiffEq.jl and Fenrir.jl","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"note: Note\nThis is mostly just a copy from the tutorial included in the Fenrir.jl documentation, so have a look there too!","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"using LinearAlgebra\nusing OrdinaryDiffEq, ProbNumDiffEq, Plots\nusing Fenrir\nusing Optimization, OptimizationOptimJL\nstack(x) = copy(reduce(hcat, x)') # convenient\nnothing # hide","category":"page"},{"location":"tutorials/fenrir/#The-parameter-inference-problem-in-general","page":"Parameter Inference","title":"The parameter inference problem in general","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Let's assume we have an initial value problem (IVP)","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"beginaligned\ndoty = f_theta(y t) qquad y(t_0) = y_0\nendaligned","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"which we observe through a set mathcalD = u(t_n)_n=1^N of noisy data points","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"beginaligned\nu(t_n) = H y(t_n) + v_n qquad v_n sim mathcalN(0 R)\nendaligned","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"The question of interest is: How can we compute the marginal likelihood p(mathcalD mid theta)? Short answer: We can't. It's intractable, because computing the true IVP solution exactly y(t) is intractable. What we can do however is compute an approximate marginal likelihood. This is what Fenrir.jl provides. For details, check out the paper.","category":"page"},{"location":"tutorials/fenrir/#The-specific-problem,-in-code","page":"Parameter Inference","title":"The specific problem, in code","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Let's assume that the true underlying dynamics are given by a FitzHugh-Nagumo model","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"function f(du, u, p, t)\n a, b, c = p\n du[1] = c*(u[1] - u[1]^3/3 + u[2])\n du[2] = -(1/c)*(u[1] - a - b*u[2])\nend\nu0 = [-1.0, 1.0]\ntspan = (0.0, 20.0)\np = (0.2, 0.2, 3.0)\ntrue_prob = ODEProblem(f, u0, tspan, p)","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"from which we generate some artificial noisy data","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"true_sol = solve(true_prob, Vern9(), abstol=1e-10, reltol=1e-10)\n\ntimes = 1:0.5:20\nobservation_noise_var = 1e-1\nodedata = [true_sol(t) .+ sqrt(observation_noise_var) * randn(length(u0)) for t in times]\n\nplot(true_sol, color=:black, linestyle=:dash, label=[\"True Solution\" \"\"])\nscatter!(times, stack(odedata), markersize=2, markerstrokewidth=0.1, color=1, label=[\"Noisy Data\" \"\"])","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Our goal is then to recover the true parameter p (and thus also the true trajectoy plotted above) the noisy data.","category":"page"},{"location":"tutorials/fenrir/#Computing-the-negative-log-likelihood","page":"Parameter Inference","title":"Computing the negative log-likelihood","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"To do parameter inference - be it maximum-likelihod, maximum a posteriori, or full Bayesian inference with MCMC - we need to evaluate the likelihood of given a parameter estimate theta_textest. This is exactly what Fenrir.jl's fenrir_nll provides:","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"p_est = (0.1, 0.1, 2.0)\nprob = remake(true_prob, p=p_est)\ndata = (t=times, u=odedata)\nκ² = 1e10\nnll, _, _ = fenrir_nll(prob, data, observation_noise_var, κ²; dt=1e-1)\nnll","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"This is the negative marginal log-likelihood of the parameter p_est. You can use it as any other NLL: Optimize it to compute maximum-likelihood estimates or MAPs, or plug it into MCMC to sample from the posterior. In our paper [3] we compute MLEs by pairing Fenrir with Optimization.jl and ForwardDiff.jl. Let's quickly explore how to do this next.","category":"page"},{"location":"tutorials/fenrir/#Maximum-likelihood-parameter-inference","page":"Parameter Inference","title":"Maximum-likelihood parameter inference","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"To compute a maximum-likelihood estimate (MLE), we just need to maximize theta to p(mathcalD mid theta) - that is, minimize the nll from above. We use Optimization.jl for this. First, define a loss function and create an OptimizationProblem","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"function loss(x, _)\n ode_params = x[begin:end-1]\n prob = remake(true_prob, p=ode_params)\n κ² = exp(x[end]) # the diffusion parameter of the EK1\n return fenrir_nll(prob, data, observation_noise_var, κ²; dt=1e-1)\nend\n\nfun = OptimizationFunction(loss, Optimization.AutoForwardDiff())\noptprob = OptimizationProblem(\n fun, [p_est..., 1e0];\n lb=[0.0, 0.0, 0.0, -10], ub=[1.0, 1.0, 5.0, 20] # lower and upper bounds\n)","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Then, just solve it! Here we use LBFGS:","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"optsol = solve(optprob, LBFGS())\np_mle = optsol.u[1:3]\np_mle # hide","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Success! The computed MLE is quite close to the true parameter which we used to generate the data. As a final step, let's plot the true solution, the data, and the result of the MLE:","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"plot(true_sol, color=:black, linestyle=:dash, label=[\"True Solution\" \"\"])\nscatter!(times, stack(odedata), markersize=2, markerstrokewidth=0.1, color=1, label=[\"Noisy Data\" \"\"])\nmle_sol = solve(remake(true_prob, p=p_mle), EK1())\nplot!(mle_sol, color=3, label=[\"MLE-parameter Solution\" \"\"])","category":"page"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"Looks good!","category":"page"},{"location":"tutorials/fenrir/#Reference","page":"Parameter Inference","title":"Reference","text":"","category":"section"},{"location":"tutorials/fenrir/","page":"Parameter Inference","title":"Parameter Inference","text":"
[3]
\n
\n
F. Tronarp, N. Bosch and P. Hennig. Fenrir: Physics-Enhanced Regression for Initial Value\n Problems. In: Proceedings of the 39th International Conference on Machine\n Learning, Proceedings of Machine Learning Research, 21776–21794, PMLR (2022).
\n
\n
","category":"page"},{"location":"#Probabilistic-Numerical-Differential-Equation-Solvers","page":"Home","title":"Probabilistic Numerical Differential Equation Solvers","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"(Image: Banner)","category":"page"},{"location":"","page":"Home","title":"Home","text":"ProbNumDiffEq.jl provides probabilistic numerical solvers to the DifferentialEquations.jl ecosystem. The implemented ODE filters solve differential equations via Bayesian filtering and smoothing and compute not just a single point estimate of the true solution, but a posterior distribution that contains an estimate of its numerical approximation error.","category":"page"},{"location":"","page":"Home","title":"Home","text":"For a short intro video, check out our poster presentation at JuliaCon2021.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Run Julia, enter ] to bring up Julia's package manager, and add the ProbNumDiffEq.jl package:","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> ]\n(v1.9) pkg> add ProbNumDiffEq","category":"page"},{"location":"#Getting-Started","page":"Home","title":"Getting Started","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"For a quick introduction check out the \"Solving ODEs with Probabilistic Numerics\" tutorial.","category":"page"},{"location":"#Features","page":"Home","title":"Features","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Two extended Kalman filtering-based probabilistic solvers: the explicit EK0 and semi-implicit EK1.\nAdaptive step-size selection with PI control; fully compatible with DifferentialEquations.jl's timestepping options\nOnline uncertainty calibration for multiple different diffusion models (see \"Diffusion models and calibration\")\nDense output\nSampling from the solution\nCallback support\nConvenient plotting through a Plots.jl recipe\nAutomatic differentiation via ForwardDiff.jl\nArbitrary precision via Julia's built-in arbitrary precision arithmetic\nSpecialized solvers for second-order ODEs (see Second Order ODEs and Energy Preservation)\nCompatible with DAEs in mass-matrix ODE form (see Solving DAEs with Probabilistic Numerics)","category":"page"},{"location":"#Related-packages","page":"Home","title":"Related packages","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"probdiffeq: Fast and feature-rich filtering-based probabilistic ODE solvers in JAX.\nProbNum: Probabilistic numerics in Python. It has not only probabilistic ODE solvers, but also probabilistic linear solvers, Bayesian quadrature, and many filtering and smoothing implementations.\nFenrir.jl: Parameter-inference in ODEs with probabilistic ODE solvers. This package builds on ProbNumDiffEq.jl to provide a negative marginal log-likelihood function, which can then be used with an optimizer or with MCMC for parameter inference.","category":"page"},{"location":"implementation/#Solver-Implementation-via-OrdinaryDiffEq.jl","page":"Implementation via OrdinaryDiffEq.jl","title":"Solver Implementation via OrdinaryDiffEq.jl","text":"","category":"section"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"ProbNumDiffEq.jl builds directly on OrdinaryDiffEq.jl to benefit from its iterator interface, flexible step-size control, and efficient Jacobian calculations. But, this requires extending non-public APIs. This page is meant to provide an overview on which parts exactly ProbNumDiffEq.jl builds on.","category":"page"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"For more discussion on the pros and cons of building on OrdinaryDiffEq.jl, see this thread on discourse.","category":"page"},{"location":"implementation/#Building-on-OrdinaryDiffEq.jl","page":"Implementation via OrdinaryDiffEq.jl","title":"Building on OrdinaryDiffEq.jl","text":"","category":"section"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"ProbNumDiffEq.jl shares most of OrdinaryDiffEq.jl's implementation. In particular:","category":"page"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"OrdinaryDiffEq.__init builds the cache and the integrator, and calls OrdinaryDiffEq.initialize!\nOrdinaryDiffEq.solve! implements the actual iterator structure, with\nOrdinaryDiffEq.loopheader!\nOrdinaryDiffEq.perform_step!\nOrdinaryDiffEq.loopfooter!\nOrdinaryDiffEq.postamble!","category":"page"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"ProbNumDiffEq.jl builds around this structure and overloads some of the parts:","category":"page"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"Algorithms: EK0/EK1 <: AbstractEK <: OrdinaryDiffEq.OrdinaryDiffEqAdaptiveAlgorithm\n./src/algorithms.jl provides the algorithms themselves\n./src/alg_utils.jl implements many traits (e.g. relating to autodiff, implicitness, step-size control)\nCache: EKCache <: AbstractODEFilterCache <: OrdinaryDiffEq.OrdinaryDiffEqCache\n./src/caches.jl implements the cache and its main constructor: OrdinaryDiffEq.alg_cache\nInitialization and perform_step!: via OrdinaryDiffEq.initialize! and OrdinaryDiffEq.perform_step!. Implemented in ./src/perform_step.jl.\nCustom postamble by overloading OrdinaryDiffEq.postamble! (which should always call OrdinaryDiffEq._postamble!). This is where we do the \"smoothing\" of the solution. Implemented in ./src/integrator_utils.jl. \nCustom saving by overloading OrdinaryDiffEq.savevalues! (which should always call OrdinaryDiffEq._savevalues!). Implemented in ./src/integrator_utils.jl.","category":"page"},{"location":"implementation/#Building-on-DiffEqBase.jl","page":"Implementation via OrdinaryDiffEq.jl","title":"Building on DiffEqBase.jl","text":"","category":"section"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"DiffEqBase.__init is currently overloaded to transform OOP problems into IIP problems (in ./src/solve.jl).\nThe solution object: ProbODESolution <: AbstractProbODESolution <: DiffEqBase.AbstractODESolution\n./src/solution.jl implements the main parts. Note that the main constructor DiffEqBase.build_solution is called by OrdinaryDiffEq.__init - so OrdinaryDiffEq.jl has control over its inputs.\nThere is also MeanProbODESolution <: DiffEqBase.AbstractODESolution: It allows handling the mean of a probabilistic ODE solution the same way one would handle any \"standard\" ODE solution - e.g. it is compatible with DiffEqDevTools.appxtrue.\nAbstractODEFilterPosterior <: DiffEqBase.AbstractDiffEqInterpolation is the current interpolant, but it does not actually fully handle the interpolation right now. This part might be subject to change soon.\nPlot recipe in ./src/solution_plotting.jl\nSampling in ./src/solution_sampling.jl\nDiffEqBase.prepare_alg(::EK1{0}); closely follows a similar function implemented in OrdinaryDiffEq.jl ./src/alg_utils.jl\nthis also required DiffEqBase.remake(::EK1)","category":"page"},{"location":"implementation/#Other-packages","page":"Implementation via OrdinaryDiffEq.jl","title":"Other packages","text":"","category":"section"},{"location":"implementation/","page":"Implementation via OrdinaryDiffEq.jl","title":"Implementation via OrdinaryDiffEq.jl","text":"DiffEqDevTools.appxtrue is overloaded to work with ProbODESolution (by just doing mean(sol)). This also enables DiffEqDevTools.WorkPrecision to work out of th box.","category":"page"}] } diff --git a/dev/solvers/index.html b/dev/solvers/index.html index 0e2665016..be48bde62 100644 --- a/dev/solvers/index.html +++ b/dev/solvers/index.html @@ -4,14 +4,14 @@ prior=IWP(order), diffusionmodel=DynamicDiffusion(), initialization=TaylorModeInit(), - kwargs...)

Gaussian ODE filter with first-order vector field linearization.

Arguments

Some additional kwargs relating to implicit solvers are supported; check out DifferentialEquations.jl's Extra Options page. Right now, we support autodiff, chunk_size, and diff_type. In particular, autodiff=false can come in handy to use finite differences instead of ForwardDiff.jl to compute Jacobians.

Examples

julia> solve(prob, EK1())

References

source
ProbNumDiffEq.EK0Type
EK0(; order=3,
+      kwargs...)

Gaussian ODE filter with first-order vector field linearization.

Arguments

  • order::Integer: Order of the integrated Wiener process (IWP) prior.
  • smooth::Bool: Turn smoothing on/off; smoothing is required for dense output.
  • prior::AbstractODEFilterPrior: Prior to be used by the ODE filter. By default, uses a 3-times integrated Wiener process prior IWP(3). See also: Priors.
  • diffusionmodel::ProbNumDiffEq.AbstractDiffusion: See Diffusion models and calibration.
  • initialization::ProbNumDiffEq.InitializationScheme: See Initialization.

Some additional kwargs relating to implicit solvers are supported; check out DifferentialEquations.jl's Extra Options page. Right now, we support autodiff, chunk_size, and diff_type. In particular, autodiff=false can come in handy to use finite differences instead of ForwardDiff.jl to compute Jacobians.

Examples

julia> solve(prob, EK1())

References

source
ProbNumDiffEq.EK0Type
EK0(; order=3,
       smooth=true,
       prior=IWP(order),
       diffusionmodel=DynamicDiffusion(),
-      initialization=TaylorModeInit())

Gaussian ODE filter with zeroth-order vector field linearization.

Arguments

  • order::Integer: Order of the integrated Wiener process (IWP) prior.
  • smooth::Bool: Turn smoothing on/off; smoothing is required for dense output.
  • prior::AbstractODEFilterPrior: Prior to be used by the ODE filter. By default, uses a 3-times integrated Wiener process prior IWP(3). See also: Priors.
  • diffusionmodel::ProbNumDiffEq.AbstractDiffusion: See Diffusion models and calibration.
  • initialization::ProbNumDiffEq.InitializationScheme: See Initialization.

Examples

julia> solve(prob, EK0())

References

source

Probabilistic Exponential Integrators

ProbNumDiffEq.ExpEKFunction
ExpEK(; L, order=3, kwargs...)

Probabilistic exponential integrator

Probabilistic exponential integrators are a class of integrators for semi-linear stiff ODEs that provide improved stability by essentially solving the linear part of the ODE exactly. In probabilistic numerics, this amounts to including the linear part into the prior model of the solver.

ExpEK is therefore just a short-hand for EK0 with IOUP prior:

ExpEK(; order=3, L, kwargs...) = EK0(; prior=IOUP(order, L), kwargs...)

See also RosenbrockExpEK, EK0, EK1.

Arguments

See EK0 for available keyword arguments.

Examples

julia> prob = ODEProblem((du, u, p, t) -> (@. du = - u + sin(u)), [1.0], (0.0, 10.0))
-julia> solve(prob, ExpEK(L=-1))

Reference

  • [2] Bosch et al, "Probabilistic Exponential Integrators", arXiv (2021)
source
ProbNumDiffEq.RosenbrockExpEKFunction
RosenbrockExpEK(; order=3, kwargs...)

Probabilistic Rosenbrock-type exponential integrator

A probabilistic exponential integrator similar to ExpEK, but with automatic linearization along the mean numerical solution. This brings the advantage that the linearity does not need to be specified manually, and the more accurate local linearization can sometimes also improve stability; but since the "prior" is adjusted at each step the probabilistic interpretation becomes more complicated.

RosenbrockExpEK is just a short-hand for EK1 with appropriete IOUP prior:

RosenbrockExpEK(; order=3, kwargs...) = EK1(; prior=IOUP(order, update_rate_parameter=true), kwargs...)

See also ExpEK, EK0, EK1.

Arguments

See EK1 for available keyword arguments.

Examples

julia> prob = ODEProblem((du, u, p, t) -> (@. du = - u + sin(u)), [1.0], (0.0, 10.0))
-julia> solve(prob, RosenbrockExpEK())

Reference

  • [2] Bosch et al, "Probabilistic Exponential Integrators", arXiv (2021)
source

References

[2]
+ initialization=TaylorModeInit())

Gaussian ODE filter with zeroth-order vector field linearization.

Arguments

Examples

julia> solve(prob, EK0())

References

source

Probabilistic Exponential Integrators

ProbNumDiffEq.ExpEKFunction
ExpEK(; L, order=3, kwargs...)

Probabilistic exponential integrator

Probabilistic exponential integrators are a class of integrators for semi-linear stiff ODEs that provide improved stability by essentially solving the linear part of the ODE exactly. In probabilistic numerics, this amounts to including the linear part into the prior model of the solver.

ExpEK is therefore just a short-hand for EK0 with IOUP prior:

ExpEK(; order=3, L, kwargs...) = EK0(; prior=IOUP(order, L), kwargs...)

See also RosenbrockExpEK, EK0, EK1.

Arguments

See EK0 for available keyword arguments.

Examples

julia> prob = ODEProblem((du, u, p, t) -> (@. du = - u + sin(u)), [1.0], (0.0, 10.0))
+julia> solve(prob, ExpEK(L=-1))

Reference

  • [2] Bosch et al, "Probabilistic Exponential Integrators", arXiv (2021)
source
ProbNumDiffEq.RosenbrockExpEKFunction
RosenbrockExpEK(; order=3, kwargs...)

Probabilistic Rosenbrock-type exponential integrator

A probabilistic exponential integrator similar to ExpEK, but with automatic linearization along the mean numerical solution. This brings the advantage that the linearity does not need to be specified manually, and the more accurate local linearization can sometimes also improve stability; but since the "prior" is adjusted at each step the probabilistic interpretation becomes more complicated.

RosenbrockExpEK is just a short-hand for EK1 with appropriete IOUP prior:

RosenbrockExpEK(; order=3, kwargs...) = EK1(; prior=IOUP(order, update_rate_parameter=true), kwargs...)

See also ExpEK, EK0, EK1.

Arguments

See EK1 for available keyword arguments.

Examples

julia> prob = ODEProblem((du, u, p, t) -> (@. du = - u + sin(u)), [1.0], (0.0, 10.0))
+julia> solve(prob, RosenbrockExpEK())

Reference

  • [2] Bosch et al, "Probabilistic Exponential Integrators", arXiv (2021)
source

References

[2]
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
-
+ diff --git a/dev/tutorials/dae/47424bc3.svg b/dev/tutorials/dae/12e69d49.svg similarity index 99% rename from dev/tutorials/dae/47424bc3.svg rename to dev/tutorials/dae/12e69d49.svg index 7d10f67e4..eb2db0a8b 100644 --- a/dev/tutorials/dae/47424bc3.svg +++ b/dev/tutorials/dae/12e69d49.svg @@ -1,90 +1,90 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dae/fa2ca012.svg b/dev/tutorials/dae/81b0c82b.svg similarity index 97% rename from dev/tutorials/dae/fa2ca012.svg rename to dev/tutorials/dae/81b0c82b.svg index b5c6f2ff1..9bd03ac67 100644 --- a/dev/tutorials/dae/fa2ca012.svg +++ b/dev/tutorials/dae/81b0c82b.svg @@ -1,59 +1,59 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dae/index.html b/dev/tutorials/dae/index.html index e545867a4..cb53a7f11 100644 --- a/dev/tutorials/dae/index.html +++ b/dev/tutorials/dae/index.html @@ -28,7 +28,7 @@ ylabel=["u₁(t)" "u₂(t)" "u₃(t)"], xlabel=["" "" "t"], denseplot=false, -)Example block output

Looks good!

Solving an Index-3 DAE directly

The following is based on the "Automatic Index Reduction of DAEs" tutorial by ModelingToolkit.jl, which demonstrates how the classic Rodas4 solver fails to solve a DAE due to the fact that it is of index 3; which is why ModelingToolkit's automatic index reduction is so useful.

It turns out that our probabilistic numerical solvers can directly solve the index-3 DAE!

First, define the pendulum problem as in the tutorial:

function pendulum!(du, u, p, t)
+)
Example block output

Looks good!

Solving an Index-3 DAE directly

The following is based on the "Automatic Index Reduction of DAEs" tutorial by ModelingToolkit.jl, which demonstrates how the classic Rodas4 solver fails to solve a DAE due to the fact that it is of index 3; which is why ModelingToolkit's automatic index reduction is so useful.

It turns out that our probabilistic numerical solvers can directly solve the index-3 DAE!

First, define the pendulum problem as in the tutorial:

function pendulum!(du, u, p, t)
     x, dx, y, dy, T = u
     g, L = p
     du[1] = dx
@@ -104,7 +104,7 @@
  [0.9606564704752983, -0.6488912965111842, -0.2777393773684324, -2.241904545274168, -8.20649809026962]
  [0.953580703532598, -0.7329362795843499, -0.301137606051972, -2.317049716858693, -8.911119223489587]
  [0.9472620899569895, -0.8049576742312687, -0.32045990833782334, -2.3741938112672893, -9.49621461341327]
- [0.9445849315579167, -0.8347208413797078, -0.32826712908215605, -2.3960584356227934, -9.733564093090328]

Nope! The EK1 is able to solve the index-3 DAE directly. Pretty cool!

plot(sol)
Example block output

Is index-reduction still worth it?

The point of the "Automatic Index Reduction of DAEs" tutorial is to demonstrate ModelingToolkit's utility for automatic index reduction, which enables the classic implicit Runge-Kutta solvers such as Rodas5 to solve this DAE. Let's see if that still helps in this context here.

First, modelingtoolkitize the problem:

traced_sys = modelingtoolkitize(pendulum_prob)

\[ \begin{align} + [0.9445849315579167, -0.8347208413797078, -0.32826712908215605, -2.3960584356227934, -9.733564093090328]

Nope! The EK1 is able to solve the index-3 DAE directly. Pretty cool!

plot(sol)
Example block output

Is index-reduction still worth it?

The point of the "Automatic Index Reduction of DAEs" tutorial is to demonstrate ModelingToolkit's utility for automatic index reduction, which enables the classic implicit Runge-Kutta solvers such as Rodas5 to solve this DAE. Let's see if that still helps in this context here.

First, modelingtoolkitize the problem:

traced_sys = modelingtoolkitize(pendulum_prob)

\[ \begin{align} \frac{\mathrm{d} x_1\left( t \right)}{\mathrm{d}t} =& x_2\left( t \right) \\ \frac{\mathrm{d} x_2\left( t \right)}{\mathrm{d}t} =& x_1\left( t \right) x_5\left( t \right) \\ \frac{\mathrm{d} x_3\left( t \right)}{\mathrm{d}t} =& x_4\left( t \right) \\ @@ -140,4 +140,4 @@ Solvers. In: Proceedings of The 25th International Conference on Artificial Intelligence and Statistics, Proceedings of Machine Learning Research, 10015–10027, PMLR (2022). -

+ diff --git a/dev/tutorials/dynamical_odes/e8eea931.svg b/dev/tutorials/dynamical_odes/27923a4c.svg similarity index 88% rename from dev/tutorials/dynamical_odes/e8eea931.svg rename to dev/tutorials/dynamical_odes/27923a4c.svg index 3b46ab0a0..16bf07c0a 100644 --- a/dev/tutorials/dynamical_odes/e8eea931.svg +++ b/dev/tutorials/dynamical_odes/27923a4c.svg @@ -1,46 +1,46 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dynamical_odes/270e5e7a.svg b/dev/tutorials/dynamical_odes/373f8431.svg similarity index 88% rename from dev/tutorials/dynamical_odes/270e5e7a.svg rename to dev/tutorials/dynamical_odes/373f8431.svg index b4ce457c1..6e17b7d38 100644 --- a/dev/tutorials/dynamical_odes/270e5e7a.svg +++ b/dev/tutorials/dynamical_odes/373f8431.svg @@ -1,46 +1,46 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dynamical_odes/fd48b78e.svg b/dev/tutorials/dynamical_odes/5fcbcdb1.svg similarity index 99% rename from dev/tutorials/dynamical_odes/fd48b78e.svg rename to dev/tutorials/dynamical_odes/5fcbcdb1.svg index 8cc6b2c38..99338afc5 100644 --- a/dev/tutorials/dynamical_odes/fd48b78e.svg +++ b/dev/tutorials/dynamical_odes/5fcbcdb1.svg @@ -1,52 +1,52 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dynamical_odes/4c32ca2d.svg b/dev/tutorials/dynamical_odes/e22b23c3.svg similarity index 98% rename from dev/tutorials/dynamical_odes/4c32ca2d.svg rename to dev/tutorials/dynamical_odes/e22b23c3.svg index f33e01ae3..cbcabf373 100644 --- a/dev/tutorials/dynamical_odes/4c32ca2d.svg +++ b/dev/tutorials/dynamical_odes/e22b23c3.svg @@ -1,50 +1,50 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dynamical_odes/index.html b/dev/tutorials/dynamical_odes/index.html index 409421c21..62c6079a8 100644 --- a/dev/tutorials/dynamical_odes/index.html +++ b/dev/tutorials/dynamical_odes/index.html @@ -19,13 +19,13 @@ tspan = (0.0, 100.0) prob = ODEProblem(Hénon_Heiles, [du0; u0], tspan) sol = solve(prob, EK1()); -plot(sol, vars=(3, 4)) # where `vars=(3,4)` is used to plot x agains yExample block output

Solving the second-order ODE directly

Instead of first transforming the problem, we can also solve it directly as a second-order ODE, by defining it as a SecondOrderODEProblem.

Note

The SecondOrderODEProblem type is not defined in ProbNumDiffEq.jl but is provided by SciMLBase.jl. For more information, check out the DifferentialEquations.jl documentation on Dynamical, Hamiltonian and 2nd Order ODE Problems.

function Hénon_Heiles2(ddu, du, u, p, t)
+plot(sol, idxs=(3, 4)) # where `idxs=(3,4)` is used to plot x agains y
Example block output

Solving the second-order ODE directly

Instead of first transforming the problem, we can also solve it directly as a second-order ODE, by defining it as a SecondOrderODEProblem.

Note

The SecondOrderODEProblem type is not defined in ProbNumDiffEq.jl but is provided by SciMLBase.jl. For more information, check out the DifferentialEquations.jl documentation on Dynamical, Hamiltonian and 2nd Order ODE Problems.

function Hénon_Heiles2(ddu, du, u, p, t)
     ddu[1] = -u[1] - 2 * u[1] * u[2]
     ddu[2] = u[2]^2 - u[2] - u[1]^2
 end
 prob2 = SecondOrderODEProblem(Hénon_Heiles2, du0, u0, tspan)
 sol2 = solve(prob2, EK1());
-plot(sol2, vars=(3, 4))
Example block output

Benchmark: Solving second order ODEs is faster

Solving second-order ODEs is not just a matter of convenience - in fact, SciMLBase's SecondOrderODEProblem is neatly designed in such a way that all the classic solvers from OrdinaryDiffEq.jl can handle it by solving the corresponding first-order ODE. But, transforming the ODE to first order increases the dimensionality of the problem, and comes therefore at increased computational cost; this also motivates classic specialized solvers for second-order ODEs.

The probabilistic numerical solvers from ProbNumDiffEq.jl have the same internal state representation for first and second order ODEs; all that changes is the measurement model [1]. As a result, we can use the EK1 both for first and second order ODEs, but it automatically specializes on the latter to provide a 2x performance boost:

julia> @btime solve(prob, EK1(order=3), adaptive=false, dt=1e-2);
+plot(sol2, idxs=(3, 4))
Example block output

Benchmark: Solving second order ODEs is faster

Solving second-order ODEs is not just a matter of convenience - in fact, SciMLBase's SecondOrderODEProblem is neatly designed in such a way that all the classic solvers from OrdinaryDiffEq.jl can handle it by solving the corresponding first-order ODE. But, transforming the ODE to first order increases the dimensionality of the problem, and comes therefore at increased computational cost; this also motivates classic specialized solvers for second-order ODEs.

The probabilistic numerical solvers from ProbNumDiffEq.jl have the same internal state representation for first and second order ODEs; all that changes is the measurement model [1]. As a result, we can use the EK1 both for first and second order ODEs, but it automatically specializes on the latter to provide a 2x performance boost:

julia> @btime solve(prob, EK1(order=3), adaptive=false, dt=1e-2);
   766.312 ms (400362 allocations: 173.38 MiB)
 
 julia> @btime solve(prob2, EK1(order=4), adaptive=false, dt=1e-2);
@@ -37,13 +37,13 @@
 E(dx, dy, x, y) = PotentialEnergy(x, y) + KineticEnergy(dx, dy)
 E(u) = E(u...); # convenient shorthand
E (generic function with 2 methods)

So, let's have a look at how the total energy changes over time when we numerically simulate the Hénon-Heiles model over a long period of time: Standard solve

longprob = remake(prob2, tspan=(0.0, 1e3))
 longsol = solve(longprob, EK1(smooth=false), dense=false)
-plot(longsol.t, E.(longsol.u))
Example block output

It visibly loses energy over time, from an initial 0.12967 to a final 0.12899. Let's fix this to get a physically more meaningful solution.

Energy preservation with the ManifoldUpdate callback

In the language of ODE filters, preserving energy over time amounts to just another measurement model [1]. The most convenient way of updating on this additional zero measurement with ProbNumDiffEq.jl is with the ManifoldUpdate callback.

Note

The ManifoldUpdate callback can be thought of a probabilistic counterpart to the ManifoldProjection callback provided by DiffEqCallbacks.jl.

To do so, first define a (vector-valued) residual function, here chosen to be the difference between the current energy and the initial energy, and build a ManifoldUpdate callback

residual(u) = [E(u) - E(du0..., u0...)]
+plot(longsol.t, E.(longsol.u))
Example block output

It visibly loses energy over time, from an initial 0.12967 to a final 0.12899. Let's fix this to get a physically more meaningful solution.

Energy preservation with the ManifoldUpdate callback

In the language of ODE filters, preserving energy over time amounts to just another measurement model [1]. The most convenient way of updating on this additional zero measurement with ProbNumDiffEq.jl is with the ManifoldUpdate callback.

Note

The ManifoldUpdate callback can be thought of a probabilistic counterpart to the ManifoldProjection callback provided by DiffEqCallbacks.jl.

To do so, first define a (vector-valued) residual function, here chosen to be the difference between the current energy and the initial energy, and build a ManifoldUpdate callback

residual(u) = [E(u) - E(du0..., u0...)]
 cb = ManifoldUpdate(residual)
DiscreteCallback{ProbNumDiffEq.var"#condition#45", ProbNumDiffEq.var"#affect!#46"{Int64, Float64, Float64, typeof(Main.residual)}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT)}(ProbNumDiffEq.var"#condition#45"(), ProbNumDiffEq.var"#affect!#46"{Int64, Float64, Float64, typeof(Main.residual)}(100, 1.0e-25, 1.0e-15, Main.residual), SciMLBase.INITIALIZE_DEFAULT, SciMLBase.FINALIZE_DEFAULT, Bool[1, 1])

Then, solve the ODE with this callback

longsol_preserving = solve(longprob, EK1(smooth=false), dense=false, callback=cb)
 plot(longsol.t, E.(longsol.u))
-plot!(longsol_preserving.t, E.(longsol_preserving.u))
Example block output

Voilà! With the ManifoldUpdate callback we could preserve the energy over time and obtain a more truthful probabilistic numerical long-term simulation of the Hénon-Heiles model.

References

[1]
+plot!(longsol_preserving.t, E.(longsol_preserving.u))Example block output

Voilà! With the ManifoldUpdate callback we could preserve the energy over time and obtain a more truthful probabilistic numerical long-term simulation of the Hénon-Heiles model.

References

[1]
N. Bosch, F. Tronarp and P. Hennig. Pick-and-Mix Information Operators for Probabilistic ODE Solvers. In: Proceedings of The 25th International Conference on Artificial Intelligence and Statistics, Proceedings of Machine Learning Research, 10015–10027, PMLR (2022).
-
+ diff --git a/dev/tutorials/exponential_integrators/1482bfe5.svg b/dev/tutorials/exponential_integrators/5e6b2b1f.svg similarity index 92% rename from dev/tutorials/exponential_integrators/1482bfe5.svg rename to dev/tutorials/exponential_integrators/5e6b2b1f.svg index 39dfdfe83..198d619bb 100644 --- a/dev/tutorials/exponential_integrators/1482bfe5.svg +++ b/dev/tutorials/exponential_integrators/5e6b2b1f.svg @@ -1,65 +1,65 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/exponential_integrators/81ca4817.svg b/dev/tutorials/exponential_integrators/5f074e4e.svg similarity index 93% rename from dev/tutorials/exponential_integrators/81ca4817.svg rename to dev/tutorials/exponential_integrators/5f074e4e.svg index 5ca32434c..421b015a2 100644 --- a/dev/tutorials/exponential_integrators/81ca4817.svg +++ b/dev/tutorials/exponential_integrators/5f074e4e.svg @@ -1,55 +1,55 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/exponential_integrators/e7745db5.svg b/dev/tutorials/exponential_integrators/d7a376a7.svg similarity index 93% rename from dev/tutorials/exponential_integrators/e7745db5.svg rename to dev/tutorials/exponential_integrators/d7a376a7.svg index 996033969..36fb17dec 100644 --- a/dev/tutorials/exponential_integrators/e7745db5.svg +++ b/dev/tutorials/exponential_integrators/d7a376a7.svg @@ -1,63 +1,63 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/exponential_integrators/be496b83.svg b/dev/tutorials/exponential_integrators/d844aea3.svg similarity index 93% rename from dev/tutorials/exponential_integrators/be496b83.svg rename to dev/tutorials/exponential_integrators/d844aea3.svg index 9fb9ca370..cf3336237 100644 --- a/dev/tutorials/exponential_integrators/be496b83.svg +++ b/dev/tutorials/exponential_integrators/d844aea3.svg @@ -1,51 +1,51 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/exponential_integrators/index.html b/dev/tutorials/exponential_integrators/index.html index 0960083e6..1f2bb259e 100644 --- a/dev/tutorials/exponential_integrators/index.html +++ b/dev/tutorials/exponential_integrators/index.html @@ -12,7 +12,7 @@ prob = ODEProblem(f, u0, tspan) ref = solve(prob, EK1(), abstol=1e-10, reltol=1e-10) -plot(ref, color=:black, linestyle=:dash, label="Reference")Example block output

But for fixed (large) step sizes this ODE is more challenging: The explicit EK0 method oscillates and diverges due to the stiffness of the ODE, and the semi-implicit EK1 method is stable but the solution is not very accurate.

STEPSIZE = 4
+plot(ref, color=:black, linestyle=:dash, label="Reference")
Example block output

But for fixed (large) step sizes this ODE is more challenging: The explicit EK0 method oscillates and diverges due to the stiffness of the ODE, and the semi-implicit EK1 method is stable but the solution is not very accurate.

STEPSIZE = 4
 DM = FixedDiffusion() # recommended for fixed steps
 
 # we don't smooth the EK0 here to show the oscillations more clearly
@@ -22,18 +22,18 @@
 plot(ylims=(0.3, 1.05))
 plot!(ref, color=:black, linestyle=:dash, label="Reference")
 plot!(sol0, denseplot=false, marker=:o, markersize=2, label="EK0", color=1)
-plot!(sol1, denseplot=false, marker=:o, markersize=2, label="EK1", color=2)
Example block output

Probabilistic exponential integrators leverage the semi-linearity of the ODE to compute more accurate solutions for the same fixed step size. You can use either the ExpEK method and provide the linear part (with the keyword argument L), or the RosenbrockExpEK to automatically linearize along the mean of the numerical solution:

sol_exp = solve(prob, ExpEK(L=-1, diffusionmodel=DM), adaptive=false, dt=STEPSIZE)
+plot!(sol1, denseplot=false, marker=:o, markersize=2, label="EK1", color=2)
Example block output

Probabilistic exponential integrators leverage the semi-linearity of the ODE to compute more accurate solutions for the same fixed step size. You can use either the ExpEK method and provide the linear part (with the keyword argument L), or the RosenbrockExpEK to automatically linearize along the mean of the numerical solution:

sol_exp = solve(prob, ExpEK(L=-1, diffusionmodel=DM), adaptive=false, dt=STEPSIZE)
 sol_ros = solve(prob, RosenbrockExpEK(diffusionmodel=DM), adaptive=false, dt=STEPSIZE)
 
 plot(ylims=(0.3, 1.05))
 plot!(ref, color=:black, linestyle=:dash, label="Reference")
 plot!(sol_exp, denseplot=false, marker=:o, markersize=2, label="ExpEK", color=3)
-plot!(sol_ros, denseplot=false, marker=:o, markersize=2, label="RosenbrockExpEK", color=4)
Example block output

The solutions are indeed much more accurate than those of the standard EK1, for the same fixed step size!

Background: Integrated Ornstein-Uhlenbeck priors

Probabilistic exponential integrators "solve the linear part exactly" by including it into the prior model of the solver. Namely, the solver chooses a (q-times) integrated Ornstein-Uhlenbeck prior with rate parameter equal to the linearity. The ExpEK solver is just a short-hand for an EK0 with appropriate prior:

julia> ExpEK(order=3, L=-1) == EK0(prior=IOUP(3, -1))true

Similarly, the RosenbrockExpEK solver is also just a short-hand:

julia> RosenbrockExpEK(order=3) == EK1(prior=IOUP(3, update_rate_parameter=true))true

This means that you can also construct other probabilistic exponential integrators by hand! In this example the EK1 with IOUP prior with rate parameter -1 performs extremely well:

sol_expek1 = solve(prob, EK1(prior=IOUP(3, -1), diffusionmodel=DM), adaptive=false, dt=STEPSIZE)
+plot!(sol_ros, denseplot=false, marker=:o, markersize=2, label="RosenbrockExpEK", color=4)
Example block output

The solutions are indeed much more accurate than those of the standard EK1, for the same fixed step size!

Background: Integrated Ornstein-Uhlenbeck priors

Probabilistic exponential integrators "solve the linear part exactly" by including it into the prior model of the solver. Namely, the solver chooses a (q-times) integrated Ornstein-Uhlenbeck prior with rate parameter equal to the linearity. The ExpEK solver is just a short-hand for an EK0 with appropriate prior:

julia> ExpEK(order=3, L=-1) == EK0(prior=IOUP(3, -1))true

Similarly, the RosenbrockExpEK solver is also just a short-hand:

julia> RosenbrockExpEK(order=3) == EK1(prior=IOUP(3, update_rate_parameter=true))true

This means that you can also construct other probabilistic exponential integrators by hand! In this example the EK1 with IOUP prior with rate parameter -1 performs extremely well:

sol_expek1 = solve(prob, EK1(prior=IOUP(3, -1), diffusionmodel=DM), adaptive=false, dt=STEPSIZE)
 
 plot(ylims=(0.3, 1.05))
 plot!(ref, color=:black, linestyle=:dash, label="Reference")
-plot!(sol_expek1, denseplot=false, marker=:o, markersize=2, label="EK1 + IOUP")
Example block output

References

[2]
+plot!(sol_expek1, denseplot=false, marker=:o, markersize=2, label="EK1 + IOUP")Example block output

References

[2]
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
-
+ diff --git a/dev/tutorials/fenrir/17dc9379.svg b/dev/tutorials/fenrir/17dc9379.svg new file mode 100644 index 000000000..c8e60b8cb --- /dev/null +++ b/dev/tutorials/fenrir/17dc9379.svg @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/fenrir/832e7586.svg b/dev/tutorials/fenrir/832e7586.svg deleted file mode 100644 index 898d3bc4e..000000000 --- a/dev/tutorials/fenrir/832e7586.svg +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/tutorials/fenrir/e0908ddd.svg b/dev/tutorials/fenrir/e0908ddd.svg deleted file mode 100644 index 823a61df0..000000000 --- a/dev/tutorials/fenrir/e0908ddd.svg +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/tutorials/fenrir/e5275bab.svg b/dev/tutorials/fenrir/e5275bab.svg new file mode 100644 index 000000000..2aba80ba2 --- /dev/null +++ b/dev/tutorials/fenrir/e5275bab.svg @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/fenrir/index.html b/dev/tutorials/fenrir/index.html index 301e4d7be..62f30656f 100644 --- a/dev/tutorials/fenrir/index.html +++ b/dev/tutorials/fenrir/index.html @@ -26,12 +26,12 @@ odedata = [true_sol(t) .+ sqrt(observation_noise_var) * randn(length(u0)) for t in times] plot(true_sol, color=:black, linestyle=:dash, label=["True Solution" ""]) -scatter!(times, stack(odedata), markersize=2, markerstrokewidth=0.1, color=1, label=["Noisy Data" ""])Example block output

Our goal is then to recover the true parameter p (and thus also the true trajectoy plotted above) the noisy data.

Computing the negative log-likelihood

To do parameter inference - be it maximum-likelihod, maximum a posteriori, or full Bayesian inference with MCMC - we need to evaluate the likelihood of given a parameter estimate $\theta_\text{est}$. This is exactly what Fenrir.jl's fenrir_nll provides:

p_est = (0.1, 0.1, 2.0)
+scatter!(times, stack(odedata), markersize=2, markerstrokewidth=0.1, color=1, label=["Noisy Data" ""])
Example block output

Our goal is then to recover the true parameter p (and thus also the true trajectoy plotted above) the noisy data.

Computing the negative log-likelihood

To do parameter inference - be it maximum-likelihod, maximum a posteriori, or full Bayesian inference with MCMC - we need to evaluate the likelihood of given a parameter estimate $\theta_\text{est}$. This is exactly what Fenrir.jl's fenrir_nll provides:

p_est = (0.1, 0.1, 2.0)
 prob = remake(true_prob, p=p_est)
 data = (t=times, u=odedata)
 κ² = 1e10
 nll, _, _ = fenrir_nll(prob, data, observation_noise_var, κ²; dt=1e-1)
-nll
274.43229408214546

This is the negative marginal log-likelihood of the parameter p_est. You can use it as any other NLL: Optimize it to compute maximum-likelihood estimates or MAPs, or plug it into MCMC to sample from the posterior. In our paper [3] we compute MLEs by pairing Fenrir with Optimization.jl and ForwardDiff.jl. Let's quickly explore how to do this next.

Maximum-likelihood parameter inference

To compute a maximum-likelihood estimate (MLE), we just need to maximize $\theta \to p(\mathcal{D} \mid \theta)$ - that is, minimize the nll from above. We use Optimization.jl for this. First, define a loss function and create an OptimizationProblem

function loss(x, _)
+nll
274.2589058328008

This is the negative marginal log-likelihood of the parameter p_est. You can use it as any other NLL: Optimize it to compute maximum-likelihood estimates or MAPs, or plug it into MCMC to sample from the posterior. In our paper [3] we compute MLEs by pairing Fenrir with Optimization.jl and ForwardDiff.jl. Let's quickly explore how to do this next.

Maximum-likelihood parameter inference

To compute a maximum-likelihood estimate (MLE), we just need to maximize $\theta \to p(\mathcal{D} \mid \theta)$ - that is, minimize the nll from above. We use Optimization.jl for this. First, define a loss function and create an OptimizationProblem

function loss(x, _)
     ode_params = x[begin:end-1]
     prob = remake(true_prob, p=ode_params)
     κ² = exp(x[end]) # the diffusion parameter of the EK1
@@ -49,15 +49,15 @@
  2.0
  1.0

Then, just solve it! Here we use LBFGS:

optsol = solve(optprob, LBFGS())
 p_mle = optsol.u[1:3]
3-element Vector{Float64}:
- 0.19207593566531622
- 0.4228392442314689
- 2.757209279951985

Success! The computed MLE is quite close to the true parameter which we used to generate the data. As a final step, let's plot the true solution, the data, and the result of the MLE:

plot(true_sol, color=:black, linestyle=:dash, label=["True Solution" ""])
+ 0.18670836355256565
+ 0.36196938701472103
+ 2.8837585725081145

Success! The computed MLE is quite close to the true parameter which we used to generate the data. As a final step, let's plot the true solution, the data, and the result of the MLE:

plot(true_sol, color=:black, linestyle=:dash, label=["True Solution" ""])
 scatter!(times, stack(odedata), markersize=2, markerstrokewidth=0.1, color=1, label=["Noisy Data" ""])
 mle_sol = solve(remake(true_prob, p=p_mle), EK1())
-plot!(mle_sol, color=3, label=["MLE-parameter Solution" ""])
Example block output

Looks good!

Reference

[3]
+plot!(mle_sol, color=3, label=["MLE-parameter Solution" ""])Example block output

Looks good!

Reference

[3]
F. Tronarp, N. Bosch and P. Hennig. Fenrir: Physics-Enhanced Regression for Initial Value Problems. In: Proceedings of the 39th International Conference on Machine Learning, Proceedings of Machine Learning Research, 21776–21794, PMLR (2022).
-
+ diff --git a/dev/tutorials/getting_started/5ab118ee.svg b/dev/tutorials/getting_started/08155c4a.svg similarity index 96% rename from dev/tutorials/getting_started/5ab118ee.svg rename to dev/tutorials/getting_started/08155c4a.svg index 713c56a80..050015353 100644 --- a/dev/tutorials/getting_started/5ab118ee.svg +++ b/dev/tutorials/getting_started/08155c4a.svg @@ -1,50 +1,50 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/de59c688.svg b/dev/tutorials/getting_started/5e51c0bd.svg similarity index 96% rename from dev/tutorials/getting_started/de59c688.svg rename to dev/tutorials/getting_started/5e51c0bd.svg index 1735640d5..650f42d3e 100644 --- a/dev/tutorials/getting_started/de59c688.svg +++ b/dev/tutorials/getting_started/5e51c0bd.svg @@ -1,50 +1,50 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/dfebb13f.svg b/dev/tutorials/getting_started/eeead470.svg similarity index 91% rename from dev/tutorials/getting_started/dfebb13f.svg rename to dev/tutorials/getting_started/eeead470.svg index f7b460794..56d0fb34e 100644 --- a/dev/tutorials/getting_started/dfebb13f.svg +++ b/dev/tutorials/getting_started/eeead470.svg @@ -1,54 +1,54 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/index.html b/dev/tutorials/getting_started/index.html index ff0dc1c78..f7413a569 100644 --- a/dev/tutorials/getting_started/index.html +++ b/dev/tutorials/getting_started/index.html @@ -15,7 +15,7 @@ prob = ODEProblem(fitz, u0, tspan, p) sol = solve(prob, EK1()) -plot(sol)Example block output

Step 1: Define the problem

First, import ProbNumDiffEq.jl

using ProbNumDiffEq

Then, set up the ODEProblem exactly as you would in DifferentialEquations.jl. Define the vector field

function fitz(du, u, p, t)
+plot(sol)
Example block output

Step 1: Define the problem

First, import ProbNumDiffEq.jl

using ProbNumDiffEq

Then, set up the ODEProblem exactly as you would in DifferentialEquations.jl. Define the vector field

function fitz(du, u, p, t)
     a, b, c = p
     du[1] = c * (u[1] - u[1]^3 / 3 + u[2])
     du[2] = -(1 / c) * (u[1] - a - b * u[2])
@@ -66,13 +66,13 @@
  [2.035086153414764, 0.7169394922557271]
  [2.0210436519484176, 0.6717007174965183]
  [2.0104405118668915, 0.6383145073764349]

That's it! we just computed a probabilistic numerical ODE solution!

Step 3: Analyze the solution

Let's plot the result with Plots.jl.

using Plots
-plot(sol)
Example block output

Looks good! Looks like the EK1 managed to solve the Fitzhugh-Nagumo problem quite well.

Tip

To learn more about plotting ODE solutions, check out the plotting tutorial for DifferentialEquations.jl + Plots.jl provided here. Most of that works exactly as expected with ProbNumDiffEq.jl.

Plot the probabilistic error estimates

The plot above looks like a standard ODE solution – but it's not! The numerical errors are just so small that we can't see them in the plot, and the probabilistic error estimates are too. We can visualize them by plotting the errors and error estimates directly:

using OrdinaryDiffEq, Statistics
+plot(sol)
Example block output

Looks good! Looks like the EK1 managed to solve the Fitzhugh-Nagumo problem quite well.

Tip

To learn more about plotting ODE solutions, check out the plotting tutorial for DifferentialEquations.jl + Plots.jl provided here. Most of that works exactly as expected with ProbNumDiffEq.jl.

Plot the probabilistic error estimates

The plot above looks like a standard ODE solution – but it's not! The numerical errors are just so small that we can't see them in the plot, and the probabilistic error estimates are too. We can visualize them by plotting the errors and error estimates directly:

using OrdinaryDiffEq, Statistics
 reference = solve(prob, Vern9(), abstol=1e-9, reltol=1e-9, saveat=sol.t)
 errors = reduce(hcat, mean.(sol.pu) .- reference.u)'
 error_estimates = reduce(hcat, std.(sol.pu))'
 plot(sol.t, errors, label="error", color=[1 2], xlabel="t", ylabel="err")
 plot!(sol.t, zero(errors), ribbon=3error_estimates, label="error estimate",
-      color=[1 2], alpha=0.2)
Example block output

More about the ProbabilisticODESolution

The solution object returned by ProbNumDiffEq.jl mostly behaves just like any other ODESolution in DifferentialEquations.jl – with some added uncertainties and related functionality on top. So, sol can be indexed

julia> sol[1]2-element Vector{Float64}:
+      color=[1 2], alpha=0.2)
Example block output

More about the ProbabilisticODESolution

The solution object returned by ProbNumDiffEq.jl mostly behaves just like any other ODESolution in DifferentialEquations.jl – with some added uncertainties and related functionality on top. So, sol can be indexed

julia> sol[1]2-element Vector{Float64}:
  -1.0
   1.0
julia> sol[end]2-element Vector{Float64}: 2.0104405118668915 @@ -93,4 +93,4 @@ 2.8014003609811094e-6 2.7505533924662915e-6

Dense output

Probabilistic numerical ODE solvers approximate the posterior distribution

\[p \Big( y(t) ~\big|~ y(0) = y_0, \{ \dot{y}(t_i) = f_\theta(y(t_i), t_i) \} \Big),\]

which describes a posterior not just for the discrete steps but for any $t$ in the continuous space $t \in [0, T]$; in classic ODE solvers, this is also known as "interpolation" or "dense output". The probabilistic solutions returned by our solvers can be interpolated as usual by treating them as functions, but they return Gaussian distributions

julia> sol(0.45)Gaussian{Vector{Float64},PSDMatrix{Float64, Matrix{Float64}}}([-0.2773821283086793, 1.1675659430627094], 2x2 PSDMatrix{Float64, Matrix{Float64}}; R=[-3.208354407822495e-5 -4.78996984535617e-6; 0.0 1.926478845667932e-5; 0.0 1.4605790175623882e-5; 0.0 1.0839739026001365e-6; 0.0 5.6069326352075e-7; 0.0 0.0; 0.0 0.0; 0.0 0.0])
julia> mean(sol(0.45))2-element Vector{Float64}: -0.2773821283086793 - 1.1675659430627094

Next steps

Check out one of the other tutorials:

+ 1.1675659430627094

Next steps

Check out one of the other tutorials: