diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index a7510f272..3aa123b0b 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-11-01T20:05:02","documenter_version":"1.1.2"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-11-01T22:33:12","documenter_version":"1.1.2"}} \ No newline at end of file diff --git a/dev/benchmarks/figures/lotkavolterra_2_1.svg b/dev/benchmarks/figures/lotkavolterra_2_1.svg index 9dc4fe771..c48978215 100644 --- a/dev/benchmarks/figures/lotkavolterra_2_1.svg +++ b/dev/benchmarks/figures/lotkavolterra_2_1.svg @@ -1,148 +1,148 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/benchmarks/figures/lotkavolterra_3_1.svg b/dev/benchmarks/figures/lotkavolterra_3_1.svg index 2bd2ea269..a65f5585a 100644 --- a/dev/benchmarks/figures/lotkavolterra_3_1.svg +++ b/dev/benchmarks/figures/lotkavolterra_3_1.svg @@ -1,318 +1,318 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/benchmarks/figures/lotkavolterra_4_1.svg b/dev/benchmarks/figures/lotkavolterra_4_1.svg index 375bf3fcb..dd593a004 100644 --- a/dev/benchmarks/figures/lotkavolterra_4_1.svg +++ b/dev/benchmarks/figures/lotkavolterra_4_1.svg @@ -1,320 +1,320 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/benchmarks/figures/lotkavolterra_5_1.svg b/dev/benchmarks/figures/lotkavolterra_5_1.svg index b676b7c1d..cdf17a233 100644 --- a/dev/benchmarks/figures/lotkavolterra_5_1.svg +++ b/dev/benchmarks/figures/lotkavolterra_5_1.svg @@ -1,376 +1,376 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/benchmarks/figures/lotkavolterra_6_1.svg b/dev/benchmarks/figures/lotkavolterra_6_1.svg index f11f15f78..17da346c5 100644 --- a/dev/benchmarks/figures/lotkavolterra_6_1.svg +++ b/dev/benchmarks/figures/lotkavolterra_6_1.svg @@ -1,358 +1,358 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/benchmarks/figures/lotkavolterra_7_1.svg b/dev/benchmarks/figures/lotkavolterra_7_1.svg index 7243b9076..5a8663d2b 100644 --- a/dev/benchmarks/figures/lotkavolterra_7_1.svg +++ b/dev/benchmarks/figures/lotkavolterra_7_1.svg @@ -1,390 +1,390 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/benchmarks/lotkavolterra/index.html b/dev/benchmarks/lotkavolterra/index.html index d4945e5d9..c91b17cf9 100644 --- a/dev/benchmarks/lotkavolterra/index.html +++ b/dev/benchmarks/lotkavolterra/index.html @@ -185,7 +185,8 @@ Threads: 12 on 12 virtual cores Environment: JULIA_NUM_THREADS = auto - JULIA_STACKTRACE_MINIMAL = true

Package Information:

using Pkg
+  JULIA_STACKTRACE_MINIMAL = true
+  JULIA_IMAGE_THREADS = 1

Package Information:

using Pkg
 Pkg.status()
Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml`
   [f3b72e0c] DiffEqDevTools v2.39.0
   [7073ff75] IJulia v1.24.2
@@ -199,26 +200,26 @@
   [65888b18] ParameterizedFunctions v5.16.0
   [91a5bcdd] Plots v1.39.0
   [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq`
-  [0bca4576] SciMLBase v2.4.3
+  [0bca4576] SciMLBase v2.5.0
   [505e40e9] SciPyDiffEq v0.2.1
   [90137ffa] StaticArrays v1.6.5
-  [c3572dad] Sundials v4.20.0
+  [c3572dad] Sundials v4.20.1
   [44d3d7a6] Weave v0.10.12
   [0518478a] deSolveDiffEq v0.1.1

And the full manifest:

Pkg.status(mode=Pkg.PKGMODE_MANIFEST)
Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml`
   [47edcb42] ADTypes v0.2.4
 ⌅ [c3fe647b] AbstractAlgebra v0.32.5
   [621f4979] AbstractFFTs v1.5.0
   [1520ce14] AbstractTrees v0.4.4
-  [79e6a3ab] Adapt v3.7.0
+  [79e6a3ab] Adapt v3.7.1
   [ec485272] ArnoldiMethod v0.2.0
   [c9d4266f] ArrayAllocators v0.3.0
-  [4fba245c] ArrayInterface v7.4.11
+  [4fba245c] ArrayInterface v7.5.0
   [30b0a656] ArrayInterfaceCore v0.1.29
   [6e4b80f9] BenchmarkTools v1.3.2
   [e2ed5e7c] Bijections v0.1.6
   [d1d4a3ce] BitFlags v0.1.7
   [62783981] BitTwiddlingConvenienceFunctions v0.1.5
-⌅ [fa961155] CEnum v0.4.2
+  [fa961155] CEnum v0.5.0
   [2a0fbf3d] CPUSummary v0.2.4
   [00ebfdb7] CSTParser v3.3.6
   [49dc2e85] Calculus v0.5.1
@@ -250,7 +251,7 @@
   [864edb3b] DataStructures v0.18.15
   [e2d170a0] DataValueInterfaces v1.0.0
   [8bb1440f] DelimitedFiles v1.9.1
-  [2b5f629d] DiffEqBase v6.134.0
+  [2b5f629d] DiffEqBase v6.135.0
   [459566f4] DiffEqCallbacks v2.33.1
   [f3b72e0c] DiffEqDevTools v2.39.0
   [77a26b50] DiffEqNoiseProcess v5.19.0
@@ -264,7 +265,7 @@
   [7c1d4256] DynamicPolynomials v0.5.3
   [b305315f] Elliptic v1.0.1
   [4e289a0a] EnumX v1.0.4
-  [f151be2c] EnzymeCore v0.6.2
+  [f151be2c] EnzymeCore v0.6.3
   [6912e4f1] Espresso v0.6.1
   [460bff9d] ExceptionUnwrapping v0.1.9
   [d4d017d3] ExponentialUtilities v1.25.0
@@ -290,7 +291,7 @@
   [c27321d9] Glob v1.3.1
   [86223c79] Graphs v1.9.0
   [42e2da0e] Grisu v1.0.2
-  [0b43b601] Groebner v0.4.4
+⌅ [0b43b601] Groebner v0.4.4
   [d5909c97] GroupsCore v0.4.0
   [cd3eb016] HTTP v1.10.0
   [eafb193a] Highlights v0.5.2
@@ -309,7 +310,7 @@
   [1019f520] JLFzf v0.1.6
   [692b3bcd] JLLWrappers v1.5.0
   [682c06a0] JSON v0.21.4
-  [98e50ef6] JuliaFormatter v1.0.40
+  [98e50ef6] JuliaFormatter v1.0.41
   [ccbc3e58] JumpProcesses v9.8.0
   [ef3ab10e] KLU v0.4.1
   [2c470bb0] Kronecker v0.5.4
@@ -323,7 +324,7 @@
   [50d2b5c4] Lazy v0.15.1
   [1d6d02ad] LeftChildRightSiblingTrees v0.2.0
   [d3d80556] LineSearches v7.2.0
-  [7ed4a6bd] LinearSolve v2.12.1
+  [7ed4a6bd] LinearSolve v2.14.0
   [2ab3a3ac] LogExpFunctions v0.3.26
   [e6f89c97] LoggingExtras v1.0.3
   [bdcacae8] LoopVectorization v0.12.165
@@ -344,7 +345,7 @@
   [2774e3e8] NLsolve v4.5.1
   [77ba4419] NaNMath v1.0.2
 ⌅ [356022a1] NamedDims v0.2.50
-  [8913a72c] NonlinearSolve v2.4.0
+  [8913a72c] NonlinearSolve v2.5.0
   [54ca160b] ODEInterface v0.5.0
   [09606e27] ODEInterfaceDiffEq v3.13.3
   [6fd5a793] Octavian v0.3.27
@@ -396,8 +397,8 @@
   [7e49a35a] RuntimeGeneratedFunctions v0.5.12
   [fdea26ae] SIMD v3.4.5
   [94e857df] SIMDTypes v0.1.0
-  [476501e8] SLEEFPirates v0.6.39
-  [0bca4576] SciMLBase v2.4.3
+  [476501e8] SLEEFPirates v0.6.40
+  [0bca4576] SciMLBase v2.5.0
   [e9a6253c] SciMLNLSolve v0.1.9
   [c0aeaf25] SciMLOperators v0.3.6
   [505e40e9] SciPyDiffEq v0.2.1
@@ -413,7 +414,7 @@
   [66db9d55] SnoopPrecompile v1.0.3
   [b85f4697] SoftGlobalScope v1.1.0
   [a2af1166] SortingAlgorithms v1.2.0
-  [47a9eef4] SparseDiffTools v2.8.0
+  [47a9eef4] SparseDiffTools v2.9.1
   [e56a9233] Sparspak v0.3.9
   [276daf66] SpecialFunctions v2.3.1
   [928aab9d] SpecialMatrices v3.0.0
@@ -429,7 +430,7 @@
   [69024149] StringEncodings v0.3.7
   [892a3eda] StringManipulation v0.3.4
   [09ab397b] StructArrays v0.6.16
-  [c3572dad] Sundials v4.20.0
+  [c3572dad] Sundials v4.20.1
   [2efcf032] SymbolicIndexingInterface v0.2.2
   [d1185830] SymbolicUtils v1.4.0
   [0c5d862f] Symbolics v5.10.0
@@ -601,4 +602,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 377435373..9e59296d0 100644 --- a/dev/benchmarks/multi-language-wrappers/index.html +++ b/dev/benchmarks/multi-language-wrappers/index.html @@ -698,4 +698,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 1a731303e..c65db1e5f 100644 --- a/dev/benchmarks/pleiades/index.html +++ b/dev/benchmarks/pleiades/index.html @@ -529,4 +529,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 cecc6a241..38bc12e0f 100644 --- a/dev/benchmarks/rober/index.html +++ b/dev/benchmarks/rober/index.html @@ -481,4 +481,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 8ab20138b..bda6afedb 100644 --- a/dev/benchmarks/vanderpol/index.html +++ b/dev/benchmarks/vanderpol/index.html @@ -519,4 +519,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 b7e9c5a8c..377332d35 100644 --- a/dev/diffusions/index.html +++ b/dev/diffusions/index.html @@ -5,4 +5,4 @@ \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}$:

  • FixedDiffusion assumes an isotropic, time-fixed $\textcolor{#4063D8}{\Gamma} = \sigma \cdot I_d$,
  • DynamicDiffusion assumes an isotropic, time-varying $\textcolor{#4063D8}{\Gamma}(t) = \sigma(t) \cdot I_d$ (recommended),
  • FixedMVDiffusion assumes a diagonal, time-fixed $\textcolor{#4063D8}{\Gamma} = \operatorname{diag}(\sigma_1, \dots, \sigma_d)$,
  • DynamicMVDiffusion assumes a diagonal, time-varying $\textcolor{#4063D8}{\Gamma}(t) = \operatorname{diag}(\sigma_1(t), \dots, \sigma_d(t))$.

Or more compactly:

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

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

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

  • [8] 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

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

References

[8]
N. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, Vol. 130 of Proceedings of Machine Learning Research, edited by A. Banerjee and K. Fukumizu (PMLR, 13–15 Apr 2021); pp. 3466–3474.
+\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}$:

  • FixedDiffusion assumes an isotropic, time-fixed $\textcolor{#4063D8}{\Gamma} = \sigma \cdot I_d$,
  • DynamicDiffusion assumes an isotropic, time-varying $\textcolor{#4063D8}{\Gamma}(t) = \sigma(t) \cdot I_d$ (recommended),
  • FixedMVDiffusion assumes a diagonal, time-fixed $\textcolor{#4063D8}{\Gamma} = \operatorname{diag}(\sigma_1, \dots, \sigma_d)$,
  • DynamicMVDiffusion assumes a diagonal, time-varying $\textcolor{#4063D8}{\Gamma}(t) = \operatorname{diag}(\sigma_1(t), \dots, \sigma_d(t))$.

Or more compactly:

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

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

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

  • [8] 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

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

References

[8]
N. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, Vol. 130 of Proceedings of Machine Learning Research, edited by A. Banerjee and K. Fukumizu (PMLR, 13–15 Apr 2021); pp. 3466–3474.
diff --git a/dev/filtering/index.html b/dev/filtering/index.html index b92c68344..6f3a39875 100644 --- a/dev/filtering/index.html +++ b/dev/filtering/index.html @@ -1,16 +1,37 @@ -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.

source

Markov Kernels

ProbNumDiffEq.AffineNormalKernelType
AffineNormalKernel(A[, b], C)

Structure to represent affine Normal Markov kernels, i.e. conditional distributions of the form

\[\begin{aligned} +y \mid x \sim \mathcal{N} \left( y; A x + b, C \right). +\end{aligned}\]

At the point of writing, AffineNormalKernels are only used to precompute and store the backward representation of the posterior (via compute_backward_kernel!) and for smoothing (via marginalize!).

source
ProbNumDiffEq.marginalize!Function
marginalize!(
+    xout::Gaussian{Vector{T},PSDMatrix{T,S}}
+    x::Gaussian{Vector{T},PSDMatrix{T,S}},
+    K::AffineNormalKernel{<:AbstractMatrix,Union{<:Number,<:AbstractVector,Missing},<:PSDMatrix};
+    C_DxD, C_3DxD
+)

Basically the same as predict!), but in kernel language and with support for affine transitions. At the time of writing, this is only used to smooth the posterior using it's backward representation, where the kernels are precomputed with compute_backward_kernel!.

Note that this function assumes certain shapes:

  • size(x.μ) == (D, D)
  • size(x.Σ) == (D, D)
  • size(K.A) == (D, D)
  • size(K.b) == (D,), or missing
  • size(K.C) == (D, D), _but with a tall square-root size(K.C.R) == (3D, D)

xout is assumes to have the same shapes as x.

source
ProbNumDiffEq.compute_backward_kernel!Function
compute_backward_kernel!(Kout, xpred, x, K; C_DxD[, diffusion=1])

Compute the backward representation of the posterior, i.e. the conditional distribution of the current state given the next state and the transition kernel.

More precisely, given a distribution (x)

\[\begin{aligned} +x \sim \mathcal{N} \left( x; μ, Σ \right), +\end{aligned}\]

a kernel (K)

\[\begin{aligned} +y \mid x \sim \mathcal{N} \left( y; A x + b, C \right), +\end{aligned}\]

and a distribution (xpred) obtained via marginalization

\[\begin{aligned} +y &\sim \mathcal{N} \left( y; μ^P, Σ^P \right), \\ +μ^P &= A μ + b, \\ +Σ^P &= A Σ A^\top + C, +\end{aligned}\]

this function computes the conditional distribution

\[\begin{aligned} +x \mid y \sim \mathcal{N} \left( x; G x + d, Λ \right), +\end{aligned}\]

where

\[\begin{aligned} +G &= Σ A^\top (Σ^P)^{-1}, \\ +d &= μ - G μ^P, \\ +Λ &= Σ - G Σ^P G^\top. +\end{aligned}\]

Everything is computed in square-root form and with minimal allocations (thus the cache C_DxD), so the actual formulas implemented here differ a bit.

The resulting backward kernels are used to smooth the posterior, via marginalize!.

source
diff --git a/dev/implementation/index.html b/dev/implementation/index.html index 0f63f172a..50c35de85 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 7f85b13ea..1a1b4b2e3 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

  • 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.
diff --git a/dev/initialization/index.html b/dev/initialization/index.html index 09e27ae59..3a33a6109 100644 --- a/dev/initialization/index.html +++ b/dev/initialization/index.html @@ -11,4 +11,4 @@ \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

  • [6] 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

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

References

+\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

  • [6] 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

  • [6] Krämer et al, "Stable Implementation of Probabilistic ODE Solvers" (2020)
  • [7] 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 50ac32154..0673a7032 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 338746fe9..8a9a0498c 100644 --- a/dev/references/index.html +++ b/dev/references/index.html @@ -1,2 +1,2 @@ -References · ProbNumDiffEq.jl

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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.
[2]
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
[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, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 21776–21794.
[4]
[5]
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 Learning, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 11634–11649.
[6]
[7]
[8]
N. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, Vol. 130 of Proceedings of Machine Learning Research, edited by A. Banerjee and K. Fukumizu (PMLR, 13–15 Apr 2021); pp. 3466–3474.
[9]
P. Hennig, M. A. Osborne and H. P. Kersting. Probabilistic Numerics: Computation as Machine Learning (Cambridge University Press, 2022).
[10]
H. Kersting and P. Hennig. Active Uncertainty Calibration in Bayesian ODE Solvers. In: Proceedings of the Thirty-Second Conference on Uncertainty in Artificial Intelligence, UAI'16 (AUAI Press, 2016); pp. 309–318.
[11]
H. Kersting, T. J. Sullivan and P. Hennig. Convergence rates of Gaussian ODE filters. Statistics and Computing 30, 1791–1816 (2020).
[12]
+References · ProbNumDiffEq.jl

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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.
[2]
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
[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, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 21776–21794.
[4]
[5]
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 Learning, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 11634–11649.
[6]
[7]
[8]
N. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, Vol. 130 of Proceedings of Machine Learning Research, edited by A. Banerjee and K. Fukumizu (PMLR, 13–15 Apr 2021); pp. 3466–3474.
[9]
P. Hennig, M. A. Osborne and H. P. Kersting. Probabilistic Numerics: Computation as Machine Learning (Cambridge University Press, 2022).
[10]
H. Kersting and P. Hennig. Active Uncertainty Calibration in Bayesian ODE Solvers. In: Proceedings of the Thirty-Second Conference on Uncertainty in Artificial Intelligence, UAI'16 (AUAI Press, 2016); pp. 309–318.
[11]
H. Kersting, T. J. Sullivan and P. Hennig. Convergence rates of Gaussian ODE filters. Statistics and Computing 30, 1791–1816 (2020).
[12]
diff --git a/dev/search_index.js b/dev/search_index.js index 88ba74fb2..e2167d6f9 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":"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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.\n\n\n\nN. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].\n\n\n\nF. Tronarp, N. Bosch and P. Hennig. Fenrir: Physics-Enhanced Regression for Initial Value Problems. In: Proceedings of the 39th International Conference on Machine Learning, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 21776–21794.\n\n\n\nF. Tronarp, H. Kersting, S. Särkkä and P. Hennig. Probabilistic solutions to ordinary differential equations as nonlinear Bayesian filtering: a new perspective. Statistics and Computing 29, 1297–1315 (2019).\n\n\n\nN. 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 Learning, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 11634–11649.\n\n\n\nN. Krämer and P. Hennig. Stable Implementation of Probabilistic ODE Solvers. CoRR (2020), arXiv:2012.10106 [stat.ML].\n\n\n\nM. Schober, S. Särkkä and P. Hennig. A probabilistic model for the numerical solution of initial value problems. Statistics and Computing 29, 99–122 (2019).\n\n\n\nN. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, Vol. 130 of Proceedings of Machine Learning Research, edited by A. Banerjee and K. Fukumizu (PMLR, 13–15 Apr 2021); pp. 3466–3474.\n\n\n\nP. Hennig, M. A. Osborne and H. P. Kersting. Probabilistic Numerics: Computation as Machine Learning (Cambridge University Press, 2022).\n\n\n\nH. Kersting and P. Hennig. Active Uncertainty Calibration in Bayesian ODE Solvers. In: Proceedings of the Thirty-Second Conference on Uncertainty in Artificial Intelligence, UAI'16 (AUAI Press, 2016); pp. 309–318.\n\n\n\nH. Kersting, T. J. Sullivan and P. Hennig. Convergence rates of Gaussian ODE filters. Statistics and Computing 30, 1791–1816 (2020).\n\n\n\nF. Tronarp, S. Särkkä and P. Hennig. Bayesian ODE solvers: the maximum a posteriori estimate. Statistics and Computing 31, 23 (2021).\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 3:7\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(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(6) 1st order\" => Dict(:alg => EK1(order=6, 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(6) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=6, smooth=DENSE))\n \"EK1(7) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=7, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (6:12)\nreltols = 1.0 ./ 10.0 .^ (3:9)\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.3\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.7.0\n [ec485272] ArnoldiMethod v0.2.0\n [c9d4266f] ArrayAllocators v0.3.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.6\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.18.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.3\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 [587fd27a] CovarianceEstimation v0.2.9\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.134.0\n [459566f4] DiffEqCallbacks v2.33.1\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.2\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.7.0\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.8\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.6\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.40\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [2c470bb0] Kronecker v0.5.4\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.12.1\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⌅ [356022a1] NamedDims v0.2.50\n [8913a72c] NonlinearSolve v2.4.0\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.28\n [fe68d972] PSDMatrices v0.4.6\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.8\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.38.10\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.3\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.23\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.2.0\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.10.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.1\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.10.1\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.1\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.4\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.35.1+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 2:4\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:8)\nreltols = 1.0 ./ 10.0 .^ (1:5)\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.3\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.7.0\n [ec485272] ArnoldiMethod v0.2.0\n [c9d4266f] ArrayAllocators v0.3.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.6\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.18.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.3\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 [587fd27a] CovarianceEstimation v0.2.9\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.134.0\n [459566f4] DiffEqCallbacks v2.33.1\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.2\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.7.0\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.8\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.6\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.40\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [2c470bb0] Kronecker v0.5.4\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.12.1\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⌅ [356022a1] NamedDims v0.2.50\n [8913a72c] NonlinearSolve v2.4.0\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.28\n [fe68d972] PSDMatrices v0.4.6\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.8\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.38.10\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.3\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.23\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.2.0\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.10.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.1\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.10.1\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.1\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.4\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.35.1+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.","category":"page"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"Which solver should I use?","category":"page"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"Use the EK1 to get the best uncertainty quantification and to solve stiff problems.\nUse the EK0 to get the fastest runtimes and to solve high-dimensional problems.","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\nThis is a semi-implicit, L-stable ODE solver so it can handle stiffness quite well [4], and it generally produces more expressive posterior covariances than the EK0. However, as typical implicit ODE solvers it scales cubically with the ODE dimension [5], so if you're solving a high-dimensional non-stiff problem you might want to give the EK0 a try.\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\nThis is an explicit ODE solver. It is fast and scales well to high-dimensional problems [5], but it is not L-stable [4]. So for stiff problems, use the EK1.\n\nWhenever possible this solver will use a Kronecker-factored implementation to achieve its linear scaling and to get the best runtimes. This can currently be done only with an IWP prior (default), with a scalar diffusion model (either DynamicDiffusion or FixedDiffusion). For other configurations the solver falls back to a dense implementation which scales cubically with the problem size.\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 locally-updated 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":"F. Tronarp, H. Kersting, S. Särkkä and P. Hennig. Probabilistic solutions to ordinary differential equations as nonlinear Bayesian filtering: a new perspective. Statistics and Computing 29, 1297–1315 (2019).\n\n\n\nN. 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 Learning, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 11634–11649.\n\n\n\nN. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].\n\n\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":"N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].\n\n\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 2: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 2: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: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=[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: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=[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":"For such a low-dimensional problem the EK0 and EK1 have a very similar runtime. 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.3\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.7.0\n [ec485272] ArnoldiMethod v0.2.0\n [c9d4266f] ArrayAllocators v0.3.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.6\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.18.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.3\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 [587fd27a] CovarianceEstimation v0.2.9\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.134.0\n [459566f4] DiffEqCallbacks v2.33.1\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.2\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.7.0\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.8\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.6\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.40\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [2c470bb0] Kronecker v0.5.4\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.12.1\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⌅ [356022a1] NamedDims v0.2.50\n [8913a72c] NonlinearSolve v2.4.0\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.28\n [fe68d972] PSDMatrices v0.4.6\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.8\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.38.10\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.3\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.23\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.2.0\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.10.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.1\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.10.1\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.1\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.4\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.35.1+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/","page":"Initialization","title":"Initialization","text":"TL;DR: In the vast majority of cases, just stick to the exact Taylor-mode initialization TaylorModeInit!","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[6] 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[6] Krämer et al, \"Stable Implementation of Probabilistic ODE Solvers\" (2020)\n[7] 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":"N. Krämer and P. Hennig. Stable Implementation of Probabilistic ODE Solvers. CoRR (2020), arXiv:2012.10106 [stat.ML].\n\n\n\nM. Schober, S. Särkkä and P. Hennig. A probabilistic model for the numerical solution of initial value problems. Statistics and Computing 29, 99–122 (2019).\n\n\n\n","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":"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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.\n\n\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 [8].","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[8] 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[8] 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":"N. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, Vol. 130 of Proceedings of Machine Learning Research, edited by A. Banerjee and K. Fukumizu (PMLR, 13–15 Apr 2021); pp. 3466–3474.\n\n\n\n","category":"page"},{"location":"priors/#Priors","page":"Priors","title":"Priors","text":"","category":"section"},{"location":"priors/","page":"Priors","title":"Priors","text":"TL;DR: If you're unsure which prior to use, just stick to the default integrated Wiener process prior IWP!","category":"page"},{"location":"priors/#Background","page":"Priors","title":"Background","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":"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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.\n\n\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: EK0\" => :Gray30,\n \"ProbNumDiffEq: EK1\" => :Gray60,\n)\ntocolor(n) = if split(n, '(')[1] in keys(COLORS)\n COLORS[split(n, '(')[1]]\nelse\n COLORS[split(n, ':')[1]]\nend","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"tocolor (generic function with 1 method)","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(3)\" => Dict(:alg=>EK0(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK0(5)\" => Dict(:alg=>EK0(order=5, 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 \"ProbNumDiffEq: EK1(8)\" => Dict(:alg=>EK1(order=8, 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(3)\" => Dict(:alg=>EK0(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK0(5)\" => Dict(:alg=>EK0(order=5, 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 \"ProbNumDiffEq: EK1(8)\" => Dict(:alg=>EK1(order=8, 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(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=\"HIRES 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.3\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.7.0\n [ec485272] ArnoldiMethod v0.2.0\n [c9d4266f] ArrayAllocators v0.3.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.6\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.18.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.3\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 [587fd27a] CovarianceEstimation v0.2.9\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.134.0\n [459566f4] DiffEqCallbacks v2.33.1\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.2\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.7.0\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.8\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.6\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.40\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [2c470bb0] Kronecker v0.5.4\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.12.1\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⌅ [356022a1] NamedDims v0.2.50\n [8913a72c] NonlinearSolve v2.4.0\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.28\n [fe68d972] PSDMatrices v0.4.6\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.8\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.38.10\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.3\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.23\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.2.0\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.10.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.1\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.10.1\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.1\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.4\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.35.1+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!\nFor best runtimes runtimes, use the EK0!","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.3\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.7.0\n [ec485272] ArnoldiMethod v0.2.0\n [c9d4266f] ArrayAllocators v0.3.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.6\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.18.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.3\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 [587fd27a] CovarianceEstimation v0.2.9\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.134.0\n [459566f4] DiffEqCallbacks v2.33.1\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.2\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.7.0\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.8\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.6\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.40\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [2c470bb0] Kronecker v0.5.4\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.12.1\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⌅ [356022a1] NamedDims v0.2.50\n [8913a72c] NonlinearSolve v2.4.0\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.28\n [fe68d972] PSDMatrices v0.4.6\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.8\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.38.10\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.3\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.23\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.2.0\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.10.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.1\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.10.1\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.1\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.4\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.35.1+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":"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, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 21776–21794.\n\n\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":"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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.\n\n\n\nN. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].\n\n\n\nF. Tronarp, N. Bosch and P. Hennig. Fenrir: Physics-Enhanced Regression for Initial Value Problems. In: Proceedings of the 39th International Conference on Machine Learning, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 21776–21794.\n\n\n\nF. Tronarp, H. Kersting, S. Särkkä and P. Hennig. Probabilistic solutions to ordinary differential equations as nonlinear Bayesian filtering: a new perspective. Statistics and Computing 29, 1297–1315 (2019).\n\n\n\nN. 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 Learning, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 11634–11649.\n\n\n\nN. Krämer and P. Hennig. Stable Implementation of Probabilistic ODE Solvers. CoRR (2020), arXiv:2012.10106 [stat.ML].\n\n\n\nM. Schober, S. Särkkä and P. Hennig. A probabilistic model for the numerical solution of initial value problems. Statistics and Computing 29, 99–122 (2019).\n\n\n\nN. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, Vol. 130 of Proceedings of Machine Learning Research, edited by A. Banerjee and K. Fukumizu (PMLR, 13–15 Apr 2021); pp. 3466–3474.\n\n\n\nP. Hennig, M. A. Osborne and H. P. Kersting. Probabilistic Numerics: Computation as Machine Learning (Cambridge University Press, 2022).\n\n\n\nH. Kersting and P. Hennig. Active Uncertainty Calibration in Bayesian ODE Solvers. In: Proceedings of the Thirty-Second Conference on Uncertainty in Artificial Intelligence, UAI'16 (AUAI Press, 2016); pp. 309–318.\n\n\n\nH. Kersting, T. J. Sullivan and P. Hennig. Convergence rates of Gaussian ODE filters. Statistics and Computing 30, 1791–1816 (2020).\n\n\n\nF. Tronarp, S. Särkkä and P. Hennig. Bayesian ODE solvers: the maximum a posteriori estimate. Statistics and Computing 31, 23 (2021).\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 3:7\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(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(6) 1st order\" => Dict(:alg => EK1(order=6, 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(6) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=6, smooth=DENSE))\n \"EK1(7) 2nd order\" => Dict(:prob_choice => 2, :alg => EK1(order=7, smooth=DENSE))\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (6:12)\nreltols = 1.0 ./ 10.0 .^ (3:9)\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.3\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.7.0\n [ec485272] ArnoldiMethod v0.2.0\n [c9d4266f] ArrayAllocators v0.3.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.6\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.18.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.3\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 [587fd27a] CovarianceEstimation v0.2.9\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.134.0\n [459566f4] DiffEqCallbacks v2.33.1\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.2\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.7.0\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.8\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.6\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.40\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [2c470bb0] Kronecker v0.5.4\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.12.1\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⌅ [356022a1] NamedDims v0.2.50\n [8913a72c] NonlinearSolve v2.4.0\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.28\n [fe68d972] PSDMatrices v0.4.6\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.8\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.38.10\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.3\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.23\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.2.0\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.10.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.1\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.10.1\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.1\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.4\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.35.1+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 2:4\n]\n\nlabels = first.(_setups)\nsetups = last.(_setups)\n\nabstols = 1.0 ./ 10.0 .^ (4:8)\nreltols = 1.0 ./ 10.0 .^ (1:5)\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.3\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.7.0\n [ec485272] ArnoldiMethod v0.2.0\n [c9d4266f] ArrayAllocators v0.3.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.6\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.18.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.3\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 [587fd27a] CovarianceEstimation v0.2.9\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.134.0\n [459566f4] DiffEqCallbacks v2.33.1\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.2\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.7.0\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.8\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.6\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.40\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [2c470bb0] Kronecker v0.5.4\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.12.1\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⌅ [356022a1] NamedDims v0.2.50\n [8913a72c] NonlinearSolve v2.4.0\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.28\n [fe68d972] PSDMatrices v0.4.6\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.8\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.38.10\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.3\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.23\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.2.0\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.10.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.1\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.10.1\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.1\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.4\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.35.1+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","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\n\n\n\n\n","category":"function"},{"location":"filtering/#Markov-Kernels","page":"Filtering and Smoothing","title":"Markov Kernels","text":"","category":"section"},{"location":"filtering/","page":"Filtering and Smoothing","title":"Filtering and Smoothing","text":"ProbNumDiffEq.AffineNormalKernel\nProbNumDiffEq.marginalize!\nProbNumDiffEq.compute_backward_kernel!","category":"page"},{"location":"filtering/#ProbNumDiffEq.AffineNormalKernel","page":"Filtering and Smoothing","title":"ProbNumDiffEq.AffineNormalKernel","text":"AffineNormalKernel(A[, b], C)\n\nStructure to represent affine Normal Markov kernels, i.e. conditional distributions of the form\n\nbeginaligned\ny mid x sim mathcalN left( y A x + b C right)\nendaligned\n\nAt the point of writing, AffineNormalKernels are only used to precompute and store the backward representation of the posterior (via compute_backward_kernel!) and for smoothing (via marginalize!).\n\n\n\n\n\n","category":"type"},{"location":"filtering/#ProbNumDiffEq.marginalize!","page":"Filtering and Smoothing","title":"ProbNumDiffEq.marginalize!","text":"marginalize!(\n xout::Gaussian{Vector{T},PSDMatrix{T,S}}\n x::Gaussian{Vector{T},PSDMatrix{T,S}},\n K::AffineNormalKernel{<:AbstractMatrix,Union{<:Number,<:AbstractVector,Missing},<:PSDMatrix};\n C_DxD, C_3DxD\n)\n\nBasically the same as predict!), but in kernel language and with support for affine transitions. At the time of writing, this is only used to smooth the posterior using it's backward representation, where the kernels are precomputed with compute_backward_kernel!.\n\nNote that this function assumes certain shapes:\n\nsize(x.μ) == (D, D)\nsize(x.Σ) == (D, D)\nsize(K.A) == (D, D)\nsize(K.b) == (D,), or missing\nsize(K.C) == (D, D), _but with a tall square-root size(K.C.R) == (3D, D)\n\nxout is assumes to have the same shapes as x.\n\n\n\n\n\n","category":"function"},{"location":"filtering/#ProbNumDiffEq.compute_backward_kernel!","page":"Filtering and Smoothing","title":"ProbNumDiffEq.compute_backward_kernel!","text":"compute_backward_kernel!(Kout, xpred, x, K; C_DxD[, diffusion=1])\n\nCompute the backward representation of the posterior, i.e. the conditional distribution of the current state given the next state and the transition kernel.\n\nMore precisely, given a distribution (x)\n\nbeginaligned\nx sim mathcalN left( x μ Σ right)\nendaligned\n\na kernel (K)\n\nbeginaligned\ny mid x sim mathcalN left( y A x + b C right)\nendaligned\n\nand a distribution (xpred) obtained via marginalization\n\nbeginaligned\ny sim mathcalN left( y μ^P Σ^P right) \nμ^P = A μ + b \nΣ^P = A Σ A^top + C\nendaligned\n\nthis function computes the conditional distribution\n\nbeginaligned\nx mid y sim mathcalN left( x G x + d Λ right)\nendaligned\n\nwhere\n\nbeginaligned\nG = Σ A^top (Σ^P)^-1 \nd = μ - G μ^P \nΛ = Σ - G Σ^P G^top\nendaligned\n\nEverything is computed in square-root form and with minimal allocations (thus the cache C_DxD), so the actual formulas implemented here differ a bit.\n\nThe resulting backward kernels are used to smooth the posterior, via marginalize!.\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.","category":"page"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"Which solver should I use?","category":"page"},{"location":"solvers/","page":"Solvers","title":"Solvers","text":"Use the EK1 to get the best uncertainty quantification and to solve stiff problems.\nUse the EK0 to get the fastest runtimes and to solve high-dimensional problems.","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\nThis is a semi-implicit, L-stable ODE solver so it can handle stiffness quite well [4], and it generally produces more expressive posterior covariances than the EK0. However, as typical implicit ODE solvers it scales cubically with the ODE dimension [5], so if you're solving a high-dimensional non-stiff problem you might want to give the EK0 a try.\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\nThis is an explicit ODE solver. It is fast and scales well to high-dimensional problems [5], but it is not L-stable [4]. So for stiff problems, use the EK1.\n\nWhenever possible this solver will use a Kronecker-factored implementation to achieve its linear scaling and to get the best runtimes. This can currently be done only with an IWP prior (default), with a scalar diffusion model (either DynamicDiffusion or FixedDiffusion). For other configurations the solver falls back to a dense implementation which scales cubically with the problem size.\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 locally-updated 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":"F. Tronarp, H. Kersting, S. Särkkä and P. Hennig. Probabilistic solutions to ordinary differential equations as nonlinear Bayesian filtering: a new perspective. Statistics and Computing 29, 1297–1315 (2019).\n\n\n\nN. 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 Learning, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 11634–11649.\n\n\n\nN. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].\n\n\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":"N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].\n\n\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 2: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 2: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: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=[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: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=[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":"For such a low-dimensional problem the EK0 and EK1 have a very similar runtime. 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\n JULIA_IMAGE_THREADS = 1","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.5.0\n [505e40e9] SciPyDiffEq v0.2.1\n [90137ffa] StaticArrays v1.6.5\n [c3572dad] Sundials v4.20.1\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.7.1\n [ec485272] ArnoldiMethod v0.2.0\n [c9d4266f] ArrayAllocators v0.3.0\n [4fba245c] ArrayInterface v7.5.0\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.6\n [d1d4a3ce] BitFlags v0.1.7\n [62783981] BitTwiddlingConvenienceFunctions v0.1.5\n [fa961155] CEnum v0.5.0\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.18.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.3\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 [587fd27a] CovarianceEstimation v0.2.9\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.135.0\n [459566f4] DiffEqCallbacks v2.33.1\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.3\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.7.0\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.8\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.6\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.41\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [2c470bb0] Kronecker v0.5.4\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.14.0\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⌅ [356022a1] NamedDims v0.2.50\n [8913a72c] NonlinearSolve v2.5.0\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.28\n [fe68d972] PSDMatrices v0.4.6\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.8\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.38.10\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.40\n [0bca4576] SciMLBase v2.5.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.23\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.2.0\n [47a9eef4] SparseDiffTools v2.9.1\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.1\n [2efcf032] SymbolicIndexingInterface v0.2.2\n [d1185830] SymbolicUtils v1.4.0\n [0c5d862f] Symbolics v5.10.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.1\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.10.1\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.1\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.4\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.35.1+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/","page":"Initialization","title":"Initialization","text":"TL;DR: In the vast majority of cases, just stick to the exact Taylor-mode initialization TaylorModeInit!","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[6] 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[6] Krämer et al, \"Stable Implementation of Probabilistic ODE Solvers\" (2020)\n[7] 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":"N. Krämer and P. Hennig. Stable Implementation of Probabilistic ODE Solvers. CoRR (2020), arXiv:2012.10106 [stat.ML].\n\n\n\nM. Schober, S. Särkkä and P. Hennig. A probabilistic model for the numerical solution of initial value problems. Statistics and Computing 29, 99–122 (2019).\n\n\n\n","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":"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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.\n\n\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 [8].","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[8] 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[8] 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":"N. Bosch, P. Hennig and F. Tronarp. Calibrated Adaptive Probabilistic ODE Solvers. In: Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, Vol. 130 of Proceedings of Machine Learning Research, edited by A. Banerjee and K. Fukumizu (PMLR, 13–15 Apr 2021); pp. 3466–3474.\n\n\n\n","category":"page"},{"location":"priors/#Priors","page":"Priors","title":"Priors","text":"","category":"section"},{"location":"priors/","page":"Priors","title":"Priors","text":"TL;DR: If you're unsure which prior to use, just stick to the default integrated Wiener process prior IWP!","category":"page"},{"location":"priors/#Background","page":"Priors","title":"Background","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":"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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.\n\n\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: EK0\" => :Gray30,\n \"ProbNumDiffEq: EK1\" => :Gray60,\n)\ntocolor(n) = if split(n, '(')[1] in keys(COLORS)\n COLORS[split(n, '(')[1]]\nelse\n COLORS[split(n, ':')[1]]\nend","category":"page"},{"location":"benchmarks/multi-language-wrappers/","page":"Multi-Language Wrapper Benchmark","title":"Multi-Language Wrapper Benchmark","text":"tocolor (generic function with 1 method)","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(3)\" => Dict(:alg=>EK0(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK0(5)\" => Dict(:alg=>EK0(order=5, 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 \"ProbNumDiffEq: EK1(8)\" => Dict(:alg=>EK1(order=8, 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(3)\" => Dict(:alg=>EK0(order=3, smooth=DENSE))\n \"ProbNumDiffEq: EK0(5)\" => Dict(:alg=>EK0(order=5, 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 \"ProbNumDiffEq: EK1(8)\" => Dict(:alg=>EK1(order=8, 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(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=\"HIRES 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.3\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.7.0\n [ec485272] ArnoldiMethod v0.2.0\n [c9d4266f] ArrayAllocators v0.3.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.6\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.18.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.3\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 [587fd27a] CovarianceEstimation v0.2.9\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.134.0\n [459566f4] DiffEqCallbacks v2.33.1\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.2\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.7.0\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.8\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.6\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.40\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [2c470bb0] Kronecker v0.5.4\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.12.1\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⌅ [356022a1] NamedDims v0.2.50\n [8913a72c] NonlinearSolve v2.4.0\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.28\n [fe68d972] PSDMatrices v0.4.6\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.8\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.38.10\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.3\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.23\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.2.0\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.10.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.1\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.10.1\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.1\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.4\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.35.1+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!\nFor best runtimes runtimes, use the EK0!","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.3\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.7.0\n [ec485272] ArnoldiMethod v0.2.0\n [c9d4266f] ArrayAllocators v0.3.0\n [4fba245c] ArrayInterface v7.4.11\n [30b0a656] ArrayInterfaceCore v0.1.29\n [6e4b80f9] BenchmarkTools v1.3.2\n [e2ed5e7c] Bijections v0.1.6\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.18.0\n [fb6a15b2] CloseOpenIntervals v0.1.12\n [944b1d66] CodecZlib v0.7.3\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 [587fd27a] CovarianceEstimation v0.2.9\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.134.0\n [459566f4] DiffEqCallbacks v2.33.1\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.2\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.7.0\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.8\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.6\n [692b3bcd] JLLWrappers v1.5.0\n [682c06a0] JSON v0.21.4\n [98e50ef6] JuliaFormatter v1.0.40\n [ccbc3e58] JumpProcesses v9.8.0\n [ef3ab10e] KLU v0.4.1\n [2c470bb0] Kronecker v0.5.4\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.12.1\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⌅ [356022a1] NamedDims v0.2.50\n [8913a72c] NonlinearSolve v2.4.0\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.28\n [fe68d972] PSDMatrices v0.4.6\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.8\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.38.10\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.3\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.23\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.2.0\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.10.0\n [3783bdb8] TableTraits v1.0.1\n [bd369af6] Tables v1.11.1\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.10.1\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.1\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.4\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.35.1+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":"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, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 21776–21794.\n\n\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 3ebf3bf46..024c1af1c 100644 --- a/dev/solvers/index.html +++ b/dev/solvers/index.html @@ -4,10 +4,10 @@ prior=IWP(order), diffusionmodel=DynamicDiffusion(), initialization=TaylorModeInit(), - kwargs...)

Gaussian ODE filter with first-order vector field linearization.

This is a semi-implicit, L-stable ODE solver so it can handle stiffness quite well [4], and it generally produces more expressive posterior covariances than the EK0. However, as typical implicit ODE solvers it scales cubically with the ODE dimension [5], so if you're solving a high-dimensional non-stiff problem you might want to give the EK0 a try.

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,
+      kwargs...)

Gaussian ODE filter with first-order vector field linearization.

This is a semi-implicit, L-stable ODE solver so it can handle stiffness quite well [4], and it generally produces more expressive posterior covariances than the EK0. However, as typical implicit ODE solvers it scales cubically with the ODE dimension [5], so if you're solving a high-dimensional non-stiff problem you might want to give the EK0 a try.

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.

This is an explicit ODE solver. It is fast and scales well to high-dimensional problems [5], but it is not L-stable [4]. So for stiff problems, use the EK1.

Whenever possible this solver will use a Kronecker-factored implementation to achieve its linear scaling and to get the best runtimes. This can currently be done only with an IWP prior (default), with a scalar diffusion model (either DynamicDiffusion or FixedDiffusion). For other configurations the solver falls back to a dense implementation which scales cubically with the problem size.

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 locally-updated 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

[4]
[5]
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 Learning, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 11634–11649.
[2]
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
+ initialization=TaylorModeInit())

Gaussian ODE filter with zeroth-order vector field linearization.

This is an explicit ODE solver. It is fast and scales well to high-dimensional problems [5], but it is not L-stable [4]. So for stiff problems, use the EK1.

Whenever possible this solver will use a Kronecker-factored implementation to achieve its linear scaling and to get the best runtimes. This can currently be done only with an IWP prior (default), with a scalar diffusion model (either DynamicDiffusion or FixedDiffusion). For other configurations the solver falls back to a dense implementation which scales cubically with the problem size.

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 locally-updated 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

[4]
[5]
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 Learning, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 11634–11649.
[2]
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
diff --git a/dev/tutorials/dae/d72c8341.svg b/dev/tutorials/dae/4d2221f4.svg similarity index 99% rename from dev/tutorials/dae/d72c8341.svg rename to dev/tutorials/dae/4d2221f4.svg index 165af05ef..cc1aa1be4 100644 --- a/dev/tutorials/dae/d72c8341.svg +++ b/dev/tutorials/dae/4d2221f4.svg @@ -1,90 +1,90 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dae/d7aafc27.svg b/dev/tutorials/dae/98097a1c.svg similarity index 97% rename from dev/tutorials/dae/d7aafc27.svg rename to dev/tutorials/dae/98097a1c.svg index 59b2f920a..6659a17a4 100644 --- a/dev/tutorials/dae/d7aafc27.svg +++ b/dev/tutorials/dae/98097a1c.svg @@ -1,59 +1,59 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dae/index.html b/dev/tutorials/dae/index.html index 5bd06f950..5d66ed83f 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.9576832077841627, -0.6844009228582699, -0.2878244025481933, -2.275075574535352, -8.50035973649531]
  [0.9511362934048653, -0.7607458146061145, -0.3087713860220536, -2.340151207607821, -9.130178981000505]
  [0.9453102099145542, -0.8262319105561766, -0.32617269378323804, -2.390287433368883, -9.6556574355015]
- [0.9445663339165202, -0.8344471654263028, -0.32832063725617283, -2.3962366116664926, -9.720705076694108]

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.9445663339165202, -0.8344471654263028, -0.32832063725617283, -2.3962366116664926, -9.720705076694108]

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) \\ @@ -134,4 +134,4 @@ │ sol1_final_error = 0.01093193416854228 │ sol1_f_evals = 1085 │ sol3_final_error = 0.05928967177484851 -└ sol3_f_evals = 1409

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!

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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.
+└ sol3_f_evals = 1409

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!

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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.
diff --git a/dev/tutorials/dynamical_odes/10749d58.svg b/dev/tutorials/dynamical_odes/06c42d2b.svg similarity index 88% rename from dev/tutorials/dynamical_odes/10749d58.svg rename to dev/tutorials/dynamical_odes/06c42d2b.svg index ebcfbb6f6..b90b45bf3 100644 --- a/dev/tutorials/dynamical_odes/10749d58.svg +++ b/dev/tutorials/dynamical_odes/06c42d2b.svg @@ -1,46 +1,46 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dynamical_odes/a9f41b56.svg b/dev/tutorials/dynamical_odes/18e5baba.svg similarity index 99% rename from dev/tutorials/dynamical_odes/a9f41b56.svg rename to dev/tutorials/dynamical_odes/18e5baba.svg index 29ee38458..291ddca47 100644 --- a/dev/tutorials/dynamical_odes/a9f41b56.svg +++ b/dev/tutorials/dynamical_odes/18e5baba.svg @@ -1,52 +1,52 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dynamical_odes/6eda91dd.svg b/dev/tutorials/dynamical_odes/5984fdf9.svg similarity index 98% rename from dev/tutorials/dynamical_odes/6eda91dd.svg rename to dev/tutorials/dynamical_odes/5984fdf9.svg index 5e8808d5f..0fad8ffdb 100644 --- a/dev/tutorials/dynamical_odes/6eda91dd.svg +++ b/dev/tutorials/dynamical_odes/5984fdf9.svg @@ -1,50 +1,50 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dynamical_odes/61dc9def.svg b/dev/tutorials/dynamical_odes/7f3e1058.svg similarity index 88% rename from dev/tutorials/dynamical_odes/61dc9def.svg rename to dev/tutorials/dynamical_odes/7f3e1058.svg index 8be6194ba..473bf4fda 100644 --- a/dev/tutorials/dynamical_odes/61dc9def.svg +++ b/dev/tutorials/dynamical_odes/7f3e1058.svg @@ -1,46 +1,46 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/dynamical_odes/index.html b/dev/tutorials/dynamical_odes/index.html index d1e720e62..840ef202d 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, idxs=(3, 4)) # where `idxs=(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, 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);
+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,7 +37,7 @@
 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#52", ProbNumDiffEq.var"#affect!#53"{Int64, Float64, Float64, typeof(Main.residual)}, typeof(SciMLBase.INITIALIZE_DEFAULT), typeof(SciMLBase.FINALIZE_DEFAULT)}(ProbNumDiffEq.var"#condition#52"(), ProbNumDiffEq.var"#affect!#53"{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]
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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.
+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, Vol. 151 of Proceedings of Machine Learning Research, edited by G. Camps-Valls, F. J. Ruiz and I. Valera (PMLR, 28–30 Mar 2022); pp. 10015–10027.
diff --git a/dev/tutorials/exponential_integrators/58cd2cc8.svg b/dev/tutorials/exponential_integrators/00ec1af2.svg similarity index 93% rename from dev/tutorials/exponential_integrators/58cd2cc8.svg rename to dev/tutorials/exponential_integrators/00ec1af2.svg index 3fe32ea14..847912bc8 100644 --- a/dev/tutorials/exponential_integrators/58cd2cc8.svg +++ b/dev/tutorials/exponential_integrators/00ec1af2.svg @@ -1,55 +1,55 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/exponential_integrators/da630005.svg b/dev/tutorials/exponential_integrators/16d8fc95.svg similarity index 93% rename from dev/tutorials/exponential_integrators/da630005.svg rename to dev/tutorials/exponential_integrators/16d8fc95.svg index 5b1629a99..f149b2c81 100644 --- a/dev/tutorials/exponential_integrators/da630005.svg +++ b/dev/tutorials/exponential_integrators/16d8fc95.svg @@ -1,51 +1,51 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/exponential_integrators/3fdd106f.svg b/dev/tutorials/exponential_integrators/3756a911.svg similarity index 92% rename from dev/tutorials/exponential_integrators/3fdd106f.svg rename to dev/tutorials/exponential_integrators/3756a911.svg index 7cae1727e..04ff28913 100644 --- a/dev/tutorials/exponential_integrators/3fdd106f.svg +++ b/dev/tutorials/exponential_integrators/3756a911.svg @@ -1,65 +1,65 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/exponential_integrators/ceb93b5e.svg b/dev/tutorials/exponential_integrators/f1be30b1.svg similarity index 93% rename from dev/tutorials/exponential_integrators/ceb93b5e.svg rename to dev/tutorials/exponential_integrators/f1be30b1.svg index c243e0c8d..3dd300174 100644 --- a/dev/tutorials/exponential_integrators/ceb93b5e.svg +++ b/dev/tutorials/exponential_integrators/f1be30b1.svg @@ -1,63 +1,63 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/exponential_integrators/index.html b/dev/tutorials/exponential_integrators/index.html index 5aad5ea3e..e320a4656 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,14 +22,14 @@
 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]
N. Bosch, P. Hennig and F. Tronarp. Probabilistic Exponential Integrators (2023), arXiv:2305.14978 [math.NA].
+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/2c728439.svg b/dev/tutorials/fenrir/2c728439.svg new file mode 100644 index 000000000..0e40ff6d1 --- /dev/null +++ b/dev/tutorials/fenrir/2c728439.svg @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/fenrir/65fe254d.svg b/dev/tutorials/fenrir/65fe254d.svg new file mode 100644 index 000000000..0adef5c4b --- /dev/null +++ b/dev/tutorials/fenrir/65fe254d.svg @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/fenrir/e66f8934.svg b/dev/tutorials/fenrir/e66f8934.svg deleted file mode 100644 index e82da550a..000000000 --- a/dev/tutorials/fenrir/e66f8934.svg +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/tutorials/fenrir/f32558b6.svg b/dev/tutorials/fenrir/f32558b6.svg deleted file mode 100644 index 4a964c930..000000000 --- a/dev/tutorials/fenrir/f32558b6.svg +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/tutorials/fenrir/index.html b/dev/tutorials/fenrir/index.html index 728f59530..bc01f23e6 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
275.4038996545017

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
268.71143675973474

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,9 +49,9 @@
  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.16645339746403964
- 0.18399320044231418
- 3.061045331733617

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.2075054616874829
+ 7.06425148089224e-11
+ 3.078384058039431

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]
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, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 21776–21794.
+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, Vol. 162 of Proceedings of Machine Learning Research, edited by K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvari, G. Niu and S. Sabato (PMLR, 17–23 Jul 2022); pp. 21776–21794.
diff --git a/dev/tutorials/getting_started/798a7c6c.svg b/dev/tutorials/getting_started/c2705ff0.svg similarity index 96% rename from dev/tutorials/getting_started/798a7c6c.svg rename to dev/tutorials/getting_started/c2705ff0.svg index 3cd0a6ab1..e552c1efd 100644 --- a/dev/tutorials/getting_started/798a7c6c.svg +++ b/dev/tutorials/getting_started/c2705ff0.svg @@ -1,50 +1,50 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/df16599e.svg b/dev/tutorials/getting_started/e3813dd2.svg similarity index 96% rename from dev/tutorials/getting_started/df16599e.svg rename to dev/tutorials/getting_started/e3813dd2.svg index 5d784d5f3..6563cadf9 100644 --- a/dev/tutorials/getting_started/df16599e.svg +++ b/dev/tutorials/getting_started/e3813dd2.svg @@ -1,50 +1,50 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/b0838995.svg b/dev/tutorials/getting_started/f1677112.svg similarity index 91% rename from dev/tutorials/getting_started/b0838995.svg rename to dev/tutorials/getting_started/f1677112.svg index b33199dfb..0ca2f3471 100644 --- a/dev/tutorials/getting_started/b0838995.svg +++ b/dev/tutorials/getting_started/f1677112.svg @@ -1,54 +1,54 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tutorials/getting_started/index.html b/dev/tutorials/getting_started/index.html index 4cba657c8..4d631de01 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.035086153414759, 0.7169394922557076]
  [2.0210436519484114, 0.6717007174964985]
  [2.0104405118668853, 0.6383145073764152]

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.0104405118668853 @@ -93,4 +93,4 @@ 2.801400360981113e-6 2.7505533924663042e-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.27738212830867875, 1.1675659430627094], 2x2 PSDMatrix{Float64, Matrix{Float64}}; R=[-3.208354407822226e-5 -4.789969845353445e-6; 0.0 1.9264788456679216e-5; 0.0 1.4605790175620858e-5; 0.0 1.0839739025999487e-6; 0.0 5.606932635206308e-7; 0.0 0.0; 0.0 0.0; 0.0 0.0])
julia> mean(sol(0.45))2-element Vector{Float64}: -0.27738212830867875 - 1.1675659430627094

Next steps

Check out one of the other tutorials:

+ 1.1675659430627094

Next steps

Check out one of the other tutorials: