From a030afde175573a4b6f7fb1e6330691a6c24cd4b Mon Sep 17 00:00:00 2001 From: Nathanael Bosch Date: Mon, 23 Oct 2023 17:31:25 +0200 Subject: [PATCH] Update docs and re-run benchmarks once more --- benchmarks/lotkavolterra.jmd | 2 +- benchmarks/multi-language-wrappers.jmd | 19 +- benchmarks/pleiades.jmd | 1 + benchmarks/vanderpol.jmd | 4 +- .../benchmarks/figures/lotkavolterra_2_1.svg | 266 +++--- .../benchmarks/figures/lotkavolterra_3_1.svg | 670 +++++++------- .../benchmarks/figures/lotkavolterra_4_1.svg | 730 ++++++++------- .../benchmarks/figures/lotkavolterra_5_1.svg | 722 +++++++-------- .../benchmarks/figures/lotkavolterra_6_1.svg | 732 ++++++++------- .../benchmarks/figures/lotkavolterra_7_1.svg | 796 ++++++++-------- .../figures/multi-language-wrappers_10_1.svg | 208 ++--- .../figures/multi-language-wrappers_11_1.svg | 830 ++++++++--------- .../figures/multi-language-wrappers_12_1.svg | 186 ++-- .../figures/multi-language-wrappers_13_1.svg | 686 +++++++------- .../figures/multi-language-wrappers_6_1.svg | 266 +++--- .../figures/multi-language-wrappers_7_1.svg | 848 +++++++++--------- .../figures/multi-language-wrappers_8_1.svg | 192 ++-- .../figures/multi-language-wrappers_9_1.svg | 820 +++++++++-------- docs/src/benchmarks/figures/pleiades_2_1.svg | 282 +++--- docs/src/benchmarks/figures/pleiades_3_1.svg | 652 +++++++------- docs/src/benchmarks/figures/rober_2_1.svg | 232 ++--- docs/src/benchmarks/figures/rober_3_1.svg | 378 ++++---- docs/src/benchmarks/figures/vanderpol_2_1.svg | 250 +++--- docs/src/benchmarks/figures/vanderpol_3_1.svg | 472 +++++----- docs/src/benchmarks/figures/vanderpol_4_1.svg | 250 +++--- docs/src/benchmarks/figures/vanderpol_5_1.svg | 592 ++++++------ docs/src/benchmarks/lotkavolterra.md | 14 +- .../src/benchmarks/multi-language-wrappers.md | 36 +- docs/src/benchmarks/pleiades.md | 13 +- docs/src/benchmarks/rober.md | 12 +- docs/src/benchmarks/vanderpol.md | 14 +- docs/src/initialization.md | 1 + docs/src/priors.md | 4 + docs/src/solvers.md | 7 +- src/algorithms.jl | 19 +- 35 files changed, 5648 insertions(+), 5558 deletions(-) diff --git a/benchmarks/lotkavolterra.jmd b/benchmarks/lotkavolterra.jmd index c2c5a344c..e1bcc9696 100644 --- a/benchmarks/lotkavolterra.jmd +++ b/benchmarks/lotkavolterra.jmd @@ -218,7 +218,7 @@ plot(wp, color=[2 2 2 4 4 4 5 5 5], xticks = 10.0 .^ (-16:1:5)) ## Conclusion -- **Use the EK1!** It seems to be strictly better than the EK0 here. +- 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. - Orders behave as in classic solvers: Use low order for low accuracy, medium order for medium accuracy, high order for high accuracy. diff --git a/benchmarks/multi-language-wrappers.jmd b/benchmarks/multi-language-wrappers.jmd index 2f224180d..c520f17cb 100644 --- a/benchmarks/multi-language-wrappers.jmd +++ b/benchmarks/multi-language-wrappers.jmd @@ -30,7 +30,7 @@ const SAVE_EVERYSTEP = false; ``` ```julia -_COLORS = Dict( +COLORS = Dict( "Julia" => :LightGreen, "Julia (static)" => :DarkGreen, "Hairer" => :Red, @@ -39,9 +39,14 @@ _COLORS = Dict( "deSolve" => :Blue, "Sundials" => :Purple, "liblsoda" => :Purple, - "ProbNumDiffEq" => :Darkgray, + "ProbNumDiffEq: EK0" => :Gray30, + "ProbNumDiffEq: EK1" => :Gray60, ) -tocolor(n) = _COLORS[split(n, ':')[1]]; +tocolor(n) = if split(n, '(')[1] in keys(COLORS) + COLORS[split(n, '(')[1]] +else + COLORS[split(n, ':')[1]] +end ``` ```julia @@ -81,10 +86,12 @@ _setups = [ "deSolve: lsoda" => Dict(:alg=>deSolveDiffEq.lsoda()) "deSolve: ode45" => Dict(:alg=>deSolveDiffEq.ode45()) "Sundials: Adams" => Dict(:alg=>Sundials.CVODE_Adams()) - "ProbNumDiffEq: EK0(2)" => Dict(:alg=>EK0(order=2, smooth=DENSE)) "ProbNumDiffEq: EK0(3)" => Dict(:alg=>EK0(order=3, smooth=DENSE)) + "ProbNumDiffEq: EK0(5)" => Dict(:alg=>EK0(order=5, smooth=DENSE)) + "ProbNumDiffEq: EK0(8)" => Dict(:alg=>EK0(order=8, smooth=DENSE)) "ProbNumDiffEq: EK1(3)" => Dict(:alg=>EK1(order=3, smooth=DENSE)) "ProbNumDiffEq: EK1(5)" => Dict(:alg=>EK1(order=5, smooth=DENSE)) + "ProbNumDiffEq: EK1(8)" => Dict(:alg=>EK1(order=8, smooth=DENSE)) ] labels = first.(_setups) @@ -149,10 +156,12 @@ _setups = [ "deSolve: lsoda" => Dict(:alg=>deSolveDiffEq.lsoda()) "deSolve: ode45" => Dict(:alg=>deSolveDiffEq.ode45()) "Sundials: Adams" => Dict(:alg=>CVODE_Adams()) - "ProbNumDiffEq: EK0(2)" => Dict(:alg=>EK0(order=2, smooth=DENSE)) "ProbNumDiffEq: EK0(3)" => Dict(:alg=>EK0(order=3, smooth=DENSE)) + "ProbNumDiffEq: EK0(5)" => Dict(:alg=>EK0(order=5, smooth=DENSE)) + "ProbNumDiffEq: EK0(8)" => Dict(:alg=>EK0(order=8, smooth=DENSE)) "ProbNumDiffEq: EK1(3)" => Dict(:alg=>EK1(order=3, smooth=DENSE)) "ProbNumDiffEq: EK1(5)" => Dict(:alg=>EK1(order=5, smooth=DENSE)) + "ProbNumDiffEq: EK1(8)" => Dict(:alg=>EK1(order=8, smooth=DENSE)) ] labels = first.(_setups) diff --git a/benchmarks/pleiades.jmd b/benchmarks/pleiades.jmd index 2eaf6fac4..770ca8f65 100644 --- a/benchmarks/pleiades.jmd +++ b/benchmarks/pleiades.jmd @@ -119,6 +119,7 @@ plot(wp, color=[1 1 2 2 3 3 4 4], ## Conclusion - If the problem is a second-order ODE, _implement it as a second-order ODE_! +- For best runtimes runtimes, use the `EK0`! ## Appendix diff --git a/benchmarks/vanderpol.jmd b/benchmarks/vanderpol.jmd index 764f29168..d899f11a4 100644 --- a/benchmarks/vanderpol.jmd +++ b/benchmarks/vanderpol.jmd @@ -92,7 +92,7 @@ _setups = [ "EK1(3) 2nd order" => Dict(:prob_choice => 2, :alg => EK1(order=3, smooth=DENSE)) "EK1(4) 2nd order" => Dict(:prob_choice => 2, :alg => EK1(order=4, smooth=DENSE)) "EK1(5) 2nd order" => Dict(:prob_choice => 2, :alg => EK1(order=5, smooth=DENSE)) - "EK1(5) 2nd order" => Dict(:prob_choice => 2, :alg => EK1(order=6, smooth=DENSE)) + "EK1(6) 2nd order" => Dict(:prob_choice => 2, :alg => EK1(order=6, smooth=DENSE)) ] labels = first.(_setups) @@ -141,4 +141,4 @@ Pkg.status() And the full manifest: ```julia Pkg.status(mode=Pkg.PKGMODE_MANIFEST) -``` \ No newline at end of file +``` diff --git a/docs/src/benchmarks/figures/lotkavolterra_2_1.svg b/docs/src/benchmarks/figures/lotkavolterra_2_1.svg index 166e53a8a..b925ec7b9 100644 --- a/docs/src/benchmarks/figures/lotkavolterra_2_1.svg +++ b/docs/src/benchmarks/figures/lotkavolterra_2_1.svg @@ -1,148 +1,148 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/lotkavolterra_3_1.svg b/docs/src/benchmarks/figures/lotkavolterra_3_1.svg index 5bfc793e0..ae38e85a3 100644 --- a/docs/src/benchmarks/figures/lotkavolterra_3_1.svg +++ b/docs/src/benchmarks/figures/lotkavolterra_3_1.svg @@ -1,349 +1,349 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/lotkavolterra_4_1.svg b/docs/src/benchmarks/figures/lotkavolterra_4_1.svg index 60003a556..460dab1db 100644 --- a/docs/src/benchmarks/figures/lotkavolterra_4_1.svg +++ b/docs/src/benchmarks/figures/lotkavolterra_4_1.svg @@ -1,381 +1,377 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/lotkavolterra_5_1.svg b/docs/src/benchmarks/figures/lotkavolterra_5_1.svg index abbc20c18..91df6c641 100644 --- a/docs/src/benchmarks/figures/lotkavolterra_5_1.svg +++ b/docs/src/benchmarks/figures/lotkavolterra_5_1.svg @@ -1,374 +1,376 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/lotkavolterra_6_1.svg b/docs/src/benchmarks/figures/lotkavolterra_6_1.svg index c9caf25c4..c3909d2aa 100644 --- a/docs/src/benchmarks/figures/lotkavolterra_6_1.svg +++ b/docs/src/benchmarks/figures/lotkavolterra_6_1.svg @@ -1,382 +1,378 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/lotkavolterra_7_1.svg b/docs/src/benchmarks/figures/lotkavolterra_7_1.svg index 1aea69496..ffde3f9a5 100644 --- a/docs/src/benchmarks/figures/lotkavolterra_7_1.svg +++ b/docs/src/benchmarks/figures/lotkavolterra_7_1.svg @@ -1,411 +1,413 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/multi-language-wrappers_10_1.svg b/docs/src/benchmarks/figures/multi-language-wrappers_10_1.svg index 4d8e458b2..2e984cb10 100644 --- a/docs/src/benchmarks/figures/multi-language-wrappers_10_1.svg +++ b/docs/src/benchmarks/figures/multi-language-wrappers_10_1.svg @@ -1,119 +1,119 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/multi-language-wrappers_11_1.svg b/docs/src/benchmarks/figures/multi-language-wrappers_11_1.svg index 0826004bf..3b9f65584 100644 --- a/docs/src/benchmarks/figures/multi-language-wrappers_11_1.svg +++ b/docs/src/benchmarks/figures/multi-language-wrappers_11_1.svg @@ -1,429 +1,429 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/multi-language-wrappers_12_1.svg b/docs/src/benchmarks/figures/multi-language-wrappers_12_1.svg index d3de954f1..c78844f3d 100644 --- a/docs/src/benchmarks/figures/multi-language-wrappers_12_1.svg +++ b/docs/src/benchmarks/figures/multi-language-wrappers_12_1.svg @@ -1,108 +1,108 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/multi-language-wrappers_13_1.svg b/docs/src/benchmarks/figures/multi-language-wrappers_13_1.svg index 6daebd0e4..a6f9b1f74 100644 --- a/docs/src/benchmarks/figures/multi-language-wrappers_13_1.svg +++ b/docs/src/benchmarks/figures/multi-language-wrappers_13_1.svg @@ -1,351 +1,363 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/multi-language-wrappers_6_1.svg b/docs/src/benchmarks/figures/multi-language-wrappers_6_1.svg index 1576a32b4..b9e707c25 100644 --- a/docs/src/benchmarks/figures/multi-language-wrappers_6_1.svg +++ b/docs/src/benchmarks/figures/multi-language-wrappers_6_1.svg @@ -1,148 +1,148 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/multi-language-wrappers_7_1.svg b/docs/src/benchmarks/figures/multi-language-wrappers_7_1.svg index f689b8bac..98177c3bb 100644 --- a/docs/src/benchmarks/figures/multi-language-wrappers_7_1.svg +++ b/docs/src/benchmarks/figures/multi-language-wrappers_7_1.svg @@ -1,428 +1,448 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/multi-language-wrappers_8_1.svg b/docs/src/benchmarks/figures/multi-language-wrappers_8_1.svg index 8c7150540..a34c77772 100644 --- a/docs/src/benchmarks/figures/multi-language-wrappers_8_1.svg +++ b/docs/src/benchmarks/figures/multi-language-wrappers_8_1.svg @@ -1,111 +1,111 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/multi-language-wrappers_9_1.svg b/docs/src/benchmarks/figures/multi-language-wrappers_9_1.svg index fbb5d18e3..6448a8db1 100644 --- a/docs/src/benchmarks/figures/multi-language-wrappers_9_1.svg +++ b/docs/src/benchmarks/figures/multi-language-wrappers_9_1.svg @@ -1,412 +1,436 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/pleiades_2_1.svg b/docs/src/benchmarks/figures/pleiades_2_1.svg index 18255d62e..f01e8a413 100644 --- a/docs/src/benchmarks/figures/pleiades_2_1.svg +++ b/docs/src/benchmarks/figures/pleiades_2_1.svg @@ -1,156 +1,156 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/pleiades_3_1.svg b/docs/src/benchmarks/figures/pleiades_3_1.svg index d3cc2c908..f2ebbff28 100644 --- a/docs/src/benchmarks/figures/pleiades_3_1.svg +++ b/docs/src/benchmarks/figures/pleiades_3_1.svg @@ -1,348 +1,332 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/rober_2_1.svg b/docs/src/benchmarks/figures/rober_2_1.svg index 0c4558352..99a3838b0 100644 --- a/docs/src/benchmarks/figures/rober_2_1.svg +++ b/docs/src/benchmarks/figures/rober_2_1.svg @@ -1,131 +1,131 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/rober_3_1.svg b/docs/src/benchmarks/figures/rober_3_1.svg index 5af0d9f34..1be4b53b6 100644 --- a/docs/src/benchmarks/figures/rober_3_1.svg +++ b/docs/src/benchmarks/figures/rober_3_1.svg @@ -1,202 +1,204 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/vanderpol_2_1.svg b/docs/src/benchmarks/figures/vanderpol_2_1.svg index f4431e7a1..5bdf03f2b 100644 --- a/docs/src/benchmarks/figures/vanderpol_2_1.svg +++ b/docs/src/benchmarks/figures/vanderpol_2_1.svg @@ -1,140 +1,140 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/vanderpol_3_1.svg b/docs/src/benchmarks/figures/vanderpol_3_1.svg index e2d03c84c..b6d68716a 100644 --- a/docs/src/benchmarks/figures/vanderpol_3_1.svg +++ b/docs/src/benchmarks/figures/vanderpol_3_1.svg @@ -1,247 +1,253 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/vanderpol_4_1.svg b/docs/src/benchmarks/figures/vanderpol_4_1.svg index ff5555e50..e7ea9afa8 100644 --- a/docs/src/benchmarks/figures/vanderpol_4_1.svg +++ b/docs/src/benchmarks/figures/vanderpol_4_1.svg @@ -1,140 +1,140 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/vanderpol_5_1.svg b/docs/src/benchmarks/figures/vanderpol_5_1.svg index 9005e257c..65cf434e1 100644 --- a/docs/src/benchmarks/figures/vanderpol_5_1.svg +++ b/docs/src/benchmarks/figures/vanderpol_5_1.svg @@ -1,312 +1,308 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/lotkavolterra.md b/docs/src/benchmarks/lotkavolterra.md index 8b0e6f300..134edfb54 100644 --- a/docs/src/benchmarks/lotkavolterra.md +++ b/docs/src/benchmarks/lotkavolterra.md @@ -245,7 +245,7 @@ plot(wp, color=[2 2 2 4 4 4 5 5 5], xticks = 10.0 .^ (-16:1:5)) ## Conclusion -- **Use the EK1!** It seems to be strictly better than the EK0 here. +- 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. - Orders behave as in classic solvers: Use low order for low accuracy, medium order for medium accuracy, high order for high accuracy. @@ -301,7 +301,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml` [65888b18] ParameterizedFunctions v5.16.0 [91a5bcdd] Plots v1.39.0 [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq` - [0bca4576] SciMLBase v2.4.2 + [0bca4576] SciMLBase v2.4.3 [505e40e9] SciPyDiffEq v0.2.1 [90137ffa] StaticArrays v1.6.5 [c3572dad] Sundials v4.20.0 @@ -329,7 +329,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [4fba245c] ArrayInterface v7.4.11 [30b0a656] ArrayInterfaceCore v0.1.29 [6e4b80f9] BenchmarkTools v1.3.2 - [e2ed5e7c] Bijections v0.1.5 + [e2ed5e7c] Bijections v0.1.6 [d1d4a3ce] BitFlags v0.1.7 [62783981] BitTwiddlingConvenienceFunctions v0.1.5 ⌅ [fa961155] CEnum v0.4.2 @@ -415,7 +415,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [d25df0c9] Inflate v0.1.4 [842dd82b] InlineStrings v1.4.0 [18e54dd8] IntegerMathUtils v0.1.2 - [8197267c] IntervalSets v0.7.7 + [8197267c] IntervalSets v0.7.8 [41ab1584] InvertedIndices v1.3.0 [92d709cd] IrrationalConstants v0.2.2 [c8e1da08] IterTools v1.8.0 @@ -437,7 +437,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [50d2b5c4] Lazy v0.15.1 [1d6d02ad] LeftChildRightSiblingTrees v0.2.0 [d3d80556] LineSearches v7.2.0 - [7ed4a6bd] LinearSolve v2.11.0 + [7ed4a6bd] LinearSolve v2.11.1 [2ab3a3ac] LogExpFunctions v0.3.26 [e6f89c97] LoggingExtras v1.0.3 [bdcacae8] LoopVectorization v0.12.165 @@ -458,7 +458,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [2774e3e8] NLsolve v4.5.1 [77ba4419] NaNMath v1.0.2 ⌅ [356022a1] NamedDims v0.2.50 - [8913a72c] NonlinearSolve v2.3.0 + [8913a72c] NonlinearSolve v2.4.0 [54ca160b] ODEInterface v0.5.0 [09606e27] ODEInterfaceDiffEq v3.13.3 [6fd5a793] Octavian v0.3.27 @@ -511,7 +511,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [fdea26ae] SIMD v3.4.5 [94e857df] SIMDTypes v0.1.0 [476501e8] SLEEFPirates v0.6.39 - [0bca4576] SciMLBase v2.4.2 + [0bca4576] SciMLBase v2.4.3 [e9a6253c] SciMLNLSolve v0.1.9 [c0aeaf25] SciMLOperators v0.3.6 [505e40e9] SciPyDiffEq v0.2.1 diff --git a/docs/src/benchmarks/multi-language-wrappers.md b/docs/src/benchmarks/multi-language-wrappers.md index d9a0810ab..0ac332c34 100644 --- a/docs/src/benchmarks/multi-language-wrappers.md +++ b/docs/src/benchmarks/multi-language-wrappers.md @@ -33,7 +33,7 @@ const SAVE_EVERYSTEP = false; ```julia -_COLORS = Dict( +COLORS = Dict( "Julia" => :LightGreen, "Julia (static)" => :DarkGreen, "Hairer" => :Red, @@ -42,10 +42,20 @@ _COLORS = Dict( "deSolve" => :Blue, "Sundials" => :Purple, "liblsoda" => :Purple, - "ProbNumDiffEq" => :Darkgray, + "ProbNumDiffEq: EK0" => :Gray30, + "ProbNumDiffEq: EK1" => :Gray60, ) -tocolor(n) = _COLORS[split(n, ':')[1]]; +tocolor(n) = if split(n, '(')[1] in keys(COLORS) + COLORS[split(n, '(')[1]] +else + COLORS[split(n, ':')[1]] +end +``` + ``` +tocolor (generic function with 1 method) +``` + ```julia @@ -90,10 +100,12 @@ _setups = [ "deSolve: lsoda" => Dict(:alg=>deSolveDiffEq.lsoda()) "deSolve: ode45" => Dict(:alg=>deSolveDiffEq.ode45()) "Sundials: Adams" => Dict(:alg=>Sundials.CVODE_Adams()) - "ProbNumDiffEq: EK0(2)" => Dict(:alg=>EK0(order=2, smooth=DENSE)) "ProbNumDiffEq: EK0(3)" => Dict(:alg=>EK0(order=3, smooth=DENSE)) + "ProbNumDiffEq: EK0(5)" => Dict(:alg=>EK0(order=5, smooth=DENSE)) + "ProbNumDiffEq: EK0(8)" => Dict(:alg=>EK0(order=8, smooth=DENSE)) "ProbNumDiffEq: EK1(3)" => Dict(:alg=>EK1(order=3, smooth=DENSE)) "ProbNumDiffEq: EK1(5)" => Dict(:alg=>EK1(order=5, smooth=DENSE)) + "ProbNumDiffEq: EK1(8)" => Dict(:alg=>EK1(order=8, smooth=DENSE)) ] labels = first.(_setups) @@ -164,10 +176,12 @@ _setups = [ "deSolve: lsoda" => Dict(:alg=>deSolveDiffEq.lsoda()) "deSolve: ode45" => Dict(:alg=>deSolveDiffEq.ode45()) "Sundials: Adams" => Dict(:alg=>CVODE_Adams()) - "ProbNumDiffEq: EK0(2)" => Dict(:alg=>EK0(order=2, smooth=DENSE)) "ProbNumDiffEq: EK0(3)" => Dict(:alg=>EK0(order=3, smooth=DENSE)) + "ProbNumDiffEq: EK0(5)" => Dict(:alg=>EK0(order=5, smooth=DENSE)) + "ProbNumDiffEq: EK0(8)" => Dict(:alg=>EK0(order=8, smooth=DENSE)) "ProbNumDiffEq: EK1(3)" => Dict(:alg=>EK1(order=3, smooth=DENSE)) "ProbNumDiffEq: EK1(5)" => Dict(:alg=>EK1(order=5, smooth=DENSE)) + "ProbNumDiffEq: EK1(8)" => Dict(:alg=>EK1(order=8, smooth=DENSE)) ] labels = first.(_setups) @@ -407,7 +421,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml` [65888b18] ParameterizedFunctions v5.16.0 [91a5bcdd] Plots v1.39.0 [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq` - [0bca4576] SciMLBase v2.4.2 + [0bca4576] SciMLBase v2.4.3 [505e40e9] SciPyDiffEq v0.2.1 [90137ffa] StaticArrays v1.6.5 [c3572dad] Sundials v4.20.0 @@ -435,7 +449,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [4fba245c] ArrayInterface v7.4.11 [30b0a656] ArrayInterfaceCore v0.1.29 [6e4b80f9] BenchmarkTools v1.3.2 - [e2ed5e7c] Bijections v0.1.5 + [e2ed5e7c] Bijections v0.1.6 [d1d4a3ce] BitFlags v0.1.7 [62783981] BitTwiddlingConvenienceFunctions v0.1.5 ⌅ [fa961155] CEnum v0.4.2 @@ -521,7 +535,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [d25df0c9] Inflate v0.1.4 [842dd82b] InlineStrings v1.4.0 [18e54dd8] IntegerMathUtils v0.1.2 - [8197267c] IntervalSets v0.7.7 + [8197267c] IntervalSets v0.7.8 [41ab1584] InvertedIndices v1.3.0 [92d709cd] IrrationalConstants v0.2.2 [c8e1da08] IterTools v1.8.0 @@ -543,7 +557,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [50d2b5c4] Lazy v0.15.1 [1d6d02ad] LeftChildRightSiblingTrees v0.2.0 [d3d80556] LineSearches v7.2.0 - [7ed4a6bd] LinearSolve v2.11.0 + [7ed4a6bd] LinearSolve v2.11.1 [2ab3a3ac] LogExpFunctions v0.3.26 [e6f89c97] LoggingExtras v1.0.3 [bdcacae8] LoopVectorization v0.12.165 @@ -564,7 +578,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [2774e3e8] NLsolve v4.5.1 [77ba4419] NaNMath v1.0.2 ⌅ [356022a1] NamedDims v0.2.50 - [8913a72c] NonlinearSolve v2.3.0 + [8913a72c] NonlinearSolve v2.4.0 [54ca160b] ODEInterface v0.5.0 [09606e27] ODEInterfaceDiffEq v3.13.3 [6fd5a793] Octavian v0.3.27 @@ -617,7 +631,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [fdea26ae] SIMD v3.4.5 [94e857df] SIMDTypes v0.1.0 [476501e8] SLEEFPirates v0.6.39 - [0bca4576] SciMLBase v2.4.2 + [0bca4576] SciMLBase v2.4.3 [e9a6253c] SciMLNLSolve v0.1.9 [c0aeaf25] SciMLOperators v0.3.6 [505e40e9] SciPyDiffEq v0.2.1 diff --git a/docs/src/benchmarks/pleiades.md b/docs/src/benchmarks/pleiades.md index b4fc1df9c..0c7f92929 100644 --- a/docs/src/benchmarks/pleiades.md +++ b/docs/src/benchmarks/pleiades.md @@ -130,6 +130,7 @@ plot(wp, color=[1 1 2 2 3 3 4 4], ## Conclusion - If the problem is a second-order ODE, _implement it as a second-order ODE_! +- For best runtimes runtimes, use the `EK0`! ## Appendix @@ -181,7 +182,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml` [65888b18] ParameterizedFunctions v5.16.0 [91a5bcdd] Plots v1.39.0 [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq` - [0bca4576] SciMLBase v2.4.2 + [0bca4576] SciMLBase v2.4.3 [505e40e9] SciPyDiffEq v0.2.1 [90137ffa] StaticArrays v1.6.5 [c3572dad] Sundials v4.20.0 @@ -209,7 +210,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [4fba245c] ArrayInterface v7.4.11 [30b0a656] ArrayInterfaceCore v0.1.29 [6e4b80f9] BenchmarkTools v1.3.2 - [e2ed5e7c] Bijections v0.1.5 + [e2ed5e7c] Bijections v0.1.6 [d1d4a3ce] BitFlags v0.1.7 [62783981] BitTwiddlingConvenienceFunctions v0.1.5 ⌅ [fa961155] CEnum v0.4.2 @@ -295,7 +296,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [d25df0c9] Inflate v0.1.4 [842dd82b] InlineStrings v1.4.0 [18e54dd8] IntegerMathUtils v0.1.2 - [8197267c] IntervalSets v0.7.7 + [8197267c] IntervalSets v0.7.8 [41ab1584] InvertedIndices v1.3.0 [92d709cd] IrrationalConstants v0.2.2 [c8e1da08] IterTools v1.8.0 @@ -317,7 +318,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [50d2b5c4] Lazy v0.15.1 [1d6d02ad] LeftChildRightSiblingTrees v0.2.0 [d3d80556] LineSearches v7.2.0 - [7ed4a6bd] LinearSolve v2.11.0 + [7ed4a6bd] LinearSolve v2.11.1 [2ab3a3ac] LogExpFunctions v0.3.26 [e6f89c97] LoggingExtras v1.0.3 [bdcacae8] LoopVectorization v0.12.165 @@ -338,7 +339,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [2774e3e8] NLsolve v4.5.1 [77ba4419] NaNMath v1.0.2 ⌅ [356022a1] NamedDims v0.2.50 - [8913a72c] NonlinearSolve v2.3.0 + [8913a72c] NonlinearSolve v2.4.0 [54ca160b] ODEInterface v0.5.0 [09606e27] ODEInterfaceDiffEq v3.13.3 [6fd5a793] Octavian v0.3.27 @@ -391,7 +392,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [fdea26ae] SIMD v3.4.5 [94e857df] SIMDTypes v0.1.0 [476501e8] SLEEFPirates v0.6.39 - [0bca4576] SciMLBase v2.4.2 + [0bca4576] SciMLBase v2.4.3 [e9a6253c] SciMLNLSolve v0.1.9 [c0aeaf25] SciMLOperators v0.3.6 [505e40e9] SciPyDiffEq v0.2.1 diff --git a/docs/src/benchmarks/rober.md b/docs/src/benchmarks/rober.md index 096816528..79983ce73 100644 --- a/docs/src/benchmarks/rober.md +++ b/docs/src/benchmarks/rober.md @@ -138,7 +138,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml` [65888b18] ParameterizedFunctions v5.16.0 [91a5bcdd] Plots v1.39.0 [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq` - [0bca4576] SciMLBase v2.4.2 + [0bca4576] SciMLBase v2.4.3 [505e40e9] SciPyDiffEq v0.2.1 [90137ffa] StaticArrays v1.6.5 [c3572dad] Sundials v4.20.0 @@ -166,7 +166,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [4fba245c] ArrayInterface v7.4.11 [30b0a656] ArrayInterfaceCore v0.1.29 [6e4b80f9] BenchmarkTools v1.3.2 - [e2ed5e7c] Bijections v0.1.5 + [e2ed5e7c] Bijections v0.1.6 [d1d4a3ce] BitFlags v0.1.7 [62783981] BitTwiddlingConvenienceFunctions v0.1.5 ⌅ [fa961155] CEnum v0.4.2 @@ -252,7 +252,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [d25df0c9] Inflate v0.1.4 [842dd82b] InlineStrings v1.4.0 [18e54dd8] IntegerMathUtils v0.1.2 - [8197267c] IntervalSets v0.7.7 + [8197267c] IntervalSets v0.7.8 [41ab1584] InvertedIndices v1.3.0 [92d709cd] IrrationalConstants v0.2.2 [c8e1da08] IterTools v1.8.0 @@ -274,7 +274,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [50d2b5c4] Lazy v0.15.1 [1d6d02ad] LeftChildRightSiblingTrees v0.2.0 [d3d80556] LineSearches v7.2.0 - [7ed4a6bd] LinearSolve v2.11.0 + [7ed4a6bd] LinearSolve v2.11.1 [2ab3a3ac] LogExpFunctions v0.3.26 [e6f89c97] LoggingExtras v1.0.3 [bdcacae8] LoopVectorization v0.12.165 @@ -295,7 +295,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [2774e3e8] NLsolve v4.5.1 [77ba4419] NaNMath v1.0.2 ⌅ [356022a1] NamedDims v0.2.50 - [8913a72c] NonlinearSolve v2.3.0 + [8913a72c] NonlinearSolve v2.4.0 [54ca160b] ODEInterface v0.5.0 [09606e27] ODEInterfaceDiffEq v3.13.3 [6fd5a793] Octavian v0.3.27 @@ -348,7 +348,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [fdea26ae] SIMD v3.4.5 [94e857df] SIMDTypes v0.1.0 [476501e8] SLEEFPirates v0.6.39 - [0bca4576] SciMLBase v2.4.2 + [0bca4576] SciMLBase v2.4.3 [e9a6253c] SciMLNLSolve v0.1.9 [c0aeaf25] SciMLOperators v0.3.6 [505e40e9] SciPyDiffEq v0.2.1 diff --git a/docs/src/benchmarks/vanderpol.md b/docs/src/benchmarks/vanderpol.md index 7f2be8306..b15280ab5 100644 --- a/docs/src/benchmarks/vanderpol.md +++ b/docs/src/benchmarks/vanderpol.md @@ -105,7 +105,7 @@ _setups = [ "EK1(3) 2nd order" => Dict(:prob_choice => 2, :alg => EK1(order=3, smooth=DENSE)) "EK1(4) 2nd order" => Dict(:prob_choice => 2, :alg => EK1(order=4, smooth=DENSE)) "EK1(5) 2nd order" => Dict(:prob_choice => 2, :alg => EK1(order=5, smooth=DENSE)) - "EK1(5) 2nd order" => Dict(:prob_choice => 2, :alg => EK1(order=6, smooth=DENSE)) + "EK1(6) 2nd order" => Dict(:prob_choice => 2, :alg => EK1(order=6, smooth=DENSE)) ] labels = first.(_setups) @@ -190,7 +190,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Project.toml` [65888b18] ParameterizedFunctions v5.16.0 [91a5bcdd] Plots v1.39.0 [bf3e78b0] ProbNumDiffEq v0.12.1 `~/.julia/dev/ProbNumDiffEq` - [0bca4576] SciMLBase v2.4.2 + [0bca4576] SciMLBase v2.4.3 [505e40e9] SciPyDiffEq v0.2.1 [90137ffa] StaticArrays v1.6.5 [c3572dad] Sundials v4.20.0 @@ -218,7 +218,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [4fba245c] ArrayInterface v7.4.11 [30b0a656] ArrayInterfaceCore v0.1.29 [6e4b80f9] BenchmarkTools v1.3.2 - [e2ed5e7c] Bijections v0.1.5 + [e2ed5e7c] Bijections v0.1.6 [d1d4a3ce] BitFlags v0.1.7 [62783981] BitTwiddlingConvenienceFunctions v0.1.5 ⌅ [fa961155] CEnum v0.4.2 @@ -304,7 +304,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [d25df0c9] Inflate v0.1.4 [842dd82b] InlineStrings v1.4.0 [18e54dd8] IntegerMathUtils v0.1.2 - [8197267c] IntervalSets v0.7.7 + [8197267c] IntervalSets v0.7.8 [41ab1584] InvertedIndices v1.3.0 [92d709cd] IrrationalConstants v0.2.2 [c8e1da08] IterTools v1.8.0 @@ -326,7 +326,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [50d2b5c4] Lazy v0.15.1 [1d6d02ad] LeftChildRightSiblingTrees v0.2.0 [d3d80556] LineSearches v7.2.0 - [7ed4a6bd] LinearSolve v2.11.0 + [7ed4a6bd] LinearSolve v2.11.1 [2ab3a3ac] LogExpFunctions v0.3.26 [e6f89c97] LoggingExtras v1.0.3 [bdcacae8] LoopVectorization v0.12.165 @@ -347,7 +347,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [2774e3e8] NLsolve v4.5.1 [77ba4419] NaNMath v1.0.2 ⌅ [356022a1] NamedDims v0.2.50 - [8913a72c] NonlinearSolve v2.3.0 + [8913a72c] NonlinearSolve v2.4.0 [54ca160b] ODEInterface v0.5.0 [09606e27] ODEInterfaceDiffEq v3.13.3 [6fd5a793] Octavian v0.3.27 @@ -400,7 +400,7 @@ Status `~/.julia/dev/ProbNumDiffEq/benchmarks/Manifest.toml` [fdea26ae] SIMD v3.4.5 [94e857df] SIMDTypes v0.1.0 [476501e8] SLEEFPirates v0.6.39 - [0bca4576] SciMLBase v2.4.2 + [0bca4576] SciMLBase v2.4.3 [e9a6253c] SciMLNLSolve v0.1.9 [c0aeaf25] SciMLOperators v0.3.6 [505e40e9] SciPyDiffEq v0.2.1 diff --git a/docs/src/initialization.md b/docs/src/initialization.md index 7513f8e89..2c45b74ed 100644 --- a/docs/src/initialization.md +++ b/docs/src/initialization.md @@ -2,6 +2,7 @@ The notion of "initialization" relates to the _prior_ part of the model. +**TL;DR: In the vast majority of cases, just stick to the exact Taylor-mode initialization [`TaylorModeInit`](@ref)!** ## Background: The prior diff --git a/docs/src/priors.md b/docs/src/priors.md index 86fb1ed37..5fa1fba7e 100644 --- a/docs/src/priors.md +++ b/docs/src/priors.md @@ -1,5 +1,9 @@ # Priors +**TL;DR: If you're unsure which prior to use, just stick to the default integrated Wiener process prior [`IWP`](@ref)!** + +# Background + We model the ODE solution ``y(t)`` with a Gauss--Markov prior. More precisely, let ```math diff --git a/docs/src/solvers.md b/docs/src/solvers.md index 3dc5abe00..8d2e8ead7 100644 --- a/docs/src/solvers.md +++ b/docs/src/solvers.md @@ -1,7 +1,10 @@ # Solvers ProbNumDiffEq.jl provides two solvers: the [`EK1`](@ref) and the [`EK0`](@ref). Both based on extended Kalman filtering and smoothing, but the latter relies on evaluating the Jacobian of the vector field. -**For the best results, use the [`EK1`](@ref).** + +**Which solver should I use?** +- Use the [`EK1`](@ref) to get the best uncertainty quantification and to solve stiff problems. +- Use the [`EK0`](@ref) to get the fastest runtimes and to solve high-dimensional problems. 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`](https://docs.sciml.ai/DiffEqDocs/stable/types/dynamical_types/#SciMLBase.SecondOrderODEProblem), it solves the second-order problem directly; this is more efficient than solving the transformed first-order problem and provides more meaningful posteriors @@ -26,5 +29,7 @@ RosenbrockExpEK Pages = [] Canonical = false +tronarp18probsol +krämer21highdim bosch23expint ``` diff --git a/src/algorithms.jl b/src/algorithms.jl index efba620de..740df81dd 100644 --- a/src/algorithms.jl +++ b/src/algorithms.jl @@ -12,6 +12,16 @@ abstract type AbstractEK <: OrdinaryDiffEq.OrdinaryDiffEqAdaptiveAlgorithm end **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 +[krämer21highdim](@cite), but it is not L-stable [tronarp18probsol](@cite). So for stiff +problems, use the [`EK1`](@ref). + +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. @@ -55,6 +65,11 @@ _unwrap_val(B) = B **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 [tronarp18probsol](@cite), +and it generally produces more expressive posterior covariances than the [`EK0`](@ref). +However, as typical implicit ODE solvers it scales cubically with the ODE dimension [krämer21highdim](@cite), +so if you're solving a high-dimensional non-stiff problem you might want to give the [`EK0`](@ref) 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. @@ -114,7 +129,7 @@ EK1(; """ ExpEK(; L, order=3, kwargs...) -Probabilistic exponential integrator +**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. @@ -154,7 +169,7 @@ linearity does not need to be specified manually, and the more accurate local li 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`](@ref) with appropriete [`IOUP`](@ref) +`RosenbrockExpEK` is just a short-hand for [`EK1`](@ref) with locally-updated [`IOUP`](@ref) prior: ```julia RosenbrockExpEK(; order=3, kwargs...) = EK1(; prior=IOUP(order, update_rate_parameter=true), kwargs...)