From c2ce50f4c34b3d7907a6f63b083e3c792d3186fc Mon Sep 17 00:00:00 2001 From: Nathanael Bosch Date: Fri, 3 Nov 2023 14:28:20 +0100 Subject: [PATCH] run again --- Project.toml | 1 + benchmarks/hodgkinhuxley.jmd | 24 +- .../benchmarks/figures/hodgkinhuxley_2_1.svg | 834 +++++++++--------- .../benchmarks/figures/hodgkinhuxley_3_1.svg | 494 +++++------ .../benchmarks/figures/hodgkinhuxley_4_1.svg | 486 +++++----- .../benchmarks/figures/hodgkinhuxley_5_1.svg | 450 +++++----- .../benchmarks/figures/hodgkinhuxley_6_1.svg | 444 +++++----- docs/src/benchmarks/hodgkinhuxley.md | 32 +- 8 files changed, 1379 insertions(+), 1386 deletions(-) diff --git a/Project.toml b/Project.toml index e37edd243..254cf1ea5 100644 --- a/Project.toml +++ b/Project.toml @@ -10,6 +10,7 @@ DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d" ExponentialUtilities = "d4d017d3-3776-5f7e-afef-a10c40355c18" FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838" +FiniteHorizonGramians = "b59a298d-d283-4a37-9369-85a9f9a111a5" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" FunctionWrappersWrappers = "77dc65aa-8811-40c2-897b-53d922fa7daf" GaussianDistributions = "43dcc890-d446-5863-8d1a-14597580bb8d" diff --git a/benchmarks/hodgkinhuxley.jmd b/benchmarks/hodgkinhuxley.jmd index d2e9a6a5f..256a5ae3a 100644 --- a/benchmarks/hodgkinhuxley.jmd +++ b/benchmarks/hodgkinhuxley.jmd @@ -77,21 +77,19 @@ plot(test_sol, DENSE = SAVE_EVERYSTEP = false _setups = [ - "EK0(2)" => Dict(:alg=>EK0(order=2, smooth=DENSE)) "EK0(3)" => Dict(:alg=>EK0(order=3, smooth=DENSE)) "EK0(5)" => Dict(:alg=>EK0(order=5, smooth=DENSE)) - "EK1(2)" => Dict(:alg=>EK1(order=2, smooth=DENSE)) "EK1(3)" => Dict(:alg=>EK1(order=3, smooth=DENSE)) "EK1(5)" => Dict(:alg=>EK1(order=5, smooth=DENSE)) "EK1(8)" => Dict(:alg=>EK1(order=8, smooth=DENSE)) - "RosenbrockExpEK1(2)" => Dict(:alg=>RosenbrockExpEK(order=2, smooth=DENSE)) "RosenbrockExpEK1(3)" => Dict(:alg=>RosenbrockExpEK(order=3, smooth=DENSE)) "RosenbrockExpEK1(5)" => Dict(:alg=>RosenbrockExpEK(order=5, smooth=DENSE)) + "RosenbrockExpEK1(8)" => Dict(:alg=>RosenbrockExpEK(order=8, smooth=DENSE)) ] labels = first.(_setups) setups = last.(_setups) -colors = [1 1 1 2 2 2 2 3 3 3] +colors = [1 1 2 2 2 3 3 3] abstols = 1.0 ./ 10.0 .^ (6:10) reltols = 1.0 ./ 10.0 .^ (3:7) @@ -124,21 +122,19 @@ plot( DENSE = SAVE_EVERYSTEP = true _setups = [ - "EK0(2)" => Dict(:alg=>EK0(order=2, smooth=DENSE)) "EK0(3)" => Dict(:alg=>EK0(order=3, smooth=DENSE)) "EK0(5)" => Dict(:alg=>EK0(order=5, smooth=DENSE)) - "EK1(2)" => Dict(:alg=>EK1(order=2, smooth=DENSE)) "EK1(3)" => Dict(:alg=>EK1(order=3, smooth=DENSE)) "EK1(5)" => Dict(:alg=>EK1(order=5, smooth=DENSE)) "EK1(8)" => Dict(:alg=>EK1(order=8, smooth=DENSE)) - "RosenbrockExpEK1(2)" => Dict(:alg=>RosenbrockExpEK(order=2, smooth=DENSE)) "RosenbrockExpEK1(3)" => Dict(:alg=>RosenbrockExpEK(order=3, smooth=DENSE)) "RosenbrockExpEK1(5)" => Dict(:alg=>RosenbrockExpEK(order=5, smooth=DENSE)) + "RosenbrockExpEK1(8)" => Dict(:alg=>RosenbrockExpEK(order=8, smooth=DENSE)) ] labels = first.(_setups) setups = last.(_setups) -colors = [1 1 1 2 2 2 2 3 3 3] +colors = [1 1 2 2 2 3 3 3] abstols = 1.0 ./ 10.0 .^ (6:10) reltols = 1.0 ./ 10.0 .^ (3:7) @@ -176,9 +172,9 @@ abstols = reltols = repeat([missing], length(dts)) DM = FixedDiffusion() _setups = [ - "EK0(2)" => Dict(:alg=>EK0(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) - "EK1(2)" => Dict(:alg=>EK1(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) - "RosenbrockExpEK1(2)" => Dict(:alg=>RosenbrockExpEK(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "EK0(3)" => Dict(:alg=>EK0(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "EK1(3)" => Dict(:alg=>EK1(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "RosenbrockExpEK1(3)" => Dict(:alg=>RosenbrockExpEK(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) ] labels = first.(_setups) @@ -218,9 +214,9 @@ dts = 10.0 .^ range(-2, -3, length=length(abstols)) DM = FixedDiffusion() _setups = [ - "EK0(2)" => Dict(:alg=>EK0(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) - "EK1(2)" => Dict(:alg=>EK1(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) - "RosenbrockExpEK1(2)" => Dict(:alg=>RosenbrockExpEK(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "EK0(3)" => Dict(:alg=>EK0(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "EK1(3)" => Dict(:alg=>EK1(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "RosenbrockExpEK1(3)" => Dict(:alg=>RosenbrockExpEK(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) ] labels = first.(_setups) diff --git a/docs/src/benchmarks/figures/hodgkinhuxley_2_1.svg b/docs/src/benchmarks/figures/hodgkinhuxley_2_1.svg index fd6d89049..140c56a8f 100644 --- a/docs/src/benchmarks/figures/hodgkinhuxley_2_1.svg +++ b/docs/src/benchmarks/figures/hodgkinhuxley_2_1.svg @@ -1,444 +1,444 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/hodgkinhuxley_3_1.svg b/docs/src/benchmarks/figures/hodgkinhuxley_3_1.svg index 2e5dc9f4a..b37b89a2f 100644 --- a/docs/src/benchmarks/figures/hodgkinhuxley_3_1.svg +++ b/docs/src/benchmarks/figures/hodgkinhuxley_3_1.svg @@ -1,270 +1,252 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/hodgkinhuxley_4_1.svg b/docs/src/benchmarks/figures/hodgkinhuxley_4_1.svg index a186d5286..6999795ce 100644 --- a/docs/src/benchmarks/figures/hodgkinhuxley_4_1.svg +++ b/docs/src/benchmarks/figures/hodgkinhuxley_4_1.svg @@ -1,268 +1,246 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/hodgkinhuxley_5_1.svg b/docs/src/benchmarks/figures/hodgkinhuxley_5_1.svg index 9285daeb0..51f69136c 100644 --- a/docs/src/benchmarks/figures/hodgkinhuxley_5_1.svg +++ b/docs/src/benchmarks/figures/hodgkinhuxley_5_1.svg @@ -1,229 +1,247 @@ - + - + - + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/figures/hodgkinhuxley_6_1.svg b/docs/src/benchmarks/figures/hodgkinhuxley_6_1.svg index a76fed732..f2a8e753f 100644 --- a/docs/src/benchmarks/figures/hodgkinhuxley_6_1.svg +++ b/docs/src/benchmarks/figures/hodgkinhuxley_6_1.svg @@ -1,225 +1,247 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/src/benchmarks/hodgkinhuxley.md b/docs/src/benchmarks/hodgkinhuxley.md index 64570b39c..198d52318 100644 --- a/docs/src/benchmarks/hodgkinhuxley.md +++ b/docs/src/benchmarks/hodgkinhuxley.md @@ -84,21 +84,19 @@ plot(test_sol, DENSE = SAVE_EVERYSTEP = false _setups = [ - "EK0(2)" => Dict(:alg=>EK0(order=2, smooth=DENSE)) "EK0(3)" => Dict(:alg=>EK0(order=3, smooth=DENSE)) "EK0(5)" => Dict(:alg=>EK0(order=5, smooth=DENSE)) - "EK1(2)" => Dict(:alg=>EK1(order=2, smooth=DENSE)) "EK1(3)" => Dict(:alg=>EK1(order=3, smooth=DENSE)) "EK1(5)" => Dict(:alg=>EK1(order=5, smooth=DENSE)) "EK1(8)" => Dict(:alg=>EK1(order=8, smooth=DENSE)) - "RosenbrockExpEK1(2)" => Dict(:alg=>RosenbrockExpEK(order=2, smooth=DENSE)) "RosenbrockExpEK1(3)" => Dict(:alg=>RosenbrockExpEK(order=3, smooth=DENSE)) "RosenbrockExpEK1(5)" => Dict(:alg=>RosenbrockExpEK(order=5, smooth=DENSE)) + "RosenbrockExpEK1(8)" => Dict(:alg=>RosenbrockExpEK(order=8, smooth=DENSE)) ] labels = first.(_setups) setups = last.(_setups) -colors = [1 1 1 2 2 2 2 3 3 3] +colors = [1 1 2 2 2 3 3 3] abstols = 1.0 ./ 10.0 .^ (6:10) reltols = 1.0 ./ 10.0 .^ (3:7) @@ -118,7 +116,7 @@ wp = WorkPrecisionSet( plot( wp, - title = "Hodgkin-Huxley with adaptive steps", + title = "Adaptive steps - no smoothing", color = colors, xticks = 10.0 .^ (-16:1:5), yticks = 10.0 .^ (-6:1:5), @@ -135,21 +133,19 @@ plot( DENSE = SAVE_EVERYSTEP = true _setups = [ - "EK0(2)" => Dict(:alg=>EK0(order=2, smooth=DENSE)) "EK0(3)" => Dict(:alg=>EK0(order=3, smooth=DENSE)) "EK0(5)" => Dict(:alg=>EK0(order=5, smooth=DENSE)) - "EK1(2)" => Dict(:alg=>EK1(order=2, smooth=DENSE)) "EK1(3)" => Dict(:alg=>EK1(order=3, smooth=DENSE)) "EK1(5)" => Dict(:alg=>EK1(order=5, smooth=DENSE)) "EK1(8)" => Dict(:alg=>EK1(order=8, smooth=DENSE)) - "RosenbrockExpEK1(2)" => Dict(:alg=>RosenbrockExpEK(order=2, smooth=DENSE)) "RosenbrockExpEK1(3)" => Dict(:alg=>RosenbrockExpEK(order=3, smooth=DENSE)) "RosenbrockExpEK1(5)" => Dict(:alg=>RosenbrockExpEK(order=5, smooth=DENSE)) + "RosenbrockExpEK1(8)" => Dict(:alg=>RosenbrockExpEK(order=8, smooth=DENSE)) ] labels = first.(_setups) setups = last.(_setups) -colors = [1 1 1 2 2 2 2 3 3 3] +colors = [1 1 2 2 2 3 3 3] abstols = 1.0 ./ 10.0 .^ (6:10) reltols = 1.0 ./ 10.0 .^ (3:7) @@ -169,7 +165,7 @@ wp = WorkPrecisionSet( plot( wp, - title = "Hodgkin-Huxley with adaptive steps", + title = "Adaptive steps - with smoothing", color = colors, xticks = 10.0 .^ (-16:1:5), yticks = 10.0 .^ (-6:1:5), @@ -191,9 +187,9 @@ abstols = reltols = repeat([missing], length(dts)) DM = FixedDiffusion() _setups = [ - "EK0(2)" => Dict(:alg=>EK0(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) - "EK1(2)" => Dict(:alg=>EK1(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) - "RosenbrockExpEK1(2)" => Dict(:alg=>RosenbrockExpEK(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "EK0(3)" => Dict(:alg=>EK0(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "EK1(3)" => Dict(:alg=>EK1(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "RosenbrockExpEK1(3)" => Dict(:alg=>RosenbrockExpEK(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) ] labels = first.(_setups) @@ -216,7 +212,7 @@ wp = WorkPrecisionSet( plot( wp, - title = "Hodgkin-Huxley with fixed steps", + title = "Fixed steps - no smoothing", color = colors, xticks = 10.0 .^ (-16:1:5), yticks = 10.0 .^ (-6:1:5), @@ -237,9 +233,9 @@ dts = 10.0 .^ range(-2, -3, length=length(abstols)) DM = FixedDiffusion() _setups = [ - "EK0(2)" => Dict(:alg=>EK0(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) - "EK1(2)" => Dict(:alg=>EK1(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) - "RosenbrockExpEK1(2)" => Dict(:alg=>RosenbrockExpEK(order=2, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "EK0(3)" => Dict(:alg=>EK0(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "EK1(3)" => Dict(:alg=>EK1(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) + "RosenbrockExpEK1(3)" => Dict(:alg=>RosenbrockExpEK(order=3, diffusionmodel=DM, smooth=DENSE), :dts=>dts) ] labels = first.(_setups) @@ -262,7 +258,7 @@ wp = WorkPrecisionSet( plot( wp, - title = "Hodgkin-Huxley with fixed steps", + title = "Fixed steps - with smoothing", color = colors, xticks = 10.0 .^ (-16:1:5), yticks = 10.0 .^ (-6:1:5),