diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml new file mode 100644 index 000000000..3494a9f18 --- /dev/null +++ b/.JuliaFormatter.toml @@ -0,0 +1,3 @@ +style = "sciml" +format_markdown = true +format_docstrings = true diff --git a/.buildkite/launch_benchmarks.yml.signature b/.buildkite/launch_benchmarks.yml.signature index bd2020676..6d147cb98 100644 Binary files a/.buildkite/launch_benchmarks.yml.signature and b/.buildkite/launch_benchmarks.yml.signature differ diff --git a/.buildkite/run_benchmark.yml b/.buildkite/run_benchmark.yml index 0364fd76e..eb2eba4d6 100644 --- a/.buildkite/run_benchmark.yml +++ b/.buildkite/run_benchmark.yml @@ -19,8 +19,8 @@ steps: - JuliaCI/julia#v1: version: "1.10" - staticfloat/sandbox: - rootfs_url: "https://github.com/thazhemadam/openmodelica-rootfs-image/releases/download/v1.23.0/rootfs-openmodelica-v1.23.0.amd64.tar.gz" - rootfs_treehash: "82970243dc4f188e599a976abc20951f4aba2912" + rootfs_url: "https://github.com/thazhemadam/ScimlBenchmarks-rootfs-image/releases/download/rootfs-image/rootfs-script.amd64.tar.gz" + rootfs_treehash: "943bde824554f0afad5a939341f05e3bdb393051" uid: 1000 gid: 1000 workspaces: diff --git a/.buildkite/test_sciml.yml b/.buildkite/test_sciml.yml index de65eca5c..99f9d6734 100644 --- a/.buildkite/test_sciml.yml +++ b/.buildkite/test_sciml.yml @@ -1,8 +1,8 @@ steps: - - label: ":julia: Run tests on 1.8" + - label: ":julia: Run tests on LTS" plugins: - JuliaCI/julia#v1: - version: 1.9 + version: '1.10' - JuliaCI/julia-test#v1: timeout_in_minutes: 20 artifact_paths: diff --git a/.github/workflows/update.jl b/.github/workflows/update.jl index 154355d6d..31ef2b187 100644 --- a/.github/workflows/update.jl +++ b/.github/workflows/update.jl @@ -12,14 +12,14 @@ date = Dates.format(now(), "yyyy-mm-dd") benchpath = joinpath(@__DIR__, "..", "..", "benchmarks") # Get all the open PRs and their number -gh_prs = GitHub.pull_requests("SciML/SciMLBenchmarks.jl"; auth=myauth) +gh_prs = GitHub.pull_requests("SciML/SciMLBenchmarks.jl"; auth = myauth) prs = Dict{String, Int64}() for i in 1:length(gh_prs[1]) prs[gh_prs[1][i].head.ref] = gh_prs[1][i].number end # Get all the branches from the repo -gh_branches = GitHub.branches("SciML/SciMLBenchmarks.jl"; auth=myauth) +gh_branches = GitHub.branches("SciML/SciMLBenchmarks.jl"; auth = myauth) branches = [gh_branches[1][i].name for i in 1:length(gh_branches[1])] @info("PRs and branches", prs, branches) @@ -50,11 +50,11 @@ for dir in readdir(benchpath) if dir ∉ keys(prs) params = Dict( "title" => "Updated $(dir) for benchmarks", - "head" => "$(dir)", - "base" => "master" + "head" => "$(dir)", + "base" => "master" ) - @info("Creating a pull request from head: ", dir) - GitHub.create_pull_request("SciML/SciMLBenchmarks.jl"; params=params, auth=myauth) + @info("Creating a pull request from head: ", dir) + GitHub.create_pull_request("SciML/SciMLBenchmarks.jl"; params = params, auth = myauth) else @info("Updating the pull request numbered: ", prs[dir]) GitHub.update_pull_request("SciML/SciMLBenchmarks.jl", prs[dir]; auth=myauth) diff --git a/README.md b/README.md index 3036c99e1..f7f01183e 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,9 @@ or building work-precision diagrams for direct comparison of speed at given erro **If any of the code from any of the languages can be improved, please open a pull request**. +For critiques of benchmarks, please open a pull request that changes the code in the desired manner. Issues with recommended +changes are generally vague and not actionable, while pull requests with code changes are exact. Thus if there is something +you think should be changed in the code, please make the recommended change in the code! ## Results diff --git a/benchmarks/AdaptiveSDE/AdaptiveEfficiencyTests.jmd b/benchmarks/AdaptiveSDE/AdaptiveEfficiencyTests.jmd index a4109f64b..33fee00a9 100644 --- a/benchmarks/AdaptiveSDE/AdaptiveEfficiencyTests.jmd +++ b/benchmarks/AdaptiveSDE/AdaptiveEfficiencyTests.jmd @@ -8,138 +8,163 @@ author: Chris Rackauckas using Distributed addprocs(2) -p1 = Vector{Any}(undef,3) -p2 = Vector{Any}(undef,3) -p3 = Vector{Any}(undef,3) +p1 = Vector{Any}(undef, 3) +p2 = Vector{Any}(undef, 3) +p3 = Vector{Any}(undef, 3) @everywhere begin - using StochasticDiffEq, SDEProblemLibrary, DiffEqNoiseProcess, Plots, ParallelDataTransfer - import SDEProblemLibrary: prob_sde_additive, - prob_sde_linear, prob_sde_wave + using StochasticDiffEq, SDEProblemLibrary, DiffEqNoiseProcess, Plots, + ParallelDataTransfer + import SDEProblemLibrary: prob_sde_additive, + prob_sde_linear, prob_sde_wave end using StochasticDiffEq, SDEProblemLibrary, DiffEqNoiseProcess, Plots, ParallelDataTransfer import SDEProblemLibrary: prob_sde_additive, - prob_sde_linear, prob_sde_wave + prob_sde_linear, prob_sde_wave -probs = Matrix{SDEProblem}(undef,3,3) +probs = Matrix{SDEProblem}(undef, 3, 3) ## Problem 1 prob = prob_sde_linear -probs[1,1] = SDEProblem(prob.f,prob.g,prob.u0,prob.tspan,prob.p,noise=WienerProcess(0.0,0.0,0.0,rswm=RSWM(adaptivealg=:RSwM1))) -probs[1,2] = SDEProblem(prob.f,prob.g,prob.u0,prob.tspan,prob.p,noise=WienerProcess(0.0,0.0,0.0,rswm=RSWM(adaptivealg=:RSwM2))) -probs[1,3] = SDEProblem(prob.f,prob.g,prob.u0,prob.tspan,prob.p,noise=WienerProcess(0.0,0.0,0.0,rswm=RSWM(adaptivealg=:RSwM3))) +probs[1, 1] = SDEProblem(prob.f, prob.g, prob.u0, prob.tspan, prob.p, + noise = WienerProcess(0.0, 0.0, 0.0, rswm = RSWM(adaptivealg = :RSwM1))) +probs[1, 2] = SDEProblem(prob.f, prob.g, prob.u0, prob.tspan, prob.p, + noise = WienerProcess(0.0, 0.0, 0.0, rswm = RSWM(adaptivealg = :RSwM2))) +probs[1, 3] = SDEProblem(prob.f, prob.g, prob.u0, prob.tspan, prob.p, + noise = WienerProcess(0.0, 0.0, 0.0, rswm = RSWM(adaptivealg = :RSwM3))) ## Problem 2 prob = prob_sde_wave -probs[2,1] = SDEProblem(prob.f,prob.g,prob.u0,prob.tspan,prob.p,noise=WienerProcess(0.0,0.0,0.0,rswm=RSWM(adaptivealg=:RSwM1))) -probs[2,2] = SDEProblem(prob.f,prob.g,prob.u0,prob.tspan,prob.p,noise=WienerProcess(0.0,0.0,0.0,rswm=RSWM(adaptivealg=:RSwM2))) -probs[2,3] = SDEProblem(prob.f,prob.g,prob.u0,prob.tspan,prob.p,noise=WienerProcess(0.0,0.0,0.0,rswm=RSWM(adaptivealg=:RSwM3))) +probs[2, 1] = SDEProblem(prob.f, prob.g, prob.u0, prob.tspan, prob.p, + noise = WienerProcess(0.0, 0.0, 0.0, rswm = RSWM(adaptivealg = :RSwM1))) +probs[2, 2] = SDEProblem(prob.f, prob.g, prob.u0, prob.tspan, prob.p, + noise = WienerProcess(0.0, 0.0, 0.0, rswm = RSWM(adaptivealg = :RSwM2))) +probs[2, 3] = SDEProblem(prob.f, prob.g, prob.u0, prob.tspan, prob.p, + noise = WienerProcess(0.0, 0.0, 0.0, rswm = RSWM(adaptivealg = :RSwM3))) ## Problem 3 prob = prob_sde_additive -probs[3,1] = SDEProblem(prob.f,prob.g,prob.u0,prob.tspan,prob.p,noise=WienerProcess(0.0,0.0,0.0,rswm=RSWM(adaptivealg=:RSwM1))) -probs[3,2] = SDEProblem(prob.f,prob.g,prob.u0,prob.tspan,prob.p,noise=WienerProcess(0.0,0.0,0.0,rswm=RSWM(adaptivealg=:RSwM2))) -probs[3,3] = SDEProblem(prob.f,prob.g,prob.u0,prob.tspan,prob.p,noise=WienerProcess(0.0,0.0,0.0,rswm=RSWM(adaptivealg=:RSwM3))) - -fullMeans = Vector{Array}(undef,3) -fullMedians = Vector{Array}(undef,3) -fullElapsed = Vector{Array}(undef,3) -fullTols = Vector{Array}(undef,3) +probs[3, 1] = SDEProblem(prob.f, prob.g, prob.u0, prob.tspan, prob.p, + noise = WienerProcess(0.0, 0.0, 0.0, rswm = RSWM(adaptivealg = :RSwM1))) +probs[3, 2] = SDEProblem(prob.f, prob.g, prob.u0, prob.tspan, prob.p, + noise = WienerProcess(0.0, 0.0, 0.0, rswm = RSWM(adaptivealg = :RSwM2))) +probs[3, 3] = SDEProblem(prob.f, prob.g, prob.u0, prob.tspan, prob.p, + noise = WienerProcess(0.0, 0.0, 0.0, rswm = RSWM(adaptivealg = :RSwM3))) + +fullMeans = Vector{Array}(undef, 3) +fullMedians = Vector{Array}(undef, 3) +fullElapsed = Vector{Array}(undef, 3) +fullTols = Vector{Array}(undef, 3) offset = 0 -Ns = [17,23, -17] +Ns = [17, 23, + 17] ``` Timings are only valid if no workers die. Workers die if you run out of memory. ```julia -for k in 1:size(probs,1) - global probs, Ns, fullMeans, fullMedians, fullElapsed, fullTols - println("Problem $k") - ## Setup - N = Ns[k] - - msims = Vector{Any}(undef,N) - elapsed = Array{Float64}(undef,N,3) - medians = Array{Float64}(undef,N,3) - means = Array{Float64}(undef,N,3) - tols = Array{Float64}(undef,N,3) - - #Compile - prob = probs[k,1] - ParallelDataTransfer.sendto(workers(), prob=prob) - monte_prob = EnsembleProblem(prob) - solve(monte_prob,SRIW1(),dt=1/2^(4),adaptive=true,trajectories=1000,abstol=2.0^(-1),reltol=0) - - println("RSwM1") - for i=1+offset:N+offset - tols[i-offset,1] = 2.0^(-i-1) - msims[i-offset] = DiffEqBase.calculate_monte_errors(solve(monte_prob,SRIW1(), - trajectories=1000,abstol=2.0^(-i-1), - reltol=0,force_dtmin=true)) - elapsed[i-offset,1] = msims[i-offset].elapsedTime - medians[i-offset,1] = msims[i-offset].error_medians[:final] - means[i-offset,1] = msims[i-offset].error_means[:final] - end - - println("RSwM2") - prob = probs[k,2] - - ParallelDataTransfer.sendto(workers(), prob=prob) - monte_prob = EnsembleProblem(prob) - solve(monte_prob,SRIW1(),dt=1/2^(4),adaptive=true,trajectories=1000,abstol=2.0^(-1),reltol=0) - - for i=1+offset:N+offset - tols[i-offset,2] = 2.0^(-i-1) - msims[i-offset] = DiffEqBase.calculate_monte_errors(solve(monte_prob,SRIW1(), - trajectories=1000,abstol=2.0^(-i-1), - reltol=0,force_dtmin=true)) - elapsed[i-offset,2] = msims[i-offset].elapsedTime - medians[i-offset,2] = msims[i-offset].error_medians[:final] - means[i-offset,2] = msims[i-offset].error_means[:final] - end - - println("RSwM3") - prob = probs[k,3] - ParallelDataTransfer.sendto(workers(), prob=prob) - monte_prob = EnsembleProblem(prob) - solve(monte_prob,SRIW1(),dt=1/2^(4),adaptive=true,trajectories=1000,abstol=2.0^(-1),reltol=0) - - for i=1+offset:N+offset - tols[i-offset,3] = 2.0^(-i-1) - msims[i-offset] = DiffEqBase.calculate_monte_errors(solve(monte_prob,SRIW1(), - adaptive=true,trajectories=1000,abstol=2.0^(-i-1), - reltol=0,force_dtmin=true)) - elapsed[i-offset,3] = msims[i-offset].elapsedTime - medians[i-offset,3] = msims[i-offset].error_medians[:final] - means[i-offset,3] = msims[i-offset].error_means[:final] - end - - fullMeans[k] = means - fullMedians[k] =medians - fullElapsed[k] = elapsed - fullTols[k] = tols +for k in 1:size(probs, 1) + global probs, Ns, fullMeans, fullMedians, fullElapsed, fullTols + println("Problem $k") + ## Setup + N = Ns[k] + + msims = Vector{Any}(undef, N) + elapsed = Array{Float64}(undef, N, 3) + medians = Array{Float64}(undef, N, 3) + means = Array{Float64}(undef, N, 3) + tols = Array{Float64}(undef, N, 3) + + #Compile + prob = probs[k, 1] + ParallelDataTransfer.sendto(workers(), prob = prob) + monte_prob = EnsembleProblem(prob) + solve(monte_prob, SRIW1(), dt = 1/2^(4), adaptive = true, + trajectories = 1000, abstol = 2.0^(-1), reltol = 0) + + println("RSwM1") + for i in (1 + offset):(N + offset) + tols[i - offset, 1] = 2.0^(-i-1) + msims[i - offset] = DiffEqBase.calculate_monte_errors(solve(monte_prob, SRIW1(), + trajectories = 1000, abstol = 2.0^(-i-1), + reltol = 0, force_dtmin = true)) + elapsed[i - offset, 1] = msims[i - offset].elapsedTime + medians[i - offset, 1] = msims[i - offset].error_medians[:final] + means[i - offset, 1] = msims[i - offset].error_means[:final] + end + + println("RSwM2") + prob = probs[k, 2] + + ParallelDataTransfer.sendto(workers(), prob = prob) + monte_prob = EnsembleProblem(prob) + solve(monte_prob, SRIW1(), dt = 1/2^(4), adaptive = true, + trajectories = 1000, abstol = 2.0^(-1), reltol = 0) + + for i in (1 + offset):(N + offset) + tols[i - offset, 2] = 2.0^(-i-1) + msims[i - offset] = DiffEqBase.calculate_monte_errors(solve(monte_prob, SRIW1(), + trajectories = 1000, abstol = 2.0^(-i-1), + reltol = 0, force_dtmin = true)) + elapsed[i - offset, 2] = msims[i - offset].elapsedTime + medians[i - offset, 2] = msims[i - offset].error_medians[:final] + means[i - offset, 2] = msims[i - offset].error_means[:final] + end + + println("RSwM3") + prob = probs[k, 3] + ParallelDataTransfer.sendto(workers(), prob = prob) + monte_prob = EnsembleProblem(prob) + solve(monte_prob, SRIW1(), dt = 1/2^(4), adaptive = true, + trajectories = 1000, abstol = 2.0^(-1), reltol = 0) + + for i in (1 + offset):(N + offset) + tols[i - offset, 3] = 2.0^(-i-1) + msims[i - offset] = DiffEqBase.calculate_monte_errors(solve(monte_prob, SRIW1(), + adaptive = true, trajectories = 1000, abstol = 2.0^(-i-1), + reltol = 0, force_dtmin = true)) + elapsed[i - offset, 3] = msims[i - offset].elapsedTime + medians[i - offset, 3] = msims[i - offset].error_medians[:final] + means[i - offset, 3] = msims[i - offset].error_means[:final] + end + + fullMeans[k] = means + fullMedians[k] = medians + fullElapsed[k] = elapsed + fullTols[k] = tols end ``` ```julia -gr(fmt=:svg) +gr(fmt = :svg) lw=3 -leg=String["RSwM1","RSwM2","RSwM3"] +leg=String["RSwM1", "RSwM2", "RSwM3"] titleFontSize = 16 guideFontSize = 14 -legendFontSize= 14 -tickFontSize = 12 - -for k in 1:size(probs,1) - global probs, Ns, fullMeans, fullMedians, fullElapsed, fullTols - p1[k] = Plots.plot(fullTols[k],fullMeans[k],xscale=:log10,yscale=:log10, xguide="Absolute Tolerance",yguide="Mean Final Error",title="Example $k" ,linewidth=lw,grid=false,lab=leg,titlefont=font(titleFontSize),legendfont=font(legendFontSize),tickfont=font(tickFontSize),guidefont=font(guideFontSize)) - p2[k] = Plots.plot(fullTols[k],fullMedians[k],xscale=:log10,yscale=:log10,xguide="Absolute Tolerance",yguide="Median Final Error",title="Example $k",linewidth=lw,grid=false,lab=leg,titlefont=font(titleFontSize),legendfont=font(legendFontSize),tickfont=font(tickFontSize),guidefont=font(guideFontSize)) - p3[k] = Plots.plot(fullTols[k],fullElapsed[k],xscale=:log10,yscale=:log10,xguide="Absolute Tolerance",yguide="Elapsed Time",title="Example $k" ,linewidth=lw,grid=false,lab=leg,titlefont=font(titleFontSize),legendfont=font(legendFontSize),tickfont=font(tickFontSize),guidefont=font(guideFontSize)) +legendFontSize = 14 +tickFontSize = 12 + +for k in 1:size(probs, 1) + global probs, Ns, fullMeans, fullMedians, fullElapsed, fullTols + p1[k] = Plots.plot(fullTols[k], fullMeans[k], xscale = :log10, yscale = :log10, + xguide = "Absolute Tolerance", yguide = "Mean Final Error", + title = "Example $k", linewidth = lw, grid = false, lab = leg, + titlefont = font(titleFontSize), legendfont = font(legendFontSize), + tickfont = font(tickFontSize), guidefont = font(guideFontSize)) + p2[k] = Plots.plot(fullTols[k], fullMedians[k], xscale = :log10, yscale = :log10, + xguide = "Absolute Tolerance", yguide = "Median Final Error", + title = "Example $k", linewidth = lw, grid = false, lab = leg, + titlefont = font(titleFontSize), legendfont = font(legendFontSize), + tickfont = font(tickFontSize), guidefont = font(guideFontSize)) + p3[k] = Plots.plot(fullTols[k], fullElapsed[k], xscale = :log10, yscale = :log10, + xguide = "Absolute Tolerance", yguide = "Elapsed Time", + title = "Example $k", linewidth = lw, grid = false, lab = leg, + titlefont = font(titleFontSize), legendfont = font(legendFontSize), + tickfont = font(tickFontSize), guidefont = font(guideFontSize)) end Plots.plot!(p1[1]) -Plots.plot(p1[1],p1[2],p1[3],layout=(3,1),size=(1000,800)) +Plots.plot(p1[1], p1[2], p1[3], layout = (3, 1), size = (1000, 800)) ``` ```julia @@ -148,17 +173,17 @@ Plots.plot(p1[1],p1[2],p1[3],layout=(3,1),size=(1000,800)) ``` ```julia -plot(p3[1],p3[2],p3[3],layout=(3,1),size=(1000,800)) +plot(p3[1], p3[2], p3[3], layout = (3, 1), size = (1000, 800)) #savefig("timevstol.png") #savefig("timevstol.pdf") ``` ```julia -plot(p1[1],p3[1],p1[2],p3[2],p1[3],p3[3],layout=(3,2),size=(1000,800)) +plot(p1[1], p3[1], p1[2], p3[2], p1[3], p3[3], layout = (3, 2), size = (1000, 800)) ``` ```julia using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/AdaptiveSDE/Project.toml b/benchmarks/AdaptiveSDE/Project.toml index f9a562d48..1513ce1a0 100644 --- a/benchmarks/AdaptiveSDE/Project.toml +++ b/benchmarks/AdaptiveSDE/Project.toml @@ -4,14 +4,14 @@ Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" ParallelDataTransfer = "2dcacdae-9679-587a-88bb-8b444fb7085b" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -SciMLBenchmarks = "31c91b34-3c75-11e9-0341-95557aab0344" SDEProblemLibrary = "c72e72a9-a271-4b2b-8966-303ed956772e" +SciMLBenchmarks = "31c91b34-3c75-11e9-0341-95557aab0344" StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" [compat] DiffEqNoiseProcess = "5.0" ParallelDataTransfer = "0.5" Plots = "1.4" +SDEProblemLibrary = "0.1, 1" SciMLBenchmarks = "0.1" -SDEProblemLibrary = "0.1" StochasticDiffEq = "6.23" diff --git a/benchmarks/AdaptiveSDE/qmaxDetermination.jmd b/benchmarks/AdaptiveSDE/qmaxDetermination.jmd index 1317f7d09..558a49fda 100644 --- a/benchmarks/AdaptiveSDE/qmaxDetermination.jmd +++ b/benchmarks/AdaptiveSDE/qmaxDetermination.jmd @@ -4,29 +4,30 @@ author: Chris Rackauckas --- ```julia -qs = 1.0 .+ 2.0.^(-5:2) -times = Array{Float64}(undef,length(qs),4) -means = Array{Float64}(undef,length(qs),4) +qs = 1.0 .+ 2.0 .^ (-5:2) +times = Array{Float64}(undef, length(qs), 4) +means = Array{Float64}(undef, length(qs), 4) using StochasticDiffEq, SDEProblemLibrary, Random, Plots, ParallelDataTransfer, DiffEqMonteCarlo, Distributed Random.seed!(99) -full_prob = SDEProblemLibrary.oval2ModelExample(largeFluctuations=true,useBigs=false) +full_prob = SDEProblemLibrary.oval2ModelExample(largeFluctuations = true, useBigs = false) import SDEProblemLibrary: prob_sde_additivesystem, - prob_sde_additive, prob_sde_2Dlinear, prob_sde_linear, prob_sde_wave -prob = remake(full_prob,tspan=(0.0,1.0)) + prob_sde_additive, prob_sde_2Dlinear, prob_sde_linear, + prob_sde_wave +prob = remake(full_prob, tspan = (0.0, 1.0)) println("Solve once to compile.") -sol = solve(prob,EM(),dt=1/2^(18)) +sol = solve(prob, EM(), dt = 1/2^(18)) Int(sol.u[end][1]!=NaN) println("Compilation complete.") num_runs = 10000 -probs = Vector{SDEProblem}(undef,3) -p1 = Vector{Any}(undef,3) -p2 = Vector{Any}(undef,3) -p3 = Vector{Any}(undef,3) +probs = Vector{SDEProblem}(undef, 3) +p1 = Vector{Any}(undef, 3) +p2 = Vector{Any}(undef, 3) +p3 = Vector{Any}(undef, 3) ## Problem 1 probs[1] = prob_sde_linear ## Problem 2 @@ -38,15 +39,16 @@ println("Setup Complete") ## Timing Runs -function runAdaptive(i,k) - sol = solve(prob,SRIW1(),dt=1/2^(8),abstol=2.0^(-15),reltol=2.0^(-10), - verbose=false,maxIters=Int(1e12),qmax=qs[k]) - Int(any(isnan,sol[end]) || sol.t[end] != 1) +function runAdaptive(i, k) + sol = solve(prob, SRIW1(), dt = 1/2^(8), abstol = 2.0^(-15), reltol = 2.0^(-10), + verbose = false, maxIters = Int(1e12), qmax = qs[k]) + Int(any(isnan, sol[end]) || sol.t[end] != 1) end #Compile monte_prob = EnsembleProblem(probs[1]) -test_mc = solve(monte_prob,SRIW1(),dt=1/2^(4),adaptive=true,trajectories=1000,abstol=2.0^(-1),reltol=0) +test_mc = solve(monte_prob, SRIW1(), dt = 1/2^(4), adaptive = true, + trajectories = 1000, abstol = 2.0^(-1), reltol = 0) DiffEqBase.calculate_monte_errors(test_mc); ``` @@ -54,11 +56,11 @@ DiffEqBase.calculate_monte_errors(test_mc); ```julia for k in eachindex(qs) - global times - Random.seed!(99) - adaptiveTime = @elapsed numFails = sum(map((i)->runAdaptive(i,k),1:num_runs)) - println("k was $k. The number of Adaptive Fails is $numFails. Elapsed time was $adaptiveTime") - times[k,4] = adaptiveTime + global times + Random.seed!(99) + adaptiveTime = @elapsed numFails = sum(map((i)->runAdaptive(i, k), 1:num_runs)) + println("k was $k. The number of Adaptive Fails is $numFails. Elapsed time was $adaptiveTime") + times[k, 4] = adaptiveTime end ``` @@ -66,22 +68,23 @@ end ```julia for k in eachindex(probs) - global probs, times, means, qs - println("Problem $k") - ## Setup - prob = probs[k] + global probs, times, means, qs + println("Problem $k") + ## Setup + prob = probs[k] - for i in eachindex(qs) - msim = solve(monte_prob,dt=1/2^(4),SRIW1(),adaptive=true,trajectories=num_runs,abstol=2.0^(-13),reltol=0,qmax=qs[i]) - test_msim = DiffEqBase.calculate_monte_errors(msim) - times[i,k] = test_msim.elapsedTime - means[i,k] = test_msim.error_means[:final] - println("for k=$k and i=$i, we get that the error was $(means[i,k]) and it took $(times[i,k]) seconds") - end + for i in eachindex(qs) + msim = solve(monte_prob, dt = 1/2^(4), SRIW1(), adaptive = true, + trajectories = num_runs, abstol = 2.0^(-13), reltol = 0, qmax = qs[i]) + test_msim = DiffEqBase.calculate_monte_errors(msim) + times[i, k] = test_msim.elapsedTime + means[i, k] = test_msim.error_means[:final] + println("for k=$k and i=$i, we get that the error was $(means[i,k]) and it took $(times[i,k]) seconds") + end end ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/AstroChem/astrochem.jmd b/benchmarks/AstroChem/astrochem.jmd index 954544630..51bb0e339 100644 --- a/benchmarks/AstroChem/astrochem.jmd +++ b/benchmarks/AstroChem/astrochem.jmd @@ -57,7 +57,7 @@ function get_heating(H, H2, E, tgas, ntot, dust2gas) heats = [ cosmic_ionisation_rate * (5.5e-12 * H + 2.5e-11 * H2), get_photoelectric_heating(H, E, tgas, gnot, ntot, dust2gas), - 6.4e-13 * rate_H2 * H2, + 6.4e-13 * rate_H2 * H2 ] return sum(heats) @@ -147,7 +147,8 @@ function cooling_H2(H, H2, temp) logt38 = logt37 * logt3 if temp < 2e3 - HDLR = (9.5e-22 * t3^3.76) / (1.0 + 0.12 * t3^2.1) * exp(-((0.13 / t3)^3)) + 3.0e-24 * exp(-0.51 / t3) + HDLR = (9.5e-22 * t3^3.76) / (1.0 + 0.12 * t3^2.1) * exp(-((0.13 / t3)^3)) + + 3.0e-24 * exp(-0.51 / t3) HDLV = 6.7e-19 * exp(-5.86 / t3) + 1.6e-18 * exp(-11.7 / t3) HDL = HDLR + HDLV elseif 2e3 <= temp <= 1e4 @@ -224,57 +225,64 @@ function cooling_H2(H, H2, temp) return cool end -function get_heating_cooling(T, H2, O, C, O⁺, OH⁺, H, H2O⁺, H3O⁺, E, H2O, OH, C⁺, CO, CO⁺, H⁺, HCO⁺, dust2gas) +function get_heating_cooling( + T, H2, O, C, O⁺, OH⁺, H, H2O⁺, H3O⁺, E, H2O, OH, C⁺, CO, CO⁺, H⁺, HCO⁺, dust2gas) ntot = get_ntot(H2, O, C, O⁺, OH⁺, H, H2O⁺, H3O⁺, E, H2O, OH, C⁺, CO, CO⁺, H⁺, HCO⁺) - return (gamma_ad - 1e0) * (get_heating(H, H2, E, T, ntot, dust2gas) - get_cooling(H, H2, O, E, T)) / kboltzmann / ntot + return (gamma_ad - 1e0) * + (get_heating(H, H2, E, T, ntot, dust2gas) - get_cooling(H, H2, O, E, T)) / + kboltzmann / ntot end function get_ntot(H2, O, C, O⁺, OH⁺, H, H2O⁺, H3O⁺, E, H2O, OH, C⁺, CO, CO⁺, H⁺, HCO⁺) return sum([H2 O C O⁺ OH⁺ H H2O⁺ H3O⁺ E H2O OH C⁺ CO CO⁺ H⁺ HCO⁺]) end -ka_reaction(Tgas, α=1.0, β=1.0, γ=0.0) = α*(Tgas/300)^β*exp(−γ / Tgas) - +ka_reaction(Tgas, α = 1.0, β = 1.0, γ = 0.0) = α*(Tgas/300)^β*exp(−γ / Tgas) # CONTINUE HERE # Try this: https://docs.sciml.ai/Catalyst/stable/catalyst_functionality/constraint_equations/#Coupling-ODE-constraints-via-directly-building-a-ReactionSystem - @variables t T(t) = 100.0 # Define the variables before the species! @species H2(t) O(t) C(t) O⁺(t) OH⁺(t) H(t) H2O⁺(t) H3O⁺(t) E(t) H2O(t) OH(t) C⁺(t) CO(t) CO⁺(t) H⁺(t) HCO⁺(t) @parameters cosmic_ionisation_rate radiation_field dust2gas D = Differential(t) reaction_equations = [ - (@reaction 1.6e-9, $O⁺ + $H2 --> $OH⁺ + $H), - (@reaction 1e-9, $OH⁺ + $H2 --> $H2O⁺ + $H), - (@reaction 6.1e-10, $H2O⁺ + $H2 --> $H3O⁺ + $H), - (@reaction ka_reaction(T, 1.1e-7, -1/2), $H3O⁺ + $E --> $H2O + $H), - (@reaction ka_reaction(T, 8.6e-8, -1/2), $H2O⁺ + $E --> $OH + $H), - (@reaction ka_reaction(T, 3.9e-8, -1/2), $H2O⁺ + $E --> $O + $H2), - (@reaction ka_reaction(T, 6.3e-9, -0.48), $OH⁺ + $E --> $O + $H), - (@reaction ka_reaction(T, 3.4e-12, -0.63), $O⁺ + $E --> $O), - (@reaction 2.8 * cosmic_ionisation_rate, $O --> $O⁺ + $E), - (@reaction 2.62 * cosmic_ionisation_rate, $C --> $C⁺ + $E), - (@reaction 5.0 * cosmic_ionisation_rate, $CO --> $C + $O), - (@reaction ka_reaction(T, 4.4e-12, -0.61), $C⁺ + $E --> $C), - (@reaction ka_reaction(T, 1.15e-10, -0.339), $C⁺ + $OH --> CO + $H), - (@reaction 9.15e-10 * (0.62 + 0.4767 * 5.5 * sqrt(300 / T)), $C⁺ + $OH --> $CO⁺ + $H), - (@reaction 4e-10, $CO⁺ + $H --> $CO + $H⁺), - (@reaction 7.28e-10, $CO⁺ + $H2 --> $HCO⁺ + $H), - (@reaction ka_reaction(T, 2.8e-7, -0.69), $HCO⁺ + $E --> $CO + $H), - (@reaction ka_reaction(T, 3.5e-12, -0.7), $H⁺ + $E --> $H), - (@reaction 2.121e-17 * dust2gas / 1e-2, $H + $H --> $H2), + (@reaction 1.6e-9, $O⁺ + $H2 --> $OH⁺ + $H), + (@reaction 1e-9, $OH⁺ + $H2 --> $H2O⁺ + $H), + (@reaction 6.1e-10, $H2O⁺ + $H2 --> $H3O⁺ + $H), + (@reaction ka_reaction(T, 1.1e-7, -1/2), $H3O⁺ + $E --> $H2O + $H), + (@reaction ka_reaction(T, 8.6e-8, -1/2), $H2O⁺ + $E --> $OH + $H), + (@reaction ka_reaction(T, 3.9e-8, -1/2), $H2O⁺ + $E --> $O + $H2), + (@reaction ka_reaction(T, 6.3e-9, -0.48), $OH⁺ + $E --> $O + $H), + (@reaction ka_reaction(T, 3.4e-12, -0.63), $O⁺ + $E --> $O), + (@reaction 2.8 * cosmic_ionisation_rate, $O --> $O⁺ + $E), + (@reaction 2.62 * cosmic_ionisation_rate, $C --> $C⁺ + $E), + (@reaction 5.0 * cosmic_ionisation_rate, $CO --> $C + $O), + (@reaction ka_reaction(T, 4.4e-12, -0.61), $C⁺ + $E --> $C), + (@reaction ka_reaction(T, 1.15e-10, -0.339), $C⁺ + $OH --> CO + $H), + (@reaction 9.15e-10 * (0.62 + 0.4767 * 5.5 * sqrt(300 / T)), $C⁺ + $OH --> $CO⁺ + $H), + (@reaction 4e-10, $CO⁺ + $H --> $CO + $H⁺), + (@reaction 7.28e-10, $CO⁺ + $H2 --> $HCO⁺ + $H), + (@reaction ka_reaction(T, 2.8e-7, -0.69), $HCO⁺ + $E --> $CO + $H), + (@reaction ka_reaction(T, 3.5e-12, -0.7), $H⁺ + $E --> $H), + (@reaction 2.121e-17 * dust2gas / 1e-2, $H + $H --> $H2), (@reaction 1e-1 * cosmic_ionisation_rate, $H2 --> $H + $H), - (@reaction 3.39e-10 * radiation_field, $C --> $C⁺ + $E), - (@reaction 2.43e-10 * radiation_field, $CO --> $C + $O), - (@reaction 7.72e-10 * radiation_field, $H2O --> $OH + $H), - # (D(T) ~ get_heating_cooling(T, H2, O, C, O⁺, OH⁺, H, H2O⁺, H3O⁺, E, H2O, OH, C⁺, CO, CO⁺, H⁺, HCO⁺, dust2gas)) + (@reaction 3.39e-10 * radiation_field, $C --> $C⁺ + $E), + (@reaction 2.43e-10 * radiation_field, $CO --> $C + $O), + (@reaction 7.72e-10 * radiation_field, $H2O --> $OH + $H) # (D(T) ~ get_heating_cooling(T, H2, O, C, O⁺, OH⁺, H, H2O⁺, H3O⁺, E, H2O, OH, C⁺, CO, CO⁺, H⁺, HCO⁺, dust2gas)) ] @named system = ReactionSystem(reaction_equations, t) -u0 = [:H2 => number_density, :O => number_density*2e-4, :C => number_density*1e-4, :O⁺=>minimum_fractional_density, :OH⁺=>minimum_fractional_density, :H=> minimum_fractional_density, :H2O⁺=> minimum_fractional_density, :H3O⁺=>minimum_fractional_density, :E=>minimum_fractional_density, :H2O=>minimum_fractional_density, :OH=>minimum_fractional_density, :C⁺=>minimum_fractional_density, :CO=>minimum_fractional_density, :CO⁺=>minimum_fractional_density, :H⁺=>minimum_fractional_density, :HCO⁺=> minimum_fractional_density, :T=> 100.0] +u0 = [:H2 => number_density, :O => number_density*2e-4, :C => number_density*1e-4, + :O⁺=>minimum_fractional_density, :OH⁺=>minimum_fractional_density, + :H => minimum_fractional_density, :H2O⁺ => minimum_fractional_density, + :H3O⁺=>minimum_fractional_density, :E=>minimum_fractional_density, + :H2O=>minimum_fractional_density, :OH=>minimum_fractional_density, + :C⁺=>minimum_fractional_density, :CO=>minimum_fractional_density, + :CO⁺=>minimum_fractional_density, :H⁺=>minimum_fractional_density, + :HCO⁺ => minimum_fractional_density, :T => 100.0] odesys = convert(ODESystem, complete(system)) @@ -299,7 +307,7 @@ sol = solve(oprob, Rodas5()) # Rodas5()) # Tsit5() # Generate a solution using high precision arithmetic bigprob = remake(oprob, u0 = big.(oprob.u0), tspan = big.(oprob.tspan)) -refsol = solve(bigprob, Rodas5P(), abstol=1e-18, reltol=1e-18) +refsol = solve(bigprob, Rodas5P(), abstol = 1e-18, reltol = 1e-18) ``` ```julia @@ -307,23 +315,23 @@ abstols = 1.0 ./ 10.0 .^ (7:13) reltols = 1.0 ./ 10.0 .^ (4:10) setups = [ - Dict(:alg=>FBDF()), - Dict(:alg=>QNDF()), - Dict(:alg=>Rodas4P()), - Dict(:alg=>CVODE_BDF()), - #Dict(:alg=>ddebdf()), - Dict(:alg=>Rodas4()), - Dict(:alg=>Rodas5P()), - #Dict(:alg=>rodas()), - #Dict(:alg=>radau()), - Dict(:alg=>lsoda()), - #Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = OrdinaryDiffEqCore.PolyesterThreads())), - Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = false)), - #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = OrdinaryDiffEqCore.PolyesterThreads())), - Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = false)), - ] -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;verbose=false, - save_everystep=false,appxsol=refsol,maxiters=Int(1e5),numruns=10) + Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), + Dict(:alg=>Rodas4P()), + Dict(:alg=>CVODE_BDF()), + #Dict(:alg=>ddebdf()), + Dict(:alg=>Rodas4()), + Dict(:alg=>Rodas5P()), + #Dict(:alg=>rodas()), + #Dict(:alg=>radau()), + Dict(:alg=>lsoda()), + #Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = OrdinaryDiffEqCore.PolyesterThreads())), + Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3, threading = false)), + #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = OrdinaryDiffEqCore.PolyesterThreads())), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = false)) +] +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; verbose = false, + save_everystep = false, appxsol = refsol, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -331,35 +339,43 @@ plot(wp) ```julia reaction_equations = [ - (@reaction 1.6e-9, $O⁺ + $H2 --> $OH⁺ + $H), - (@reaction 1e-9, $OH⁺ + $H2 --> $H2O⁺ + $H), - (@reaction 6.1e-10, $H2O⁺ + $H2 --> $H3O⁺ + $H), - (@reaction ka_reaction(T, 1.1e-7, -1/2), $H3O⁺ + $E --> $H2O + $H), - (@reaction ka_reaction(T, 8.6e-8, -1/2), $H2O⁺ + $E --> $OH + $H), - (@reaction ka_reaction(T, 3.9e-8, -1/2), $H2O⁺ + $E --> $O + $H2), - (@reaction ka_reaction(T, 6.3e-9, -0.48), $OH⁺ + $E --> $O + $H), - (@reaction ka_reaction(T, 3.4e-12, -0.63), $O⁺ + $E --> $O), - (@reaction 2.8 * cosmic_ionisation_rate, $O --> $O⁺ + $E), - (@reaction 2.62 * cosmic_ionisation_rate, $C --> $C⁺ + $E), - (@reaction 5.0 * cosmic_ionisation_rate, $CO --> $C + $O), - (@reaction ka_reaction(T, 4.4e-12, -0.61), $C⁺ + $E --> $C), - (@reaction ka_reaction(T, 1.15e-10, -0.339), $C⁺ + $OH --> CO + $H), - (@reaction 9.15e-10 * (0.62 + 0.4767 * 5.5 * sqrt(300 / T)), $C⁺ + $OH --> $CO⁺ + $H), - (@reaction 4e-10, $CO⁺ + $H --> $CO + $H⁺), - (@reaction 7.28e-10, $CO⁺ + $H2 --> $HCO⁺ + $H), - (@reaction ka_reaction(T, 2.8e-7, -0.69), $HCO⁺ + $E --> $CO + $H), - (@reaction ka_reaction(T, 3.5e-12, -0.7), $H⁺ + $E --> $H), - (@reaction 2.121e-17 * dust2gas / 1e-2, $H + $H --> $H2), + (@reaction 1.6e-9, $O⁺ + $H2 --> $OH⁺ + $H), + (@reaction 1e-9, $OH⁺ + $H2 --> $H2O⁺ + $H), + (@reaction 6.1e-10, $H2O⁺ + $H2 --> $H3O⁺ + $H), + (@reaction ka_reaction(T, 1.1e-7, -1/2), $H3O⁺ + $E --> $H2O + $H), + (@reaction ka_reaction(T, 8.6e-8, -1/2), $H2O⁺ + $E --> $OH + $H), + (@reaction ka_reaction(T, 3.9e-8, -1/2), $H2O⁺ + $E --> $O + $H2), + (@reaction ka_reaction(T, 6.3e-9, -0.48), $OH⁺ + $E --> $O + $H), + (@reaction ka_reaction(T, 3.4e-12, -0.63), $O⁺ + $E --> $O), + (@reaction 2.8 * cosmic_ionisation_rate, $O --> $O⁺ + $E), + (@reaction 2.62 * cosmic_ionisation_rate, $C --> $C⁺ + $E), + (@reaction 5.0 * cosmic_ionisation_rate, $CO --> $C + $O), + (@reaction ka_reaction(T, 4.4e-12, -0.61), $C⁺ + $E --> $C), + (@reaction ka_reaction(T, 1.15e-10, -0.339), $C⁺ + $OH --> CO + $H), + (@reaction 9.15e-10 * (0.62 + 0.4767 * 5.5 * sqrt(300 / T)), $C⁺ + $OH --> $CO⁺ + $H), + (@reaction 4e-10, $CO⁺ + $H --> $CO + $H⁺), + (@reaction 7.28e-10, $CO⁺ + $H2 --> $HCO⁺ + $H), + (@reaction ka_reaction(T, 2.8e-7, -0.69), $HCO⁺ + $E --> $CO + $H), + (@reaction ka_reaction(T, 3.5e-12, -0.7), $H⁺ + $E --> $H), + (@reaction 2.121e-17 * dust2gas / 1e-2, $H + $H --> $H2), (@reaction 1e-1 * cosmic_ionisation_rate, $H2 --> $H + $H), - (@reaction 3.39e-10 * radiation_field, $C --> $C⁺ + $E), - (@reaction 2.43e-10 * radiation_field, $CO --> $C + $O), - (@reaction 7.72e-10 * radiation_field, $H2O --> $OH + $H), - (D(T) ~ get_heating_cooling(T, H2, O, C, O⁺, OH⁺, H, H2O⁺, H3O⁺, E, H2O, OH, C⁺, CO, CO⁺, H⁺, HCO⁺, dust2gas)) + (@reaction 3.39e-10 * radiation_field, $C --> $C⁺ + $E), + (@reaction 2.43e-10 * radiation_field, $CO --> $C + $O), + (@reaction 7.72e-10 * radiation_field, $H2O --> $OH + $H), + (D(T) ~ get_heating_cooling( + T, H2, O, C, O⁺, OH⁺, H, H2O⁺, H3O⁺, E, H2O, OH, C⁺, CO, CO⁺, H⁺, HCO⁺, dust2gas)) ] @named system = ReactionSystem(reaction_equations, t) -u0 = [:H2 => number_density, :O => number_density*2e-4, :C => number_density*1e-4, :O⁺=>minimum_fractional_density, :OH⁺=>minimum_fractional_density, :H=> minimum_fractional_density, :H2O⁺=> minimum_fractional_density, :H3O⁺=>minimum_fractional_density, :E=>minimum_fractional_density, :H2O=>minimum_fractional_density, :OH=>minimum_fractional_density, :C⁺=>minimum_fractional_density, :CO=>minimum_fractional_density, :CO⁺=>minimum_fractional_density, :H⁺=>minimum_fractional_density, :HCO⁺=> minimum_fractional_density, :T=> 100.0] +u0 = [:H2 => number_density, :O => number_density*2e-4, :C => number_density*1e-4, + :O⁺=>minimum_fractional_density, :OH⁺=>minimum_fractional_density, + :H => minimum_fractional_density, :H2O⁺ => minimum_fractional_density, + :H3O⁺=>minimum_fractional_density, :E=>minimum_fractional_density, + :H2O=>minimum_fractional_density, :OH=>minimum_fractional_density, + :C⁺=>minimum_fractional_density, :CO=>minimum_fractional_density, + :CO⁺=>minimum_fractional_density, :H⁺=>minimum_fractional_density, + :HCO⁺ => minimum_fractional_density, :T => 100.0] odesys = convert(ODESystem, complete(system)) @@ -378,11 +394,11 @@ ssys = structural_simplify(sys) oprob = ODEProblem(ssys, [], tspan, params) println("Created the ODEproblem.") -refsol = solve(oprob, Rodas5P(), abstol=1e-14, reltol=1e-14) +refsol = solve(oprob, Rodas5P(), abstol = 1e-14, reltol = 1e-14) ``` ```julia -refsol = solve(oprob, Rodas5P(), abstol=1e-13, reltol=1e-13) +refsol = solve(oprob, Rodas5P(), abstol = 1e-13, reltol = 1e-13) # Run Benchmark @@ -390,24 +406,23 @@ abstols = 1.0 ./ 10.0 .^ (9:10) reltols = 1.0 ./ 10.0 .^ (9:10) setups = [ - Dict(:alg=>FBDF()), - Dict(:alg=>QNDF()), - Dict(:alg=>CVODE_BDF()), - #Dict(:alg=>ddebdf()), - Dict(:alg=>Rodas5P()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>KenCarp47()), - #Dict(:alg=>RadauIIA9()), - #Dict(:alg=>rodas()), - #Dict(:alg=>radau()), - Dict(:alg=>lsoda()), - #Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = OrdinaryDiffEqCore.PolyesterThreads())), - #Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = false)), - #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = OrdinaryDiffEqCore.PolyesterThreads())), - #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = false)), - ] -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;verbose=false, - save_everystep=false,appxsol=refsol,maxiters=Int(1e5),numruns=10, - print_names = true) + Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), + Dict(:alg=>CVODE_BDF()), + #Dict(:alg=>ddebdf()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>KenCarp47()), + #Dict(:alg=>RadauIIA9()), + #Dict(:alg=>rodas()), + #Dict(:alg=>radau()), + Dict(:alg=>lsoda()) #Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = OrdinaryDiffEqCore.PolyesterThreads())), + #Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = false)), + #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = OrdinaryDiffEqCore.PolyesterThreads())), + #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = false)), +] +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; verbose = false, + save_everystep = false, appxsol = refsol, maxiters = Int(1e5), numruns = 10, + print_names = true) plot(wp) -``` \ No newline at end of file +``` diff --git a/benchmarks/AstroChem/nelson.jmd b/benchmarks/AstroChem/nelson.jmd index 78d7a4e8a..28d8e7f9d 100644 --- a/benchmarks/AstroChem/nelson.jmd +++ b/benchmarks/AstroChem/nelson.jmd @@ -11,18 +11,18 @@ using ODEInterface, ODEInterfaceDiffEq using RecursiveFactorization ``` -The ODE function defined below models the reduced carbon-oxygen +The ODE function defined below models the reduced carbon-oxygen chemistry network of Nelson & Langer (1999, ApJ, 524, 923). This Julia ODE function was written by Nina De La Torre advised by Dr. Stella Offner. -The solution was compared with results derived by DESPOTIC, (Mark Krumholz, 2013) -a code to Derive the Energetics and Spectra of Optically Thick Insterstellar Clouds. -DESPOTIC has pre-defined networks, one of them coming from the Nelson & Langer paper, +The solution was compared with results derived by DESPOTIC, (Mark Krumholz, 2013) +a code to Derive the Energetics and Spectra of Optically Thick Insterstellar Clouds. +DESPOTIC has pre-defined networks, one of them coming from the Nelson & Langer paper, so the initial conditions and parameters were meant to mimic those from DESPOTIC. -Note: The composite hydrocarbon radical CHx represents both CH and CH2, +Note: The composite hydrocarbon radical CHx represents both CH and CH2, the composite oxygen species OHx represents OH, H2O, O2 and their ions, -and M represents the low ionization potential metals Mg, Fe, Ca, and Na. +and M represents the low ionization potential metals Mg, Fe, Ca, and Na. Parameter definitions: T = 10 --> Temperature (Kelvin) @@ -32,110 +32,109 @@ and M represents the low ionization potential metals Mg, Fe, Ca, and Na. shield = 1 --> "CO self-shielding factor of van Dishoeck & Black (1988), taken from Bergin et al. (1995)" ```julia -function Nelson!(du,u,p,t) +function Nelson!(du, u, p, t) T, Av, Go, n_H, shield = p # 1: H2 - du[1] = -1.2e-17 * u[1] + - n_H * (1.9e-6 * u[2] * u[3]) / (T^0.54) - - n_H * 4e-16 * u[1] * u[12] - - n_H * 7e-15 * u[1] * u[5] + - n_H * 1.7e-9 * u[10] * u[2] + - n_H * 2e-9 * u[2] * u[6] + - n_H * 2e-9 * u[2] * u[14] + - n_H * 8e-10 * u[2] * u[8] + du[1] = -1.2e-17 * u[1] + + n_H * (1.9e-6 * u[2] * u[3]) / (T^0.54) - + n_H * 4e-16 * u[1] * u[12] - + n_H * 7e-15 * u[1] * u[5] + + n_H * 1.7e-9 * u[10] * u[2] + + n_H * 2e-9 * u[2] * u[6] + + n_H * 2e-9 * u[2] * u[14] + + n_H * 8e-10 * u[2] * u[8] # 2: H3+ - du[2] = 1.2e-17 * u[1] + - n_H * (-1.9e-6 * u[3] * u[2]) / (T^0.54) - - n_H * 1.7e-9 * u[10] * u[2] - - n_H * 2e-9 * u[2] * u[6] - - n_H * 2e-9 * u[2] * u[14] - + du[2] = 1.2e-17 * u[1] + + n_H * (-1.9e-6 * u[3] * u[2]) / (T^0.54) - + n_H * 1.7e-9 * u[10] * u[2] - + n_H * 2e-9 * u[2] * u[6] - + n_H * 2e-9 * u[2] * u[14] - n_H * 8e-10 * u[2] * u[8] # 3: e - du[3] = n_H * (-1.4e-10 * u[3] * u[12]) / (T^0.61) - - n_H * (3.8e-10 * u[13] * u[3]) / (T^0.65) - - n_H * (3.3e-5 * u[11] * u[3]) / T + - 1.2e-17 * u[1] - - n_H * (1.9e-6 * u[3] * u[2]) / (T^0.54) + - 6.8e-18 * u[4] - - n_H * (9e-11 * u[3] * u[5]) / (T^0.64) + + du[3] = n_H * (-1.4e-10 * u[3] * u[12]) / (T^0.61) - + n_H * (3.8e-10 * u[13] * u[3]) / (T^0.65) - + n_H * (3.3e-5 * u[11] * u[3]) / T + + 1.2e-17 * u[1] - + n_H * (1.9e-6 * u[3] * u[2]) / (T^0.54) + + 6.8e-18 * u[4] - + n_H * (9e-11 * u[3] * u[5]) / (T^0.64) + 3e-10 * Go * exp(-3 * Av) * u[6] + n_H * 2e-9 * u[2] * u[13] - + 2.0e-10 * Go * exp(-1.9 * Av) * u[14] + + 2.0e-10 * Go * exp(-1.9 * Av) * u[14] # 4: He - du[4] = n_H * (9e-11 * u[3] * u[5]) / (T^0.64) - - 6.8e-18 * u[4] + - n_H * 7e-15 * u[1] * u[5] + + du[4] = n_H * (9e-11 * u[3] * u[5]) / (T^0.64) - + 6.8e-18 * u[4] + + n_H * 7e-15 * u[1] * u[5] + n_H * 1.6e-9 * u[10] * u[5] # 5: He+ - du[5] = 6.8e-18 * u[4] - - n_H * (9e-11 * u[3] * u[5]) / (T^0.64) - - n_H * 7e-15 * u[1] * u[5] - + du[5] = 6.8e-18 * u[4] - + n_H * (9e-11 * u[3] * u[5]) / (T^0.64) - + n_H * 7e-15 * u[1] * u[5] - n_H * 1.6e-9 * u[10] * u[5] # 6: C - du[6] = n_H * (1.4e-10 * u[3] * u[12]) / (T^0.61) - - n_H * 2e-9 * u[2] * u[6] - - n_H * 5.8e-12 * (T^0.5) * u[9] * u[6] + - 1e-9 * Go * exp(-1.5 * Av) * u[7] - - 3e-10 * Go * exp(-3 * Av) * u[6] + + du[6] = n_H * (1.4e-10 * u[3] * u[12]) / (T^0.61) - + n_H * 2e-9 * u[2] * u[6] - + n_H * 5.8e-12 * (T^0.5) * u[9] * u[6] + + 1e-9 * Go * exp(-1.5 * Av) * u[7] - + 3e-10 * Go * exp(-3 * Av) * u[6] + 1e-10 * Go * exp(-3 * Av) * u[10] * shield # 7: CHx - du[7] = n_H * (-2e-10) * u[7] * u[8] + - n_H * 4e-16 * u[1] * u[12] + - n_H * 2e-9 * u[2] * u[6] - + du[7] = n_H * (-2e-10) * u[7] * u[8] + + n_H * 4e-16 * u[1] * u[12] + + n_H * 2e-9 * u[2] * u[6] - 1e-9 * Go * u[7] * exp(-1.5 * Av) # 8: O - du[8] = n_H * (-2e-10) * u[7] * u[8] + - n_H * 1.6e-9 * u[10] * u[5] - - n_H * 8e-10 * u[2] * u[8] + - 5e-10 * Go * exp(-1.7 * Av) * u[9] + + du[8] = n_H * (-2e-10) * u[7] * u[8] + + n_H * 1.6e-9 * u[10] * u[5] - + n_H * 8e-10 * u[2] * u[8] + + 5e-10 * Go * exp(-1.7 * Av) * u[9] + 1e-10 * Go * exp(-3 * Av) * u[10] * shield # 9: OHx - du[9] = n_H * (-1e-9) * u[9] * u[12] + - n_H * 8e-10 * u[2] * u[8] - - n_H * 5.8e-12 * (T^0.5) * u[9] * u[6] - + du[9] = n_H * (-1e-9) * u[9] * u[12] + + n_H * 8e-10 * u[2] * u[8] - + n_H * 5.8e-12 * (T^0.5) * u[9] * u[6] - 5e-10 * Go * exp(-1.7 * Av) * u[9] # 10: CO - du[10] = n_H * (3.3e-5 * u[11] * u[3]) / T + - n_H * 2e-10 * u[7] * u[8] - - n_H * 1.7e-9 * u[10] * u[2] - - n_H * 1.6e-9 * u[10] * u[5] + - n_H * 5.8e-12 * (T^0.5) * u[9] * u[6] - - 1e-10 * Go * exp(-3 * Av) * u[10] + + du[10] = n_H * (3.3e-5 * u[11] * u[3]) / T + + n_H * 2e-10 * u[7] * u[8] - + n_H * 1.7e-9 * u[10] * u[2] - + n_H * 1.6e-9 * u[10] * u[5] + + n_H * 5.8e-12 * (T^0.5) * u[9] * u[6] - + 1e-10 * Go * exp(-3 * Av) * u[10] + 1.5e-10 * Go * exp(-2.5 * Av) * u[11] * shield # 11: HCO+ - du[11] = n_H * (-3.3e-5 * u[11] * u[3]) / T + - n_H * 1e-9 * u[9] * u[12] + - n_H * 1.7e-9 * u[10] * u[2] - + du[11] = n_H * (-3.3e-5 * u[11] * u[3]) / T + + n_H * 1e-9 * u[9] * u[12] + + n_H * 1.7e-9 * u[10] * u[2] - 1.5e-10 * Go * exp(-2.5 * Av) * u[11] # 12: C+ - du[12] = n_H * (-1.4e-10 * u[3] * u[12]) / (T^0.61) - - n_H * 4e-16 * u[1] * u[12] - - n_H * 1e-9 * u[9] * u[12] + - n_H * 1.6e-9 * u[10] * u[5] + + du[12] = n_H * (-1.4e-10 * u[3] * u[12]) / (T^0.61) - + n_H * 4e-16 * u[1] * u[12] - + n_H * 1e-9 * u[9] * u[12] + + n_H * 1.6e-9 * u[10] * u[5] + 3e-10 * Go * exp(-3 * Av) * u[6] # 13: M+ - du[13] = n_H * (-3.8e-10 * u[13] * u[3]) / (T^0.65) + + du[13] = n_H * (-3.8e-10 * u[13] * u[3]) / (T^0.65) + n_H * 2e-9 * u[2] * u[14] + 2.0e-10 * Go * exp(-1.9 * Av) * u[14] # 14: M - du[14] = n_H * (3.8e-10 * u[13] * u[3]) / (T^0.65) - + du[14] = n_H * (3.8e-10 * u[13] * u[3]) / (T^0.65) - n_H * 2e-9 * u[2] * u[14] - 2.0e-10 * Go * exp(-1.9 * Av) * u[14] - end # Set the Timespan, Parameters, and Initial Conditions @@ -143,28 +142,28 @@ seconds_per_year = 3600 * 24 * 365 tspan = (0.0, 30000 * seconds_per_year) # ~30 thousand yrs params = (10, # T - 2, # Av - 1.7, # Go - 611, # n_H - 1) # shield + 2, # Av + 1.7, # Go + 611, # n_H + 1) # shield u0 = [0.5, # 1: H2 - 9.059e-9, # 2: H3+ - 2.0e-4, # 3: e - 0.1, # 4: He - 7.866e-7, # 5: He+ - 0.0, # 6: C - 0.0, # 7: CHx - 0.0004, # 8: O - 0.0, # 9: OHx - 0.0, # 10: CO - 0.0, # 11: HCO+ - 0.0002, # 12: C+ - 2.0e-7, # 13: M+ - 2.0e-7] # 14: M + 9.059e-9, # 2: H3+ + 2.0e-4, # 3: e + 0.1, # 4: He + 7.866e-7, # 5: He+ + 0.0, # 6: C + 0.0, # 7: CHx + 0.0004, # 8: O + 0.0, # 9: OHx + 0.0, # 10: CO + 0.0, # 11: HCO+ + 0.0002, # 12: C+ + 2.0e-7, # 13: M+ + 2.0e-7] # 14: M prob = ODEProblem(Nelson!, u0, tspan, params) -refsol = solve(prob, Vern9(), abstol=1e-14, reltol=1e-14) +refsol = solve(prob, Vern9(), abstol = 1e-14, reltol = 1e-14) sol1 = solve(prob, Rodas5P()) sol2 = solve(prob, FBDF()) sol3 = solve(prob, lsoda()) @@ -176,12 +175,16 @@ sol4 = solve(prob, lsoda(), saveat = 1e10) ```julia using Plots colors = palette(:acton, 5) -p1 = plot(sol1, vars = (0,11), lc=colors[1], legend = false, titlefontsize = 12, lw = 3, title = "Rodas5") -p2 = plot(sol2, vars = (0,11), lc=colors[2], legend = false, titlefontsize = 12, lw = 3, title = "FBDF") -p3 = plot(sol3, vars = (0,11), lc=colors[3], legend = false, titlefontsize = 12, lw = 3, title = "lsoda") -p4 = plot(sol4, vars = (0,11), lc=colors[4], legend = false, titlefontsize = 12, lw = 3, title = "lsoda with saveat") - -combined_plot = plot(p1, p2, p3, p4, layout=(4, 1), dpi = 600, pallete=:acton) +p1 = plot(sol1, vars = (0, 11), lc = colors[1], legend = false, + titlefontsize = 12, lw = 3, title = "Rodas5") +p2 = plot(sol2, vars = (0, 11), lc = colors[2], legend = false, + titlefontsize = 12, lw = 3, title = "FBDF") +p3 = plot(sol3, vars = (0, 11), lc = colors[3], legend = false, + titlefontsize = 12, lw = 3, title = "lsoda") +p4 = plot(sol4, vars = (0, 11), lc = colors[4], legend = false, + titlefontsize = 12, lw = 3, title = "lsoda with saveat") + +combined_plot = plot(p1, p2, p3, p4, layout = (4, 1), dpi = 600, pallete = :acton) ``` ## Run Benchmark @@ -191,26 +194,26 @@ abstols = 1.0 ./ 10.0 .^ (8:10) reltols = 1.0 ./ 10.0 .^ (8:10) setups = [ - Dict(:alg=>FBDF()), - Dict(:alg=>QNDF()), - #Dict(:alg=>Rodas4P()), - Dict(:alg=>CVODE_BDF()), - #Dict(:alg=>ddebdf()), - #Dict(:alg=>Rodas4()), - Dict(:alg=>Rodas5P()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>KenCarp47()), - Dict(:alg=>RadauIIA9()), - Dict(:alg=>lsoda()), - #Dict(:alg=>rodas()), - #Dict(:alg=>radau()), - #Dict(:alg=>lsoda()), - #Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = OrdinaryDiffEqCore.PolyesterThreads())), - #Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = false)), - #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = OrdinaryDiffEqCore.PolyesterThreads())), - #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = false)), - ] - -wp = WorkPrecisionSet(prob,abstols,reltols,setups;appxsol=refsol,save_everystep=false, print_names = true) + Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), + #Dict(:alg=>Rodas4P()), + Dict(:alg=>CVODE_BDF()), + #Dict(:alg=>ddebdf()), + #Dict(:alg=>Rodas4()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>KenCarp47()), + Dict(:alg=>RadauIIA9()), + Dict(:alg=>lsoda()) #Dict(:alg=>rodas()), + #Dict(:alg=>radau()), + #Dict(:alg=>lsoda()), + #Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = OrdinaryDiffEqCore.PolyesterThreads())), + #Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = false)), + #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = OrdinaryDiffEqCore.PolyesterThreads())), + #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = false)), +] + +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = refsol, + save_everystep = false, print_names = true) plot(wp) ``` diff --git a/benchmarks/AutomaticDifferentiation/BrussScaling.jmd b/benchmarks/AutomaticDifferentiation/BrussScaling.jmd index f664a90b7..d746edcc4 100644 --- a/benchmarks/AutomaticDifferentiation/BrussScaling.jmd +++ b/benchmarks/AutomaticDifferentiation/BrussScaling.jmd @@ -1,339 +1,391 @@ ---- -title: Bruss Scaling PDE Differentaition Benchmarks -author: Chris Rackauckas and Yingbo Ma ---- - -From the paper [A Comparison of Automatic Differentiation and Continuous Sensitivity Analysis for Derivatives of Differential Equation Solutions](https://ieeexplore.ieee.org/abstract/document/9622796) - -```julia -using OrdinaryDiffEq, ReverseDiff, ForwardDiff, FiniteDiff, SciMLSensitivity -using LinearAlgebra, Tracker, Plots -``` - -```julia -function makebrusselator(N=8) - xyd_brusselator = range(0,stop=1,length=N) - function limit(a, N) - if a == N+1 - return 1 - elseif a == 0 - return N - else - return a - end - end - brusselator_f(x, y, t) = ifelse((((x-0.3)^2 + (y-0.6)^2) <= 0.1^2) && - (t >= 1.1), 5., 0.) - brusselator_2d_loop = let N=N, xyd=xyd_brusselator, dx=step(xyd_brusselator) - function brusselator_2d_loop(du, u, p, t) - @inbounds begin - ii1 = N^2 - ii2 = ii1+N^2 - ii3 = ii2+2(N^2) - A = @view p[1:ii1] - B = @view p[ii1+1:ii2] - α = @view p[ii2+1:ii3] - II = LinearIndices((N, N, 2)) - for I in CartesianIndices((N, N)) - x = xyd[I[1]] - y = xyd[I[2]] - i = I[1] - j = I[2] - ip1 = limit(i+1, N); im1 = limit(i-1, N) - jp1 = limit(j+1, N); jm1 = limit(j-1, N) - du[II[i,j,1]] = α[II[i,j,1]]*(u[II[im1,j,1]] + u[II[ip1,j,1]] + u[II[i,jp1,1]] + u[II[i,jm1,1]] - 4u[II[i,j,1]])/dx^2 + - B[II[i,j,1]] + u[II[i,j,1]]^2*u[II[i,j,2]] - (A[II[i,j,1]] + 1)*u[II[i,j,1]] + brusselator_f(x, y, t) - end - for I in CartesianIndices((N, N)) - i = I[1] - j = I[2] - ip1 = limit(i+1, N) - im1 = limit(i-1, N) - jp1 = limit(j+1, N) - jm1 = limit(j-1, N) - du[II[i,j,2]] = α[II[i,j,2]]*(u[II[im1,j,2]] + u[II[ip1,j,2]] + u[II[i,jp1,2]] + u[II[i,jm1,2]] - 4u[II[i,j,2]])/dx^2 + - A[II[i,j,1]]*u[II[i,j,1]] - u[II[i,j,1]]^2*u[II[i,j,2]] - end - return nothing - end - end - end - function init_brusselator_2d(xyd) - N = length(xyd) - u = zeros(N, N, 2) - for I in CartesianIndices((N, N)) - x = xyd[I[1]] - y = xyd[I[2]] - u[I,1] = 22*(y*(1-y))^(3/2) - u[I,2] = 27*(x*(1-x))^(3/2) - end - vec(u) - end - dx = step(xyd_brusselator) - e1 = ones(N-1) - off = N-1 - e4 = ones(N-off) - T = diagm(0=>-2ones(N), -1=>e1, 1=>e1, off=>e4, -off=>e4) ./ dx^2 - Ie = Matrix{Float64}(I, N, N) - # A + df/du - Op = kron(Ie, T) + kron(T, Ie) - brusselator_jac = let N=N - (J,a,p,t) -> begin - ii1 = N^2 - ii2 = ii1+N^2 - ii3 = ii2+2(N^2) - A = @view p[1:ii1] - B = @view p[ii1+1:ii2] - α = @view p[ii2+1:ii3] - u = @view a[1:end÷2] - v = @view a[end÷2+1:end] - N2 = length(a)÷2 - α1 = @view α[1:end÷2] - α2 = @view α[end÷2+1:end] - fill!(J, 0) - - J[1:N2, 1:N2] .= α1.*Op - J[N2+1:end, N2+1:end] .= α2.*Op - - J1 = @view J[1:N2, 1:N2] - J2 = @view J[N2+1:end, 1:N2] - J3 = @view J[1:N2, N2+1:end] - J4 = @view J[N2+1:end, N2+1:end] - J1[diagind(J1)] .+= @. 2u*v-(A+1) - J2[diagind(J2)] .= @. A-2u*v - J3[diagind(J3)] .= @. u^2 - J4[diagind(J4)] .+= @. -u^2 - nothing - end - end - Jmat = zeros(2N*N, 2N*N) - dp = zeros(2N*N, 4N*N) - brusselator_comp = let N=N, xyd=xyd_brusselator, dx=step(xyd_brusselator), Jmat=Jmat, dp=dp, brusselator_jac=brusselator_jac - function brusselator_comp(dus, us, p, t) - @inbounds begin - ii1 = N^2 - ii2 = ii1+N^2 - ii3 = ii2+2(N^2) - @views u, s = us[1:ii2], us[ii2+1:end] - du = @view dus[1:ii2] - ds = @view dus[ii2+1:end] - fill!(dp, 0) - A = @view p[1:ii1] - B = @view p[ii1+1:ii2] - α = @view p[ii2+1:ii3] - dfdα = @view dp[:, ii2+1:ii3] - diagind(dfdα) - for i in 1:ii1 - dp[i, ii1+i] = 1 - end - II = LinearIndices((N, N, 2)) - uu = @view u[1:end÷2] - for i in eachindex(uu) - dp[i, i] = -uu[i] - dp[i+ii1, i] = uu[i] - end - for I in CartesianIndices((N, N)) - x = xyd[I[1]] - y = xyd[I[2]] - i = I[1] - j = I[2] - ip1 = limit(i+1, N); im1 = limit(i-1, N) - jp1 = limit(j+1, N); jm1 = limit(j-1, N) - au = dfdα[II[i,j,1],II[i,j,1]] = (u[II[im1,j,1]] + u[II[ip1,j,1]] + u[II[i,jp1,1]] + u[II[i,jm1,1]] - 4u[II[i,j,1]])/dx^2 - du[II[i,j,1]] = α[II[i,j,1]]*(au) + B[II[i,j,1]] + u[II[i,j,1]]^2*u[II[i,j,2]] - (A[II[i,j,1]] + 1)*u[II[i,j,1]] + brusselator_f(x, y, t) - end - for I in CartesianIndices((N, N)) - i = I[1] - j = I[2] - ip1 = limit(i+1, N) - im1 = limit(i-1, N) - jp1 = limit(j+1, N) - jm1 = limit(j-1, N) - av = dfdα[II[i,j,2],II[i,j,2]] = (u[II[im1,j,2]] + u[II[ip1,j,2]] + u[II[i,jp1,2]] + u[II[i,jm1,2]] - 4u[II[i,j,2]])/dx^2 - du[II[i,j,2]] = α[II[i,j,2]]*(av) + A[II[i,j,1]]*u[II[i,j,1]] - u[II[i,j,1]]^2*u[II[i,j,2]] - end - brusselator_jac(Jmat,u,p,t) - BLAS.gemm!('N', 'N', 1., Jmat, reshape(s, 2N*N, 4N*N), 1., dp) - copyto!(ds, vec(dp)) - return nothing - end - end - end - u0 = init_brusselator_2d(xyd_brusselator) - p = [fill(3.4,N^2); fill(1.,N^2); fill(10.,2*N^2)] - brusselator_2d_loop, u0, p, brusselator_jac, ODEProblem(brusselator_comp, copy([u0;zeros((N^2*2)*(N^2*4))]), (0.,10.), p) -end - -Base.eps(::Type{Tracker.TrackedReal{T}}) where T = eps(T) -Base.vec(v::Adjoint{<:Real, <:AbstractVector}) = vec(v') # bad bad hack -``` - -## Setup AutoDiff - -```julia -bt = 0:0.1:1 -tspan = (0.0, 1.0) -forwarddiffn = vcat(2:10,12,15) -reversediffn = 2:10 -numdiffn = vcat(2:10,12) -csan = vcat(2:10,12,15,17) -#csaseedn = 2:10 -tols = (abstol=1e-5, reltol=1e-7) - -@isdefined(PROBS) || (const PROBS = Dict{Int,Any}()) -makebrusselator!(dict, n) = get!(()->makebrusselator(n), dict, n) - -_adjoint_methods = ntuple(3) do ii - Alg = (InterpolatingAdjoint, QuadratureAdjoint, BacksolveAdjoint)[ii] - ( - user = Alg(autodiff=false,autojacvec=false), # user Jacobian - adjc = Alg(autodiff=true,autojacvec=false), # AD Jacobian - advj = Alg(autodiff=true,autojacvec=EnzymeVJP()), # AD vJ - ) -end |> NamedTuple{(:interp, :quad, :backsol)} -@isdefined(ADJOINT_METHODS) || (const ADJOINT_METHODS = mapreduce(collect, vcat, _adjoint_methods)) - -function auto_sen_l2(f, u0, tspan, p, t, alg=Tsit5(); diffalg=ReverseDiff.gradient, kwargs...) - test_f(p) = begin - prob = ODEProblem{true, SciMLBase.FullSpecialize}(f,convert.(eltype(p),u0),tspan,p) - sol = solve(prob,alg,saveat=t; kwargs...) - sum(sol.u) do x - sum(z->(1-z)^2/2, x) - end - end - diffalg(test_f, p) -end -@inline function diffeq_sen_l2(df, u0, tspan, p, t, alg=Tsit5(); - abstol=1e-5, reltol=1e-7, iabstol=abstol, ireltol=reltol, - sensalg=SensitivityAlg(), kwargs...) - prob = ODEProblem{true, SciMLBase.FullSpecialize}(df,u0,tspan,p) - saveat = tspan[1] != t[1] && tspan[end] != t[end] ? vcat(tspan[1],t,tspan[end]) : t - sol = solve(prob, alg, abstol=abstol, reltol=reltol, saveat=saveat; kwargs...) - dg(out,u,p,t,i) = (out.=u.-1.0) - adjoint_sensitivities(sol,alg;t,abstol=abstol,dgdu_discrete = dg, - reltol=reltol,sensealg=sensalg) -end -``` - -## AD Choice Benchmarks - -```julia -forwarddiff = map(forwarddiffn) do n - bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator!(PROBS, n) - @elapsed auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5()); diffalg=(ForwardDiff.gradient), tols...) - t = @elapsed auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5()); diffalg=(ForwardDiff.gradient), tols...) - @show n,t - t -end -``` - -```julia -#= -reversediff = map(reversediffn) do n - bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator!(PROBS, n) - @elapsed auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5(autodiff=false)); diffalg=(ReverseDiff.gradient), tols...) - t = @elapsed auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5(autodiff=false)); diffalg=(ReverseDiff.gradient), tols...) - @show n,t - t -end -=# -``` - -```julia -numdiff = map(numdiffn) do n - bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator!(PROBS, n) - @elapsed auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5()); diffalg=(FiniteDiff.finite_difference_gradient), tols...) - t = @elapsed auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5()); diffalg=(FiniteDiff.finite_difference_gradient), tols...) - @show n,t - t -end -``` - -```julia -csa = map(csan) do n - bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator!(PROBS, n) - @time ts = map(ADJOINT_METHODS[1:2end÷3]) do alg - @info "Running $alg" - f = SciMLSensitivity.alg_autodiff(alg) ? bfun : ODEFunction(bfun, jac=brusselator_jac) - solver = Rodas5(autodiff=false) - @time diffeq_sen_l2(bfun, b_u0, tspan, b_p, bt, solver; sensalg=alg, tols...) - t = @elapsed diffeq_sen_l2(bfun, b_u0, tspan, b_p, bt, solver; sensalg=alg, tols...) - return t - end - @show n,ts - ts -end -``` - -```julia -n_to_param(n) = 4n^2 - -lw = 2 -ms = 0.5 -plt1 = plot(title="Sensitivity Scaling on Brusselator"); -plot!(plt1, n_to_param.(forwarddiffn), forwarddiff, lab="Forward-Mode DSAAD", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -#plot!(plt1, n_to_param.(reversediffn), reversediff, lab="Reverse-Mode DSAAD", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -csadata = [[csa[j][i] for j in eachindex(csa)] for i in eachindex(csa[1])] -plot!(plt1, n_to_param.(csan), csadata[1], lab="Interpolating CASA user-Jacobian", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -plot!(plt1, n_to_param.(csan), csadata[2], lab="Interpolating CASA AD-Jacobian", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -plot!(plt1, n_to_param.(csan), csadata[3], lab=raw"Interpolating CASA AD-$v^{T}J$ seeding", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -plot!(plt1, n_to_param.(csan), csadata[1+3], lab="Quadrature CASA user-Jacobian", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -plot!(plt1, n_to_param.(csan), csadata[2+3], lab="Quadrature CASA AD-Jacobian", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -plot!(plt1, n_to_param.(csan), csadata[3+3], lab=raw"Quadrature CASA AD-$v^{T}J$ seeding", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -plot!(plt1, n_to_param.(numdiffn), numdiff, lab="Numerical Differentiation", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -xaxis!(plt1, "Number of Parameters", :log10); -yaxis!(plt1, "Runtime (s)", :log10); -plot!(plt1, legend=:outertopleft, size=(1200, 600)) -``` - -## VJP Choice Benchmarks - -```julia -bt = 0:0.1:1 -tspan = (0.0, 1.0) -csan = vcat(2:10,12,15,17) -tols = (abstol=1e-5, reltol=1e-7) - -_adjoint_methods = ntuple(2) do ii - Alg = (InterpolatingAdjoint, QuadratureAdjoint)[ii] - ( - advj1 = Alg(autodiff=true,autojacvec=EnzymeVJP()), # AD vJ - advj2 = Alg(autodiff=true,autojacvec=ReverseDiffVJP(false)), # AD vJ - advj3 = Alg(autodiff=true,autojacvec=ReverseDiffVJP(true)), # AD vJ - ) -end |> NamedTuple{(:interp, :quad)} -adjoint_methods = mapreduce(collect, vcat, _adjoint_methods) - -csavjp = map(csan) do n - bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator!(PROBS, n) - @time ts = map(adjoint_methods) do alg - @info "Running $alg" - f = SciMLSensitivity.alg_autodiff(alg) ? bfun : ODEFunction(bfun, jac=brusselator_jac) - solver = Rodas5(autodiff=false) - @time diffeq_sen_l2(bfun, b_u0, tspan, b_p, bt, solver; sensalg=alg, tols...) - t = @elapsed diffeq_sen_l2(bfun, b_u0, tspan, b_p, bt, solver; sensalg=alg, tols...) - return t - end - @show n,ts - ts -end -``` - -```julia -plt2 = plot(title="Brusselator quadrature adjoint scaling"); -csacompare = [[csavjp[j][i] for j in eachindex(csavjp)] for i in eachindex(csavjp[1])] -plot!(plt2, n_to_param.(csan), csadata[2+3], lab="AD-Jacobian", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -plot!(plt2, n_to_param.(csan), csacompare[1+3], lab=raw"EnzymeVJP", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -plot!(plt2, n_to_param.(csan), csacompare[2+3], lab=raw"ReverseDiffVJP", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -plot!(plt2, n_to_param.(csan), csacompare[3+3], lab=raw"Compiled ReverseDiffVJP", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); -xaxis!(plt2, "Number of Parameters", :log10); -yaxis!(plt2, "Runtime (s)", :log10); -plot!(plt2, legend=:outertopleft, size=(1200, 600)) -``` - -## Appendix - -```julia, echo = false -using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` +--- +title: Bruss Scaling PDE Differentaition Benchmarks +author: Chris Rackauckas and Yingbo Ma +--- + +From the paper [A Comparison of Automatic Differentiation and Continuous Sensitivity Analysis for Derivatives of Differential Equation Solutions](https://ieeexplore.ieee.org/abstract/document/9622796) + +```julia +using OrdinaryDiffEq, ReverseDiff, ForwardDiff, FiniteDiff, SciMLSensitivity +using LinearAlgebra, Tracker, Plots +``` + +```julia +function makebrusselator(N = 8) + xyd_brusselator = range(0, stop = 1, length = N) + function limit(a, N) + if a == N+1 + return 1 + elseif a == 0 + return N + else + return a + end + end + brusselator_f(x, y, t) = ifelse( + (((x-0.3)^2 + (y-0.6)^2) <= 0.1^2) && + (t >= 1.1), 5.0, 0.0) + brusselator_2d_loop = let N=N, xyd=xyd_brusselator, dx=step(xyd_brusselator) + function brusselator_2d_loop(du, u, p, t) + @inbounds begin + ii1 = N^2 + ii2 = ii1+N^2 + ii3 = ii2+2(N^2) + A = @view p[1:ii1] + B = @view p[(ii1 + 1):ii2] + α = @view p[(ii2 + 1):ii3] + II = LinearIndices((N, N, 2)) + for I in CartesianIndices((N, N)) + x = xyd[I[1]] + y = xyd[I[2]] + i = I[1] + j = I[2] + ip1 = limit(i+1, N); + im1 = limit(i-1, N) + jp1 = limit(j+1, N); + jm1 = limit(j-1, N) + du[II[i, j, 1]] = α[II[ + i, j, 1]]*(u[II[im1, j, 1]] + u[II[ip1, j, 1]] + + u[II[i, jp1, 1]] + u[II[i, jm1, 1]] - + 4u[II[i, j, 1]])/dx^2 + + B[II[i, j, 1]] + u[II[i, j, 1]]^2*u[II[i, j, 2]] - + (A[II[i, j, 1]] + 1)*u[II[i, j, 1]] + + brusselator_f(x, y, t) + end + for I in CartesianIndices((N, N)) + i = I[1] + j = I[2] + ip1 = limit(i+1, N) + im1 = limit(i-1, N) + jp1 = limit(j+1, N) + jm1 = limit(j-1, N) + du[II[i, j, 2]] = α[II[ + i, j, 2]]*(u[II[im1, j, 2]] + u[II[ip1, j, 2]] + u[II[i, jp1, 2]] + + u[II[i, jm1, 2]] - 4u[II[i, j, 2]])/dx^2 + + A[II[i, j, 1]]*u[II[i, j, 1]] - + u[II[i, j, 1]]^2*u[II[i, j, 2]] + end + return nothing + end + end + end + function init_brusselator_2d(xyd) + N = length(xyd) + u = zeros(N, N, 2) + for I in CartesianIndices((N, N)) + x = xyd[I[1]] + y = xyd[I[2]] + u[I, 1] = 22*(y*(1-y))^(3/2) + u[I, 2] = 27*(x*(1-x))^(3/2) + end + vec(u) + end + dx = step(xyd_brusselator) + e1 = ones(N-1) + off = N-1 + e4 = ones(N-off) + T = diagm(0=>-2ones(N), -1=>e1, 1=>e1, off=>e4, -off=>e4) ./ dx^2 + Ie = Matrix{Float64}(I, N, N) + # A + df/du + Op = kron(Ie, T) + kron(T, Ie) + brusselator_jac = let N=N + (J, a, p, t) -> begin + ii1 = N^2 + ii2 = ii1+N^2 + ii3 = ii2+2(N^2) + A = @view p[1:ii1] + B = @view p[(ii1 + 1):ii2] + α = @view p[(ii2 + 1):ii3] + u = @view a[1:(end ÷ 2)] + v = @view a[(end ÷ 2 + 1):end] + N2 = length(a)÷2 + α1 = @view α[1:(end ÷ 2)] + α2 = @view α[(end ÷ 2 + 1):end] + fill!(J, 0) + + J[1:N2, 1:N2] .= α1 .* Op + J[(N2 + 1):end, (N2 + 1):end] .= α2 .* Op + + J1 = @view J[1:N2, 1:N2] + J2 = @view J[(N2 + 1):end, 1:N2] + J3 = @view J[1:N2, (N2 + 1):end] + J4 = @view J[(N2 + 1):end, (N2 + 1):end] + J1[diagind(J1)] .+= @. 2u*v-(A+1) + J2[diagind(J2)] .= @. A-2u*v + J3[diagind(J3)] .= @. u^2 + J4[diagind(J4)] .+= @. -u^2 + nothing + end + end + Jmat = zeros(2N*N, 2N*N) + dp = zeros(2N*N, 4N*N) + brusselator_comp = let N=N, xyd=xyd_brusselator, dx=step(xyd_brusselator), Jmat=Jmat, + dp=dp, brusselator_jac=brusselator_jac + + function brusselator_comp(dus, us, p, t) + @inbounds begin + ii1 = N^2 + ii2 = ii1+N^2 + ii3 = ii2+2(N^2) + @views u, s = us[1:ii2], us[(ii2 + 1):end] + du = @view dus[1:ii2] + ds = @view dus[(ii2 + 1):end] + fill!(dp, 0) + A = @view p[1:ii1] + B = @view p[(ii1 + 1):ii2] + α = @view p[(ii2 + 1):ii3] + dfdα = @view dp[:, (ii2 + 1):ii3] + diagind(dfdα) + for i in 1:ii1 + dp[i, ii1 + i] = 1 + end + II = LinearIndices((N, N, 2)) + uu = @view u[1:(end ÷ 2)] + for i in eachindex(uu) + dp[i, i] = -uu[i] + dp[i + ii1, i] = uu[i] + end + for I in CartesianIndices((N, N)) + x = xyd[I[1]] + y = xyd[I[2]] + i = I[1] + j = I[2] + ip1 = limit(i+1, N); + im1 = limit(i-1, N) + jp1 = limit(j+1, N); + jm1 = limit(j-1, N) + au = dfdα[II[i, j, 1], II[i, j, 1]] = (u[II[im1, j, 1]] + + u[II[ip1, j, 1]] + + u[II[i, jp1, 1]] + + u[II[i, jm1, 1]] - + 4u[II[i, j, 1]])/dx^2 + du[II[i, j, 1]] = α[II[i, j, 1]]*(au) + B[II[i, j, 1]] + + u[II[i, j, 1]]^2*u[II[i, j, 2]] - + (A[II[i, j, 1]] + 1)*u[II[i, j, 1]] + + brusselator_f(x, y, t) + end + for I in CartesianIndices((N, N)) + i = I[1] + j = I[2] + ip1 = limit(i+1, N) + im1 = limit(i-1, N) + jp1 = limit(j+1, N) + jm1 = limit(j-1, N) + av = dfdα[II[i, j, 2], II[i, j, 2]] = (u[II[im1, j, 2]] + + u[II[ip1, j, 2]] + + u[II[i, jp1, 2]] + + u[II[i, jm1, 2]] - + 4u[II[i, j, 2]])/dx^2 + du[II[i, j, 2]] = α[II[i, j, 2]]*(av) + A[II[i, j, 1]]*u[II[i, j, 1]] - + u[II[i, j, 1]]^2*u[II[i, j, 2]] + end + brusselator_jac(Jmat, u, p, t) + BLAS.gemm!('N', 'N', 1.0, Jmat, reshape(s, 2N*N, 4N*N), 1.0, dp) + copyto!(ds, vec(dp)) + return nothing + end + end + end + u0 = init_brusselator_2d(xyd_brusselator) + p = [fill(3.4, N^2); fill(1.0, N^2); fill(10.0, 2*N^2)] + brusselator_2d_loop, u0, + p, + brusselator_jac, + ODEProblem(brusselator_comp, copy([u0; zeros((N^2*2)*(N^2*4))]), (0.0, 10.0), p) +end + +Base.eps(::Type{Tracker.TrackedReal{T}}) where {T} = eps(T) +Base.vec(v::Adjoint{<:Real, <:AbstractVector}) = vec(v') # bad bad hack +``` + +## Setup AutoDiff + +```julia +bt = 0:0.1:1 +tspan = (0.0, 1.0) +forwarddiffn = vcat(2:10, 12, 15) +reversediffn = 2:10 +numdiffn = vcat(2:10, 12) +csan = vcat(2:10, 12, 15, 17) +#csaseedn = 2:10 +tols = (abstol = 1e-5, reltol = 1e-7) + +@isdefined(PROBS) || (const PROBS = Dict{Int, Any}()) +makebrusselator!(dict, n) = get!(()->makebrusselator(n), dict, n) + +_adjoint_methods = ntuple(3) do ii + Alg = (InterpolatingAdjoint, QuadratureAdjoint, BacksolveAdjoint)[ii] + ( + user = Alg(autodiff = false, autojacvec = false), # user Jacobian + adjc = Alg(autodiff = true, autojacvec = false), # AD Jacobian + advj = Alg(autodiff = true, autojacvec = EnzymeVJP()) # AD vJ + ) +end |> NamedTuple{(:interp, :quad, :backsol)} +@isdefined(ADJOINT_METHODS) || + (const ADJOINT_METHODS = mapreduce(collect, vcat, _adjoint_methods)) + +function auto_sen_l2( + f, u0, tspan, p, t, alg = Tsit5(); diffalg = ReverseDiff.gradient, kwargs...) + test_f(p) = begin + prob = ODEProblem{true, SciMLBase.FullSpecialize}(f, convert.(eltype(p), u0), tspan, p) + sol = solve(prob, alg, saveat = t; kwargs...) + sum(sol.u) do x + sum(z->(1-z)^2/2, x) + end + end + diffalg(test_f, p) +end +@inline function diffeq_sen_l2(df, u0, tspan, p, t, alg = Tsit5(); + abstol = 1e-5, reltol = 1e-7, iabstol = abstol, ireltol = reltol, + sensalg = SensitivityAlg(), kwargs...) + prob = ODEProblem{true, SciMLBase.FullSpecialize}(df, u0, tspan, p) + saveat = tspan[1] != t[1] && tspan[end] != t[end] ? vcat(tspan[1], t, tspan[end]) : t + sol = solve(prob, alg, abstol = abstol, reltol = reltol, saveat = saveat; kwargs...) + dg(out, u, p, t, i) = (out.=u .- 1.0) + adjoint_sensitivities(sol, alg; t, abstol = abstol, dgdu_discrete = dg, + reltol = reltol, sensealg = sensalg) +end +``` + +## AD Choice Benchmarks + +```julia +forwarddiff = map(forwarddiffn) do n + bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator!(PROBS, n) + @elapsed auto_sen_l2( + bfun, b_u0, tspan, b_p, bt, (Rodas5()); diffalg = (ForwardDiff.gradient), tols...) + t = @elapsed auto_sen_l2( + bfun, b_u0, tspan, b_p, bt, (Rodas5()); diffalg = (ForwardDiff.gradient), tols...) + @show n, t + t +end +``` + +```julia +#= +reversediff = map(reversediffn) do n + bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator!(PROBS, n) + @elapsed auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5(autodiff=false)); diffalg=(ReverseDiff.gradient), tols...) + t = @elapsed auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5(autodiff=false)); diffalg=(ReverseDiff.gradient), tols...) + @show n,t + t +end +=# +``` + +```julia +numdiff = map(numdiffn) do n + bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator!(PROBS, n) + @elapsed auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5()); + diffalg = (FiniteDiff.finite_difference_gradient), tols...) + t = @elapsed auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5()); + diffalg = (FiniteDiff.finite_difference_gradient), tols...) + @show n, t + t +end +``` + +```julia +csa = map(csan) do n + bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator!(PROBS, n) + @time ts = map(ADJOINT_METHODS[1:(2end ÷ 3)]) do alg + @info "Running $alg" + f = SciMLSensitivity.alg_autodiff(alg) ? bfun : + ODEFunction(bfun, jac = brusselator_jac) + solver = Rodas5(autodiff = false) + @time diffeq_sen_l2(f, b_u0, tspan, b_p, bt, solver; sensalg = alg, tols...) + t = @elapsed diffeq_sen_l2(f, b_u0, tspan, b_p, bt, solver; sensalg = alg, tols...) + return t + end + @show n, ts + ts +end +``` + +```julia +n_to_param(n) = 4n^2 + +lw = 2 +ms = 0.5 +plt1 = plot(title = "Sensitivity Scaling on Brusselator"); +plot!(plt1, n_to_param.(forwarddiffn), forwarddiff, lab = "Forward-Mode DSAAD", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +#plot!(plt1, n_to_param.(reversediffn), reversediff, lab="Reverse-Mode DSAAD", lw=lw, marksize=ms, linestyle=:auto, marker=:auto); +csadata = [[csa[j][i] for j in eachindex(csa)] for i in eachindex(csa[1])] +plot!(plt1, n_to_param.(csan), csadata[1], lab = "Interpolating CASA user-Jacobian", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +plot!(plt1, n_to_param.(csan), csadata[2], lab = "Interpolating CASA AD-Jacobian", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +plot!( + plt1, n_to_param.(csan), csadata[3], lab = raw"Interpolating CASA AD-$v^{T}J$ seeding", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +plot!(plt1, n_to_param.(csan), csadata[1 + 3], lab = "Quadrature CASA user-Jacobian", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +plot!(plt1, n_to_param.(csan), csadata[2 + 3], lab = "Quadrature CASA AD-Jacobian", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +plot!( + plt1, n_to_param.(csan), csadata[3 + 3], lab = raw"Quadrature CASA AD-$v^{T}J$ seeding", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +plot!(plt1, n_to_param.(numdiffn), numdiff, lab = "Numerical Differentiation", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +xaxis!(plt1, "Number of Parameters", :log10); +yaxis!(plt1, "Runtime (s)", :log10); +plot!(plt1, legend = :outertopleft, size = (1200, 600)) +``` + +## VJP Choice Benchmarks + +```julia +bt = 0:0.1:1 +tspan = (0.0, 1.0) +csan = vcat(2:10, 12, 15, 17) +tols = (abstol = 1e-5, reltol = 1e-7) + +_adjoint_methods = ntuple(2) do ii + Alg = (InterpolatingAdjoint, QuadratureAdjoint)[ii] + ( + advj1 = Alg(autodiff = true, autojacvec = EnzymeVJP()), # AD vJ + advj2 = Alg(autodiff = true, autojacvec = ReverseDiffVJP(false)), # AD vJ + advj3 = Alg(autodiff = true, autojacvec = ReverseDiffVJP(true)) # AD vJ + ) +end |> NamedTuple{(:interp, :quad)} +adjoint_methods = mapreduce(collect, vcat, _adjoint_methods) + +csavjp = map(csan) do n + bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator!(PROBS, n) + @time ts = map(adjoint_methods) do alg + @info "Running $alg" + f = SciMLSensitivity.alg_autodiff(alg) ? bfun : + ODEFunction(bfun, jac = brusselator_jac) + solver = Rodas5(autodiff = false) + @time diffeq_sen_l2(f, b_u0, tspan, b_p, bt, solver; sensalg = alg, tols...) + t = @elapsed diffeq_sen_l2(f, b_u0, tspan, b_p, bt, solver; sensalg = alg, tols...) + return t + end + @show n, ts + ts +end +``` + +```julia +plt2 = plot(title = "Brusselator quadrature adjoint scaling"); +csacompare = [[csavjp[j][i] for j in eachindex(csavjp)] for i in eachindex(csavjp[1])] +plot!(plt2, n_to_param.(csan), csadata[2 + 3], lab = "AD-Jacobian", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +plot!(plt2, n_to_param.(csan), csacompare[1 + 3], lab = raw"EnzymeVJP", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +plot!(plt2, n_to_param.(csan), csacompare[2 + 3], lab = raw"ReverseDiffVJP", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +plot!(plt2, n_to_param.(csan), csacompare[3 + 3], lab = raw"Compiled ReverseDiffVJP", + lw = lw, marksize = ms, linestyle = :auto, marker = :auto); +xaxis!(plt2, "Number of Parameters", :log10); +yaxis!(plt2, "Runtime (s)", :log10); +plot!(plt2, legend = :outertopleft, size = (1200, 600)) +``` + +## Appendix + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/AutomaticDifferentiation/JuliaAD.jmd b/benchmarks/AutomaticDifferentiation/JuliaAD.jmd index 154b4f880..72b3b519c 100644 --- a/benchmarks/AutomaticDifferentiation/JuliaAD.jmd +++ b/benchmarks/AutomaticDifferentiation/JuliaAD.jmd @@ -1,50 +1,50 @@ ---- -title: Julia AD Benchmarks -author: Guillaume Dalle and Chris Rackauckas ---- - -```julia -using DifferentiationInterface, DifferentiationInterfaceTest, DataFrames, DataFramesMeta -import Enzyme, Zygote, Tapir -import Markdown, PrettyTables, Printf - -function paritytrig(x::AbstractVector{T}) where {T} - y = zero(T) - for i in eachindex(x) - if iseven(i) - y += sin(x[i]) - else - y += cos(x[i]) - end - end - return y -end - -backends = [ - AutoEnzyme(mode=Enzyme.Reverse), - AutoTapir(safe_mode=false), - AutoZygote(), -]; - -scenarios = [ - GradientScenario(paritytrig; x=rand(100), y=0.0, nb_args=1, place=:inplace), - GradientScenario(paritytrig; x=rand(10_000), y=0.0, nb_args=1, place=:inplace) -]; - -data = benchmark_differentiation(backends, scenarios, logging=true); - -table = PrettyTables.pretty_table( - String, - data; - backend=Val(:markdown), - header=names(data), - formatters=PrettyTables.ft_printf("%.1e"), -) - -Markdown.parse(table) -``` - -```julia, echo = false -using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` +--- +title: Julia AD Benchmarks +author: Guillaume Dalle and Chris Rackauckas +--- + +```julia +using DifferentiationInterface, DifferentiationInterfaceTest, DataFrames, DataFramesMeta +import Enzyme, Zygote, Tapir +import Markdown, PrettyTables, Printf + +function paritytrig(x::AbstractVector{T}) where {T} + y = zero(T) + for i in eachindex(x) + if iseven(i) + y += sin(x[i]) + else + y += cos(x[i]) + end + end + return y +end + +backends = [ + AutoEnzyme(mode = Enzyme.Reverse), + AutoTapir(safe_mode = false), + AutoZygote() +]; + +scenarios = [ + GradientScenario(paritytrig; x = rand(100), y = 0.0, nb_args = 1, place = :inplace), + GradientScenario(paritytrig; x = rand(10_000), y = 0.0, nb_args = 1, place = :inplace) +]; + +data = benchmark_differentiation(backends, scenarios, logging = true); + +table = PrettyTables.pretty_table( + String, + data; + backend = Val(:markdown), + header = names(data), + formatters = PrettyTables.ft_printf("%.1e") +) + +Markdown.parse(table) +``` + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/AutomaticDifferentiation/SimpleODEAD.jmd b/benchmarks/AutomaticDifferentiation/SimpleODEAD.jmd index 0256d1e66..0fda45c2b 100644 --- a/benchmarks/AutomaticDifferentiation/SimpleODEAD.jmd +++ b/benchmarks/AutomaticDifferentiation/SimpleODEAD.jmd @@ -1,663 +1,789 @@ ---- -title: Differentiation of Simple ODE Benchmarks -author: Chris Rackauckas and Yingbo Ma ---- - -From the paper [A Comparison of Automatic Differentiation and Continuous Sensitivity Analysis for Derivatives of Differential Equation Solutions](https://ieeexplore.ieee.org/abstract/document/9622796) - -```julia -using ParameterizedFunctions, OrdinaryDiffEq, LinearAlgebra, StaticArrays -using SciMLSensitivity, ForwardDiff, FiniteDiff, ReverseDiff, BenchmarkTools, Test -using DataFrames, PrettyTables, Markdown -tols = (abstol=1e-5, reltol=1e-7) -``` - -## Define the Test ODEs - -```julia -function lvdf(du, u, p, t) - a,b,c = p - x, y = u - du[1] = a*x - b*x*y - du[2] = -c*y + x*y - nothing -end - -function lvcom_df(du, u, p, t) - a,b,c = p - x, y, s1, s2, s3, s4, s5, s6 = u - du[1] = a*x - b*x*y - du[2] = -c*y + x*y - ##################### - # [a-by -bx] - # J = [ ] - # [y x-c] - ##################### - J = @SMatrix [a-b*y -b*x - y x-c] - JS = J*@SMatrix[s1 s3 s5 - s2 s4 s6] - G = @SMatrix [x -x*y 0 - 0 0 -y] - du[3:end] .= vec(JS+G) - nothing -end - -lvdf_with_jacobian = ODEFunction{true, SciMLBase.FullSpecialize}(lvdf, jac=(J,u,p,t)->begin - a,b,c = p - x, y = u - J[1] = a-b*y - J[2] = y - J[3] = -b*x - J[4] = x-c - nothing - end) - -u0 = [1.,1.]; tspan = (0., 10.); p = [1.5,1.0,3.0]; lvcom_u0 = [u0...;zeros(6)] -lvprob = ODEProblem{true, SciMLBase.FullSpecialize}(lvcom_df, lvcom_u0, tspan, p) -``` - -```julia -pkpdf = @ode_def begin - dEv = -Ka1*Ev - dCent = Ka1*Ev - (CL+Vmax/(Km+(Cent/Vc))+Q)*(Cent/Vc) + Q*(Periph/Vp) - Q2*(Cent/Vc) + Q2*(Periph2/Vp2) - dPeriph = Q*(Cent/Vc) - Q*(Periph/Vp) - dPeriph2 = Q2*(Cent/Vc) - Q2*(Periph2/Vp2) - dResp = Kin*(1-(IMAX*(Cent/Vc)^γ/(IC50^γ+(Cent/Vc)^γ))) - Kout*Resp -end Ka1 CL Vc Q Vp Kin Kout IC50 IMAX γ Vmax Km Q2 Vp2 - -pkpdp = [ - 1, # Ka1 Absorption rate constant 1 (1/time) - 1, # CL Clearance (volume/time) - 20, # Vc Central volume (volume) - 2, # Q Inter-compartmental clearance (volume/time) - 10, # Vp Peripheral volume of distribution (volume) - 10, # Kin Response in rate constant (1/time) - 2, # Kout Response out rate constant (1/time) - 2, # IC50 Concentration for 50% of max inhibition (mass/volume) - 1, # IMAX Maximum inhibition - 1, # γ Emax model sigmoidicity - 0, # Vmax Maximum reaction velocity (mass/time) - 2, # Km Michaelis constant (mass/volume) - 0.5, # Q2 Inter-compartmental clearance2 (volume/time) - 100 # Vp2 Peripheral2 volume of distribution (volume) - ]; - -pkpdu0 = [100, eps(), eps(), eps(), 5.] # exact zero in the initial condition triggers NaN in Jacobian -#pkpdu0 = ones(5) -pkpdcondition = function (u,t,integrator) - t in 0:24:240 -end -pkpdaffect! = function (integrator) - integrator.u[1] += 100 -end -pkpdcb = DiscreteCallback(pkpdcondition, pkpdaffect!, save_positions=(false, true)) -pkpdtspan = (0.,240.) -pkpdprob = ODEProblem{true, SciMLBase.FullSpecialize}(pkpdf.f, pkpdu0, pkpdtspan, pkpdp) - -pkpdfcomp = let pkpdf=pkpdf, J=zeros(5,5), JP=zeros(5,14), tmpdu=zeros(5,14) - function (du, u, p, t) - pkpdf.f(@view(du[:, 1]), u, p, t) - pkpdf.jac(J, u, p, t) - pkpdf.paramjac(JP, u, p, t) - mul!(tmpdu, J, @view(u[:, 2:end])) - du[:, 2:end] .= tmpdu .+ JP - nothing - end -end -pkpdcompprob = ODEProblem{true, SciMLBase.FullSpecialize}(pkpdfcomp, hcat(pkpdprob.u0,zeros(5,14)), pkpdprob.tspan, pkpdprob.p) -``` - -```julia -pollution = @ode_def begin - dy1 = -k1 *y1-k10*y11*y1-k14*y1*y6-k23*y1*y4-k24*y19*y1+ - k2 *y2*y4+k3 *y5*y2+k9 *y11*y2+k11*y13+k12*y10*y2+k22*y19+k25*y20 - dy2 = -k2 *y2*y4-k3 *y5*y2-k9 *y11*y2-k12*y10*y2+k1 *y1+k21*y19 - dy3 = -k15*y3+k1 *y1+k17*y4+k19*y16+k22*y19 - dy4 = -k2 *y2*y4-k16*y4-k17*y4-k23*y1*y4+k15*y3 - dy5 = -k3 *y5*y2+k4 *y7+k4 *y7+k6 *y7*y6+k7 *y9+k13*y14+k20*y17*y6 - dy6 = -k6 *y7*y6-k8 *y9*y6-k14*y1*y6-k20*y17*y6+k3 *y5*y2+k18*y16+k18*y16 - dy7 = -k4 *y7-k5 *y7-k6 *y7*y6+k13*y14 - dy8 = k4 *y7+k5 *y7+k6 *y7*y6+k7 *y9 - dy9 = -k7 *y9-k8 *y9*y6 - dy10 = -k12*y10*y2+k7 *y9+k9 *y11*y2 - dy11 = -k9 *y11*y2-k10*y11*y1+k8 *y9*y6+k11*y13 - dy12 = k9 *y11*y2 - dy13 = -k11*y13+k10*y11*y1 - dy14 = -k13*y14+k12*y10*y2 - dy15 = k14*y1*y6 - dy16 = -k18*y16-k19*y16+k16*y4 - dy17 = -k20*y17*y6 - dy18 = k20*y17*y6 - dy19 = -k21*y19-k22*y19-k24*y19*y1+k23*y1*y4+k25*y20 - dy20 = -k25*y20+k24*y19*y1 -end k1 k2 k3 k4 k5 k6 k7 k8 k9 k10 k11 k12 k13 k14 k15 k16 k17 k18 k19 k20 k21 k22 k23 k24 k25 - -function make_pollution() - comp = let pollution = pollution, J = zeros(20, 20), JP = zeros(20, 25), tmpdu = zeros(20,25), tmpu = zeros(20,25) - function comp(du, u, p, t) - tmpu .= @view(u[:, 2:26]) - pollution(@view(du[:, 1]), u, p, t) - pollution.jac(J,u,p,t) - pollution.paramjac(JP,u,p,t) - mul!(tmpdu, J, tmpu) - du[:,2:26] .= tmpdu .+ JP - nothing - end - end - - u0 = zeros(20) - p = [.35e0, .266e2, .123e5, .86e-3, .82e-3, .15e5, .13e-3, .24e5, .165e5, .9e4, .22e-1, .12e5, .188e1, .163e5, .48e7, .35e-3, .175e-1, .1e9, .444e12, .124e4, .21e1, .578e1, .474e-1, .178e4, .312e1] - u0[2] = 0.2 - u0[4] = 0.04 - u0[7] = 0.1 - u0[8] = 0.3 - u0[9] = 0.01 - u0[17] = 0.007 - compu0 = zeros(20, 26) - compu0[1:20] .= u0 - comp, u0, p, compu0 -end -``` - -```julia -function makebrusselator(N=8) - xyd_brusselator = range(0,stop=1,length=N) - function limit(a, N) - if a == N+1 - return 1 - elseif a == 0 - return N - else - return a - end - end - brusselator_f(x, y, t) = ifelse((((x-0.3)^2 + (y-0.6)^2) <= 0.1^2) && - (t >= 1.1), 5., 0.) - brusselator_2d_loop = let N=N, xyd=xyd_brusselator, dx=step(xyd_brusselator) - function brusselator_2d_loop(du, u, p, t) - @inbounds begin - ii1 = N^2 - ii2 = ii1+N^2 - ii3 = ii2+2(N^2) - A = @view p[1:ii1] - B = @view p[ii1+1:ii2] - α = @view p[ii2+1:ii3] - II = LinearIndices((N, N, 2)) - for I in CartesianIndices((N, N)) - x = xyd[I[1]] - y = xyd[I[2]] - i = I[1] - j = I[2] - ip1 = limit(i+1, N); im1 = limit(i-1, N) - jp1 = limit(j+1, N); jm1 = limit(j-1, N) - du[II[i,j,1]] = α[II[i,j,1]]*(u[II[im1,j,1]] + u[II[ip1,j,1]] + u[II[i,jp1,1]] + u[II[i,jm1,1]] - 4u[II[i,j,1]])/dx^2 + - B[II[i,j,1]] + u[II[i,j,1]]^2*u[II[i,j,2]] - (A[II[i,j,1]] + 1)*u[II[i,j,1]] + brusselator_f(x, y, t) - end - for I in CartesianIndices((N, N)) - i = I[1] - j = I[2] - ip1 = limit(i+1, N) - im1 = limit(i-1, N) - jp1 = limit(j+1, N) - jm1 = limit(j-1, N) - du[II[i,j,2]] = α[II[i,j,2]]*(u[II[im1,j,2]] + u[II[ip1,j,2]] + u[II[i,jp1,2]] + u[II[i,jm1,2]] - 4u[II[i,j,2]])/dx^2 + - A[II[i,j,1]]*u[II[i,j,1]] - u[II[i,j,1]]^2*u[II[i,j,2]] - end - return nothing - end - end - end - function init_brusselator_2d(xyd) - N = length(xyd) - u = zeros(N, N, 2) - for I in CartesianIndices((N, N)) - x = xyd[I[1]] - y = xyd[I[2]] - u[I,1] = 22*(y*(1-y))^(3/2) - u[I,2] = 27*(x*(1-x))^(3/2) - end - vec(u) - end - dx = step(xyd_brusselator) - e1 = ones(N-1) - off = N-1 - e4 = ones(N-off) - T = diagm(0=>-2ones(N), -1=>e1, 1=>e1, off=>e4, -off=>e4) ./ dx^2 - Ie = Matrix{Float64}(I, N, N) - # A + df/du - Op = kron(Ie, T) + kron(T, Ie) - brusselator_jac = let N=N - (J,a,p,t) -> begin - ii1 = N^2 - ii2 = ii1+N^2 - ii3 = ii2+2(N^2) - A = @view p[1:ii1] - B = @view p[ii1+1:ii2] - α = @view p[ii2+1:ii3] - u = @view a[1:end÷2] - v = @view a[end÷2+1:end] - N2 = length(a)÷2 - α1 = @view α[1:end÷2] - α2 = @view α[end÷2+1:end] - fill!(J, 0) - - J[1:N2, 1:N2] .= α1.*Op - J[N2+1:end, N2+1:end] .= α2.*Op - - J1 = @view J[1:N2, 1:N2] - J2 = @view J[N2+1:end, 1:N2] - J3 = @view J[1:N2, N2+1:end] - J4 = @view J[N2+1:end, N2+1:end] - J1[diagind(J1)] .+= @. 2u*v-(A+1) - J2[diagind(J2)] .= @. A-2u*v - J3[diagind(J3)] .= @. u^2 - J4[diagind(J4)] .+= @. -u^2 - nothing - end - end - Jmat = zeros(2N*N, 2N*N) - dp = zeros(2N*N, 4N*N) - brusselator_comp = let N=N, xyd=xyd_brusselator, dx=step(xyd_brusselator), Jmat=Jmat, dp=dp, brusselator_jac=brusselator_jac - function brusselator_comp(dus, us, p, t) - @inbounds begin - ii1 = N^2 - ii2 = ii1+N^2 - ii3 = ii2+2(N^2) - @views u, s = us[1:ii2], us[ii2+1:end] - du = @view dus[1:ii2] - ds = @view dus[ii2+1:end] - fill!(dp, 0) - A = @view p[1:ii1] - B = @view p[ii1+1:ii2] - α = @view p[ii2+1:ii3] - dfdα = @view dp[:, ii2+1:ii3] - diagind(dfdα) - for i in 1:ii1 - dp[i, ii1+i] = 1 - end - II = LinearIndices((N, N, 2)) - uu = @view u[1:end÷2] - for i in eachindex(uu) - dp[i, i] = -uu[i] - dp[i+ii1, i] = uu[i] - end - for I in CartesianIndices((N, N)) - x = xyd[I[1]] - y = xyd[I[2]] - i = I[1] - j = I[2] - ip1 = limit(i+1, N); im1 = limit(i-1, N) - jp1 = limit(j+1, N); jm1 = limit(j-1, N) - au = dfdα[II[i,j,1],II[i,j,1]] = (u[II[im1,j,1]] + u[II[ip1,j,1]] + u[II[i,jp1,1]] + u[II[i,jm1,1]] - 4u[II[i,j,1]])/dx^2 - du[II[i,j,1]] = α[II[i,j,1]]*(au) + B[II[i,j,1]] + u[II[i,j,1]]^2*u[II[i,j,2]] - (A[II[i,j,1]] + 1)*u[II[i,j,1]] + brusselator_f(x, y, t) - end - for I in CartesianIndices((N, N)) - i = I[1] - j = I[2] - ip1 = limit(i+1, N) - im1 = limit(i-1, N) - jp1 = limit(j+1, N) - jm1 = limit(j-1, N) - av = dfdα[II[i,j,2],II[i,j,2]] = (u[II[im1,j,2]] + u[II[ip1,j,2]] + u[II[i,jp1,2]] + u[II[i,jm1,2]] - 4u[II[i,j,2]])/dx^2 - du[II[i,j,2]] = α[II[i,j,2]]*(av) + A[II[i,j,1]]*u[II[i,j,1]] - u[II[i,j,1]]^2*u[II[i,j,2]] - end - brusselator_jac(Jmat,u,p,t) - BLAS.gemm!('N', 'N', 1., Jmat, reshape(s, 2N*N, 4N*N), 1., dp) - copyto!(ds, vec(dp)) - return nothing - end - end - end - u0 = init_brusselator_2d(xyd_brusselator) - p = [fill(3.4,N^2); fill(1.,N^2); fill(10.,2*N^2)] - brusselator_2d_loop, u0, p, brusselator_jac, ODEProblem{true, SciMLBase.FullSpecialize}(brusselator_comp, copy([u0;zeros((N^2*2)*(N^2*4))]), (0.,10.), p) -end -``` - -## Differentiation Setups - -```julia -function diffeq_sen(prob::DiffEqBase.DEProblem, args...; kwargs...) - diffeq_sen(prob.f, prob.u0, prob.tspan, prob.p, args...; kwargs...) -end -function auto_sen(prob::DiffEqBase.DEProblem, args...; kwargs...) - auto_sen(prob.f, prob.u0, prob.tspan, prob.p, args...; kwargs...) -end - -function diffeq_sen(f, u0, tspan, p, alg=Tsit5(); sensalg=ForwardSensitivity(), kwargs...) - prob = ODEForwardSensitivityProblem(f,u0,tspan,p,sensalg) - sol = solve(prob,alg; save_everystep=false, kwargs...) - extract_local_sensitivities(sol, length(sol))[2] -end - -function auto_sen(f, u0, tspan, p, alg=Tsit5(); kwargs...) - test_f(p) = begin - prob = ODEProblem{true, SciMLBase.FullSpecialize}(f,eltype(p).(u0),tspan,p) - solve(prob,alg; save_everystep=false, kwargs...)[end] - end - ForwardDiff.jacobian(test_f, p) -end - -function numerical_sen(f,u0, tspan, p, alg=Tsit5(); kwargs...) - test_f(out,p) = begin - prob = ODEProblem{true, SciMLBase.FullSpecialize}(f,eltype(p).(u0),tspan,p) - copyto!(out, solve(prob,alg; kwargs...)[end]) - end - J = Matrix{Float64}(undef,length(u0),length(p)) - FiniteDiff.finite_difference_jacobian!(J, test_f, p, FiniteDiff.JacobianCache(p,Array{Float64}(undef,length(u0)))) - return J -end - -function diffeq_sen_l2(df, u0, tspan, p, t, alg=Tsit5(); - abstol=1e-5, reltol=1e-7, - sensalg=InterpolatingAdjoint(), kwargs...) - prob = ODEProblem(df,u0,tspan,p) - sol = solve(prob, alg, sensealg=DiffEqBase.SensitivityADPassThrough(), abstol=abstol, reltol=reltol; kwargs...) - dg(out,u,p,t,i) = (out.=u.-1.0) - adjoint_sensitivities(sol,alg;t,abstol=abstol,dgdu_discrete = dg, - reltol=reltol,sensealg=sensalg)[2] -end - -function auto_sen_l2(f, u0, tspan, p, t, alg=Tsit5(); diffalg=ReverseDiff.gradient, kwargs...) - test_f(p) = begin - prob = ODEProblem{true, SciMLBase.FullSpecialize}(f,eltype(p).(u0),tspan,p) - sol = solve(prob,alg; sensealg=DiffEqBase.SensitivityADPassThrough(), kwargs...)(t) - sum(sol.u) do x - sum(z->(1-z)^2/2, x) - end - end - diffalg(test_f, p) -end - -function numerical_sen_l2(f, u0, tspan, p, t, alg=Tsit5(); kwargs...) - test_f(p) = begin - prob = ODEProblem(f,eltype(p).(u0),tspan,p) - sol = solve(prob,alg; kwargs...)(t) - sum(sol.u) do x - sum(z->(1-z)^2/2, x) - end - end - FiniteDiff.finite_difference_gradient(test_f, p, Val{:central}) -end -``` - -```julia -_adjoint_methods = ntuple(3) do ii - Alg = (InterpolatingAdjoint, QuadratureAdjoint, BacksolveAdjoint)[ii] - ( - user = Alg(autodiff=false,autojacvec=false), # user Jacobian - adjc = Alg(autodiff=true,autojacvec=false), # AD Jacobian - advj = Alg(autodiff=true,autojacvec=EnzymeVJP()), # AD vJ - ) -end |> NamedTuple{(:interp, :quad, :backsol)} -@isdefined(ADJOINT_METHODS) || (const ADJOINT_METHODS = mapreduce(collect, vcat, _adjoint_methods)) -``` - -## Run Forward Mode Benchmarks - -These are testing for the construction of the full Jacobian. - -```julia -forward_lv = let - @info "Running the Lotka-Volterra model:" - @info " Running compile-time CSA" - t1 = @belapsed solve($lvprob, $(Tsit5()); $tols...) - @info " Running DSA" - t2 = @belapsed auto_sen($lvdf, $u0, $tspan, $p, $(Tsit5()); $tols...) - @info " Running CSA user-Jacobian" - t3 = @belapsed diffeq_sen($lvdf_with_jacobian, $u0, $tspan, $p, $(Tsit5()); sensalg=ForwardSensitivity(autodiff=false, autojacvec=false), $tols...) - @info " Running AD-Jacobian" - t4 = @belapsed diffeq_sen($lvdf, $u0, $tspan, $p, $(Tsit5()); sensalg=ForwardSensitivity(autojacvec=false), $tols...) - @info " Running AD-Jv seeding" - t5 = @belapsed diffeq_sen($lvdf, $u0, $tspan, $p, $(Tsit5()); sensalg=ForwardSensitivity(autojacvec=true), $tols...) - @info " Running numerical differentiation" - t6 = @belapsed numerical_sen($lvdf, $u0, $tspan, $p, $(Tsit5()); $tols...) - print('\n') - [t1, t2, t3, t4, t5, t6] -end -``` - -```julia -forward_bruss = let - @info "Running the Brusselator model:" - n = 5 - # Run low tolerance to test correctness - bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator(n) - sol1 = @time numerical_sen(bfun, b_u0, (0.,10.), b_p, Rodas5(), abstol=1e-5,reltol=1e-7); - sol2 = @time auto_sen(bfun, b_u0, (0.,10.), b_p, Rodas5(), abstol=1e-5,reltol=1e-7); - @test sol1 ≈ sol2 atol=1e-2 - sol3 = @time diffeq_sen(bfun, b_u0, (0.,10.), b_p, Rodas5(autodiff=false), abstol=1e-5,reltol=1e-7); - @test sol1 ≈ hcat(sol3...) atol=1e-3 - sol4 = @time diffeq_sen(ODEFunction{true, SciMLBase.FullSpecialize}(bfun, jac=brusselator_jac), b_u0, (0.,10.), b_p, Rodas5(autodiff=false), abstol=1e-5,reltol=1e-7, sensalg=ForwardSensitivity(autodiff=false, autojacvec=false)); - @test sol1 ≈ hcat(sol4...) atol=1e-2 - sol5 = @time solve(brusselator_comp, Rodas5(autodiff=false), abstol=1e-5,reltol=1e-7,); - @test sol1 ≈ reshape(sol5[end][2n*n+1:end], 2n*n, 4n*n) atol=1e-3 - - # High tolerance to benchmark - @info " Running compile-time CSA" - t1 = @belapsed solve($brusselator_comp, $(Rodas5(autodiff=false)); $tols...); - @info " Running DSA" - t2 = @belapsed auto_sen($bfun, $b_u0, $((0.,10.)), $b_p, $(Rodas5()); $tols...); - @info " Running CSA user-Jacobian" - t3 = @belapsed diffeq_sen($(ODEFunction{true, SciMLBase.FullSpecialize}(bfun, jac=brusselator_jac)), $b_u0, $((0.,10.)), $b_p, $(Rodas5(autodiff=false)); sensalg=ForwardSensitivity(autodiff=false, autojacvec=false), $tols...); - @info " Running AD-Jacobian" - t4 = @belapsed diffeq_sen($bfun, $b_u0, $((0.,10.)), $b_p, $(Rodas5(autodiff=false)); sensalg=ForwardSensitivity(autojacvec=false), $tols...); - @info " Running AD-Jv seeding" - t5 = @belapsed diffeq_sen($bfun, $b_u0, $((0.,10.)), $b_p, $(Rodas5(autodiff=false)); sensalg=ForwardSensitivity(autojacvec=true), $tols...); - @info " Running numerical differentiation" - t6 = @belapsed numerical_sen($bfun, $b_u0, $((0.,10.)), $b_p, $(Rodas5()); $tols...); - print('\n') - [t1, t2, t3, t4, t5, t6] -end -``` - -```julia -forward_pollution = let - @info "Running the pollution model:" - pcomp, pu0, pp, pcompu0 = make_pollution() - ptspan = (0.,60.) - @info " Running compile-time CSA" - t1 = 0#@belapsed solve($(ODEProblem(pcomp, pcompu0, ptspan, pp)), $(Rodas5(autodiff=false)),); - @info " Running DSA" - t2 = @belapsed auto_sen($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), $pu0, $ptspan, $pp, $(Rodas5()); $tols...); - @info " Running CSA user-Jacobian" - t3 = @belapsed diffeq_sen($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f, jac=pollution.jac)), $pu0, $ptspan, $pp, $(Rodas5(autodiff=false)); sensalg=ForwardSensitivity(autodiff=false, autojacvec=false), $tols...); - @info " Running AD-Jacobian" - t4 = @belapsed diffeq_sen($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), $pu0, $ptspan, $pp, $(Rodas5(autodiff=false)); sensalg=ForwardSensitivity(autojacvec=false), $tols...); - @info " Running AD-Jv seeding" - t5 = @belapsed diffeq_sen($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), $pu0, $ptspan, $pp, $(Rodas5(autodiff=false)); sensalg=ForwardSensitivity(autojacvec=true), $tols...); - @info " Running numerical differentiation" - t6 = @belapsed numerical_sen($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), $pu0, $ptspan, $pp, $(Rodas5()); $tols...); - print('\n') - [t1, t2, t3, t4, t5, t6] -end -``` - -```julia -forward_pkpd = let - @info "Running the PKPD model:" - #sol1 = solve(pkpdcompprob, Tsit5(),abstol=1e-5,reltol=1e-7,callback=pkpdcb,tstops=0:24:240,)[end][6:end] - sol2 = vec(auto_sen(pkpdprob, Tsit5(),abstol=1e-5,reltol=1e-7,callback=pkpdcb,tstops=0:24:240)) - sol3 = vec(hcat(diffeq_sen(pkpdprob, Tsit5(),abstol=1e-5,reltol=1e-7,callback=pkpdcb,tstops=0:24:240)...)) - #@test sol1 ≈ sol2 atol=1e-3 - @test sol2 ≈ sol3 atol=1e-3 - @info " Running compile-time CSA" - #t1 = @belapsed solve($pkpdcompprob, $(Tsit5()),callback=$pkpdcb,tstops=0:24:240,); - @info " Running DSA" - t2 = @belapsed auto_sen($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, $(Tsit5()); callback=$pkpdcb,tstops=0:24:240, $tols...); - @info " Running CSA user-Jacobian" - t3 = @belapsed diffeq_sen($(ODEFunction{true, SciMLBase.FullSpecialize}(pkpdf.f, jac=pkpdf.jac)), $pkpdu0, $pkpdtspan, $pkpdp, $(Tsit5());callback=$pkpdcb,tstops=0:24:240, sensalg=ForwardSensitivity(autodiff=false, autojacvec=false), $tols...); - @info " Running AD-Jacobian" - t4 = @belapsed diffeq_sen($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, $(Tsit5()); callback=$pkpdcb,tstops=0:24:240, - sensalg=ForwardSensitivity(autojacvec=false), $tols...); - @info " Running AD-Jv seeding" - t5 = @belapsed diffeq_sen($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, $(Tsit5());callback=$pkpdcb,tstops=0:24:240, - sensalg=ForwardSensitivity(autojacvec=true), $tols...); - @info " Running numerical differentiation" - t6 = @belapsed numerical_sen($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, $(Tsit5()); callback=$pkpdcb,tstops=0:24:240, $tols...); - print('\n') - [0, t2, t3, t4, t5, t6] -end -``` - -```julia -forward_methods = ["Compile-time CSA", "DSA", "CSA user-Jacobian", "AD-Jacobian", "AD-Jv seeding", "Numerical Differentiation"] -forward_timings = DataFrame(methods=forward_methods, LV=forward_lv, Bruss=forward_bruss, Pollution=forward_pollution, PKPD=forward_pkpd) -display(forward_timings) -``` - -## Run Adjoint Benchmarks - -Adjoint requires a slightly different setup even with forward mode ADs since it requires -a loss function choice. For that we simply take the L2 norm of the solution. - -```julia -adjoint_lv = let - @info "Running the Lotka-Volerra model:" - lvu0 = [1.,1.]; lvtspan = (0.0, 10.0); lvp = [1.5,1.0,3.0]; - lvt = 0:0.5:10 - @time lsol1 = auto_sen_l2(lvdf, lvu0, lvtspan, lvp, lvt, (Tsit5()); diffalg=(ForwardDiff.gradient), tols...); - @time lsol2 = auto_sen_l2(lvdf, lvu0, lvtspan, lvp, lvt, (Tsit5()); diffalg=(ReverseDiff.gradient), tols...); - @time lsol3 = map(ADJOINT_METHODS) do alg - f = SciMLSensitivity.alg_autodiff(alg) ? lvdf : lvdf_with_jacobian - diffeq_sen_l2(f, lvu0, lvtspan, lvp, lvt, (Tsit5()); sensalg=alg, tols...) - end - @time lsol4 = numerical_sen_l2(lvdf, lvu0, lvtspan, lvp, lvt, Tsit5(); tols...); - @test maximum(abs, lsol1 .- lsol2)/maximum(abs, lsol1) < 0.2 - @test all(i -> maximum(abs, lsol1 .- lsol3[i]')/maximum(abs, lsol1) < 0.2, eachindex(ADJOINT_METHODS)) - @test maximum(abs, lsol1 .- lsol4)/maximum(abs, lsol1) < 0.2 - t1 = @belapsed auto_sen_l2($lvdf, $lvu0, $lvtspan, $lvp, $lvt, $(Tsit5()); diffalg=$(ForwardDiff.gradient), $tols...); - t2 = @belapsed auto_sen_l2($lvdf, $lvu0, $lvtspan, $lvp, $lvt, $(Tsit5()); diffalg=$(ReverseDiff.gradient), $tols...); - t3 = map(ADJOINT_METHODS) do alg - f = SciMLSensitivity.alg_autodiff(alg) ? lvdf : lvdf_with_jacobian - @belapsed diffeq_sen_l2($f, $lvu0, $lvtspan, $lvp, $lvt, $(Tsit5()); sensalg=$alg, $tols...); - end - t4 = @belapsed numerical_sen_l2($lvdf, $lvu0, $lvtspan, $lvp, $lvt, $(Tsit5()); $tols...); - [t1; t2; t3; t4] -end -``` - -```julia -adjoint_bruss = let - @info "Running the Brusselator model:" - bt = 0:0.1:10 - tspan = (0.0, 10.0) - n = 5 - bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator(n) - @time bsol1 = auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5()); diffalg=(ForwardDiff.gradient), tols...); - #@time bsol2 = auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5(autodiff=false)); diffalg=(ReverseDiff.gradient), tols...); - #@test maximum(abs, bsol1 .- bsol2)/maximum(abs, bsol1) < 1e-2 - - @time bsol3 = map(ADJOINT_METHODS) do alg - @info "Running $alg" - f = SciMLSensitivity.alg_autodiff(alg) ? bfun : ODEFunction{true, SciMLBase.FullSpecialize}(bfun, jac=brusselator_jac) - solver = Rodas5(autodiff=false) - diffeq_sen_l2(f, b_u0, tspan, b_p, bt, solver, reltol=1e-7; sensalg=alg, tols...) - end - @time bsol4 = numerical_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5()); tols...); - # NOTE: backsolve gives unstable results!!! - @test all(i->maximum(abs, bsol1 .- bsol3[i]')/maximum(abs, bsol1) < 4e-2, eachindex(ADJOINT_METHODS)[1:2end÷3]) - @test all(i->maximum(abs, bsol1 .- bsol3[i]')/maximum(abs, bsol1) >= 4e-2, eachindex(ADJOINT_METHODS)[2end÷3+1:end]) - @test maximum(abs, bsol1 .- bsol4)/maximum(abs, bsol1) < 2e-2 - t1 = @belapsed auto_sen_l2($bfun, $b_u0, $tspan, $b_p, $bt, $(Rodas5()); diffalg=$(ForwardDiff.gradient), $tols...); - #t2 = @belapsed auto_sen_l2($bfun, $b_u0, $tspan, $b_p, $bt, $(Rodas5(autodiff=false)); diffalg=$(ReverseDiff.gradient), $tols...); - t2 = NaN - t3 = map(ADJOINT_METHODS[1:2end÷3]) do alg - @info "Running $alg" - f = SciMLSensitivity.alg_autodiff(alg) ? bfun : ODEFunction{true, SciMLBase.FullSpecialize}(bfun, jac=brusselator_jac) - solver = Rodas5(autodiff=false) - @elapsed diffeq_sen_l2(f, b_u0, tspan, b_p, bt, solver; sensalg=alg, tols...); - end - t3 = [t3; fill(NaN, length(ADJOINT_METHODS)÷3)] - t4 = @belapsed numerical_sen_l2($bfun, $b_u0, $tspan, $b_p, $bt, $(Rodas5()); $tols...); - [t1; t2; t3; t4] -end -``` - -```julia -adjoint_pollution = let - @info "Running the Pollution model:" - pcomp, pu0, pp, pcompu0 = make_pollution(); - ptspan = (0.0, 60.0) - pts = 0:0.5:60 - @time psol1 = auto_sen_l2((ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), pu0, ptspan, pp, pts, (Rodas5(autodiff=false)); diffalg=(ForwardDiff.gradient), tols...); - #@time psol2 = auto_sen_l2((ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), pu0, ptspan, pp, pts, (Rodas5(autodiff=false)); diffalg=(ReverseDiff.gradient), tols...); - #@test maximum(abs, psol1 .- psol2)/maximum(abs, psol1) < 1e-2 - @time psol3 = map(ADJOINT_METHODS) do alg - @info "Running $alg" - f = SciMLSensitivity.alg_autodiff(alg) ? pollution.f : ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f, jac=pollution.jac) - solver = Rodas5(autodiff=false) - diffeq_sen_l2(f, pu0, ptspan, pp, pts, solver; sensalg=alg, tols...); - end - @time psol4 = numerical_sen_l2((ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), pu0, ptspan, pp, pts, (Rodas5(autodiff=false)); tols...); - # NOTE: backsolve gives unstable results!!! - @test all(i->maximum(abs, psol1 .- psol3[i]')/maximum(abs, psol1) < 1e-2, eachindex(ADJOINT_METHODS)[1:2end÷3]) - @test all(i->maximum(abs, psol1 .- psol3[i]')/maximum(abs, psol1) >= 1e-2, eachindex(ADJOINT_METHODS)[2end÷3+1:end]) - @test maximum(abs, psol1 .- psol4)/maximum(abs, psol1) < 1e-2 - t1 = @belapsed auto_sen_l2($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), $pu0, $ptspan, $pp, $pts, $(Rodas5(autodiff=false)); diffalg=$(ForwardDiff.gradient), $tols...); - #t2 = @belapsed auto_sen_l2($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), $pu0, $ptspan, $pp, $pts, $(Rodas5(autodiff=false)); diffalg=$(ReverseDiff.gradient), $tols...); - t2 = NaN - t3 = map(ADJOINT_METHODS[1:2end÷3]) do alg - @info "Running $alg" - f = SciMLSensitivity.alg_autodiff(alg) ? pollution.f : ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f, jac=pollution.jac) - solver = Rodas5(autodiff=false) - @elapsed diffeq_sen_l2(f, pu0, ptspan, pp, pts, solver; sensalg=alg, tols...); - end - t3 = [t3; fill(NaN, length(ADJOINT_METHODS)÷3)] - t4 = @belapsed numerical_sen_l2($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), $pu0, $ptspan, $pp, $pts, $(Rodas5(autodiff=false)); $tols...); - [t1; t2; t3; t4] -end -``` - -```julia -adjoint_pkpd = let - @info "Running the PKPD model:" - pts = 0:0.5:50 - # need to use lower tolerances to avoid running into the complex domain because of exponentiation - pkpdsol1 = @time auto_sen_l2((pkpdf.f), pkpdu0, pkpdtspan, pkpdp, pts, (Tsit5()); callback=pkpdcb, tstops=0:24:240, - diffalg=(ForwardDiff.gradient), tols...); - pkpdsol2 = @time auto_sen_l2((pkpdf.f), pkpdu0, pkpdtspan, pkpdp, pts, (Tsit5()); callback=pkpdcb, tstops=0:24:240, - diffalg=(ReverseDiff.gradient), tols...); - pkpdsol3 = @time map(ADJOINT_METHODS[1:2end÷3]) do alg - f = SciMLSensitivity.alg_autodiff(alg) ? pkpdf.f : ODEFunction{true, SciMLBase.FullSpecialize}(pkpdf.f, jac=pkpdf.jac) - diffeq_sen_l2(f, pkpdu0, pkpdtspan, pkpdp, pts, (Tsit5()); sensalg=alg, - callback=pkpdcb, tstops=0:24:240, tols...); - end - pkpdsol4 = @time numerical_sen_l2((ODEFunction{true, SciMLBase.FullSpecialize}(pkpdf.f)), pkpdu0, pkpdtspan, pkpdp, pts, (Tsit5()); - callback=pkpdcb, tstops=0:24:240, tols...); - @test maximum(abs, pkpdsol1 .- pkpdsol2)/maximum(abs, pkpdsol1) < 0.2 - @test all(i->maximum(abs, pkpdsol1 .- pkpdsol3[i]')/maximum(abs, pkpdsol1) < 0.2, eachindex(ADJOINT_METHODS)[1:2end÷3]) - @test maximum(abs, pkpdsol1 .- pkpdsol4)/maximum(abs, pkpdsol1) < 0.2 - t1 = @belapsed auto_sen_l2($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, $pts, $(Tsit5()); callback=pkpdcb, tstops=0:24:240, - diffalg=$(ForwardDiff.gradient), $tols...); - t2 = @belapsed auto_sen_l2($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, $pts, $(Tsit5()); callback=pkpdcb, tstops=0:24:240, - diffalg=$(ReverseDiff.gradient), $tols...); - t3 = map(ADJOINT_METHODS[1:2end÷3]) do alg - f = SciMLSensitivity.alg_autodiff(alg) ? pkpdf.f : ODEFunction{true, SciMLBase.FullSpecialize}(pkpdf.f, jac=pkpdf.jac) - @belapsed diffeq_sen_l2($f, $pkpdu0, $pkpdtspan, $pkpdp, $pts, $(Tsit5()); tstops=0:24:240, - callback=pkpdcb, sensalg=$alg, tols...); - end - t3 = [t3; fill(NaN, length(ADJOINT_METHODS)÷3)] - t4 = @belapsed numerical_sen_l2($(ODEFunction{true, SciMLBase.FullSpecialize}(pkpdf.f)), $pkpdu0, $pkpdtspan, $pkpdp, $pts, $(Tsit5()); tstops=0:24:240, - callback=$pkpdcb, $tols...); - [t1; t2; t3; t4] -end -``` - -```julia -adjoint_methods = ["ForwardDiff", "ReverseDiff", - "InterpolatingAdjoint User Jac", "InterpolatingAdjoint AD Jac", "InterpolatingAdjoint v'J", - "QuadratureAdjoint User Jac", "QuadratureAdjoint AD Jac", "QuadratureAdjoint v'J", - "BacksolveAdjoint User Jac", "BacksolveAdjoint AD Jac", "BacksolveAdjoint v'J", - "Numerical Differentiation"] -adjoint_timings = DataFrame(methods=adjoint_methods, LV=adjoint_lv, Bruss=adjoint_bruss, Pollution=adjoint_pollution, PKPD=adjoint_pkpd) -Markdown.parse(PrettyTables.pretty_table(String, adjoint_timings; backend=Val(:markdown), header=names(adjoint_timings))) -``` - -## Appendix - -```julia, echo = false -using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` +--- +title: Differentiation of Simple ODE Benchmarks +author: Chris Rackauckas and Yingbo Ma +--- + +From the paper [A Comparison of Automatic Differentiation and Continuous Sensitivity Analysis for Derivatives of Differential Equation Solutions](https://ieeexplore.ieee.org/abstract/document/9622796) + +```julia +using ParameterizedFunctions, OrdinaryDiffEq, LinearAlgebra, StaticArrays +using SciMLSensitivity, ForwardDiff, FiniteDiff, ReverseDiff, BenchmarkTools, Test +using DataFrames, PrettyTables, Markdown +tols = (abstol = 1e-5, reltol = 1e-7) +``` + +## Define the Test ODEs + +```julia +function lvdf(du, u, p, t) + a, b, c = p + x, y = u + du[1] = a*x - b*x*y + du[2] = -c*y + x*y + nothing +end + +function lvcom_df(du, u, p, t) + a, b, c = p + x, y, s1, s2, s3, s4, s5, s6 = u + du[1] = a*x - b*x*y + du[2] = -c*y + x*y + ##################### + # [a-by -bx] + # J = [ ] + # [y x-c] + ##################### + J = @SMatrix [a-b*y -b*x + y x-c] + JS = J*@SMatrix[s1 s3 s5 + s2 s4 s6] + G = @SMatrix [x -x*y 0 + 0 0 -y] + du[3:end] .= vec(JS+G) + nothing +end + +lvdf_with_jacobian = ODEFunction{true, SciMLBase.FullSpecialize}(lvdf, jac = ( + J, u, p, t)->begin + a, b, c = p + x, y = u + J[1] = a-b*y + J[2] = y + J[3] = -b*x + J[4] = x-c + nothing +end) + +u0 = [1.0, 1.0]; +tspan = (0.0, 10.0); +p = [1.5, 1.0, 3.0]; +lvcom_u0 = [u0...; zeros(6)] +lvprob = ODEProblem{true, SciMLBase.FullSpecialize}(lvcom_df, lvcom_u0, tspan, p) +``` + +```julia +pkpdf = @ode_def begin + dEv = -Ka1*Ev + dCent = Ka1*Ev - (CL+Vmax/(Km+(Cent/Vc))+Q)*(Cent/Vc) + Q*(Periph/Vp) - Q2*(Cent/Vc) + + Q2*(Periph2/Vp2) + dPeriph = Q*(Cent/Vc) - Q*(Periph/Vp) + dPeriph2 = Q2*(Cent/Vc) - Q2*(Periph2/Vp2) + dResp = Kin*(1-(IMAX*(Cent/Vc)^γ/(IC50^γ+(Cent/Vc)^γ))) - Kout*Resp +end Ka1 CL Vc Q Vp Kin Kout IC50 IMAX γ Vmax Km Q2 Vp2 + +pkpdp = [ + 1, # Ka1 Absorption rate constant 1 (1/time) + 1, # CL Clearance (volume/time) + 20, # Vc Central volume (volume) + 2, # Q Inter-compartmental clearance (volume/time) + 10, # Vp Peripheral volume of distribution (volume) + 10, # Kin Response in rate constant (1/time) + 2, # Kout Response out rate constant (1/time) + 2, # IC50 Concentration for 50% of max inhibition (mass/volume) + 1, # IMAX Maximum inhibition + 1, # γ Emax model sigmoidicity + 0, # Vmax Maximum reaction velocity (mass/time) + 2, # Km Michaelis constant (mass/volume) + 0.5, # Q2 Inter-compartmental clearance2 (volume/time) + 100 # Vp2 Peripheral2 volume of distribution (volume) +]; + +pkpdu0 = [100, eps(), eps(), eps(), 5.0] # exact zero in the initial condition triggers NaN in Jacobian +#pkpdu0 = ones(5) +pkpdcondition = function (u, t, integrator) + t in 0:24:240 +end +pkpdaffect! = function (integrator) + integrator.u[1] += 100 +end +pkpdcb = DiscreteCallback(pkpdcondition, pkpdaffect!, save_positions = (false, true)) +pkpdtspan = (0.0, 240.0) +pkpdprob = ODEProblem{true, SciMLBase.FullSpecialize}(pkpdf.f, pkpdu0, pkpdtspan, pkpdp) + +pkpdfcomp = let pkpdf=pkpdf, J=zeros(5, 5), JP=zeros(5, 14), tmpdu=zeros(5, 14) + function (du, u, p, t) + pkpdf.f(@view(du[:, 1]), u, p, t) + pkpdf.jac(J, u, p, t) + pkpdf.paramjac(JP, u, p, t) + mul!(tmpdu, J, @view(u[:, 2:end])) + du[:, 2:end] .= tmpdu .+ JP + nothing + end +end +pkpdcompprob = ODEProblem{true, SciMLBase.FullSpecialize}( + pkpdfcomp, hcat(pkpdprob.u0, zeros(5, 14)), pkpdprob.tspan, pkpdprob.p) +``` + +```julia +pollution = @ode_def begin + dy1 = -k1 * y1-k10*y11*y1-k14*y1*y6-k23*y1*y4-k24*y19*y1+ + k2 * y2 * y4+k3 * y5 * y2+k9 * y11 * y2+k11*y13+k12*y10*y2+k22*y19+k25*y20 + dy2 = -k2 * y2 * y4-k3 * y5 * y2-k9 * y11 * y2-k12*y10*y2+k1 * y1+k21*y19 + dy3 = -k15*y3+k1 * y1+k17*y4+k19*y16+k22*y19 + dy4 = -k2 * y2 * y4-k16*y4-k17*y4-k23*y1*y4+k15*y3 + dy5 = -k3 * y5 * y2+k4 * y7+k4 * y7+k6 * y7 * y6+k7 * y9+k13*y14+k20*y17*y6 + dy6 = -k6 * y7 * y6-k8 * y9 * y6-k14*y1*y6-k20*y17*y6+k3 * y5 * y2+k18*y16+k18*y16 + dy7 = -k4 * y7-k5 * y7-k6 * y7 * y6+k13*y14 + dy8 = k4 * y7+k5 * y7+k6 * y7 * y6+k7 * y9 + dy9 = -k7 * y9-k8 * y9 * y6 + dy10 = -k12*y10*y2+k7 * y9+k9 * y11 * y2 + dy11 = -k9 * y11 * y2-k10*y11*y1+k8 * y9 * y6+k11*y13 + dy12 = k9 * y11 * y2 + dy13 = -k11*y13+k10*y11*y1 + dy14 = -k13*y14+k12*y10*y2 + dy15 = k14*y1*y6 + dy16 = -k18*y16-k19*y16+k16*y4 + dy17 = -k20*y17*y6 + dy18 = k20*y17*y6 + dy19 = -k21*y19-k22*y19-k24*y19*y1+k23*y1*y4+k25*y20 + dy20 = -k25*y20+k24*y19*y1 +end k1 k2 k3 k4 k5 k6 k7 k8 k9 k10 k11 k12 k13 k14 k15 k16 k17 k18 k19 k20 k21 k22 k23 k24 k25 + +function make_pollution() + comp = let pollution = pollution, J = zeros(20, 20), JP = zeros(20, 25), + tmpdu = zeros(20, 25), tmpu = zeros(20, 25) + + function comp(du, u, p, t) + tmpu .= @view(u[:, 2:26]) + pollution(@view(du[:, 1]), u, p, t) + pollution.jac(J, u, p, t) + pollution.paramjac(JP, u, p, t) + mul!(tmpdu, J, tmpu) + du[:, 2:26] .= tmpdu .+ JP + nothing + end + end + + u0 = zeros(20) + p = [.35e0, .266e2, .123e5, .86e-3, .82e-3, .15e5, .13e-3, .24e5, .165e5, + .9e4, .22e-1, .12e5, .188e1, .163e5, .48e7, .35e-3, .175e-1, + .1e9, .444e12, .124e4, .21e1, .578e1, .474e-1, .178e4, .312e1] + u0[2] = 0.2 + u0[4] = 0.04 + u0[7] = 0.1 + u0[8] = 0.3 + u0[9] = 0.01 + u0[17] = 0.007 + compu0 = zeros(20, 26) + compu0[1:20] .= u0 + comp, u0, p, compu0 +end +``` + +```julia +function makebrusselator(N = 8) + xyd_brusselator = range(0, stop = 1, length = N) + function limit(a, N) + if a == N+1 + return 1 + elseif a == 0 + return N + else + return a + end + end + brusselator_f(x, y, t) = ifelse( + (((x-0.3)^2 + (y-0.6)^2) <= 0.1^2) && + (t >= 1.1), 5.0, 0.0) + brusselator_2d_loop = let N=N, xyd=xyd_brusselator, dx=step(xyd_brusselator) + function brusselator_2d_loop(du, u, p, t) + @inbounds begin + ii1 = N^2 + ii2 = ii1+N^2 + ii3 = ii2+2(N^2) + A = @view p[1:ii1] + B = @view p[(ii1 + 1):ii2] + α = @view p[(ii2 + 1):ii3] + II = LinearIndices((N, N, 2)) + for I in CartesianIndices((N, N)) + x = xyd[I[1]] + y = xyd[I[2]] + i = I[1] + j = I[2] + ip1 = limit(i+1, N); + im1 = limit(i-1, N) + jp1 = limit(j+1, N); + jm1 = limit(j-1, N) + du[II[i, j, 1]] = α[II[ + i, j, 1]]*(u[II[im1, j, 1]] + u[II[ip1, j, 1]] + + u[II[i, jp1, 1]] + u[II[i, jm1, 1]] - + 4u[II[i, j, 1]])/dx^2 + + B[II[i, j, 1]] + u[II[i, j, 1]]^2*u[II[i, j, 2]] - + (A[II[i, j, 1]] + 1)*u[II[i, j, 1]] + + brusselator_f(x, y, t) + end + for I in CartesianIndices((N, N)) + i = I[1] + j = I[2] + ip1 = limit(i+1, N) + im1 = limit(i-1, N) + jp1 = limit(j+1, N) + jm1 = limit(j-1, N) + du[II[i, j, 2]] = α[II[ + i, j, 2]]*(u[II[im1, j, 2]] + u[II[ip1, j, 2]] + u[II[i, jp1, 2]] + + u[II[i, jm1, 2]] - 4u[II[i, j, 2]])/dx^2 + + A[II[i, j, 1]]*u[II[i, j, 1]] - + u[II[i, j, 1]]^2*u[II[i, j, 2]] + end + return nothing + end + end + end + function init_brusselator_2d(xyd) + N = length(xyd) + u = zeros(N, N, 2) + for I in CartesianIndices((N, N)) + x = xyd[I[1]] + y = xyd[I[2]] + u[I, 1] = 22*(y*(1-y))^(3/2) + u[I, 2] = 27*(x*(1-x))^(3/2) + end + vec(u) + end + dx = step(xyd_brusselator) + e1 = ones(N-1) + off = N-1 + e4 = ones(N-off) + T = diagm(0=>-2ones(N), -1=>e1, 1=>e1, off=>e4, -off=>e4) ./ dx^2 + Ie = Matrix{Float64}(I, N, N) + # A + df/du + Op = kron(Ie, T) + kron(T, Ie) + brusselator_jac = let N=N + (J, a, p, t) -> begin + ii1 = N^2 + ii2 = ii1+N^2 + ii3 = ii2+2(N^2) + A = @view p[1:ii1] + B = @view p[(ii1 + 1):ii2] + α = @view p[(ii2 + 1):ii3] + u = @view a[1:(end ÷ 2)] + v = @view a[(end ÷ 2 + 1):end] + N2 = length(a)÷2 + α1 = @view α[1:(end ÷ 2)] + α2 = @view α[(end ÷ 2 + 1):end] + fill!(J, 0) + + J[1:N2, 1:N2] .= α1 .* Op + J[(N2 + 1):end, (N2 + 1):end] .= α2 .* Op + + J1 = @view J[1:N2, 1:N2] + J2 = @view J[(N2 + 1):end, 1:N2] + J3 = @view J[1:N2, (N2 + 1):end] + J4 = @view J[(N2 + 1):end, (N2 + 1):end] + J1[diagind(J1)] .+= @. 2u*v-(A+1) + J2[diagind(J2)] .= @. A-2u*v + J3[diagind(J3)] .= @. u^2 + J4[diagind(J4)] .+= @. -u^2 + nothing + end + end + Jmat = zeros(2N*N, 2N*N) + dp = zeros(2N*N, 4N*N) + brusselator_comp = let N=N, xyd=xyd_brusselator, dx=step(xyd_brusselator), Jmat=Jmat, + dp=dp, brusselator_jac=brusselator_jac + + function brusselator_comp(dus, us, p, t) + @inbounds begin + ii1 = N^2 + ii2 = ii1+N^2 + ii3 = ii2+2(N^2) + @views u, s = us[1:ii2], us[(ii2 + 1):end] + du = @view dus[1:ii2] + ds = @view dus[(ii2 + 1):end] + fill!(dp, 0) + A = @view p[1:ii1] + B = @view p[(ii1 + 1):ii2] + α = @view p[(ii2 + 1):ii3] + dfdα = @view dp[:, (ii2 + 1):ii3] + diagind(dfdα) + for i in 1:ii1 + dp[i, ii1 + i] = 1 + end + II = LinearIndices((N, N, 2)) + uu = @view u[1:(end ÷ 2)] + for i in eachindex(uu) + dp[i, i] = -uu[i] + dp[i + ii1, i] = uu[i] + end + for I in CartesianIndices((N, N)) + x = xyd[I[1]] + y = xyd[I[2]] + i = I[1] + j = I[2] + ip1 = limit(i+1, N); + im1 = limit(i-1, N) + jp1 = limit(j+1, N); + jm1 = limit(j-1, N) + au = dfdα[II[i, j, 1], II[i, j, 1]] = (u[II[im1, j, 1]] + + u[II[ip1, j, 1]] + + u[II[i, jp1, 1]] + + u[II[i, jm1, 1]] - + 4u[II[i, j, 1]])/dx^2 + du[II[i, j, 1]] = α[II[i, j, 1]]*(au) + B[II[i, j, 1]] + + u[II[i, j, 1]]^2*u[II[i, j, 2]] - + (A[II[i, j, 1]] + 1)*u[II[i, j, 1]] + + brusselator_f(x, y, t) + end + for I in CartesianIndices((N, N)) + i = I[1] + j = I[2] + ip1 = limit(i+1, N) + im1 = limit(i-1, N) + jp1 = limit(j+1, N) + jm1 = limit(j-1, N) + av = dfdα[II[i, j, 2], II[i, j, 2]] = (u[II[im1, j, 2]] + + u[II[ip1, j, 2]] + + u[II[i, jp1, 2]] + + u[II[i, jm1, 2]] - + 4u[II[i, j, 2]])/dx^2 + du[II[i, j, 2]] = α[II[i, j, 2]]*(av) + A[II[i, j, 1]]*u[II[i, j, 1]] - + u[II[i, j, 1]]^2*u[II[i, j, 2]] + end + brusselator_jac(Jmat, u, p, t) + BLAS.gemm!('N', 'N', 1.0, Jmat, reshape(s, 2N*N, 4N*N), 1.0, dp) + copyto!(ds, vec(dp)) + return nothing + end + end + end + u0 = init_brusselator_2d(xyd_brusselator) + p = [fill(3.4, N^2); fill(1.0, N^2); fill(10.0, 2*N^2)] + brusselator_2d_loop, u0, + p, + brusselator_jac, + ODEProblem{true, SciMLBase.FullSpecialize}( + brusselator_comp, copy([u0; zeros((N^2*2)*(N^2*4))]), (0.0, 10.0), p) +end +``` + +## Differentiation Setups + +```julia +function diffeq_sen(prob::DiffEqBase.DEProblem, args...; kwargs...) + diffeq_sen(prob.f, prob.u0, prob.tspan, prob.p, args...; kwargs...) +end +function auto_sen(prob::DiffEqBase.DEProblem, args...; kwargs...) + auto_sen(prob.f, prob.u0, prob.tspan, prob.p, args...; kwargs...) +end + +function diffeq_sen( + f, u0, tspan, p, alg = Tsit5(); sensalg = ForwardSensitivity(), kwargs...) + prob = ODEForwardSensitivityProblem(f, u0, tspan, p, sensalg) + sol = solve(prob, alg; save_everystep = false, kwargs...) + extract_local_sensitivities(sol, length(sol))[2] +end + +function auto_sen(f, u0, tspan, p, alg = Tsit5(); kwargs...) + test_f(p) = begin + prob = ODEProblem{true, SciMLBase.FullSpecialize}(f, eltype(p).(u0), tspan, p) + solve(prob, alg; save_everystep = false, kwargs...)[end] + end + ForwardDiff.jacobian(test_f, p) +end + +function numerical_sen(f, u0, tspan, p, alg = Tsit5(); kwargs...) + test_f(out, p) = begin + prob = ODEProblem{true, SciMLBase.FullSpecialize}(f, eltype(p).(u0), tspan, p) + copyto!(out, solve(prob, alg; kwargs...)[end]) + end + J = Matrix{Float64}(undef, length(u0), length(p)) + FiniteDiff.finite_difference_jacobian!( + J, test_f, p, FiniteDiff.JacobianCache(p, Array{Float64}(undef, length(u0)))) + return J +end + +function diffeq_sen_l2(df, u0, tspan, p, t, alg = Tsit5(); + abstol = 1e-5, reltol = 1e-7, + sensalg = InterpolatingAdjoint(), kwargs...) + prob = ODEProblem(df, u0, tspan, p) + sol = solve(prob, alg, sensealg = DiffEqBase.SensitivityADPassThrough(), + abstol = abstol, reltol = reltol; kwargs...) + dg(out, u, p, t, i) = (out.=u .- 1.0) + adjoint_sensitivities(sol, alg; t, abstol = abstol, dgdu_discrete = dg, + reltol = reltol, sensealg = sensalg)[2] +end + +function auto_sen_l2( + f, u0, tspan, p, t, alg = Tsit5(); diffalg = ReverseDiff.gradient, kwargs...) + test_f(p) = begin + prob = ODEProblem{true, SciMLBase.FullSpecialize}(f, eltype(p).(u0), tspan, p) + sol = solve(prob, alg; sensealg = DiffEqBase.SensitivityADPassThrough(), kwargs...)(t) + sum(sol.u) do x + sum(z->(1-z)^2/2, x) + end + end + diffalg(test_f, p) +end + +function numerical_sen_l2(f, u0, tspan, p, t, alg = Tsit5(); kwargs...) + test_f(p) = begin + prob = ODEProblem(f, eltype(p).(u0), tspan, p) + sol = solve(prob, alg; kwargs...)(t) + sum(sol.u) do x + sum(z->(1-z)^2/2, x) + end + end + FiniteDiff.finite_difference_gradient(test_f, p, Val{:central}) +end +``` + +```julia +_adjoint_methods = ntuple(3) do ii + Alg = (InterpolatingAdjoint, QuadratureAdjoint, BacksolveAdjoint)[ii] + ( + user = Alg(autodiff = false, autojacvec = false), # user Jacobian + adjc = Alg(autodiff = true, autojacvec = false), # AD Jacobian + advj = Alg(autodiff = true, autojacvec = EnzymeVJP()) # AD vJ + ) +end |> NamedTuple{(:interp, :quad, :backsol)} +@isdefined(ADJOINT_METHODS) || + (const ADJOINT_METHODS = mapreduce(collect, vcat, _adjoint_methods)) +``` + +## Run Forward Mode Benchmarks + +These are testing for the construction of the full Jacobian. + +```julia +forward_lv = let + @info "Running the Lotka-Volterra model:" + @info " Running compile-time CSA" + t1 = @belapsed solve($lvprob, $(Tsit5()); $tols...) + @info " Running DSA" + t2 = @belapsed auto_sen($lvdf, $u0, $tspan, $p, $(Tsit5()); $tols...) + @info " Running CSA user-Jacobian" + t3 = @belapsed diffeq_sen($lvdf_with_jacobian, $u0, $tspan, $p, $(Tsit5()); + sensalg = ForwardSensitivity(autodiff = false, autojacvec = false), $tols...) + @info " Running AD-Jacobian" + t4 = @belapsed diffeq_sen($lvdf, $u0, $tspan, $p, $(Tsit5()); + sensalg = ForwardSensitivity(autojacvec = false), $tols...) + @info " Running AD-Jv seeding" + t5 = @belapsed diffeq_sen($lvdf, $u0, $tspan, $p, $(Tsit5()); + sensalg = ForwardSensitivity(autojacvec = true), $tols...) + @info " Running numerical differentiation" + t6 = @belapsed numerical_sen($lvdf, $u0, $tspan, $p, $(Tsit5()); $tols...) + print('\n') + [t1, t2, t3, t4, t5, t6] +end +``` + +```julia +forward_bruss = let + @info "Running the Brusselator model:" + n = 5 + # Run low tolerance to test correctness + bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator(n) + sol1 = @time numerical_sen( + bfun, b_u0, (0.0, 10.0), b_p, Rodas5(), abstol = 1e-5, reltol = 1e-7); + sol2 = @time auto_sen( + bfun, b_u0, (0.0, 10.0), b_p, Rodas5(), abstol = 1e-5, reltol = 1e-7); + @test sol1 ≈ sol2 atol=1e-2 + sol3 = @time diffeq_sen(bfun, b_u0, (0.0, 10.0), b_p, Rodas5(autodiff = false), + abstol = 1e-5, reltol = 1e-7); + @test sol1 ≈ hcat(sol3...) atol=1e-3 + sol4 = @time diffeq_sen( + ODEFunction{true, SciMLBase.FullSpecialize}(bfun, jac = brusselator_jac), b_u0, + (0.0, 10.0), b_p, Rodas5(autodiff = false), abstol = 1e-5, reltol = 1e-7, + sensalg = ForwardSensitivity(autodiff = false, autojacvec = false)); + @test sol1 ≈ hcat(sol4...) atol=1e-2 + sol5 = @time solve(brusselator_comp, Rodas5(autodiff = false), abstol = 1e-5, reltol = 1e-7); + @test sol1 ≈ reshape(sol5[end][(2n * n + 1):end], 2n*n, 4n*n) atol=1e-3 + + # High tolerance to benchmark + @info " Running compile-time CSA" + t1 = @belapsed solve($brusselator_comp, $(Rodas5(autodiff = false)); $tols...); + @info " Running DSA" + t2 = @belapsed auto_sen($bfun, $b_u0, $((0.0, 10.0)), $b_p, $(Rodas5()); $tols...); + @info " Running CSA user-Jacobian" + t3 = @belapsed diffeq_sen( + $(ODEFunction{true, SciMLBase.FullSpecialize}(bfun, jac = brusselator_jac)), + $b_u0, $((0.0, 10.0)), $b_p, $(Rodas5(autodiff = false)); + sensalg = ForwardSensitivity(autodiff = false, autojacvec = false), $tols...); + @info " Running AD-Jacobian" + t4 = @belapsed diffeq_sen( + $bfun, $b_u0, $((0.0, 10.0)), $b_p, $(Rodas5(autodiff = false)); + sensalg = ForwardSensitivity(autojacvec = false), $tols...); + @info " Running AD-Jv seeding" + t5 = @belapsed diffeq_sen( + $bfun, $b_u0, $((0.0, 10.0)), $b_p, $(Rodas5(autodiff = false)); + sensalg = ForwardSensitivity(autojacvec = true), $tols...); + @info " Running numerical differentiation" + t6 = @belapsed numerical_sen($bfun, $b_u0, $((0.0, 10.0)), $b_p, $(Rodas5()); $tols...); + print('\n') + [t1, t2, t3, t4, t5, t6] +end +``` + +```julia +forward_pollution = let + @info "Running the pollution model:" + pcomp, pu0, pp, pcompu0 = make_pollution() + ptspan = (0.0, 60.0) + @info " Running compile-time CSA" + t1 = 0#@belapsed solve($(ODEProblem(pcomp, pcompu0, ptspan, pp)), $(Rodas5(autodiff=false)),); + @info " Running DSA" + t2 = @belapsed auto_sen($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), + $pu0, $ptspan, $pp, $(Rodas5()); $tols...); + @info " Running CSA user-Jacobian" + t3 = @belapsed diffeq_sen( + $(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f, jac = pollution.jac)), + $pu0, $ptspan, $pp, $(Rodas5(autodiff = false)); + sensalg = ForwardSensitivity(autodiff = false, autojacvec = false), $tols...); + @info " Running AD-Jacobian" + t4 = @belapsed diffeq_sen($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), + $pu0, $ptspan, $pp, $(Rodas5(autodiff = false)); + sensalg = ForwardSensitivity(autojacvec = false), $tols...); + @info " Running AD-Jv seeding" + t5 = @belapsed diffeq_sen($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), + $pu0, $ptspan, $pp, $(Rodas5(autodiff = false)); + sensalg = ForwardSensitivity(autojacvec = true), $tols...); + @info " Running numerical differentiation" + t6 = @belapsed numerical_sen( + $(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), + $pu0, $ptspan, $pp, $(Rodas5()); $tols...); + print('\n') + [t1, t2, t3, t4, t5, t6] +end +``` + +```julia +forward_pkpd = let + @info "Running the PKPD model:" + #sol1 = solve(pkpdcompprob, Tsit5(),abstol=1e-5,reltol=1e-7,callback=pkpdcb,tstops=0:24:240,)[end][6:end] + sol2 = vec(auto_sen(pkpdprob, Tsit5(), abstol = 1e-5, reltol = 1e-7, + callback = pkpdcb, tstops = 0:24:240)) + sol3 = vec(hcat(diffeq_sen(pkpdprob, Tsit5(), abstol = 1e-5, reltol = 1e-7, + callback = pkpdcb, tstops = 0:24:240)...)) + #@test sol1 ≈ sol2 atol=1e-3 + @test sol2 ≈ sol3 atol=1e-3 + @info " Running compile-time CSA" + #t1 = @belapsed solve($pkpdcompprob, $(Tsit5()),callback=$pkpdcb,tstops=0:24:240,); + @info " Running DSA" + t2 = @belapsed auto_sen($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, $(Tsit5()); + callback = $pkpdcb, tstops = 0:24:240, $tols...); + @info " Running CSA user-Jacobian" + t3 = @belapsed diffeq_sen( + $(ODEFunction{true, SciMLBase.FullSpecialize}(pkpdf.f, jac = pkpdf.jac)), + $pkpdu0, $pkpdtspan, $pkpdp, $(Tsit5()); callback = $pkpdcb, tstops = 0:24:240, + sensalg = ForwardSensitivity(autodiff = false, autojacvec = false), $tols...); + @info " Running AD-Jacobian" + t4 = @belapsed diffeq_sen($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, + $(Tsit5()); callback = $pkpdcb, tstops = 0:24:240, + sensalg = ForwardSensitivity(autojacvec = false), $tols...); + @info " Running AD-Jv seeding" + t5 = @belapsed diffeq_sen($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, + $(Tsit5()); callback = $pkpdcb, tstops = 0:24:240, + sensalg = ForwardSensitivity(autojacvec = true), $tols...); + @info " Running numerical differentiation" + t6 = @belapsed numerical_sen($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, $(Tsit5()); + callback = $pkpdcb, tstops = 0:24:240, $tols...); + print('\n') + [0, t2, t3, t4, t5, t6] +end +``` + +```julia +forward_methods = ["Compile-time CSA", "DSA", "CSA user-Jacobian", + "AD-Jacobian", "AD-Jv seeding", "Numerical Differentiation"] +forward_timings = DataFrame( + methods = forward_methods, LV = forward_lv, Bruss = forward_bruss, + Pollution = forward_pollution, PKPD = forward_pkpd) +display(forward_timings) +``` + +## Run Adjoint Benchmarks + +Adjoint requires a slightly different setup even with forward mode ADs since it requires +a loss function choice. For that we simply take the L2 norm of the solution. + +```julia +adjoint_lv = let + @info "Running the Lotka-Volerra model:" + lvu0 = [1.0, 1.0]; + lvtspan = (0.0, 10.0); + lvp = [1.5, 1.0, 3.0]; + lvt = 0:0.5:10 + @time lsol1 = auto_sen_l2( + lvdf, lvu0, lvtspan, lvp, lvt, (Tsit5()); diffalg = (ForwardDiff.gradient), tols...); + @time lsol2 = auto_sen_l2( + lvdf, lvu0, lvtspan, lvp, lvt, (Tsit5()); diffalg = (ReverseDiff.gradient), tols...); + @time lsol3 = map(ADJOINT_METHODS) do alg + f = SciMLSensitivity.alg_autodiff(alg) ? lvdf : lvdf_with_jacobian + diffeq_sen_l2(f, lvu0, lvtspan, lvp, lvt, (Tsit5()); sensalg = alg, tols...) + end + @time lsol4 = numerical_sen_l2(lvdf, lvu0, lvtspan, lvp, lvt, Tsit5(); tols...); + @test maximum(abs, lsol1 .- lsol2)/maximum(abs, lsol1) < 0.2 + @test all(i -> maximum(abs, lsol1 .- lsol3[i]')/maximum(abs, lsol1) < 0.2, eachindex(ADJOINT_METHODS)) + @test maximum(abs, lsol1 .- lsol4)/maximum(abs, lsol1) < 0.2 + t1 = @belapsed auto_sen_l2($lvdf, $lvu0, $lvtspan, $lvp, $lvt, $(Tsit5()); + diffalg = $(ForwardDiff.gradient), $tols...); + t2 = @belapsed auto_sen_l2($lvdf, $lvu0, $lvtspan, $lvp, $lvt, $(Tsit5()); + diffalg = $(ReverseDiff.gradient), $tols...); + t3 = map(ADJOINT_METHODS) do alg + f = SciMLSensitivity.alg_autodiff(alg) ? lvdf : lvdf_with_jacobian + @belapsed diffeq_sen_l2( + $f, $lvu0, $lvtspan, $lvp, $lvt, $(Tsit5()); sensalg = $alg, $tols...); + end + t4 = @belapsed numerical_sen_l2( + $lvdf, $lvu0, $lvtspan, $lvp, $lvt, $(Tsit5()); $tols...); + [t1; t2; t3; t4] +end +``` + +```julia +adjoint_bruss = let + @info "Running the Brusselator model:" + bt = 0:0.1:10 + tspan = (0.0, 10.0) + n = 5 + bfun, b_u0, b_p, brusselator_jac, brusselator_comp = makebrusselator(n) + @time bsol1 = auto_sen_l2( + bfun, b_u0, tspan, b_p, bt, (Rodas5()); diffalg = (ForwardDiff.gradient), tols...); + #@time bsol2 = auto_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5(autodiff=false)); diffalg=(ReverseDiff.gradient), tols...); + #@test maximum(abs, bsol1 .- bsol2)/maximum(abs, bsol1) < 1e-2 + + @time bsol3 = map(ADJOINT_METHODS) do alg + @info "Running $alg" + f = SciMLSensitivity.alg_autodiff(alg) ? bfun : + ODEFunction{true, SciMLBase.FullSpecialize}(bfun, jac = brusselator_jac) + solver = Rodas5(autodiff = false) + diffeq_sen_l2( + f, b_u0, tspan, b_p, bt, solver, reltol = 1e-7; sensalg = alg, tols...) + end + @time bsol4 = numerical_sen_l2(bfun, b_u0, tspan, b_p, bt, (Rodas5()); tols...); + # NOTE: backsolve gives unstable results!!! + @test all(i->maximum(abs, bsol1 .- bsol3[i]')/maximum(abs, bsol1) < 4e-2, + eachindex(ADJOINT_METHODS)[1:(2end ÷ 3)]) + @test all(i->maximum(abs, bsol1 .- bsol3[i]')/maximum(abs, bsol1) >= 4e-2, + eachindex(ADJOINT_METHODS)[(2end ÷ 3 + 1):end]) + @test maximum(abs, bsol1 .- bsol4)/maximum(abs, bsol1) < 2e-2 + t1 = @belapsed auto_sen_l2($bfun, $b_u0, $tspan, $b_p, $bt, $(Rodas5()); + diffalg = $(ForwardDiff.gradient), $tols...); + #t2 = @belapsed auto_sen_l2($bfun, $b_u0, $tspan, $b_p, $bt, $(Rodas5(autodiff=false)); diffalg=$(ReverseDiff.gradient), $tols...); + t2 = NaN + t3 = map(ADJOINT_METHODS[1:(2end ÷ 3)]) do alg + @info "Running $alg" + f = SciMLSensitivity.alg_autodiff(alg) ? bfun : + ODEFunction{true, SciMLBase.FullSpecialize}(bfun, jac = brusselator_jac) + solver = Rodas5(autodiff = false) + @elapsed diffeq_sen_l2(f, b_u0, tspan, b_p, bt, solver; sensalg = alg, tols...); + end + t3 = [t3; fill(NaN, length(ADJOINT_METHODS)÷3)] + t4 = @belapsed numerical_sen_l2($bfun, $b_u0, $tspan, $b_p, $bt, $(Rodas5()); $tols...); + [t1; t2; t3; t4] +end +``` + +```julia +adjoint_pollution = let + @info "Running the Pollution model:" + pcomp, pu0, pp, pcompu0 = make_pollution(); + ptspan = (0.0, 60.0) + pts = 0:0.5:60 + @time psol1 = auto_sen_l2( + (ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), pu0, ptspan, pp, + pts, (Rodas5(autodiff = false)); diffalg = (ForwardDiff.gradient), tols...); + #@time psol2 = auto_sen_l2((ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), pu0, ptspan, pp, pts, (Rodas5(autodiff=false)); diffalg=(ReverseDiff.gradient), tols...); + #@test maximum(abs, psol1 .- psol2)/maximum(abs, psol1) < 1e-2 + @time psol3 = map(ADJOINT_METHODS) do alg + @info "Running $alg" + f = SciMLSensitivity.alg_autodiff(alg) ? pollution.f : + ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f, jac = pollution.jac) + solver = Rodas5(autodiff = false) + diffeq_sen_l2(f, pu0, ptspan, pp, pts, solver; sensalg = alg, tols...); + end + @time psol4 = numerical_sen_l2( + (ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), + pu0, ptspan, pp, pts, (Rodas5(autodiff = false)); tols...); + # NOTE: backsolve gives unstable results!!! + @test all(i->maximum(abs, psol1 .- psol3[i]')/maximum(abs, psol1) < 1e-2, + eachindex(ADJOINT_METHODS)[1:(2end ÷ 3)]) + @test all(i->maximum(abs, psol1 .- psol3[i]')/maximum(abs, psol1) >= 1e-2, + eachindex(ADJOINT_METHODS)[(2end ÷ 3 + 1):end]) + @test maximum(abs, psol1 .- psol4)/maximum(abs, psol1) < 1e-2 + t1 = @belapsed auto_sen_l2( + $(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), $pu0, $ptspan, $pp, + $pts, $(Rodas5(autodiff = false)); diffalg = $(ForwardDiff.gradient), $tols...); + #t2 = @belapsed auto_sen_l2($(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), $pu0, $ptspan, $pp, $pts, $(Rodas5(autodiff=false)); diffalg=$(ReverseDiff.gradient), $tols...); + t2 = NaN + t3 = map(ADJOINT_METHODS[1:(2end ÷ 3)]) do alg + @info "Running $alg" + f = SciMLSensitivity.alg_autodiff(alg) ? pollution.f : + ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f, jac = pollution.jac) + solver = Rodas5(autodiff = false) + @elapsed diffeq_sen_l2(f, pu0, ptspan, pp, pts, solver; sensalg = alg, tols...); + end + t3 = [t3; fill(NaN, length(ADJOINT_METHODS)÷3)] + t4 = @belapsed numerical_sen_l2( + $(ODEFunction{true, SciMLBase.FullSpecialize}(pollution.f)), + $pu0, $ptspan, $pp, $pts, $(Rodas5(autodiff = false)); $tols...); + [t1; t2; t3; t4] +end +``` + +```julia +adjoint_pkpd = let + @info "Running the PKPD model:" + pts = 0:0.5:50 + # need to use lower tolerances to avoid running into the complex domain because of exponentiation + pkpdsol1 = @time auto_sen_l2((pkpdf.f), pkpdu0, pkpdtspan, pkpdp, pts, + (Tsit5()); callback = pkpdcb, tstops = 0:24:240, + diffalg = (ForwardDiff.gradient), tols...); + pkpdsol2 = @time auto_sen_l2((pkpdf.f), pkpdu0, pkpdtspan, pkpdp, pts, + (Tsit5()); callback = pkpdcb, tstops = 0:24:240, + diffalg = (ReverseDiff.gradient), tols...); + pkpdsol3 = @time map(ADJOINT_METHODS[1:(2end ÷ 3)]) do alg + f = SciMLSensitivity.alg_autodiff(alg) ? pkpdf.f : + ODEFunction{true, SciMLBase.FullSpecialize}(pkpdf.f, jac = pkpdf.jac) + diffeq_sen_l2(f, pkpdu0, pkpdtspan, pkpdp, pts, (Tsit5()); sensalg = alg, + callback = pkpdcb, tstops = 0:24:240, tols...); + end + pkpdsol4 = @time numerical_sen_l2( + (ODEFunction{true, SciMLBase.FullSpecialize}(pkpdf.f)), + pkpdu0, pkpdtspan, pkpdp, pts, (Tsit5()); + callback = pkpdcb, tstops = 0:24:240, tols...); + @test maximum(abs, pkpdsol1 .- pkpdsol2)/maximum(abs, pkpdsol1) < 0.2 + @test all(i->maximum(abs, pkpdsol1 .- pkpdsol3[i]')/maximum(abs, pkpdsol1) < 0.2, + eachindex(ADJOINT_METHODS)[1:(2end ÷ 3)]) + @test maximum(abs, pkpdsol1 .- pkpdsol4)/maximum(abs, pkpdsol1) < 0.2 + t1 = @belapsed auto_sen_l2($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, $pts, + $(Tsit5()); callback = pkpdcb, tstops = 0:24:240, + diffalg = $(ForwardDiff.gradient), $tols...); + t2 = @belapsed auto_sen_l2($(pkpdf.f), $pkpdu0, $pkpdtspan, $pkpdp, $pts, + $(Tsit5()); callback = pkpdcb, tstops = 0:24:240, + diffalg = $(ReverseDiff.gradient), $tols...); + t3 = map(ADJOINT_METHODS[1:(2end ÷ 3)]) do alg + f = SciMLSensitivity.alg_autodiff(alg) ? pkpdf.f : + ODEFunction{true, SciMLBase.FullSpecialize}(pkpdf.f, jac = pkpdf.jac) + @belapsed diffeq_sen_l2( + $f, $pkpdu0, $pkpdtspan, $pkpdp, $pts, $(Tsit5()); tstops = 0:24:240, + callback = pkpdcb, sensalg = $alg, tols...); + end + t3 = [t3; fill(NaN, length(ADJOINT_METHODS)÷3)] + t4 = @belapsed numerical_sen_l2( + $(ODEFunction{true, SciMLBase.FullSpecialize}(pkpdf.f)), $pkpdu0, + $pkpdtspan, $pkpdp, $pts, $(Tsit5()); tstops = 0:24:240, + callback = $pkpdcb, $tols...); + [t1; t2; t3; t4] +end +``` + +```julia +adjoint_methods = ["ForwardDiff", "ReverseDiff", + "InterpolatingAdjoint User Jac", "InterpolatingAdjoint AD Jac", "InterpolatingAdjoint v'J", + "QuadratureAdjoint User Jac", "QuadratureAdjoint AD Jac", "QuadratureAdjoint v'J", + "BacksolveAdjoint User Jac", "BacksolveAdjoint AD Jac", "BacksolveAdjoint v'J", + "Numerical Differentiation"] +adjoint_timings = DataFrame( + methods = adjoint_methods, LV = adjoint_lv, Bruss = adjoint_bruss, + Pollution = adjoint_pollution, PKPD = adjoint_pkpd) +Markdown.parse(PrettyTables.pretty_table( + String, adjoint_timings; backend = Val(:markdown), header = names(adjoint_timings))) +``` + +## Appendix + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/AutomaticDifferentiationSparse/BrusselatorSparseAD.jmd b/benchmarks/AutomaticDifferentiationSparse/BrusselatorSparseAD.jmd index 029e2b30f..2878a2831 100644 --- a/benchmarks/AutomaticDifferentiationSparse/BrusselatorSparseAD.jmd +++ b/benchmarks/AutomaticDifferentiationSparse/BrusselatorSparseAD.jmd @@ -33,7 +33,7 @@ limit(a, N) = function brusselator_2d!(du, u) t = 0.0 N = size(u, 1) - xyd = range(0; stop=1, length=N) + xyd = range(0; stop = 1, length = N) p = (3.4, 1.0, 10.0, step(xyd)) A, B, alpha, dx = p alpha = alpha / dx^2 @@ -41,23 +41,25 @@ function brusselator_2d!(du, u) @inbounds for I in CartesianIndices((N, N)) i, j = Tuple(I) x, y = xyd[I[1]], xyd[I[2]] - ip1, im1, jp1, jm1 = limit(i + 1, N), + ip1, im1, jp1, + jm1 = limit(i + 1, N), limit(i - 1, N), limit(j + 1, N), limit(j - 1, N) - du[i, j, 1] = - alpha * - (u[im1, j, 1] + u[ip1, j, 1] + u[i, jp1, 1] + u[i, jm1, 1] - 4u[i, j, 1]) + - B + - u[i, j, 1]^2 * u[i, j, 2] - (A + 1) * u[i, j, 1] + brusselator_f(x, y, t) - du[i, j, 2] = - alpha * - (u[im1, j, 2] + u[ip1, j, 2] + u[i, jp1, 2] + u[i, jm1, 2] - 4u[i, j, 2]) + - A * u[i, j, 1] - u[i, j, 1]^2 * u[i, j, 2] + du[i, j, 1] = alpha * + (u[im1, j, 1] + u[ip1, j, 1] + u[i, jp1, 1] + u[i, jm1, 1] - + 4u[i, j, 1]) + + B + + u[i, j, 1]^2 * u[i, j, 2] - (A + 1) * u[i, j, 1] + + brusselator_f(x, y, t) + du[i, j, 2] = alpha * + (u[im1, j, 2] + u[ip1, j, 2] + u[i, jp1, 2] + u[i, jm1, 2] - + 4u[i, j, 2]) + + A * u[i, j, 1] - u[i, j, 1]^2 * u[i, j, 2] end end; function init_brusselator_2d(N::Integer) - xyd = range(0; stop=1, length=N) + xyd = range(0; stop = 1, length = N) N = length(xyd) u = zeros(N, N, 2) for I in CartesianIndices((N, N)) @@ -101,8 +103,8 @@ c2 = SDT.matrix_colors(S1) ```julia backend = AutoSparse( AutoForwardDiff(); - sparsity_detector=TracerSparsityDetector(), - coloring_algorithm=GreedyColoringAlgorithm(), + sparsity_detector = TracerSparsityDetector(), + coloring_algorithm = GreedyColoringAlgorithm() ); extras = DI.prepare_jacobian(brusselator_2d!, similar(x0_32), backend, x0_32); @@ -112,10 +114,10 @@ J1 = DI.jacobian!( cache = SDT.sparse_jacobian_cache( backend, - SDT.JacPrototypeSparsityDetection(; jac_prototype=S1), + SDT.JacPrototypeSparsityDetection(; jac_prototype = S1), brusselator_2d!, similar(x0_32), - x0_32, + x0_32 ); J2 = SDT.sparse_jacobian!( similar(S1, eltype(x0_32)), backend, cache, brusselator_2d!, similar(x0_32), x0_32 @@ -147,21 +149,22 @@ end let pld = plot(; - title="Sparsity detection on the Brusselator", - xlabel="Input size N", - ylabel="Runtime [s]", + title = "Sparsity detection on the Brusselator", + xlabel = "Input size N", + ylabel = "Runtime [s]" ) plot!( pld, N_values, td1; - lw=2, - linestyle=:auto, - markershape=:auto, - label="SparseConnectivityTracer", + lw = 2, + linestyle = :auto, + markershape = :auto, + label = "SparseConnectivityTracer" ) - plot!(pld, N_values, td2; lw=2, linestyle=:auto, markershape=:auto, label="Symbolics") - plot!(pld; xscale=:log10, yscale=:log10, legend=:topleft, minorgrid=true) + plot!(pld, N_values, td2; lw = 2, linestyle = :auto, + markershape = :auto, label = "Symbolics") + plot!(pld; xscale = :log10, yscale = :log10, legend = :topleft, minorgrid = true) pld end ``` @@ -182,19 +185,20 @@ end let plc = plot(; - title="Coloring on the Brusselator", xlabel="Input size N", ylabel="Runtime [s]" + title = "Coloring on the Brusselator", xlabel = "Input size N", ylabel = "Runtime [s]" ) plot!( plc, N_values, tc1; - lw=2, - linestyle=:auto, - markershape=:auto, - label="SparseMatrixColorings", + lw = 2, + linestyle = :auto, + markershape = :auto, + label = "SparseMatrixColorings" ) - plot!(plc, N_values, tc2; lw=2, linestyle=:auto, markershape=:auto, label="SparseDiffTools") - plot!(plc; xscale=:log10, yscale=:log10, legend=:topleft, minorgrid=true) + plot!(plc, N_values, tc2; lw = 2, linestyle = :auto, + markershape = :auto, label = "SparseDiffTools") + plot!(plc; xscale = :log10, yscale = :log10, legend = :topleft, minorgrid = true) plc end ``` @@ -211,40 +215,41 @@ for (i, N) in enumerate(N_values) ) J = similar(S, eltype(x0)) - tj1[i] = @belapsed DI.jacobian!($brusselator_2d!, _y, _J, _prep, $backend, $x0) setup = ( + tj1[i] = @belapsed DI.jacobian!($brusselator_2d!, _y, _J, _prep, $backend, $x0) setup=( _y = similar($x0); _J = similar($J); _prep = DI.prepare_jacobian($brusselator_2d!, similar($x0), $backend, $x0) - ) evals = 1 + ) evals=1 - tj2[i] = @belapsed SDT.sparse_jacobian!(_J, $backend, _cache, $brusselator_2d!, _y, $x0) setup = ( + tj2[i] = @belapsed SDT.sparse_jacobian!(_J, $backend, _cache, $brusselator_2d!, _y, $x0) setup=( _y = similar($x0); _J = similar($J); _cache = SDT.sparse_jacobian_cache( $backend, - SDT.JacPrototypeSparsityDetection(; jac_prototype=$S), + SDT.JacPrototypeSparsityDetection(; jac_prototype = $S), $brusselator_2d!, similar($x0), - $x0, + $x0 ) - ) evals = 1 + ) evals=1 end let plj = plot(; - title="Sparse Jacobian on the Brusselator", xlabel="Input size N", ylabel="Runtime [s]" + title = "Sparse Jacobian on the Brusselator", xlabel = "Input size N", ylabel = "Runtime [s]" ) plot!( plj, N_values, tj1; - lw=2, - linestyle=:auto, - markershape=:auto, - label="DifferentiationInterface", + lw = 2, + linestyle = :auto, + markershape = :auto, + label = "DifferentiationInterface" ) - plot!(plj, N_values, tj2; lw=2, linestyle=:auto, markershape=:auto, label="SparseDiffTools") - plot!(plj; xscale=:log10, yscale=:log10, legend=:topleft, minorgrid=true) + plot!(plj, N_values, tj2; lw = 2, linestyle = :auto, + markershape = :auto, label = "SparseDiffTools") + plot!(plj; xscale = :log10, yscale = :log10, legend = :topleft, minorgrid = true) plj end ``` @@ -254,39 +259,40 @@ end ```julia let pl = plot(; - title="Is the new pipeline worth it?\nTest case: Brusselator", - xlabel="Input size N", - ylabel="Runtime ratio DI / SparseDiffTools", + title = "Is the new pipeline worth it?\nTest case: Brusselator", + xlabel = "Input size N", + ylabel = "Runtime ratio DI / SparseDiffTools" ) plot!( pl, N_values, td2 ./ td1; - lw=2, - linestyle=:dot, - markershape=:utriangle, - label="sparsity detection speedup", + lw = 2, + linestyle = :dot, + markershape = :utriangle, + label = "sparsity detection speedup" ) plot!( pl, N_values, tc2 ./ tc1; - lw=2, - linestyle=:dashdot, - markershape=:diamond, - label="coloring speedup", + lw = 2, + linestyle = :dashdot, + markershape = :diamond, + label = "coloring speedup" ) plot!( pl, N_values, tj2 ./ tj1; - lw=2, - linestyle=:dash, - markershape=:pentagon, - label="differentiation speedup", + lw = 2, + linestyle = :dash, + markershape = :pentagon, + label = "differentiation speedup" ) - plot!(pl, N_values, ones(length(N_values)); lw=3, color=:black, label="same speed") - plot!(pl; xscale=:log10, yscale=:log10, minorgrid=true, legend=:right) + plot!( + pl, N_values, ones(length(N_values)); lw = 3, color = :black, label = "same speed") + plot!(pl; xscale = :log10, yscale = :log10, minorgrid = true, legend = :right) pl end ``` diff --git a/benchmarks/AutomaticDifferentiationSparse/ManualLoopDissusionSparseAD.jmd b/benchmarks/AutomaticDifferentiationSparse/ManualLoopDissusionSparseAD.jmd index f3ac6db71..c1ae61fa1 100644 --- a/benchmarks/AutomaticDifferentiationSparse/ManualLoopDissusionSparseAD.jmd +++ b/benchmarks/AutomaticDifferentiationSparse/ManualLoopDissusionSparseAD.jmd @@ -9,7 +9,7 @@ using DifferentiationInterfaceTest using LinearAlgebra using SparseConnectivityTracer: TracerSparsityDetector using SparseMatrixColorings -import Enzyme,ForwardDiff,Mooncake +import Enzyme, ForwardDiff, Mooncake import Markdown, PrettyTables, Printf ``` @@ -17,21 +17,21 @@ import Markdown, PrettyTables, Printf ```julia bcks = [ - AutoEnzyme(mode=Enzyme.Reverse), - AutoEnzyme(mode=Enzyme.Forward), - AutoMooncake(config=nothing), + AutoEnzyme(mode = Enzyme.Reverse), + AutoEnzyme(mode = Enzyme.Forward), + AutoMooncake(config = nothing), AutoForwardDiff(), AutoSparse( AutoForwardDiff(); - sparsity_detector=TracerSparsityDetector(), - coloring_algorithm=GreedyColoringAlgorithm() + sparsity_detector = TracerSparsityDetector(), + coloring_algorithm = GreedyColoringAlgorithm() ), AutoSparse( - AutoEnzyme(mode=Enzyme.Forward); - sparsity_detector=TracerSparsityDetector(), - coloring_algorithm=GreedyColoringAlgorithm() + AutoEnzyme(mode = Enzyme.Forward); + sparsity_detector = TracerSparsityDetector(), + coloring_algorithm = GreedyColoringAlgorithm() ) - ] +] ``` ## Diffusion operator simple loop @@ -41,29 +41,30 @@ uin() = 0.0 uout() = 0.0 function Diffusion(u) du = zero(u) - for i in eachindex(du,u) + for i in eachindex(du, u) if i == 1 ug = uin() - ud = u[i+1] + ud = u[i + 1] elseif i == length(u) - ug = u[i-1] + ug = u[i - 1] ud = uout() else - ug = u[i-1] - ud = u[i+1] + ug = u[i - 1] + ud = u[i + 1] end - du[i] = ug + ud -2*u[i] + du[i] = ug + ud - 2*u[i] end return du end; ``` ## Manual jacobian + ```julia function DDiffusion(u) A = diagm( -1 => ones(length(u)-1), - 0=>-2 .*ones(length(u)), + 0=>-2 .* ones(length(u)), 1 => ones(length(u)-1)) return A end; @@ -73,7 +74,7 @@ end; ```julia u = rand(1000) -scenarios = [ Scenario{:jacobian,:out}(Diffusion,u,res1=DDiffusion(u))]; +scenarios = [Scenario{:jacobian, :out}(Diffusion, u, res1 = DDiffusion(u))]; ``` ## Run Benchmarks @@ -83,10 +84,10 @@ df = benchmark_differentiation(bcks, scenarios) table = PrettyTables.pretty_table( String, df; - backend=Val(:markdown), - header=names(df), - formatters=PrettyTables.ft_printf("%.1e"), + backend = Val(:markdown), + header = names(df), + formatters = PrettyTables.ft_printf("%.1e") ) Markdown.parse(table) -``` \ No newline at end of file +``` diff --git a/benchmarks/AutomaticDifferentiationSparse/Project.toml b/benchmarks/AutomaticDifferentiationSparse/Project.toml index 11ee5082a..f93d440af 100644 --- a/benchmarks/AutomaticDifferentiationSparse/Project.toml +++ b/benchmarks/AutomaticDifferentiationSparse/Project.toml @@ -32,7 +32,7 @@ Mooncake = "0.4" Plots = "1" PreallocationTools = "0.4" PrettyTables = "2" -SparseConnectivityTracer = "0.6" +SparseConnectivityTracer = "0.6, 1" SparseDiffTools = "2" SparseMatrixColorings = "0.4" Symbolics = "5, 6" diff --git a/benchmarks/BayesianInference/DiffEqBayesFitzHughNagumo.jmd b/benchmarks/BayesianInference/DiffEqBayesFitzHughNagumo.jmd index 443f52be8..492bc18d4 100644 --- a/benchmarks/BayesianInference/DiffEqBayesFitzHughNagumo.jmd +++ b/benchmarks/BayesianInference/DiffEqBayesFitzHughNagumo.jmd @@ -8,12 +8,13 @@ using DiffEqBayes, BenchmarkTools ``` ```julia -using OrdinaryDiffEq, RecursiveArrayTools, Distributions, ParameterizedFunctions, StanSample, DynamicHMC +using OrdinaryDiffEq, RecursiveArrayTools, Distributions, ParameterizedFunctions, + StanSample, DynamicHMC using Plots, StaticArrays, Turing, LinearAlgebra ``` ```julia -gr(fmt=:png) +gr(fmt = :png) ``` ### Defining the problem. @@ -22,25 +23,26 @@ The [FitzHugh-Nagumo model](https://en.wikipedia.org/wiki/FitzHugh%E2%80%93Nagum ```julia fitz = @ode_def FitzhughNagumo begin - dv = v - 0.33*v^3 -w + l - dw = τinv*(v + a - b*w) + dv = v - 0.33*v^3 - w + l + dw = τinv*(v + a - b*w) end a b τinv l ``` ```julia -prob_ode_fitzhughnagumo = ODEProblem(fitz, [1.0,1.0], (0.0,10.0), [0.7,0.8,1/12.5,0.5]) +prob_ode_fitzhughnagumo = ODEProblem(fitz, [1.0, 1.0], (0.0, 10.0), [0.7, 0.8, 1/12.5, 0.5]) sol = solve(prob_ode_fitzhughnagumo, Tsit5()) ``` ```julia -sprob_ode_fitzhughnagumo = ODEProblem{false,SciMLBase.FullSpecialize}(fitz, SA[1.0,1.0], (0.0,10.0), SA[0.7,0.8,1/12.5,0.5]) +sprob_ode_fitzhughnagumo = ODEProblem{false, SciMLBase.FullSpecialize}( + fitz, SA[1.0, 1.0], (0.0, 10.0), SA[0.7, 0.8, 1 / 12.5, 0.5]) sol = solve(sprob_ode_fitzhughnagumo, Tsit5()) ``` Data is generated by adding noise to the solution obtained above. ```julia -t = collect(range(1,stop=10,length=10)) +t = collect(range(1, stop = 10, length = 10)) sig = 0.20 data = convert(Array, VectorOfArray([(sol(t[i]) + sig*randn(2)) for i in 1:length(t)])) ``` @@ -48,15 +50,16 @@ data = convert(Array, VectorOfArray([(sol(t[i]) + sig*randn(2)) for i in 1:lengt ### Plot of the data and the solution. ```julia -scatter(t, data[1,:]) -scatter!(t, data[2,:]) +scatter(t, data[1, :]) +scatter!(t, data[2, :]) plot!(sol) ``` ### Priors for the parameters which will be passed for the Bayesian Inference ```julia -priors = [truncated(Normal(1.0,0.5),0,1.5), truncated(Normal(1.0,0.5),0,1.5), truncated(Normal(0.0,0.5),0.0,0.5), truncated(Normal(0.5,0.5),0,1)] +priors = [truncated(Normal(1.0, 0.5), 0, 1.5), truncated(Normal(1.0, 0.5), 0, 1.5), + truncated(Normal(0.0, 0.5), 0.0, 0.5), truncated(Normal(0.5, 0.5), 0, 1)] ``` ### Benchmarks @@ -64,7 +67,9 @@ priors = [truncated(Normal(1.0,0.5),0,1.5), truncated(Normal(1.0,0.5),0,1.5), tr #### Stan.jl backend ```julia -@time bayesian_result_stan = stan_inference(prob_ode_fitzhughnagumo,t,data,priors; delta = 0.65, num_samples = 10_000, print_summary=false, vars=(DiffEqBayes.StanODEData(), InverseGamma(2, 3))) +@time bayesian_result_stan = stan_inference( + prob_ode_fitzhughnagumo, t, data, priors; delta = 0.65, num_samples = 10_000, + print_summary = false, vars = (DiffEqBayes.StanODEData(), InverseGamma(2, 3))) ``` ### Direct Turing.jl @@ -74,15 +79,15 @@ priors = [truncated(Normal(1.0,0.5),0,1.5), truncated(Normal(1.0,0.5),0,1.5), tr # Prior distributions. σ ~ InverseGamma(2, 3) - a ~ truncated(Normal(1.0,0.5),0,1.5) - b ~ truncated(Normal(1.0,0.5),0,1.5) - τinv ~ truncated(Normal(0.0,0.5),0.0,0.5) - l ~ truncated(Normal(0.5,0.5),0,1) + a ~ truncated(Normal(1.0, 0.5), 0, 1.5) + b ~ truncated(Normal(1.0, 0.5), 0, 1.5) + τinv ~ truncated(Normal(0.0, 0.5), 0.0, 0.5) + l ~ truncated(Normal(0.5, 0.5), 0, 1) # Simulate Lotka-Volterra model. - p = SA[a,b,τinv,l] + p = SA[a, b, τinv, l] _prob = remake(prob, p = p) - predicted = solve(_prob, Tsit5(); saveat=t) + predicted = solve(_prob, Tsit5(); saveat = t) # Observations. for i in 1:length(predicted) @@ -94,16 +99,16 @@ end model = fitlv(data, sprob_ode_fitzhughnagumo) -@time chain = sample(model, Turing.NUTS(0.65), 10000; progress=false) +@time chain = sample(model, Turing.NUTS(0.65), 10000; progress = false) ``` #### Turing.jl backend ```julia -@time bayesian_result_turing = turing_inference(prob_ode_fitzhughnagumo,Tsit5(),t,data,priors;num_samples = 10_000) +@time bayesian_result_turing = turing_inference( + prob_ode_fitzhughnagumo, Tsit5(), t, data, priors; num_samples = 10_000) ``` - # Conclusion FitzHugh-Ngumo is a standard problem for parameter estimation studies. In the FitzHugh-Nagumo model the parameters to be estimated were `[0.7,0.8,0.08,0.5]`. @@ -111,5 +116,5 @@ FitzHugh-Ngumo is a standard problem for parameter estimation studies. In the Fi ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/BayesianInference/DiffEqBayesLorenz.jmd b/benchmarks/BayesianInference/DiffEqBayesLorenz.jmd index bb4dfbac9..88184dc42 100644 --- a/benchmarks/BayesianInference/DiffEqBayesLorenz.jmd +++ b/benchmarks/BayesianInference/DiffEqBayesLorenz.jmd @@ -14,42 +14,42 @@ using Plots, LinearAlgebra ``` ```julia -gr(fmt=:png) +gr(fmt = :png) ``` #### Initializing the problem ```julia g1 = @ode_def LorenzExample begin - dx = σ*(y-x) - dy = x*(ρ-z) - y - dz = x*y - β*z + dx = σ*(y-x) + dy = x*(ρ-z) - y + dz = x*y - β*z end σ ρ β ``` ```julia r0 = [1.0; 0.0; 0.0] tspan = (0.0, 30.0) -p = [10.0,28.0,2.66] +p = [10.0, 28.0, 2.66] ``` ```julia prob = ODEProblem(g1, r0, tspan, p) -sol = solve(prob,Tsit5()) +sol = solve(prob, Tsit5()) ``` ```julia sr0 = SA[1.0; 0.0; 0.0] tspan = (0.0, 30.0) -sp = SA[10.0,28.0,2.66] -sprob = ODEProblem{false,SciMLBase.FullSpecialize}(g1, sr0, tspan, sp) -sol = solve(sprob,Tsit5()) +sp = SA[10.0, 28.0, 2.66] +sprob = ODEProblem{false, SciMLBase.FullSpecialize}(g1, sr0, tspan, sp) +sol = solve(sprob, Tsit5()) ``` #### Generating data for bayesian estimation of parameters from the obtained solutions using the `Tsit5` algorithm by adding random noise to it. ```julia -t = collect(range(1, stop=30, length=30)) +t = collect(range(1, stop = 30, length = 30)) sig = 0.49 data = convert(Array, VectorOfArray([(sol(t[i]) + sig*randn(3)) for i in 1:length(t)])) ``` @@ -57,9 +57,9 @@ data = convert(Array, VectorOfArray([(sol(t[i]) + sig*randn(3)) for i in 1:lengt #### Plots of the generated data and the actual data. ```julia -Plots.scatter(t, data[1,:],markersize=4,color=:purple) -Plots.scatter!(t, data[2,:],markersize=4,color=:yellow) -Plots.scatter!(t, data[3,:],markersize=4,color=:black) +Plots.scatter(t, data[1, :], markersize = 4, color = :purple) +Plots.scatter!(t, data[2, :], markersize = 4, color = :yellow) +Plots.scatter!(t, data[3, :], markersize = 4, color = :black) plot!(sol) ``` @@ -68,26 +68,30 @@ plot!(sol) ```julia cb = AdaptiveProbIntsUncertainty(5) monte_prob = EnsembleProblem(prob) -sim = solve(monte_prob,Tsit5(),trajectories=100,callback=cb,reltol=1e-5,abstol=1e-5) -plot(sim,vars=(0,1),linealpha=0.4) +sim = solve( + monte_prob, Tsit5(), trajectories = 100, callback = cb, reltol = 1e-5, abstol = 1e-5) +plot(sim, vars = (0, 1), linealpha = 0.4) ``` ```julia cb = AdaptiveProbIntsUncertainty(5) monte_prob = EnsembleProblem(prob) -sim = solve(monte_prob,Tsit5(),trajectories=100,callback=cb,reltol=1e-6,abstol=1e-6) -plot(sim,vars=(0,1),linealpha=0.4) +sim = solve( + monte_prob, Tsit5(), trajectories = 100, callback = cb, reltol = 1e-6, abstol = 1e-6) +plot(sim, vars = (0, 1), linealpha = 0.4) ``` ```julia cb = AdaptiveProbIntsUncertainty(5) monte_prob = EnsembleProblem(prob) -sim = solve(monte_prob,Tsit5(),trajectories=100,callback=cb,reltol=1e-8,abstol=1e-8) -plot(sim,vars=(0,1),linealpha=0.4) +sim = solve( + monte_prob, Tsit5(), trajectories = 100, callback = cb, reltol = 1e-8, abstol = 1e-8) +plot(sim, vars = (0, 1), linealpha = 0.4) ``` ```julia -priors = [truncated(Normal(10,2),1,15),truncated(Normal(30,5),1,45),truncated(Normal(2.5,0.5),1,4)] +priors = [truncated(Normal(10, 2), 1, 15), truncated(Normal(30, 5), 1, 45), + truncated(Normal(2.5, 0.5), 1, 4)] ``` ## Using Stan.jl backend @@ -95,7 +99,9 @@ priors = [truncated(Normal(10,2),1,15),truncated(Normal(30,5),1,45),truncated(No Lorenz equation is a chaotic system hence requires very low tolerance to be estimated in a reasonable way, we use 1e-8 obtained from the uncertainty plots. Use of truncated priors is necessary to prevent Stan from stepping into negative and other improbable areas. ```julia -@time bayesian_result_stan = stan_inference(prob,t,data,priors; delta = 0.65, reltol=1e-8,abstol=1e-8, vars=(DiffEqBayes.StanODEData(), InverseGamma(2, 3))) +@time bayesian_result_stan = stan_inference( + prob, t, data, priors; delta = 0.65, reltol = 1e-8, abstol = 1e-8, + vars = (DiffEqBayes.StanODEData(), InverseGamma(2, 3))) ``` ### Direct Turing.jl @@ -111,7 +117,7 @@ Lorenz equation is a chaotic system hence requires very low tolerance to be esti # Simulate Lotka-Volterra model. p = SA[σ, ρ, β] _prob = remake(prob, p = p) - predicted = solve(_prob, Vern9(); saveat=t) + predicted = solve(_prob, Vern9(); saveat = t) # Observations. for i in 1:length(predicted) @@ -123,29 +129,31 @@ end model = fitlv(data, sprob) -@time chain = sample(model, Turing.NUTS(0.65), 10000; progress=false) +@time chain = sample(model, Turing.NUTS(0.65), 10000; progress = false) ``` ### Using Turing.jl backend ```julia -@time bayesian_result_turing = turing_inference(prob, Vern9(), t, data, priors; reltol=1e-8, abstol=1e-8, likelihood=(u, p, t, σ) -> MvNormal(u, Diagonal((σ) .^ 2 .* ones(length(u)))), likelihood_dist_priors=[InverseGamma(2, 3), InverseGamma(2, 3), InverseGamma(2, 3)]) +@time bayesian_result_turing = turing_inference( + prob, Vern9(), t, data, priors; reltol = 1e-8, abstol = 1e-8, + likelihood = (u, p, t, σ) -> MvNormal(u, Diagonal((σ) .^ 2 .* ones(length(u)))), + likelihood_dist_priors = [InverseGamma(2, 3), InverseGamma(2, 3), InverseGamma(2, 3)]) ``` ### Using DynamicHMC.jl backend ```julia -@time bayesian_result_dynamichmc = dynamichmc_inference(prob,Tsit5(),t,data,priors;solve_kwargs = (reltol=1e-8,abstol=1e-8,)) +@time bayesian_result_dynamichmc = dynamichmc_inference( + prob, Tsit5(), t, data, priors; solve_kwargs = (reltol = 1e-8, abstol = 1e-8)) ``` - ## Conclusion Due to the chaotic nature of Lorenz Equation, it is a very hard problem to estimate as it has the property of exponentially increasing errors. Its uncertainty plot points to its chaotic behaviour and goes awry for different values of tolerance, we use 1e-8 as the tolerance as it makes its uncertainty small enough to be trusted in `(0,30)` time span. - ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/BayesianInference/DiffEqBayesLotkaVolterra.jmd b/benchmarks/BayesianInference/DiffEqBayesLotkaVolterra.jmd index 5eac30b20..f25d10a82 100644 --- a/benchmarks/BayesianInference/DiffEqBayesLotkaVolterra.jmd +++ b/benchmarks/BayesianInference/DiffEqBayesLotkaVolterra.jmd @@ -16,7 +16,7 @@ using Plots, LinearAlgebra ``` ```julia -gr(fmt=:png) +gr(fmt = :png) ``` #### Initializing the problem @@ -29,27 +29,27 @@ end a b c d ``` ```julia -u0 = [1.0,1.0] -tspan = (0.0,10.0) -p = [1.5,1.0,3.0,1,0] +u0 = [1.0, 1.0] +tspan = (0.0, 10.0) +p = [1.5, 1.0, 3.0, 1, 0] ``` ```julia prob = ODEProblem(f, u0, tspan, p) -sol = solve(prob,Tsit5()) +sol = solve(prob, Tsit5()) ``` ```julia -su0 = SA[1.0,1.0] -sp = SA[1.5,1.0,3.0,1,0] -sprob = ODEProblem{false,SciMLBase.FullSpecialize}(f, su0, tspan, sp) -sol = solve(sprob,Tsit5()) +su0 = SA[1.0, 1.0] +sp = SA[1.5, 1.0, 3.0, 1, 0] +sprob = ODEProblem{false, SciMLBase.FullSpecialize}(f, su0, tspan, sp) +sol = solve(sprob, Tsit5()) ``` #### We take the solution data obtained and add noise to it to obtain data for using in the Bayesian Inference of the parameters ```julia -t = collect(range(1,stop=10,length=10)) +t = collect(range(1, stop = 10, length = 10)) sig = 0.49 data = convert(Array, VectorOfArray([(sol(t[i]) + sig*randn(2)) for i in 1:length(t)])) ``` @@ -57,13 +57,14 @@ data = convert(Array, VectorOfArray([(sol(t[i]) + sig*randn(2)) for i in 1:lengt #### Plots of the actual data and generated data ```julia -scatter(t, data[1,:], lab="#prey (data)") -scatter!(t, data[2,:], lab="#predator (data)") +scatter(t, data[1, :], lab = "#prey (data)") +scatter!(t, data[2, :], lab = "#predator (data)") plot!(sol) ``` ```julia -priors = [truncated(Normal(1.5,0.5),0.5,2.5),truncated(Normal(1.2,0.5),0,2),truncated(Normal(3.0,0.5),1,4),truncated(Normal(1.0,0.5),0,2)] +priors = [truncated(Normal(1.5, 0.5), 0.5, 2.5), truncated(Normal(1.2, 0.5), 0, 2), + truncated(Normal(3.0, 0.5), 1, 4), truncated(Normal(1.0, 0.5), 0, 2)] ``` ### Stan.jl backend @@ -71,7 +72,9 @@ priors = [truncated(Normal(1.5,0.5),0.5,2.5),truncated(Normal(1.2,0.5),0,2),trun The solution converges for tolerance values lower than 1e-3, lower tolerance leads to better accuracy in result but is accompanied by longer warmup and sampling time, truncated normal priors are used for preventing Stan from stepping into negative values. ```julia -@btime bayesian_result_stan = stan_inference(prob,t,data,priors,num_samples=10_000,print_summary=false,delta = 0.65, vars = (DiffEqBayes.StanODEData(), InverseGamma(2, 3))) +@btime bayesian_result_stan = stan_inference( + prob, t, data, priors, num_samples = 10_000, print_summary = false, + delta = 0.65, vars = (DiffEqBayes.StanODEData(), InverseGamma(2, 3))) ``` ### Direct Turing.jl @@ -88,7 +91,7 @@ The solution converges for tolerance values lower than 1e-3, lower tolerance lea # Simulate Lotka-Volterra model. p = SA[α, β, γ, δ] _prob = remake(prob, p = p) - predicted = solve(_prob, Tsit5(); saveat=t) + predicted = solve(_prob, Tsit5(); saveat = t) # Observations. for i in 1:length(predicted) @@ -100,30 +103,29 @@ end model = fitlv(data, sprob) -@time chain = sample(model, Turing.NUTS(0.65), 10000; progress=false) +@time chain = sample(model, Turing.NUTS(0.65), 10000; progress = false) ``` ### Turing.jl backend ```julia -@btime bayesian_result_turing = turing_inference(prob, Tsit5(), t, data, priors, num_samples=10_000) +@btime bayesian_result_turing = turing_inference( + prob, Tsit5(), t, data, priors, num_samples = 10_000) ``` ### DynamicHMC.jl backend ```julia -@btime bayesian_result_dynamichmc = dynamichmc_inference(prob,Tsit5(),t,data,priors,num_samples=10_000) +@btime bayesian_result_dynamichmc = dynamichmc_inference( + prob, Tsit5(), t, data, priors, num_samples = 10_000) ``` - ## Conclusion Lotka-Volterra Equation is a "predator-prey" model, it models population of two species in which one is the predator (wolf) and the other is the prey (rabbit). It depicts a cyclic behaviour, which is also seen in its Uncertainty Quantification Plots. This behaviour makes it easy to estimate even at very high tolerance values (1e-3). - - ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/Bio/BCR.jmd b/benchmarks/Bio/BCR.jmd index 9aab1beaa..81e25b98f 100644 --- a/benchmarks/Bio/BCR.jmd +++ b/benchmarks/Bio/BCR.jmd @@ -1,304 +1,330 @@ ---- -title: BCR Work-Precision Diagrams -author: Samuel Isaacson and Chris Rackauckas ---- - -The following benchmark is of 1122 ODEs with 24388 terms that describe a stiff -chemical reaction network modeling the BCR signaling network from [Barua et -al.](https://doi.org/10.4049/jimmunol.1102003). We use -[`ReactionNetworkImporters`](https://github.com/isaacsas/ReactionNetworkImporters.jl) -to load the BioNetGen model files as a -[Catalyst](https://github.com/SciML/Catalyst.jl) model, and then use -[ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl) to convert the -Catalyst network model to ODEs. - - -```julia -using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, - Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, - LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, - LinearSolve, RecursiveFactorization - -gr() -datadir = joinpath(dirname(pathof(ReactionNetworkImporters)),"../data/bcr") -const to = TimerOutput() -tf = 100000.0 - -# generate ModelingToolkit ODEs -@timeit to "Parse Network" prnbng = loadrxnetwork(BNGNetwork(), joinpath(datadir, "bcr.net")) -show(to) -rn = complete(prnbng.rn) -obs = [eq.lhs for eq in observed(rn)] - -@timeit to "Create ODESys" osys = complete(convert(ODESystem, rn)) -show(to) - -tspan = (0.,tf) -@timeit to "ODEProb No Jac" oprob = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[]) -show(to) -oprob_sparse = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[]; sparse=true); -``` - -```julia -@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[], jac=true, sparse=true) -show(to) -``` - - -```julia -@show numspecies(rn) # Number of ODEs -@show numreactions(rn) # Apprx. number of terms in the ODE -@show length(parameters(rn)); # Number of Parameters -``` - -## Time ODE derivative function compilation -As compiling the ODE derivative functions has in the past taken longer than -running a simulation, we first force compilation by evaluating these functions -one time. -```julia -u = oprob.u0 -du = copy(u) -p = oprob.p -@timeit to "ODE rhs Eval1" oprob.f(du,u,p,0.) -@timeit to "ODE rhs spjac Eval1" sparsejacprob.f(du,u,p,0.) -show(to) -``` - -We also time the ODE rhs function with BenchmarkTools as it is more accurate -given how fast evaluating `f` is: -```julia -@btime oprob.f($du,$u,$p,0.) -``` - -```julia -Js = similar(sparsejacprob.f.jac_prototype) -@timeit to "SparseJac Eval1" sparsejacprob.f.jac(Js,u,p,0.) -@timeit to "SparseJac Eval2" sparsejacprob.f.jac(Js,u,p,0.) -show(to) -``` - -## Picture of the solution - -```julia -sol = solve(oprob, CVODE_BDF(), saveat=tf/1000., reltol=1e-5, abstol=1e-5) -plot(sol; idxs=obs, legend=false, fmt=:png) -``` - -## Generate Test Solution - -```julia -@time sol = solve(oprob, CVODE_BDF(), abstol=1/10^12, reltol=1/10^12) -test_sol = TestSolution(sol); -``` - -## Setups - -#### Sets plotting defaults - -```julia -default(legendfontsize=7,framestyle=:box,gridalpha=0.3,gridlinewidth=2.5) -``` - -#### Declare pre-conditioners -```julia -using IncompleteLU, LinearAlgebra -const τ = 1e2 -const τ2 = 1e2 - -jaccache = sparsejacprob.f.jac(oprob.u0,oprob.p,0.0) -W = I - 1.0*jaccache -prectmp = ilu(W, τ = τ) - -preccache = Ref(prectmp) - -function psetupilu(p, t, u, du, jok, jcurPtr, gamma) - if !jok - sparsejacprob.f.jac(jaccache,u,p,t) - jcurPtr[] = true - - # W = I - gamma*J - @. W = -gamma*jaccache - idxs = diagind(W) - @. @view(W[idxs]) = @view(W[idxs]) + 1 - - # Build preconditioner on W - preccache[] = ilu(W, τ = τ) - end -end -function precilu(z,r,p,t,y,fy,gamma,delta,lr) - ldiv!(z,preccache[],r) -end - -function incompletelu(W,du,u,p,t,newW,Plprev,Prprev,solverdata) - if newW === nothing || newW - Pl = ilu(convert(AbstractMatrix,W), τ = τ2) - else - Pl = Plprev - end - Pl,nothing -end; -``` - -#### Sets tolerances - -```julia -abstols = 1.0 ./ 10.0 .^ (5:8) -reltols = 1.0 ./ 10.0 .^ (5:8); -``` - -## Failures - -Before proceeding to the results, we note the notable omissions. CVODE with KLU diverges in the solution, and -thus it is omitted from the results: - -```julia -solve(sparsejacprob,CVODE_BDF(linear_solver=:KLU), abstol=1e-8, reltol=1e-8); -``` - -## Work-Precision Diagrams (CVODE and lsoda solvers) - -#### Declare solvers. - -```julia -setups = [ - Dict(:alg=>lsoda(), :prob_choice => 1), - Dict(:alg=>CVODE_BDF(), :prob_choice => 1), - Dict(:alg=>CVODE_BDF(linear_solver=:LapackDense), :prob_choice => 1), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES), :prob_choice => 1), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precilu,psetup=psetupilu,prec_side=1), :prob_choice => 2), - ]; -``` - - -#### Plot Work-Precision Diagram. - -```julia -wp = WorkPrecisionSet([oprob,oprob_sparse,sparsejacprob],abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=[test_sol,test_sol,test_sol],maxiters=Int(1e6),numruns=1) - -names = ["lsoda" "CVODE_BDF" "CVODE_BDF (LapackDense)" "CVODE_BDF (GMRES)" "CVODE_BDF (GMRES, iLU)" "CVODE_BDF (KLU, sparse jac)"] -plot(wp;label=names) -``` - -## Work-Precision Diagrams (various Julia solvers) - -#### Declare solvers (using default linear solver). - -```julia -setups = [ - Dict(:alg=>TRBDF2(autodiff=false)), - Dict(:alg=>QNDF(autodiff=false)), - Dict(:alg=>FBDF(autodiff=false)), - Dict(:alg=>KenCarp4(autodiff=false)) - ]; -``` - -#### Plot Work-Precision Diagram (using default linear solver). - -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e6),numruns=1) - -names = ["TRBDF2" "QNDF" "FBDF" "KenCarp4"] -plot(wp;label=names) -``` - -#### Declare solvers (using GMRES linear solver). - -```julia -setups = [ - Dict(:alg=>TRBDF2(linsolve=KrylovJL_GMRES(),autodiff=false)), - Dict(:alg=>QNDF(linsolve=KrylovJL_GMRES(),autodiff=false)), - Dict(:alg=>FBDF(linsolve=KrylovJL_GMRES(),autodiff=false)), - Dict(:alg=>KenCarp4(linsolve=KrylovJL_GMRES(),autodiff=false)) - ]; -``` - -#### Plot Work-Precision Diagram (using GMRES linear solver). - -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e6),numruns=1) - -names = ["TRBDF2 (GMRES)" "QNDF (GMRES)" "FBDF (GMRES)" "KenCarp4 (GMRES)"] -plot(wp;label=names) -``` - -#### Declare solvers (using GMRES linear solver, with pre-conditioner). - -```julia -setups = [ - Dict(:alg=>TRBDF2(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true)), - Dict(:alg=>QNDF(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true)), - Dict(:alg=>FBDF(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true)), - Dict(:alg=>KenCarp4(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true)) - ]; -``` - -#### Plot Work-Precision Diagram (using GMRES linear solver, with pre-conditioner). - -```julia -wp = WorkPrecisionSet(sparsejacprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e6),numruns=1) - -names = ["TRBDF2 (GMRES, iLU)" "QNDF (GMRES, iLU)" "FBDF (GMRES, iLU)" "KenCarp4 (GMRES, iLU)"] -plot(wp;label=names) -``` - -#### Declare solvers (using sparse jacobian) - -We designate the solvers we wish to use. -```julia -setups = [ - Dict(:alg=>TRBDF2(linsolve=KLUFactorization(),autodiff=false)), - Dict(:alg=>QNDF(linsolve=KLUFactorization(),autodiff=false)), - Dict(:alg=>FBDF(linsolve=KLUFactorization(),autodiff=false)), - Dict(:alg=>KenCarp4(linsolve=KLUFactorization(),autodiff=false)) - ]; -``` - - -#### Plot Work-Precision Diagram (using sparse jacobian) - -Finally, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet(sparsejacprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e6),numruns=1) - -names = ["TRBDF2 (KLU, sparse jac)" "QNDF (KLU, sparse jac)" "FBDF (KLU, sparse jac)" "KenCarp4 (KLU, sparse jac)"] -plot(wp;label=names) -``` - -## Summary of results -Finally, we compute a single diagram comparing the various solvers used. - -#### Declare solvers -We designate the solvers we wish to compare. -```julia -setups = [ - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precilu,psetup=psetupilu,prec_side=1), :prob_choice => 2), - Dict(:alg=>QNDF(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true), :prob_choice => 3), - Dict(:alg=>FBDF(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true), :prob_choice => 3), - Dict(:alg=>QNDF(linsolve=KLUFactorization(),autodiff=false), :prob_choice => 3), - Dict(:alg=>FBDF(linsolve=KLUFactorization(),autodiff=false), :prob_choice => 3), - Dict(:alg=>KenCarp4(linsolve=KLUFactorization(),autodiff=false), :prob_choice => 3) - ]; -``` - -#### Plot Work-Precision Diagram - -For these, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet([oprob,oprob_sparse,sparsejacprob],abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=[test_sol,test_sol,test_sol],maxiters=Int(1e9),numruns=200) - -names = ["CVODE_BDF (GMRES, iLU)" "QNDF (GMRES, iLU)" "FBDF (GMRES, iLU)" "QNDF (KLU, sparse jac)" "FBDF (KLU, sparse jac)" "KenCarp4 (KLU, sparse jac)"] -colors = [:green :deepskyblue1 :dodgerblue2 :royalblue2 :slateblue3 :lightskyblue] -markershapes = [:octagon :hexagon :rtriangle :pentagon :ltriangle :star5] -plot(wp;label=names,left_margin=10Plots.mm,right_margin=10Plots.mm,xticks=[1e-3,1e-2,1e-1,1e0,1e1,1e2,1e3],yticks=[1e0,1e1,1e2,1e3],color=colors,markershape=markershapes,legendfontsize=15,tickfontsize=15,guidefontsize=15, legend=:topright, lw=20, la=0.8, markersize=20,markerstrokealpha=1.0, markerstrokewidth=1.5, gridalpha=0.3, gridlinewidth=7.5,size=(1100,1000)) -``` - -```julia, echo = false -using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` +--- +title: BCR Work-Precision Diagrams +author: Samuel Isaacson and Chris Rackauckas +--- + +The following benchmark is of 1122 ODEs with 24388 terms that describe a stiff +chemical reaction network modeling the BCR signaling network from [Barua et +al.](https://doi.org/10.4049/jimmunol.1102003). We use +[`ReactionNetworkImporters`](https://github.com/isaacsas/ReactionNetworkImporters.jl) +to load the BioNetGen model files as a +[Catalyst](https://github.com/SciML/Catalyst.jl) model, and then use +[ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl) to convert the +Catalyst network model to ODEs. + +```julia +using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, + Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, + LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, + LinearSolve, RecursiveFactorization + +gr() +datadir = joinpath(dirname(pathof(ReactionNetworkImporters)), "../data/bcr") +const to = TimerOutput() +tf = 100000.0 + +# generate ModelingToolkit ODEs +@timeit to "Parse Network" prnbng = loadrxnetwork(BNGNetwork(), joinpath(datadir, "bcr.net")) +show(to) +rn = complete(prnbng.rn) +obs = [eq.lhs for eq in observed(rn)] + +@timeit to "Create ODESys" osys = complete(convert(ODESystem, rn)) +show(to) + +tspan = (0.0, tf) +@timeit to "ODEProb No Jac" oprob = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[]) +show(to) +oprob_sparse = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[]; sparse = true); +``` + +```julia +@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[], jac = true, sparse = true) +show(to) +``` + +```julia +@show numspecies(rn) # Number of ODEs +@show numreactions(rn) # Apprx. number of terms in the ODE +@show length(parameters(rn)); # Number of Parameters +``` + +## Time ODE derivative function compilation + +As compiling the ODE derivative functions has in the past taken longer than +running a simulation, we first force compilation by evaluating these functions +one time. + +```julia +u = oprob.u0 +du = copy(u) +p = oprob.p +@timeit to "ODE rhs Eval1" oprob.f(du, u, p, 0.0) +@timeit to "ODE rhs spjac Eval1" sparsejacprob.f(du, u, p, 0.0) +show(to) +``` + +We also time the ODE rhs function with BenchmarkTools as it is more accurate +given how fast evaluating `f` is: + +```julia +@btime oprob.f($du, $u, $p, 0.0) +``` + +```julia +Js = similar(sparsejacprob.f.jac_prototype) +@timeit to "SparseJac Eval1" sparsejacprob.f.jac(Js, u, p, 0.0) +@timeit to "SparseJac Eval2" sparsejacprob.f.jac(Js, u, p, 0.0) +show(to) +``` + +## Picture of the solution + +```julia +sol = solve(oprob, CVODE_BDF(), saveat = tf/1000.0, reltol = 1e-5, abstol = 1e-5) +plot(sol; idxs = obs, legend = false, fmt = :png) +``` + +## Generate Test Solution + +```julia +@time sol = solve(oprob, CVODE_BDF(), abstol = 1/10^12, reltol = 1/10^12) +test_sol = TestSolution(sol); +``` + +## Setups + +#### Sets plotting defaults + +```julia +default(legendfontsize = 7, framestyle = :box, gridalpha = 0.3, gridlinewidth = 2.5) +``` + +#### Declare pre-conditioners + +```julia +using IncompleteLU, LinearAlgebra +const τ = 1e2 +const τ2 = 1e2 + +jaccache = sparsejacprob.f.jac(oprob.u0, oprob.p, 0.0) +W = I - 1.0*jaccache +prectmp = ilu(W, τ = τ) + +preccache = Ref(prectmp) + +function psetupilu(p, t, u, du, jok, jcurPtr, gamma) + if !jok + sparsejacprob.f.jac(jaccache, u, p, t) + jcurPtr[] = true + + # W = I - gamma*J + @. W = -gamma*jaccache + idxs = diagind(W) + @. @view(W[idxs]) = @view(W[idxs]) + 1 + + # Build preconditioner on W + preccache[] = ilu(W, τ = τ) + end +end +function precilu(z, r, p, t, y, fy, gamma, delta, lr) + ldiv!(z, preccache[], r) +end + +function incompletelu(W, du, u, p, t, newW, Plprev, Prprev, solverdata) + if newW === nothing || newW + Pl = ilu(convert(AbstractMatrix, W), τ = τ2) + else + Pl = Plprev + end + Pl, nothing +end; +``` + +#### Sets tolerances + +```julia +abstols = 1.0 ./ 10.0 .^ (5:8) +reltols = 1.0 ./ 10.0 .^ (5:8); +``` + +## Failures + +Before proceeding to the results, we note the notable omissions. CVODE with KLU diverges in the solution, and +thus it is omitted from the results: + +```julia +solve(sparsejacprob, CVODE_BDF(linear_solver = :KLU), abstol = 1e-8, reltol = 1e-8); +``` + +## Work-Precision Diagrams (CVODE and lsoda solvers) + +#### Declare solvers. + +```julia +setups = [ + Dict(:alg=>lsoda(), :prob_choice => 1), + Dict(:alg=>CVODE_BDF(), :prob_choice => 1), + Dict(:alg=>CVODE_BDF(linear_solver = :LapackDense), :prob_choice => 1), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES), :prob_choice => 1), + Dict( + :alg=>CVODE_BDF(linear_solver = :GMRES, prec = precilu, psetup = psetupilu, prec_side = 1), + :prob_choice => 2) +]; +``` + +#### Plot Work-Precision Diagram. + +```julia +wp = WorkPrecisionSet( + [oprob, oprob_sparse, sparsejacprob], abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = [test_sol, test_sol, test_sol], maxiters = Int(1e6), numruns = 1) + +names = ["lsoda" "CVODE_BDF" "CVODE_BDF (LapackDense)" "CVODE_BDF (GMRES)" "CVODE_BDF (GMRES, iLU)" "CVODE_BDF (KLU, sparse jac)"] +plot(wp; label = names) +``` + +## Work-Precision Diagrams (various Julia solvers) + +#### Declare solvers (using default linear solver). + +```julia +setups = [ + Dict(:alg=>TRBDF2(autodiff = false)), + Dict(:alg=>QNDF(autodiff = false)), + Dict(:alg=>FBDF(autodiff = false)), + Dict(:alg=>KenCarp4(autodiff = false)) +]; +``` + +#### Plot Work-Precision Diagram (using default linear solver). + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e6), numruns = 1) + +names = ["TRBDF2" "QNDF" "FBDF" "KenCarp4"] +plot(wp; label = names) +``` + +#### Declare solvers (using GMRES linear solver). + +```julia +setups = [ + Dict(:alg=>TRBDF2(linsolve = KrylovJL_GMRES(), autodiff = false)), + Dict(:alg=>QNDF(linsolve = KrylovJL_GMRES(), autodiff = false)), + Dict(:alg=>FBDF(linsolve = KrylovJL_GMRES(), autodiff = false)), + Dict(:alg=>KenCarp4(linsolve = KrylovJL_GMRES(), autodiff = false)) +]; +``` + +#### Plot Work-Precision Diagram (using GMRES linear solver). + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e6), numruns = 1) + +names = ["TRBDF2 (GMRES)" "QNDF (GMRES)" "FBDF (GMRES)" "KenCarp4 (GMRES)"] +plot(wp; label = names) +``` + +#### Declare solvers (using GMRES linear solver, with pre-conditioner). + +```julia +setups = [ + Dict(:alg=>TRBDF2( + linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true)), + Dict(:alg=>QNDF(linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true)), + Dict(:alg=>FBDF(linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true)), + Dict(:alg=>KenCarp4( + linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true)) +]; +``` + +#### Plot Work-Precision Diagram (using GMRES linear solver, with pre-conditioner). + +```julia +wp = WorkPrecisionSet(sparsejacprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e6), numruns = 1) + +names = ["TRBDF2 (GMRES, iLU)" "QNDF (GMRES, iLU)" "FBDF (GMRES, iLU)" "KenCarp4 (GMRES, iLU)"] +plot(wp; label = names) +``` + +#### Declare solvers (using sparse jacobian) + +We designate the solvers we wish to use. + +```julia +setups = [ + Dict(:alg=>TRBDF2(linsolve = KLUFactorization(), autodiff = false)), + Dict(:alg=>QNDF(linsolve = KLUFactorization(), autodiff = false)), + Dict(:alg=>FBDF(linsolve = KLUFactorization(), autodiff = false)), + Dict(:alg=>KenCarp4(linsolve = KLUFactorization(), autodiff = false)) +]; +``` + +#### Plot Work-Precision Diagram (using sparse jacobian) + +Finally, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet(sparsejacprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e6), numruns = 1) + +names = ["TRBDF2 (KLU, sparse jac)" "QNDF (KLU, sparse jac)" "FBDF (KLU, sparse jac)" "KenCarp4 (KLU, sparse jac)"] +plot(wp; label = names) +``` + +## Summary of results + +Finally, we compute a single diagram comparing the various solvers used. + +#### Declare solvers + +We designate the solvers we wish to compare. + +```julia +setups = [ + Dict( + :alg=>CVODE_BDF(linear_solver = :GMRES, prec = precilu, psetup = psetupilu, prec_side = 1), + :prob_choice => 2), + Dict( + :alg=>QNDF(linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true), + :prob_choice => 3), + Dict( + :alg=>FBDF(linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true), + :prob_choice => 3), + Dict(:alg=>QNDF(linsolve = KLUFactorization(), autodiff = false), :prob_choice => 3), + Dict(:alg=>FBDF(linsolve = KLUFactorization(), autodiff = false), :prob_choice => 3), + Dict(:alg=>KenCarp4(linsolve = KLUFactorization(), autodiff = false), :prob_choice => 3) +]; +``` + +#### Plot Work-Precision Diagram + +For these, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet( + [oprob, oprob_sparse, sparsejacprob], abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = [test_sol, test_sol, test_sol], maxiters = Int(1e9), numruns = 200) + +names = ["CVODE_BDF (GMRES, iLU)" "QNDF (GMRES, iLU)" "FBDF (GMRES, iLU)" "QNDF (KLU, sparse jac)" "FBDF (KLU, sparse jac)" "KenCarp4 (KLU, sparse jac)"] +colors = [:green :deepskyblue1 :dodgerblue2 :royalblue2 :slateblue3 :lightskyblue] +markershapes = [:octagon :hexagon :rtriangle :pentagon :ltriangle :star5] +plot(wp; label = names, left_margin = 10Plots.mm, right_margin = 10Plots.mm, + xticks = [1e-3, 1e-2, 1e-1, 1e0, 1e1, 1e2, 1e3], yticks = [1e0, 1e1, 1e2, 1e3], + color = colors, markershape = markershapes, legendfontsize = 15, + tickfontsize = 15, guidefontsize = 15, legend = :topright, lw = 20, + la = 0.8, markersize = 20, markerstrokealpha = 1.0, markerstrokewidth = 1.5, + gridalpha = 0.3, gridlinewidth = 7.5, size = (1100, 1000)) +``` + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/Bio/Bidkhori2012.jmd b/benchmarks/Bio/Bidkhori2012.jmd index 8f9a460a3..b476760f0 100644 --- a/benchmarks/Bio/Bidkhori2012.jmd +++ b/benchmarks/Bio/Bidkhori2012.jmd @@ -1,857 +1,1470 @@ ---- -title: Bidkhori2012 Work-Precision Diagrams -author: Utkarsh ---- - - -The following benchmark is of 109 ODEs and 188 parameters that describe a stiff -SBML model, modelling the EGFR signalling between normal and NSCLC cells [Bidkhori et -al.](https://doi.org/10.1371/journal.pone.0048004). It is referenced from [Biomodels Database](https://www.ebi.ac.uk/biomodels/curation/index), -and the model was parsed to Julia are finally to ODEs using [ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl). - - -```julia -using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, - Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, - LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, JLD2, - RecursiveFactorization - -gr() - -par = load(joinpath(@__DIR__, "params_Bidkhori2012.jld2")) -``` - -# Defining the reaction system - -```julia -function sbml_model!(du, u, p, t) - # assignmentRule: variable = mwa6994523_5d45_4000_af0c_3e94073bf183 - u88 = u[80] + u[79] - - reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12 = p["reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12_mw575f7f49_3663_47f1_b492_5b92c1c4345d"] * u[1] * u[2] - p["reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12_mw53c64fd3_9a1c_4947_a734_74a73554964c"] * u[3] - - reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d = p["reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d_mw8cfaf07f_dabe_45de_93cc_ef2c7fd31104"] * u[3] * u[3] - p["reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d_mwab52aceb_4b19_4317_b2da_97ccbb973dab"] * u[4] - - reaction_mw413c6d45_ab23_4d3e_87b3_a8ed4629b923 = p["reaction_mw413c6d45_ab23_4d3e_87b3_a8ed4629b923_mw6b97a1ec_2cba_4bce_96f7_ec1d0fa2d16c"] * u[4] - - reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04 = p["reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04_mwf1697f55_a3f4_4fb6_ae1d_f96f09ad1daa"] * u[5] * u[7] - p["reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04_mw880a5942_7549_4466_bd19_0e1768a3a533"] * u[8] - - reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644 = p["reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644_mw7e889122_d26c_4d09_bae4_d313b992dc8e"] * u[5] * u[9] - p["reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644_mwff6f49f7_268a_4f08_8d36_3ad8449d7472"] * u[10] - - reaction_mw974c39f5_b82e_44b3_abec_7a724f46c526 = p["reaction_mw974c39f5_b82e_44b3_abec_7a724f46c526_mwe645e76e_bb00_4c22_b25e_a2e77a6aada2"] * u[8] - - reaction_mw9544e67b_b6d0_4941_b7e0_ecd4f400a335 = p["reaction_mw9544e67b_b6d0_4941_b7e0_ecd4f400a335_mwb0744746_88a2_488e_a483_266747a044c6"] * u[10] - - reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe = p["reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe_mw9e24066c_51a5_4c7a_af7c_4656155a4eb0"] * u[11] - p["reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe_mwab1ef4d4_2acc_4fa2_b07c_fac51fb7bfaf"] * u[5] * u[12] - - reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db = p["reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db_mwc4824ff0_2b51_4d66_ad48_1145f670a6e1"] * u[12] * u[9] - p["reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db_mw0f1d282f_1c6b_455c_8254_3760632c6ecc"] * u[13] - - reaction_mweda6a945_fb5d_4d99_9958_11b2b2840308 = p["reaction_mweda6a945_fb5d_4d99_9958_11b2b2840308_mw0aa92e25_f9aa_461e_92b8_23b1b5b3ab92"] * u[13] - - reaction_mwd4bf58ea_70c9_43ea_a831_1fcde130ba28 = p["reaction_mwd4bf58ea_70c9_43ea_a831_1fcde130ba28_mw2a4ed8a2_fce4_44a4_adb9_edc24a06b4e1"] * u[12] - - reaction_mw4817365e_a33b_451f_bee1_de748377ede2 = p["reaction_mw4817365e_a33b_451f_bee1_de748377ede2_mwe879a9ac_4b8d_4c9a_a157_a3751761cf63"] * u[11] * u[14] - p["reaction_mw4817365e_a33b_451f_bee1_de748377ede2_mwa18578d7_236f_4939_baca_52259e38fe15"] * u[15] - - reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2 = p["reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2_mw289fed85_e6ee_43e6_a69f_77b5f487a452"] * u[15] * u[9] - p["reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2_mw8768b5c7_b227_4825_aa55_a525b0d915c2"] * u[16] - - reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6 = p["reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6_mwd12a67b3_6d98_40e9_a54b_282a577498eb"] * u[16] - - reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3 = p["reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3_mw6ac313e2_e8a9_42a9_b13a_27e55c1012a2"] * u[15] * u[17] - p["reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3_mw93f832d7_eefb_43dd_853c_a0d7a76023cf"] * u[18] - - reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a = p["reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a_mwbb727dc5_30e8_45f4_9d15_3b34be5c1e93"] * u[14] * u[17] - p["reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a_mw7ae1ee96_563e_4684_bc9a_8f4ef373620e"] * u[20] - - reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc = p["reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc_mwbc5340b6_06b7_4081_bd0c_e7a397f06a92"] * u[11] * u[20] - p["reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc_mw0df80c0e_c32b_4f90_99bd_e8f90e4c8109"] * u[18] - - reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61 = p["reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61_mwc585e0e4_b7e7_4290_8a6d_10fcd9759a2d"] * u[5] * u[14] - p["reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61_mwf44d37d0_fe7f_4e47_bf10_1e734fbc3391"] * u[21] - - reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb = p["reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb_mw3d564c3c_aa54_4c16_90be_662cfcbf8bc8"] * u[21] * u[9] - p["reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb_mw371642bb_3836_4ded_93a5_68fa9b464896"] * u[22] - - reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93 = p["reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93_mw736e4a7b_4a25_4d32_b96b_b088e3bd41e7"] * u[22] - - reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2 = p["reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2_mw084cd67b_f328_48a7_8e16_1d6256c8c137"] * u[21] * u[17] - p["reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2_mw43f177dc_f522_4dd1_b8e5_21b2b8fdfdba"] * u[23] - - reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd = p["reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd_mwfa6a58ab_0ca5_4c05_92b0_870593ac135d"] * u[5] * u[20] - p["reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd_mwb9547c37_09b7_4258_95ab_8039d4088298"] * u[23] - - reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e = p["reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e_mw7e09242b_bd80_4af0_90c8_e0cddace89fe"] * u[18] * u[25] - p["reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e_mw2dfc8a19_1792_4e12_af38_8bfbda31a577"] * u[26] - - reaction_mw921ee820_1dbb_4b5f_866c_87da620d8f89 = p["reaction_mw921ee820_1dbb_4b5f_866c_87da620d8f89_mw553c0b3c_af7f_4309_8c61_0f1e2c32347c"] * u[27] - - reaction_mw0bcfad86_59b9_42ff_bcb7_fbb44845049d = p["reaction_mw0bcfad86_59b9_42ff_bcb7_fbb44845049d_mwfc146e94_8070_4727_8416_fb55829068cb"] * u[26] - - reaction_mwe9b50ac7_dac3_4eba_b1db_b3fd392d8fb7 = p["reaction_mwe9b50ac7_dac3_4eba_b1db_b3fd392d8fb7_mw26688d02_8ab9_4123_89c4_022b981cb72c"] * u[28] - - reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f = p["reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f_mw5639395a_a5cd_46dd_81b8_30fe72400a2e"] * u[23] * u[25] - p["reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f_mw9cc637fe_d9ca_47d2_a4dc_66009d458094"] * u[28] - - reaction_mw3c617363_649b_4460_a694_36f7a3127a62 = p["reaction_mw3c617363_649b_4460_a694_36f7a3127a62_mw19173345_925d_427b_8658_add0978e5931"] * u[27] * u[29] - p["reaction_mw3c617363_649b_4460_a694_36f7a3127a62_mw9f6790d7_19ce_41d9_b4de_a1658c047501"] * u[30] - - reaction_mwf31259aa_32b7_4104_be70_045297b9a512 = p["reaction_mwf31259aa_32b7_4104_be70_045297b9a512_mw23e16d40_acbb_4658_a336_be5d0b0dd86a"] * u[30] - - reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c = p["reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c_mw10c97b8e_72aa_4f56_b3b9_c94baad7e213"] * u[5] * u[29] - p["reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c_mw0b6eb5f7_b133_4b3d_bf15_9fd6c2e9332d"] * u[31] - - reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53 = p["reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53_mwe483687f_b591_4c42_9abc_7ea9f47470bf"] * u[31] * u[27] - p["reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53_mwcf964aba_9db6_46c5_b687_beafc5d89169"] * u[32] - - reaction_mw652570eb_c9d3_499b_b877_61d360b10980 = p["reaction_mw652570eb_c9d3_499b_b877_61d360b10980_mwb881f20a_cf8a_493a_aa84_59ee90f26dd9"] * u[32] - - reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19 = p["reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19_mwb4c6ed27_c7ec_438f_bafd_4a09a9f356f1"] * u[31] * u[9] - p["reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19_mwba77a9ba_078d_4ec6_a8b8_d7042a2cefe7"] * u[33] - - reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a = p["reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a_mwe1743f7b_ca2c_47d4_91d7_aed2748d98c5"] * u[33] - - reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3 = p["reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3_mw9f1dbbe6_8aa3_4180_bcea_04343649d7ba"] * u[34] * u[27] - p["reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3_mwdf20ff60_f0b7_4c2a_b393_586ec1337e67"] * u[35] - - reaction_mw42c97708_4f85_45a8_9141_d0ae529409ca = p["reaction_mw42c97708_4f85_45a8_9141_d0ae529409ca_mw91f2ca92_9556_4fb8_ae12_0b72f3e3f261"] * u[35] - - reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33 = p["reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33_mw77c60377_28ae_4aad_b911_5768fc8b824f"] * u[36] * u[37] - p["reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33_mw2eed2db0_ba78_435b_b2c8_ee91efdba1b4"] * u[38] - - reaction_mw1bd186cf_4762_480a_b70d_d7a775462398 = p["reaction_mw1bd186cf_4762_480a_b70d_d7a775462398_mw7e974605_8d9c_4250_8f69_072aab1f24f7"] * u[38] - - reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2 = p["reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2_mw11cdaca9_941c_4a59_ba2a_3bfeafb65aeb"] * u[36] * u[39] - p["reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2_mw58c37b3e_91e7_445e_846e_77cd0b2320af"] * u[40] - - reaction_mwb49058ff_2997_4187_abe7_4dce4ccf6ff4 = p["reaction_mwb49058ff_2997_4187_abe7_4dce4ccf6ff4_mw432640ec_11b9_484d_ba26_415538ab9a10"] * u[40] - - reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe = p["reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe_mw11bb74b8_d908_46f0_ac4d_06e8dd1aa5ae"] * u[41] * u[42] - p["reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe_mwb44117f5_20b2_495e_adf3_3467cd119fd6"] * u[43] - - reaction_mwf95f743d_6108_49fe_8ffd_bdcc1a9f9a8d = p["reaction_mwf95f743d_6108_49fe_8ffd_bdcc1a9f9a8d_mwa4c71b8d_fb74_465b_b76e_cec4e4c95484"] * u[43] - - reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9 = p["reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9_mwc40b3165_cc16_4f78_86b5_e34f2731dcbb"] * u[41] * u[44] - p["reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9_mw8bff2fe0_b582_4020_8f05_83f14451b1c0"] * u[45] - - reaction_mw6fd24d16_f57d_46c6_82f5_3f00759fa16b = p["reaction_mw6fd24d16_f57d_46c6_82f5_3f00759fa16b_mw3d07dc22_f821_49a5_9712_820ba9592353"] * u[45] - - reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d = p["reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d_mwa8f70790_9f44_4548_988e_49d13016d2f1"] * u[36] * u[47] - p["reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d_mwaad540b6_783e_4576_8862_ad522fd897db"] * u[48] - - reaction_mw87711dc1_43d7_40fc_b9e9_a24e2f92419d = p["reaction_mw87711dc1_43d7_40fc_b9e9_a24e2f92419d_mwfbc395b5_05b8_4e27_9696_c3ba52edaf74"] * u[48] - - reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b = p["reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b_mwc489f472_68ce_44e7_aad1_f8d2f6dda4ff"] * u[41] * u[49] - p["reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b_mw56f1bdc0_66fd_47c0_806a_beeaf123e2f2"] * u[50] - - reaction_mw40950d59_1012_4361_8418_73e25758e367 = p["reaction_mw40950d59_1012_4361_8418_73e25758e367_mwa17c895f_29d8_4977_a99f_cf9bf6216785"] * u[50] - - reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419 = p["reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419_mwafd23622_952d_44b3_a437_4aa12422add7"] * u[39] * u[49] - p["reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419_mw9d9a7d08_b19a_44f1_a806_151597049345"] * u[51] - - reaction_mwa4b69c77_6226_46da_b78c_3e6027d0be41 = p["reaction_mwa4b69c77_6226_46da_b78c_3e6027d0be41_mwac85fd83_4e73_43f1_9c42_01773349d50f"] * u[51] - - reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48 = p["reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48_mwd23d026b_c5b7_4742_aab9_b9beb18ec9bc"] * u[46] * u[52] - p["reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48_mwf4c4d7a7_1498_4f6c_9d72_cd5cb012146c"] * u[54] - - reaction_mw61305f93_7b2d_4a2d_8d16_f7be026d8671 = p["reaction_mw61305f93_7b2d_4a2d_8d16_f7be026d8671_mwe3e5abe4_9f92_43eb_92e4_cea771f5bf14"] * u[54] - - reaction_mwcc31b497_6c50_446c_bbc2_6c5739507252 = p["reaction_mwcc31b497_6c50_446c_bbc2_6c5739507252_mwa617804d_95cc_4197_a39b_264a2c66b5a3"] * u[53] - - reaction_mw1d8c2435_bb85_4352_a25f_82033250579e = p["reaction_mw1d8c2435_bb85_4352_a25f_82033250579e_mw254868f8_c9fb_493c_bc1d_807cc83c18e6"] * u[44] * u[52] - p["reaction_mw1d8c2435_bb85_4352_a25f_82033250579e_mw78a41659_4abc_4614_9e83_38cbfe1c5262"] * u[53] - - reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c = p["reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c_mwbc2119ce_ade3_4e2a_a3bc_a29cd77adf72"] * u[46] * u[18] - p["reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c_mw54b0e5e9_710f_438e_a8d3_749c594667bc"] * u[55] - - reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730 = p["reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730_mw1ddaf9f4_dcab_4dc2_a6fa_5ce85b9d7a3a"] * u[55] - - reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30 = p["reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30_mw60892818_7ef4_4f65_8003_9700a708c66c"] * u[46] * u[23] - p["reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30_mw6843d346_6e9f_43d5_97f6_1059f164aa16"] * u[57] - - reaction_mw4685274a_2b55_429f_927f_3fd863592af6 = p["reaction_mw4685274a_2b55_429f_927f_3fd863592af6_mwdaa378da_64fe_4ea4_b79d_c25733837b9f"] * u[57] - - reaction_mw8e331e43_16b4_478d_880b_d5a3244540e4 = p["reaction_mw8e331e43_16b4_478d_880b_d5a3244540e4_mw3f5e2165_9bb6_4ac3_992e_50943dd2ea05"] * u[56] - - reaction_mw47dee769_daa0_4af4_978a_5ab17e504c2f = p["reaction_mw47dee769_daa0_4af4_978a_5ab17e504c2f_mwe49ede89_014e_40f2_acfd_0d1a0cd11fe7"] * u[58] - - reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b = p["reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b_mw90873203_7a5d_4fca_a789_5e989ff0c999"] * u[18] * u[6] - p["reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b_mw92d81b3b_fa59_4637_8540_8cb8482490d9"] * u[19] - - reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630 = p["reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630_mwcc2a950d_261b_4fd7_9c08_9f3c194ba09d"] * u[19] * u[60] - p["reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630_mw1351daea_68be_404a_b7b0_105920ff3371"] * u[59] - - reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657 = p["reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657_mwc6b3c76f_af7b_488c_8751_28f1d9ab90a1"] * u[59] - - reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4 = p["reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4_mwf9c81339_e73a_45b5_a714_0854b718d44f"] * u[23] * u[6] - p["reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4_mw587125c7_6092_4627_9cdd_2415b77a8307"] * u[24] - - reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014 = p["reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014_mwa575cf96_3d57_4222_ac71_bd17006ef035"] * u[24] * u[60] - p["reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014_mwf7658bc6_acb6_411e_ae2c_9d8de7738d5f"] * u[61] - - reaction_mweb93165f_cf03_48f1_b035_59d79e324314 = p["reaction_mweb93165f_cf03_48f1_b035_59d79e324314_mwa137184a_0eb0_4bcb_971c_8e19231b2c07"] * u[61] - - reaction_mw85e457d1_73f8_4236_bb61_a128d300003f = p["reaction_mw85e457d1_73f8_4236_bb61_a128d300003f_mwfa680314_051c_4b10_afc9_7e7fbee49e3f"] * u[5] * u[6] - p["reaction_mw85e457d1_73f8_4236_bb61_a128d300003f_mw97b9ab43_02ae_4e42_a524_6b781633a255"] * u[62] - - reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6 = p["reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6_mwcc0d3fcd_9b9e_4390_b588_e57b57d89d22"] * u[62] * u[60] - p["reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6_mw56f1be7e_e303_4a72_be17_5bd08e3eb1f2"] * u[63] - - reaction_mwc9b3b248_3290_452a_9b7c_8fdada3e6687 = p["reaction_mwc9b3b248_3290_452a_9b7c_8fdada3e6687_mw1decb177_5075_41f3_a348_ca13b8f4497e"] * u[63] - - reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d = p["reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d_mw001b8124_b461_482a_8c8e_30bffc6718f7"] * u[5] * u[64] - p["reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d_mw40eca7d6_80b2_4926_9c2f_330422db0814"] * u[65] - - reaction_mw2c5858f3_0988_49b0_a94a_057853b84e91 = p["reaction_mw2c5858f3_0988_49b0_a94a_057853b84e91_mwf3d00ca5_89dc_4693_92ec_a47db8150144"] * u[65] - p["reaction_mw2c5858f3_0988_49b0_a94a_057853b84e91_mw91a84697_3231_4fa6_b6ff_d69ee86056dc"] * u[66] - - reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8 = p["reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8_mw901b5284_bdae_4040_b77d_10f1ec267f06"] * u[65] - p["reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8_mw94cadd24_0432_4f89_a6fc_96cb0475c44e"] * u[5] * u[67] - - reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31 = p["reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31_mw688106ee_719d_4995_b1a0_faeefdb0af5a"] * u[68] * u[67] - p["reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31_mw85c8ff7d_8d7c_4403_8a58_4996a3e6ac28"] * u[69] - - reaction_mw837b5ad7_4a8c_4c55_94ff_0fdd63048044 = p["reaction_mw837b5ad7_4a8c_4c55_94ff_0fdd63048044_mw4f6f44d9_408e_49b2_bedf_d34b2448725e"] * u[69] - - reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621 = p["reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621_mwd3e2533f_8d57_407c_834d_e0dde30b7f4a"] * u[70] - p["reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621_mwbd416b7b_f9b6_4464_b9e8_be4ac001d13d"] * u[68] * u[64] - - reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0 = p["reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0_mw64664eb9_353a_4f1d_a8dc_e22bcb06e2c2"] * u[67] * u[71] - p["reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0_mw0573df9d_f365_40b7_83d4_3846a05aefdc"] * u[72] - - reaction_mw5dcc8719_3180_4bd0_8797_08e256131961 = p["reaction_mw5dcc8719_3180_4bd0_8797_08e256131961_mw134431c3_e8e5_4375_89a0_2c51a03d65dd"] * u[72] - - reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b = p["reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b_mw22510791_ef7e_4373_907c_9eecbc8adda7"] * u[74] * u[73] - p["reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b_mwf59d397b_cfee_4a84_9279_134cc951db8c"] * u[75] - - reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef = p["reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef_mwe2aded94_f2b5_4513_8670_71a86abf7968"] * u[75] * u[76] - p["reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef_mw8d6eacb6_7184_4564_8cde_53e93add2146"] * u[77] - - reaction_mw98da32e0_b061_40c5_9d32_40744134f3fa = p["reaction_mw98da32e0_b061_40c5_9d32_40744134f3fa_mw3c3648cb_6d56_4d9d_be47_129483778fd6"] * u[77] - - reaction_mw31369230_1f14_45bd_be02_a44a275c6e31 = p["reaction_mw31369230_1f14_45bd_be02_a44a275c6e31_mw98405e53_330b_4a64_a700_a62bb3f21426"] * u[78] - p["reaction_mw31369230_1f14_45bd_be02_a44a275c6e31_mw11f8de84_6639_486d_bf17_8f7021f54b66"] * u[79] * u[76] - - reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6 = p["reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6_mw65e1222f_39ad_4a29_ae76_04b7d591af38"] * u[79] - p["reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6_mw11e520e6_b1f1_4802_af71_92a2bd9cb644"] * u[80] * u[73] - - reaction_mwf3d393e9_ae09_4eab_a39a_ed0eef0f54bc = p["reaction_mwf3d393e9_ae09_4eab_a39a_ed0eef0f54bc_mw6a4e035b_11a7_4155_9a78_cfba13631cb1"] * u[81] - - reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92 = p["reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92_mw6eebbe41_cf28_46e8_930c_26f50e08d602"] * u[82] - p["reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92_mw751c2663_d807_482f_991b_c8032cb6d996"] * u[74] * u[83] - - reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9 = p["reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9_mwd2d0b340_bbdb_40bd_9eac_992a2a402b94"] * u[80] * u[83] - p["reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9_mwb1b46773_a218_4f99_a000_a98fbc1275d7"] * u[81] - - reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371 = p["reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371_mw193f2553_1ab3_4b07_9b4b_201ee9e08c96"] * u[79] * u[83] - p["reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371_mwb7292ff5_dd13_41aa_b9b8_2c0c75d35fb1"] * u[84] - - reaction_mw94b3bae0_4da9_4358_a5ac_a46a5cbf621b = p["reaction_mw94b3bae0_4da9_4358_a5ac_a46a5cbf621b_mwf4069175_b898_4633_ac1e_20f44431c36a"] * u[84] - - reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e = p["reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e_mw6d852e8c_c64a_4926_80c4_781a9c04b20e"] * u[85] - p["reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e_mw4d614bfc_3e20_450e_8890_6326afd0a0d7"] * u[75] * u[83] - - reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5 = p["reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5_mw3676a900_b098_4a74_a511_e15984ca0cd2"] * u[78] * u[83] - p["reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5_mwf68a0726_94b5_4be1_933f_1ac48053601d"] * u[86] - - reaction_mw75acd2d1_3fdf_4c3f_8d99_6d62f825d5e2 = p["reaction_mw75acd2d1_3fdf_4c3f_8d99_6d62f825d5e2_mwb4f0353c_d140_44cc_ab75_566fcc2909c5"] * u[86] - - reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174 = p["reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174_mw6165953d_ce44_4b21_a18a_c401c04993f1"] * u[87] - p["reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174_mw99a30aef_212a_4577_bcfd_8c5764057cca"] * u[77] * u[83] - - reaction_mw950485f2_4463_4309_a4e4_cc81d16ffb7f = p["reaction_mw950485f2_4463_4309_a4e4_cc81d16ffb7f_mw94b0216f_3353_4b36_b9b7_fd34a0510b08"] * u88 * u[36] / (p["reaction_mw950485f2_4463_4309_a4e4_cc81d16ffb7f_mw2034bbe7_27cc_410c_9870_1f8a5986dfa5"] + u[36]) - - reaction_mw62f71309_e066_47d2_9b99_01f78a51c218 = p["reaction_mw62f71309_e066_47d2_9b99_01f78a51c218_mw0cea56f3_1cdb_410e_a5a4_f3635ba5c94b"] * u[89] - - reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01 = p["reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01_mw50a0e884_a88c_46a7_b985_788868bc1029"] * u[5] * u[90] - p["reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01_mw2c88e0e2_e9c3_4e4c_bb2e_b0cd1f6420f4"] * u[91] - - reaction_mw65b9e026_bc6c_4c94_8b37_8b9acdf50c8a = p["reaction_mw65b9e026_bc6c_4c94_8b37_8b9acdf50c8a_mw95e2190d_8e39_419b_ad26_7cc141f7b87b"] * u[91] - - reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3 = p["reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3_mw76d68ace_272d_4178_bba2_74dfdf260c70"] * u[5] * u[92] - p["reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3_mwe37b936f_7781_4a01_b59b_96bd7db0c49e"] * u[93] - - reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618 = p["reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618_mwb6701ead_d3f2_4eb3_8b08_341cea49a4b2"] * u[92] * u[94] - p["reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618_mwa5016035_3f9f_44fc_9f69_1d7a0155eb36"] * u[95] - - reaction_mwe9988e4a_083c_4f8e_b154_3e599c9307b0 = p["reaction_mwe9988e4a_083c_4f8e_b154_3e599c9307b0_mw26164d03_adda_4a21_b5ac_59e1d5a8d8ab"] * u[95] - - reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735 = p["reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735_mw9fe16c2b_7271_4e4f_b6de_c149721a3198"] * u[92] * u[92] - p["reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735_mw74ea5b55_ead0_4b6f_8da0_fd1dcf7e231d"] * u[97] - - reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2 = p["reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2_mw8cbe6595_6f16_4704_afe2_0dd043a175fa"] * u[97] * u[94] - p["reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2_mw21d22acd_ddd4_4794_9700_52201984f75b"] * u[96] - - reaction_mw75c6078f_fb76_4ca9_9fdd_e221e3ba57ad = p["reaction_mw75c6078f_fb76_4ca9_9fdd_e221e3ba57ad_mw81384973_14a0_4498_ab21_f70666d46d7f"] * u[96] - - reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2 = p["reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2_mw9f1a7f64_0b37_42df_9dd5_e1a44efdcbba"] * u[90] * u[92] - p["reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2_mw366e6f17_4081_4cdc_9fa5_0aeb354d692c"] * u[98] - - reaction_mwec4127b5_6bcf_4128_aff4_a6b3c470f690 = p["reaction_mwec4127b5_6bcf_4128_aff4_a6b3c470f690_mw1df2caba_8e41_4fe5_a1b5_7777eb98ed1c"] * u[97] - - reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a = p["reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a_mw5a798f7a_b4eb_4a27_b413_4ff3956b90e9"] * u[100] * u[100] - p["reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a_mw54178365_18c1_47e0_94ee_6b96582c52ef"] * u[99] - - reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7 = p["reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7_mw1ff4e75e_fce5_4a7a_907b_05df4981f80b"] * u[99] * u[101] - p["reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7_mw8b269d52_eda9_4dd1_8616_ebcf29c971fa"] * u[102] - - reaction_mw3b0c171c_6d60_41ca_8193_83cd5e6c188c = p["reaction_mw3b0c171c_6d60_41ca_8193_83cd5e6c188c_mw90b25c4b_ad1a_4ee5_ae20_c60451484516"] * u[102] - - reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7 = p["reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7_mwa0806e7a_a90d_4187_9c37_6d9ea569a447"] * u[104] * u[100] - p["reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7_mw95cb9071_56e2_447d_b7c7_59ac96baa623"] * u[103] - - reaction_mw45d92b79_0656_4795_87d0_7a465949ca43 = p["reaction_mw45d92b79_0656_4795_87d0_7a465949ca43_mwba545ecf_c7d4_4a6c_8c47_9e91f052d5a9"] * u[100] * u[101] - p["reaction_mw45d92b79_0656_4795_87d0_7a465949ca43_mw01c5ceef_57a1_4baa_b2cd_fd39e9588a10"] * u[105] - - reaction_mwb71945c2_03a8_4fad_a995_e1caeee98525 = p["reaction_mwb71945c2_03a8_4fad_a995_e1caeee98525_mw7aba6db3_c7ec_4192_bb5e_0ac4b466c1a5"] * u[105] - - reaction_mwd189238c_e8f9_40be_b4ea_18a42bba1b4f = p["reaction_mwd189238c_e8f9_40be_b4ea_18a42bba1b4f_mw31eb851a_c381_419d_b694_f158b7f5cfb6"] * u[104] - - reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df = p["reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df_mwe09b67b9_0d2a_4b82_91ef_5284216beb94"] * u[91] * u[6] - p["reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df_mw77a6c207_ff8c_463c_9b4e_8a7d96652b79"] * u[106] - - reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e = p["reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e_mw1df53838_48e5_4331_9084_3790409ad5ff"] * u[106] * u[60] - p["reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e_mwe4573b2c_5f99_40d0_9f9e_c238caa5ccbe"] * u[107] - - reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19 = p["reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19_mw8ed5885f_774e_48a0_9338_fe8cdd512023"] * u[107] - - reaction_mwb205f533_4013_406b_8a4b_691ec3949555 = p["reaction_mwb205f533_4013_406b_8a4b_691ec3949555_mwa6ef5f75_f152_414d_811c_dd037d4b3ca1"] * u[65] * u[6] - p["reaction_mwb205f533_4013_406b_8a4b_691ec3949555_mwee51df1b_3f69_43f8_a1d5_5a8c5d0215f2"] * u[108] - - reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d = p["reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d_mw2e0b4751_7227_4815_bf6f_fa5e2370b1d3"] * u[108] * u[60] - p["reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d_mwa8eec8e9_74b9_4afc_b6db_1116fe48e858"] * u[109] - - reaction_mwfab3a9ec_b094_44f0_bd59_12ac56ca1c99 = p["reaction_mwfab3a9ec_b094_44f0_bd59_12ac56ca1c99_mwc3426c7e_3452_4507_9189_4b83ab147bdd"] * u[109] - - reaction_mw4fceada8_6eb0_4230_a083_b2ab094d2961 = p["reaction_mw4fceada8_6eb0_4230_a083_b2ab094d2961_mw9cafad09_6002_46e1_8336_bb91c3716d70"] * u[73] - - # Species: id = mwe2fff28d_182c_4a1c_9882_f17774c0958a; name = EGF; affected by kineticLaw - du[1] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12)) - - # Species: id = mw93907b2d_53db_4080_9e3f_3eb304441ab9; name = EGFR; affected by kineticLaw - du[2] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12) + (1.0 * reaction_mw47dee769_daa0_4af4_978a_5ab17e504c2f)) - - # Species: id = mw7eacabf9_d68c_491a_aba2_ec0809a8ecc8; name = EGF-EGFR; affected by kineticLaw - du[3] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12) + (-1.0 * reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d) + (-1.0 * reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d)) - - # Species: id = mwa8f2e7b2_0927_4ab4_a817_dddc43bb4fa3; name = EGF-EGFR2; affected by kineticLaw - du[4] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d) + (-1.0 * reaction_mw413c6d45_ab23_4d3e_87b3_a8ed4629b923) + (1.0 * reaction_mw9544e67b_b6d0_4941_b7e0_ecd4f400a335) + (1.0 * reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6) + (1.0 * reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93) + (1.0 * reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a)) - - # Species: id = mwbfcf6773_1915_432c_b1d2_1f246094cc74; name = pEGF-EGFR2; affected by kineticLaw - du[5] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw413c6d45_ab23_4d3e_87b3_a8ed4629b923) + (-1.0 * reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04) + (-1.0 * reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644) + (1.0 * reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe) + (-1.0 * reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61) + (-1.0 * reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd) + (-1.0 * reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c) + (1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730) + (1.0 * reaction_mw4685274a_2b55_429f_927f_3fd863592af6) + (-1.0 * reaction_mw85e457d1_73f8_4236_bb61_a128d300003f) + (-1.0 * reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d) + (1.0 * reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8) + (-1.0 * reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01) + (1.0 * reaction_mw65b9e026_bc6c_4c94_8b37_8b9acdf50c8a) + (-1.0 * reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3)) - - # Species: id = mw19122f7d_f92e_4dc0_922f_6b681db65b0b; name = cbl; affected by kineticLaw - du[6] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b) + (1.0 * reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657) + (-1.0 * reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4) + (1.0 * reaction_mweb93165f_cf03_48f1_b035_59d79e324314) + (-1.0 * reaction_mw85e457d1_73f8_4236_bb61_a128d300003f) + (1.0 * reaction_mwc9b3b248_3290_452a_9b7c_8fdada3e6687) + (-1.0 * reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df) + (1.0 * reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19) + (-1.0 * reaction_mwb205f533_4013_406b_8a4b_691ec3949555)) - - # Species: id = mw3c2e1b43_29ca_491a_93e9_c723a993d6fb; name = Shc; affected by kineticLaw - du[7] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04) + (1.0 * reaction_mweda6a945_fb5d_4d99_9958_11b2b2840308) + (1.0 * reaction_mwd4bf58ea_70c9_43ea_a831_1fcde130ba28)) - - # Species: id = mw5198d3c2_879c_4f0d_b4f8_cd40efe0b1cf; name = pEGF-EGFR2-Shc; affected by kineticLaw - du[8] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04) + (-1.0 * reaction_mw974c39f5_b82e_44b3_abec_7a724f46c526)) - - # Species: id = mwe57c3282_5935_405c_8c0b_7fadb7a5de17; name = SHP; affected by kineticLaw - du[9] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644) + (1.0 * reaction_mw9544e67b_b6d0_4941_b7e0_ecd4f400a335) + (-1.0 * reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db) + (1.0 * reaction_mweda6a945_fb5d_4d99_9958_11b2b2840308) + (-1.0 * reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2) + (1.0 * reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6) + (-1.0 * reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb) + (1.0 * reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93) + (-1.0 * reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19) + (1.0 * reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a)) - - # Species: id = mw954e8fcb_ac0a_459d_8878_f19080208a17; name = pEGF-EGFR2-SHP2; affected by kineticLaw - du[10] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644) + (-1.0 * reaction_mw9544e67b_b6d0_4941_b7e0_ecd4f400a335)) - - # Species: id = mwa98802cb_c977_4fe0_9e67_5000904c2c36; name = pEGF-EGFR2-pShc; affected by kineticLaw - du[11] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw974c39f5_b82e_44b3_abec_7a724f46c526) + (-1.0 * reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe) + (-1.0 * reaction_mw4817365e_a33b_451f_bee1_de748377ede2) + (-1.0 * reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc)) - - # Species: id = mwa0349407_8187_48fc_9e94_5698ccc4e06d; name = pShc; affected by kineticLaw - du[12] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe) + (-1.0 * reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db) + (-1.0 * reaction_mwd4bf58ea_70c9_43ea_a831_1fcde130ba28) + (1.0 * reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6) + (1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730) + (1.0 * reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657)) - - # Species: id = mwf9999977_6f0e_4e35_9b73_75587f3448e9; name = pShc-SHP2; affected by kineticLaw - du[13] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db) + (-1.0 * reaction_mweda6a945_fb5d_4d99_9958_11b2b2840308)) - - # Species: id = mwf430a579_ecbf_48ba_80c2_06e455808f2a; name = Grb2; affected by kineticLaw - du[14] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw4817365e_a33b_451f_bee1_de748377ede2) + (1.0 * reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6) + (-1.0 * reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a) + (-1.0 * reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61) + (1.0 * reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93) + (1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730) + (1.0 * reaction_mw4685274a_2b55_429f_927f_3fd863592af6)) - - # Species: id = mw504578d8_96c3_471f_8a7e_8c14e7535d3d; name = pEGF-EGFR2-pShc-Grb2; affected by kineticLaw - du[15] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw4817365e_a33b_451f_bee1_de748377ede2) + (-1.0 * reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2) + (-1.0 * reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3)) - - # Species: id = mw45ab688a_6467_4a3e_a779_2118fa84d69e; name = pEGF-EGFR2-pShc-Grb2-SHP2; affected by kineticLaw - du[16] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2) + (-1.0 * reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6)) - - # Species: id = mw9dcaa655_a755_426e_a3fa_1ad7c3c45575; name = SOS; affected by kineticLaw - du[17] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3) + (-1.0 * reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a) + (-1.0 * reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2) + (1.0 * reaction_mw8e331e43_16b4_478d_880b_d5a3244540e4)) - - # Species: id = mwfbda4e09_0cbb_49bc_ae69_f88b7a79ed21; name = pEGF-EGFR2-pShc-Grb2-SOS; affected by kineticLaw - du[18] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3) + (1.0 * reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc) + (-1.0 * reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e) + (1.0 * reaction_mw0bcfad86_59b9_42ff_bcb7_fbb44845049d) + (-1.0 * reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c) + (-1.0 * reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b)) - - # Species: id = mwb1bc2058_e6d8_4680_9e6c_d27bb366cde0; name = pEGF-EGFR2-pShc-Grb2-SOS-cbl; affected by kineticLaw - du[19] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b) + (-1.0 * reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630)) - - # Species: id = mw1093b3af_1864_4ba3_a541_6009a9921282; name = Grb2-SOS; affected by kineticLaw - du[20] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a) + (-1.0 * reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc) + (-1.0 * reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd) + (1.0 * reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657) + (1.0 * reaction_mweb93165f_cf03_48f1_b035_59d79e324314)) - - # Species: id = mwd9462e5b_a272_4b66_ab66_fde9266b1a43; name = pEGF-EGFR2-Grb2; affected by kineticLaw - du[21] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61) + (-1.0 * reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb) + (-1.0 * reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2)) - - # Species: id = mw925b938a_fe73_4664_ba6f_e72e57780891; name = pEGF-EGFR2-Grb2-SHP2; affected by kineticLaw - du[22] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb) + (-1.0 * reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93)) - - # Species: id = mwf8cc7834_bf4f_4ccd_8235_d0890badf0f6; name = pEGF-EGFR2-Grb2-SOS; affected by kineticLaw - du[23] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2) + (1.0 * reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd) + (1.0 * reaction_mwe9b50ac7_dac3_4eba_b1db_b3fd392d8fb7) + (-1.0 * reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f) + (-1.0 * reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30) + (-1.0 * reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4)) - - # Species: id = mw481cd12b_61ba_44e5_93bf_8b88c6c4a4e7; name = pEGF-EGFR2-Grb2-SOS-cbl; affected by kineticLaw - du[24] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4) + (-1.0 * reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014)) - - # Species: id = mw8f5a7b5c_ca4c_4a4c_85b1_e5d640c426bf; name = Ras-GDP; affected by kineticLaw - du[25] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e) + (1.0 * reaction_mw921ee820_1dbb_4b5f_866c_87da620d8f89) + (-1.0 * reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f) + (1.0 * reaction_mwf31259aa_32b7_4104_be70_045297b9a512) + (1.0 * reaction_mw652570eb_c9d3_499b_b877_61d360b10980)) - - # Species: id = mwf40d6176_abfc_4a30_886f_83a19fcffc48; name = pEGF-EGFR2-pShc-Grb2-SOS-Ras-GDP; affected by kineticLaw - du[26] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e) + (-1.0 * reaction_mw0bcfad86_59b9_42ff_bcb7_fbb44845049d)) - - # Species: id = mwa54a9c38_c98b_45e5_8432_4119fb777e44; name = Ras-GTP; affected by kineticLaw - du[27] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw921ee820_1dbb_4b5f_866c_87da620d8f89) + (1.0 * reaction_mw0bcfad86_59b9_42ff_bcb7_fbb44845049d) + (1.0 * reaction_mwe9b50ac7_dac3_4eba_b1db_b3fd392d8fb7) + (-1.0 * reaction_mw3c617363_649b_4460_a694_36f7a3127a62) + (-1.0 * reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53) + (-1.0 * reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3) + (1.0 * reaction_mw42c97708_4f85_45a8_9141_d0ae529409ca)) - - # Species: id = mw28464aad_8013_4a23_ae09_a406954859a6; name = pEGF-EGFR2-Grb2-SOS-Ras-GDP; affected by kineticLaw - du[28] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwe9b50ac7_dac3_4eba_b1db_b3fd392d8fb7) + (1.0 * reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f)) - - # Species: id = mw7cff9a0e_094d_498e_bf7f_7b162c61d63a; name = Ras-GAP; affected by kineticLaw - du[29] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw3c617363_649b_4460_a694_36f7a3127a62) + (1.0 * reaction_mwf31259aa_32b7_4104_be70_045297b9a512) + (-1.0 * reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c) + (1.0 * reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a)) - - # Species: id = mwdf82303e_323f_4c51_a858_56a59233cd98; name = Ras-GTP-Ras-GAP; affected by kineticLaw - du[30] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw3c617363_649b_4460_a694_36f7a3127a62) + (-1.0 * reaction_mwf31259aa_32b7_4104_be70_045297b9a512)) - - # Species: id = mwd39388fd_4f85_4d1c_b2a3_37857c595a2d; name = pEGF-EGFR2-Ras-GAP; affected by kineticLaw - du[31] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c) + (-1.0 * reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53) + (1.0 * reaction_mw652570eb_c9d3_499b_b877_61d360b10980) + (-1.0 * reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19)) - - # Species: id = mwd7bf31ba_b05c_4c45_bb2f_6a2468a2a507; name = pEGF-EGFR2-Ras-GAP-Ras-GTP; affected by kineticLaw - du[32] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53) + (-1.0 * reaction_mw652570eb_c9d3_499b_b877_61d360b10980)) - - # Species: id = mwbf5cb039_b830_4282_aa22_a3dda6272ec1; name = pEGF-EGFR2-Ras-GAP-SHP2; affected by kineticLaw - du[33] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19) + (-1.0 * reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a)) - - # Species: id = mw66ac98c4_7e7b_4071_954d_43eb17584220; name = Raf1; affected by kineticLaw - du[34] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3) + (1.0 * reaction_mw87711dc1_43d7_40fc_b9e9_a24e2f92419d)) - - # Species: id = mw83de7813_4941_45a6_a320_a551165bf22a; name = Raf1-Ras-GTP; affected by kineticLaw - du[35] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3) + (-1.0 * reaction_mw42c97708_4f85_45a8_9141_d0ae529409ca)) - - # Species: id = mwaff92910_ed3d_40b9_a29c_e4866167e828; name = Raf1active; affected by kineticLaw - du[36] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw42c97708_4f85_45a8_9141_d0ae529409ca) + (-1.0 * reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33) + (1.0 * reaction_mw1bd186cf_4762_480a_b70d_d7a775462398) + (-1.0 * reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2) + (1.0 * reaction_mwb49058ff_2997_4187_abe7_4dce4ccf6ff4) + (-1.0 * reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d) + (-1.0 * reaction_mw950485f2_4463_4309_a4e4_cc81d16ffb7f) + (1.0 * reaction_mw62f71309_e066_47d2_9b99_01f78a51c218)) - - # Species: id = mw0834731b_0477_4217_a53b_30cef851191b; name = MEK; affected by kineticLaw - du[37] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33) + (1.0 * reaction_mwa4b69c77_6226_46da_b78c_3e6027d0be41)) - - # Species: id = mw4628f984_eb87_4922_9760_4975095ce6eb; name = Raf1active-MEK; affected by kineticLaw - du[38] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33) + (-1.0 * reaction_mw1bd186cf_4762_480a_b70d_d7a775462398)) - - # Species: id = mw9b25f809_18a1_4c14_8f4b_cf18e6d93c28; name = pMEK; affected by kineticLaw - du[39] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw1bd186cf_4762_480a_b70d_d7a775462398) + (-1.0 * reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2) + (1.0 * reaction_mw40950d59_1012_4361_8418_73e25758e367) + (-1.0 * reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419)) - - # Species: id = mw12ba4000_d452_420c_be63_96d2848aca32; name = Raf1active-pMEK; affected by kineticLaw - du[40] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2) + (-1.0 * reaction_mwb49058ff_2997_4187_abe7_4dce4ccf6ff4)) - - # Species: id = mwf816df4c_4593_4d23_990f_0d7c15ddde5d; name = ppMEK; affected by kineticLaw - du[41] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwb49058ff_2997_4187_abe7_4dce4ccf6ff4) + (-1.0 * reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe) + (1.0 * reaction_mwf95f743d_6108_49fe_8ffd_bdcc1a9f9a8d) + (-1.0 * reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9) + (1.0 * reaction_mw6fd24d16_f57d_46c6_82f5_3f00759fa16b) + (-1.0 * reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b)) - - # Species: id = mw7e23b961_186b_47a0_a8b5_5e9957766792; name = ERK; affected by kineticLaw - du[42] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe) + (1.0 * reaction_mwcc31b497_6c50_446c_bbc2_6c5739507252)) - - # Species: id = mwcedf8ecd_67bd_4b91_aa04_d58782dec2a4; name = ppMEK-ERK; affected by kineticLaw - du[43] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe) + (-1.0 * reaction_mwf95f743d_6108_49fe_8ffd_bdcc1a9f9a8d)) - - # Species: id = mwcc894c94_0ddf_42cc_913e_cdcc4d471d94; name = pERK; affected by kineticLaw - du[44] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwf95f743d_6108_49fe_8ffd_bdcc1a9f9a8d) + (-1.0 * reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9) + (1.0 * reaction_mw61305f93_7b2d_4a2d_8d16_f7be026d8671) + (-1.0 * reaction_mw1d8c2435_bb85_4352_a25f_82033250579e)) - - # Species: id = mw6cb74b27_ffef_49bb_8ffb_622d552caa9e; name = ppMEK-pERK; affected by kineticLaw - du[45] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9) + (-1.0 * reaction_mw6fd24d16_f57d_46c6_82f5_3f00759fa16b)) - - # Species: id = mwd784228d_0cb5_468a_ac70_02d8f04b3d9c; name = ppERK; affected by kineticLaw - du[46] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw6fd24d16_f57d_46c6_82f5_3f00759fa16b) + (-1.0 * reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48) + (-1.0 * reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c) + (1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730) + (-1.0 * reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30) + (1.0 * reaction_mw4685274a_2b55_429f_927f_3fd863592af6)) - - # Species: id = mwbaaeb210_4806_4076_9d60_219f4ed945b6; name = Pase; affected by kineticLaw - du[47] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d) + (1.0 * reaction_mw87711dc1_43d7_40fc_b9e9_a24e2f92419d)) - - # Species: id = mw19a33ad5_5ba4_46c7_84eb_c1287f02bcd5; name = Raf1active-Pase; affected by kineticLaw - du[48] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d) + (-1.0 * reaction_mw87711dc1_43d7_40fc_b9e9_a24e2f92419d)) - - # Species: id = mwf9e2a044_7774_400b_a74e_a111b4a21f30; name = Pase2; affected by kineticLaw - du[49] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b) + (1.0 * reaction_mw40950d59_1012_4361_8418_73e25758e367) + (-1.0 * reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419) + (1.0 * reaction_mwa4b69c77_6226_46da_b78c_3e6027d0be41)) - - # Species: id = mwcb572fe2_c3ac_40e7_8141_da7d55fce18a; name = ppMEK-Pase2; affected by kineticLaw - du[50] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b) + (-1.0 * reaction_mw40950d59_1012_4361_8418_73e25758e367)) - - # Species: id = mwa0acc0ac_5fac_4a42_a3be_e36db44994b0; name = pMEK-Pase2; affected by kineticLaw - du[51] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419) + (-1.0 * reaction_mwa4b69c77_6226_46da_b78c_3e6027d0be41)) - - # Species: id = mwd087f76b_65dc_47f1_ba21_c43774457686; name = Pase3; affected by kineticLaw - du[52] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48) + (1.0 * reaction_mw61305f93_7b2d_4a2d_8d16_f7be026d8671) + (1.0 * reaction_mwcc31b497_6c50_446c_bbc2_6c5739507252) + (-1.0 * reaction_mw1d8c2435_bb85_4352_a25f_82033250579e)) - - # Species: id = mw35f5adaa_d1c0_433c_817d_76e317f4cb15; name = pERK-Pase3; affected by kineticLaw - du[53] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwcc31b497_6c50_446c_bbc2_6c5739507252) + (1.0 * reaction_mw1d8c2435_bb85_4352_a25f_82033250579e)) - - # Species: id = mwa7e3103a_6394_472c_b0f4_8ed527f68604; name = ppERK-Pase3; affected by kineticLaw - du[54] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48) + (-1.0 * reaction_mw61305f93_7b2d_4a2d_8d16_f7be026d8671)) - - # Species: id = mw5babe3d5_a9af_4dfd_ac01_35474ef64af2; name = ppERK-pEGF-EGFR2-pShc-Grb2-SOS; affected by kineticLaw - du[55] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c) + (-1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730)) - - # Species: id = mw31ac308f_da36_4f73_830f_67f3e5b945d9; name = pSOS; affected by kineticLaw - du[56] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730) + (1.0 * reaction_mw4685274a_2b55_429f_927f_3fd863592af6) + (-1.0 * reaction_mw8e331e43_16b4_478d_880b_d5a3244540e4)) - - # Species: id = mw31261227_9cd6_4059_a0bb_04dbf4888080; name = ppERK-pEGF-EGFR2-Grb2-SOS; affected by kineticLaw - du[57] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30) + (-1.0 * reaction_mw4685274a_2b55_429f_927f_3fd863592af6)) - - # Species: id = mw0a0ca6ba_cb28_44c7_a0c0_1593cb720966; name = ProEGFR; affected by kineticLaw - du[58] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw47dee769_daa0_4af4_978a_5ab17e504c2f)) - - # Species: id = mw06b8aada_c92a_48eb_8ee7_af3778cfe62f; name = pEGF-EGFR2-pShc-Grb2-SOS-cbl-EPn; affected by kineticLaw - du[59] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630) + (-1.0 * reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657)) - - # Species: id = mwb2366216_0b3c_4f28_8303_fec92c68dd57; name = EPn; affected by kineticLaw - du[60] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630) + (1.0 * reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657) + (-1.0 * reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014) + (1.0 * reaction_mweb93165f_cf03_48f1_b035_59d79e324314) + (-1.0 * reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6) + (1.0 * reaction_mwc9b3b248_3290_452a_9b7c_8fdada3e6687) + (-1.0 * reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e) + (1.0 * reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19) + (-1.0 * reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d) + (1.0 * reaction_mwfab3a9ec_b094_44f0_bd59_12ac56ca1c99)) - - # Species: id = mw1d5948e7_5504_4224_9d71_227911b4f1ee; name = pEGF-EGFR2-Grb2-SOS-cbl-EPn; affected by kineticLaw - du[61] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014) + (-1.0 * reaction_mweb93165f_cf03_48f1_b035_59d79e324314)) - - # Species: id = mwec1b368b_8f73_47eb_9636_9956389836eb; name = pEGF-EGFR2-cbl; affected by kineticLaw - du[62] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw85e457d1_73f8_4236_bb61_a128d300003f) + (-1.0 * reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6)) - - # Species: id = mwa455ec7e_1a12_4659_95a2_a5695d09ca60; name = pEGF-EGFR2-cbl-EPn; affected by kineticLaw - du[63] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6) + (-1.0 * reaction_mwc9b3b248_3290_452a_9b7c_8fdada3e6687)) - - # Species: id = mw2ba1db9a_4483_44fa_a3a2_b4a5ea66898c; name = PI3K; affected by kineticLaw - du[64] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d) + (1.0 * reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621) + (1.0 * reaction_mwfab3a9ec_b094_44f0_bd59_12ac56ca1c99)) - - # Species: id = mw0dc4e5eb_4366_4799_bebc_cfcffe5c06f5; name = pEGF-EGFR2-PI3K; affected by kineticLaw - du[65] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d) + (-1.0 * reaction_mw2c5858f3_0988_49b0_a94a_057853b84e91) + (-1.0 * reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8) + (-1.0 * reaction_mwb205f533_4013_406b_8a4b_691ec3949555)) - - # Species: id = mw1e591998_65c0_484e_8a3b_537a38d94de1; name = pEGF-EGFR2-pPI3K; affected by kineticLaw - du[66] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw2c5858f3_0988_49b0_a94a_057853b84e91)) - - # Species: id = mw78e207c4_4faf_4b48_8e22_1ee666e9cc4c; name = pPI3K; affected by kineticLaw - du[67] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8) + (-1.0 * reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31) + (-1.0 * reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0) + (1.0 * reaction_mw5dcc8719_3180_4bd0_8797_08e256131961)) - - # Species: id = mwfc4a9c3d_3ebb_4033_8b7d_f4d7613d2078; name = TP4; affected by kineticLaw - du[68] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31) + (1.0 * reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621)) - - # Species: id = mwbd6bb050_89bd_41df_8cea_d2e1fb77bafe; name = TP4-pPI3K; affected by kineticLaw - du[69] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31) + (-1.0 * reaction_mw837b5ad7_4a8c_4c55_94ff_0fdd63048044)) - - # Species: id = mw7033dfd6_53c5_433b_a132_f8cb34dea20f; name = TP4-PI3K; affected by kineticLaw - du[70] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw837b5ad7_4a8c_4c55_94ff_0fdd63048044) + (-1.0 * reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621)) - - # Species: id = mwb561d9f3_a9ed_4bdb_8d40_87be5cc3237a; name = PIP2; affected by kineticLaw - du[71] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0) + (1.0 * reaction_mw4fceada8_6eb0_4230_a083_b2ab094d2961)) - - # Species: id = mw014cc419_b720_4b90_9192_2ec6e706c87d; name = pPI3K-PIP2; affected by kineticLaw - du[72] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0) + (-1.0 * reaction_mw5dcc8719_3180_4bd0_8797_08e256131961)) - - # Species: id = mwd7f41594_8377_4e2e_9528_45d5a82ffdb4; name = PIP3; affected by kineticLaw - du[73] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw5dcc8719_3180_4bd0_8797_08e256131961) + (-1.0 * reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b) + (1.0 * reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6) + (-1.0 * reaction_mw4fceada8_6eb0_4230_a083_b2ab094d2961)) - - # Species: id = mwcef73e0e_d195_4077_ae71_723664ee1602; name = Akt; affected by kineticLaw - du[74] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b) + (1.0 * reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92)) - - # Species: id = mw62bf5275_ce02_4e86_b3b6_3f87a335e1de; name = Aktm; affected by kineticLaw - du[75] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b) + (-1.0 * reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef) + (1.0 * reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e)) - - # Species: id = mw6e01967b_3e2a_433d_bec6_9f9cf3ba243c; name = PDK1; affected by kineticLaw - du[76] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef) + (1.0 * reaction_mw31369230_1f14_45bd_be02_a44a275c6e31)) - - # Species: id = mw6353aa36_d4a4_4254_8a1f_1f7f571d4233; name = Aktm-PDK1; affected by kineticLaw - du[77] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef) + (-1.0 * reaction_mw98da32e0_b061_40c5_9d32_40744134f3fa) + (1.0 * reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174)) - - # Species: id = mwc1935afc_56b1_4a87_923c_ae6d82455d80; name = pAktm-PDK1; affected by kineticLaw - du[78] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw98da32e0_b061_40c5_9d32_40744134f3fa) + (-1.0 * reaction_mw31369230_1f14_45bd_be02_a44a275c6e31) + (-1.0 * reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5)) - - # Species: id = mw3d81860d_d786_4fcc_b8bb_64f1a2d7739d; name = pAktm; affected by kineticLaw - du[79] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw31369230_1f14_45bd_be02_a44a275c6e31) + (-1.0 * reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6) + (-1.0 * reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371)) - - # Species: id = mw16796ffe_4764_4a9f_942e_149f42c1cd28; name = pAkt; affected by kineticLaw - du[80] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6) + (-1.0 * reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9)) - - # Species: id = mwa6e82fc9_a0ce_461c_93c8_17f3c807c1a1; name = pAkt-Takt; affected by kineticLaw - du[81] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwf3d393e9_ae09_4eab_a39a_ed0eef0f54bc) + (1.0 * reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9)) - - # Species: id = mw236a3250_4c96_4f6e_b94c_ab3d12852801; name = Akt-Takt; affected by kineticLaw - du[82] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwf3d393e9_ae09_4eab_a39a_ed0eef0f54bc) + (-1.0 * reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92)) - - # Species: id = mw11a8b702_b8ac_4513_b4aa_063e51089812; name = Takt; affected by kineticLaw - du[83] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92) + (-1.0 * reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9) + (-1.0 * reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371) + (1.0 * reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e) + (-1.0 * reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5) + (1.0 * reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174)) - - # Species: id = mw1a0cb97a_b657_430b_963c_92217f643081; name = pAktm-Takt; affected by kineticLaw - du[84] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371) + (-1.0 * reaction_mw94b3bae0_4da9_4358_a5ac_a46a5cbf621b)) - - # Species: id = mw9b937ca3_0d82_46d5_8f5a_0f9701002797; name = Aktm-Takt; affected by kineticLaw - du[85] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw94b3bae0_4da9_4358_a5ac_a46a5cbf621b) + (-1.0 * reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e)) - - # Species: id = mw57a44eb0_ace7_4294_905a_219e87d3c281; name = pAktm-PDK1-Takt; affected by kineticLaw - du[86] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5) + (-1.0 * reaction_mw75acd2d1_3fdf_4c3f_8d99_6d62f825d5e2)) - - # Species: id = mwd746a5d5_5e65_4a4c_9f84_0e4a3cb7d2fc; name = Aktm-PDK1-Takt; affected by kineticLaw - du[87] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw75acd2d1_3fdf_4c3f_8d99_6d62f825d5e2) + (-1.0 * reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174)) - - # Species: id = mwa6994523_5d45_4000_af0c_3e94073bf183, name = pAkt_total, defined in a rule du[88] = u[88] - - # Species: id = mwdf92bdc0_f426_45b0_9ad0_876521f41312; name = pRaf1active; affected by kineticLaw - du[89] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw950485f2_4463_4309_a4e4_cc81d16ffb7f) + (-1.0 * reaction_mw62f71309_e066_47d2_9b99_01f78a51c218)) - - # Species: id = mw13abe2a6_9905_40e5_8c23_3fc8834b572a; name = STAT3c; affected by kineticLaw - du[90] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01) + (1.0 * reaction_mwe9988e4a_083c_4f8e_b154_3e599c9307b0) + (-1.0 * reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2) + (1.0 * reaction_mwd189238c_e8f9_40be_b4ea_18a42bba1b4f) + (1.0 * reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19)) - - # Species: id = mw2fd710a6_7fe2_4484_bca6_59c187bade8b; name = pEGF-EGFR2-STAT3c; affected by kineticLaw - du[91] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01) + (-1.0 * reaction_mw65b9e026_bc6c_4c94_8b37_8b9acdf50c8a) + (-1.0 * reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df)) - - # Species: id = mwb6a9aa2c_62e7_410f_9c33_dbe36dfcc4af; name = pSTAT3c; affected by kineticLaw - du[92] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw65b9e026_bc6c_4c94_8b37_8b9acdf50c8a) + (-1.0 * reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3) + (-1.0 * reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618) + (-1.0 * reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735) + (-1.0 * reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735) + (-1.0 * reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2)) - - # Species: id = mw341082a0_8017_4cc7_9d00_b1211a196072; name = pEGF-EGFR2-pSTAT3c; affected by kineticLaw - du[93] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3)) - - # Species: id = mwcea1f1c1_2f85_4af1_98ea_ef14cf580c09; name = PP1; affected by kineticLaw - du[94] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618) + (1.0 * reaction_mwe9988e4a_083c_4f8e_b154_3e599c9307b0) + (-1.0 * reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2) + (1.0 * reaction_mw75c6078f_fb76_4ca9_9fdd_e221e3ba57ad)) - - # Species: id = mwdc34472c_a6f9_4002_951d_e0e8da64eb42; name = pSTAT3c-PP1; affected by kineticLaw - du[95] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618) + (-1.0 * reaction_mwe9988e4a_083c_4f8e_b154_3e599c9307b0)) - - # Species: id = mw472d5cb9_120e_4f60_bbae_1ae2552837dd; name = pSTAT3c-pSTAT3c-PP1; affected by kineticLaw - du[96] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2) + (-1.0 * reaction_mw75c6078f_fb76_4ca9_9fdd_e221e3ba57ad)) - - # Species: id = mw4f575c55_7dff_45d7_94ad_cda9621d5b63; name = pSTAT3c-pSTAT3c; affected by kineticLaw - du[97] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735) + (-1.0 * reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2) + (-1.0 * reaction_mwec4127b5_6bcf_4128_aff4_a6b3c470f690)) - - # Species: id = mwd2c465fb_eea7_499a_8ea4_f318a64cb9ee; name = STAT3c-pSTAT3c; affected by kineticLaw - du[98] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw75c6078f_fb76_4ca9_9fdd_e221e3ba57ad) + (1.0 * reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2)) - - # Species: id = mw4110f531_7513_4786_8896_7c9d969ff558; name = pSTAT3n-pSTAT3n; affected by kineticLaw - du[99] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwec4127b5_6bcf_4128_aff4_a6b3c470f690) + (1.0 * reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a) + (-1.0 * reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7)) - - # Species: id = mwe3fd7f65_b0d1_44d9_b6f3_d2f7d332f664; name = pSTAT3n; affected by kineticLaw - du[100] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a) + (-1.0 * reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a) + (-1.0 * reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7) + (-1.0 * reaction_mw45d92b79_0656_4795_87d0_7a465949ca43)) - - # Species: id = mw0e1be972_fded_4bff_a93d_091ec942485f; name = PP2; affected by kineticLaw - du[101] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7) + (1.0 * reaction_mw3b0c171c_6d60_41ca_8193_83cd5e6c188c) + (-1.0 * reaction_mw45d92b79_0656_4795_87d0_7a465949ca43) + (1.0 * reaction_mwb71945c2_03a8_4fad_a995_e1caeee98525)) - - # Species: id = mw0facb8f2_95cf_4ddf_a959_b24ba64f320b; name = pSTAT3n-pSTAT3n-PP2; affected by kineticLaw - du[102] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7) + (-1.0 * reaction_mw3b0c171c_6d60_41ca_8193_83cd5e6c188c)) - - # Species: id = mw9686f53e_d343_45fd_b441_9c992219546a; name = STAT3n-pSTAT3n; affected by kineticLaw - du[103] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw3b0c171c_6d60_41ca_8193_83cd5e6c188c) + (1.0 * reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7)) - - # Species: id = mw960bddeb_e567_46dd_b2f3_ed5e6a5c7972; name = STAT3n; affected by kineticLaw - du[104] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((-1.0 * reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7) + (1.0 * reaction_mwb71945c2_03a8_4fad_a995_e1caeee98525) + (-1.0 * reaction_mwd189238c_e8f9_40be_b4ea_18a42bba1b4f)) - - # Species: id = mw8c85ff7f_6368_4b11_a2ed_ce83481b55e6; name = pSTAT3n-PP2; affected by kineticLaw - du[105] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw45d92b79_0656_4795_87d0_7a465949ca43) + (-1.0 * reaction_mwb71945c2_03a8_4fad_a995_e1caeee98525)) - - # Species: id = mw548c81c2_c626_4df8_9177_a1a6fc3d4ce8; name = pEGF-EGFR2-STAT3c-cbl; affected by kineticLaw - du[106] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df) + (-1.0 * reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e)) - - # Species: id = mw142e6dc4_ec15_459d_a184_6b20be04f08d; name = pEGF-EGFR2-STAT3c-cbl-EPn; affected by kineticLaw - du[107] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e) + (-1.0 * reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19)) - - # Species: id = mw2c47ae3f_06d9_40ec_a252_535db0ae5caa; name = pEGF-EGFR2-PI3K-cbl; affected by kineticLaw - du[108] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mwb205f533_4013_406b_8a4b_691ec3949555) + (-1.0 * reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d)) - - # Species: id = mwd32d108b_49c2_4df2_9b67_d6c6b84f54b9; name = pEGF-EGFR2-PI3K-cbl-EPn; affected by kineticLaw - du[109] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * ((1.0 * reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d) + (-1.0 * reaction_mwfab3a9ec_b094_44f0_bd59_12ac56ca1c99)) - -end - -u0=zeros(109) -u0[1] = 0.0081967 -u0[2] = 0.3 -u0[3] = 0.0 -u0[4] = 0.0 -u0[5] = 0.0 -u0[6] = 0.8 -u0[7] = 1.0 -u0[8] = 0.0 -u0[9] = 0.1 -u0[10] = 0.0 -u0[11] = 0.0 -u0[12] = 0.0 -u0[13] = 0.0 -u0[14] = 1.0 -u0[15] = 0.0 -u0[16] = 0.0 -u0[17] = 0.3 -u0[18] = 0.0 -u0[19] = 0.0 -u0[20] = 0.0 -u0[21] = 0.0 -u0[22] = 0.0 -u0[23] = 0.0 -u0[24] = 0.0 -u0[25] = 0.15 -u0[26] = 0.0 -u0[27] = 0.0 -u0[28] = 0.0 -u0[29] = 0.1 -u0[30] = 0.0 -u0[31] = 0.0 -u0[32] = 0.0 -u0[33] = 0.0 -u0[34] = 0.5 -u0[35] = 0.0 -u0[36] = 0.0 -u0[37] = 0.68 -u0[38] = 0.0 -u0[39] = 0.0 -u0[40] = 0.0 -u0[41] = 0.0 -u0[42] = 0.4 -u0[43] = 0.0 -u0[44] = 0.0 -u0[45] = 0.0 -u0[46] = 0.0 -u0[47] = 0.5 -u0[48] = 0.0 -u0[49] = 0.02 -u0[50] = 0.0 -u0[51] = 0.0 -u0[52] = 0.002 -u0[53] = 0.0 -u0[54] = 0.0 -u0[55] = 0.0 -u0[56] = 0.0 -u0[57] = 0.0 -u0[58] = 1.0 -u0[59] = 0.0 -u0[60] = 0.5 -u0[61] = 0.0 -u0[62] = 0.0 -u0[63] = 0.0 -u0[64] = 0.2 -u0[65] = 0.0 -u0[66] = 0.0 -u0[67] = 0.0 -u0[68] = 0.2 -u0[69] = 0.0 -u0[70] = 0.0 -u0[71] = 0.5 -u0[72] = 0.0 -u0[73] = 0.0 -u0[74] = 0.1 -u0[75] = 0.0 -u0[76] = 0.1 -u0[77] = 0.0 -u0[78] = 0.0 -u0[79] = 0.0 -u0[80] = 0.0 -u0[81] = 0.0 -u0[82] = 0.0 -u0[83] = 0.1 -u0[84] = 0.0 -u0[85] = 0.0 -u0[86] = 0.0 -u0[87] = 0.0 -u0[88] = 0.0 -u0[89] = 0.0 -u0[90] = 1.0 -u0[91] = 0.0 -u0[92] = 0.0 -u0[93] = 0.0 -u0[94] = 0.5 -u0[95] = 0.0 -u0[96] = 0.0 -u0[97] = 0.0 -u0[98] = 0.0 -u0[99] = 0.0 -u0[100] = 0.0 -u0[101] = 0.6 -u0[102] = 0.0 -u0[103] = 0.0 -u0[104] = 0.0 -u0[105] = 0.0 -u0[106] = 0.0 -u0[107] = 0.0 -u0[108] = 0.0 -u0[109] = 0.0 - -tspan = (0.0,100.0) - -prob = ODEProblem{true,SciMLBase.FullSpecialize}(sbml_model!, u0, tspan, par) - -sys = modelingtoolkitize(prob) - -sys = structural_simplify(sys) - - -const to = TimerOutput() - -@timeit to "ODEProb No Jac" oprob = ODEProblem{true,SciMLBase.FullSpecialize}(sys, Float64[], tspan, Float64[]) -@timeit to "ODEProb DenseJac" densejacprob = ODEProblem{true,SciMLBase.FullSpecialize}(sys, Float64[], tspan, Float64[], jac=true) -``` - -```julia -@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true,SciMLBase.FullSpecialize}(sys, Float64[], tspan, Float64[], jac=true, sparse=true) -show(to) -``` - -## Picture of the solution - -```julia -sol = solve(oprob, CVODE_BDF()) -plot(sol, legend=false, fmt=:png) -``` - -For these benchmarks we will be using the time-series error with these saving -points since the final time point is not well-indicative of the solution -behavior (capturing the oscillation is the key!). - -## Generate Test Solution - -```julia -@time sol = solve(oprob, CVODE_BDF(), abstol=1/10^14, reltol=1/10^14) -test_sol = TestSolution(sol) -``` - -## Setups - -```julia - -abstols = 1.0 ./ 10.0 .^ (9:13) -reltols = 1.0 ./ 10.0 .^ (6:10) - -setups = [ - Dict(:alg=>CVODE_BDF()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>Rodas4()), - Dict(:alg=>QNDF()), - Dict(:alg=>lsoda()), - Dict(:alg=>radau()), - Dict(:alg=>seulex()), - Dict(:alg=>ImplicitEulerExtrapolation(min_order = 8, init_order = 9,threading = OrdinaryDiffEq.PolyesterThreads())), - Dict(:alg=>ImplicitEulerExtrapolation(min_order = 8, init_order = 9,threading = false)), - Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 7, init_order = 8,threading = OrdinaryDiffEq.PolyesterThreads())), - Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 7, init_order = 8,threading = false)), - Dict(:alg=>ImplicitHairerWannerExtrapolation(init_order = 5,threading = OrdinaryDiffEq.PolyesterThreads())), - Dict(:alg=>ImplicitHairerWannerExtrapolation(init_order = 5, threading = false)), - ] - -solnames = ["CVODE_BDF","KenCarp4","Rodas4","QNDF","lsoda","radau","seulex","ImplEulerExtpl (threaded)", "ImplEulerExtpl (non-threaded)", - "ImplEulerBaryExtpl (threaded)","ImplEulerBaryExtpl (non-threaded)","ImplHWExtpl (threaded)","ImplHWExtpl (non-threaded)"] - -``` - -## Automatic Jacobian Solves - -First we test using auto-generated Jacobians (finite difference) -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups; - names = solnames,appxsol=test_sol,save_everystep=false,maxiters=Int(1e5),numruns=10) - -plot(wp, title = "Implicit Methods: SBML Model",legend=:outertopleft,size = (1000,500), - xticks = 10.0 .^ (-15:1:1), - yticks = 10.0 .^ (-6:0.3:5), - bottom_margin= 5Plots.mm) - -``` - -## Analytical Jacobian - -Now we test using the generated analytic Jacobian function. - -```julia -setups = [ - Dict(:alg=>CVODE_BDF()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>Rodas4()), - Dict(:alg=>QNDF()), - #Dict(:alg=>lsoda()), - #Dict(:alg=>radau()), - #Dict(:alg=>seulex()), - Dict(:alg=>ImplicitEulerExtrapolation(min_order = 8, init_order = 9,threading = OrdinaryDiffEq.PolyesterThreads())), - Dict(:alg=>ImplicitEulerExtrapolation(min_order = 8, init_order = 9,threading = false)), - Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 7, init_order = 8,threading = OrdinaryDiffEq.PolyesterThreads())), - Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 7, init_order = 8,threading = false)), - Dict(:alg=>ImplicitHairerWannerExtrapolation(init_order = 5,threading = OrdinaryDiffEq.PolyesterThreads())), - Dict(:alg=>ImplicitHairerWannerExtrapolation(init_order = 5, threading = false)), - ] - -solnames = ["CVODE_BDF","KenCarp4","Rodas4","QNDF","ImplEulerExtpl (threaded)", "ImplEulerExtpl (non-threaded)", - "ImplEulerBaryExtpl (threaded)","ImplEulerBaryExtpl (non-threaded)","ImplHWExtpl (threaded)","ImplHWExtpl (non-threaded)"] - -wp = WorkPrecisionSet(densejacprob,abstols,reltols,setups; - names = solnames,appxsol=test_sol,save_everystep=false,maxiters=Int(1e5),numruns=10) - -plot(wp, title = "Implicit Methods: SBML Model",legend=:outertopleft,size = (1000,500), - xticks = 10.0 .^ (-15:1:1), - yticks = 10.0 .^ (-6:0.3:5), - bottom_margin= 5Plots.mm) -``` - - - -## Sparse Jacobian -Finally we test using the generated sparse analytic Jacobian function. - -Note that the extrapolation methods currently do not support sparse Jacobians. - -```julia -setups = [ - #Dict(:alg=>CVODE_BDF()), #Fails! - Dict(:alg=>KenCarp4(autodiff = false)), - Dict(:alg=>Rodas4(autodiff = false)), - Dict(:alg=>QNDF(autodiff = false)), - #Dict(:alg=>lsoda()), - #Dict(:alg=>radau()), - #Dict(:alg=>seulex()), - #Dict(:alg=>ImplicitEulerExtrapolation(autodiff = false,min_order = 8, init_order = 9,threading = OrdinaryDiffEq.PolyesterThreads())), - #Dict(:alg=>ImplicitEulerExtrapolation(autodiff = false,min_order = 8, init_order = 9,threading = false)), - #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(autodiff = false,min_order = 7, init_order = 8,threading = OrdinaryDiffEq.PolyesterThreads())), - #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(autodiff = false,min_order = 7, init_order = 8,threading = false)), - #Dict(:alg=>ImplicitHairerWannerExtrapolation(autodiff = false,init_order = 5,threading = OrdinaryDiffEq.PolyesterThreads())), - #Dict(:alg=>ImplicitHairerWannerExtrapolation(autodiff = false,init_order = 5, threading = false)), - ] - -solnames = ["KenCarp4","Rodas4","QNDF",#"ImplEulerExtpl (threaded)", "ImplEulerExtpl (non-threaded)", - #"ImplEulerBaryExtpl (threaded)","ImplEulerBaryExtpl (non-threaded)","ImplHWExtpl (threaded)","ImplHWExtpl (non-threaded)" - ] - -wp = WorkPrecisionSet(sparsejacprob ,abstols,reltols,setups; - names = solnames,appxsol=test_sol,save_everystep=false,maxiters=Int(1e5),numruns=10) - -plot(wp, title = "Implicit Methods: SBML Model",legend=:outertopleft,size = (1000,500), - xticks = 10.0 .^ (-15:1:1), - yticks = 10.0 .^ (-6:0.3:5), - bottom_margin= 5Plots.mm) -``` - -```julia, echo = false -using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` +--- +title: Bidkhori2012 Work-Precision Diagrams +author: Utkarsh +--- + +The following benchmark is of 109 ODEs and 188 parameters that describe a stiff +SBML model, modelling the EGFR signalling between normal and NSCLC cells [Bidkhori et +al.](https://doi.org/10.1371/journal.pone.0048004). It is referenced from [Biomodels Database](https://www.ebi.ac.uk/biomodels/curation/index), +and the model was parsed to Julia are finally to ODEs using [ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl). + +```julia +using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, + Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, + LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, JLD2, + RecursiveFactorization + +gr() + +par = load(joinpath(@__DIR__, "params_Bidkhori2012.jld2")) +``` + +# Defining the reaction system + +```julia +function sbml_model!(du, u, p, t) + # assignmentRule: variable = mwa6994523_5d45_4000_af0c_3e94073bf183 + u88 = u[80] + u[79] + + reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12 = p["reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12_mw575f7f49_3663_47f1_b492_5b92c1c4345d"] * + u[1] * u[2] - + p["reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12_mw53c64fd3_9a1c_4947_a734_74a73554964c"] * + u[3] + + reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d = p["reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d_mw8cfaf07f_dabe_45de_93cc_ef2c7fd31104"] * + u[3] * u[3] - + p["reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d_mwab52aceb_4b19_4317_b2da_97ccbb973dab"] * + u[4] + + reaction_mw413c6d45_ab23_4d3e_87b3_a8ed4629b923 = p["reaction_mw413c6d45_ab23_4d3e_87b3_a8ed4629b923_mw6b97a1ec_2cba_4bce_96f7_ec1d0fa2d16c"] * + u[4] + + reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04 = p["reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04_mwf1697f55_a3f4_4fb6_ae1d_f96f09ad1daa"] * + u[5] * u[7] - + p["reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04_mw880a5942_7549_4466_bd19_0e1768a3a533"] * + u[8] + + reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644 = p["reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644_mw7e889122_d26c_4d09_bae4_d313b992dc8e"] * + u[5] * u[9] - + p["reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644_mwff6f49f7_268a_4f08_8d36_3ad8449d7472"] * + u[10] + + reaction_mw974c39f5_b82e_44b3_abec_7a724f46c526 = p["reaction_mw974c39f5_b82e_44b3_abec_7a724f46c526_mwe645e76e_bb00_4c22_b25e_a2e77a6aada2"] * + u[8] + + reaction_mw9544e67b_b6d0_4941_b7e0_ecd4f400a335 = p["reaction_mw9544e67b_b6d0_4941_b7e0_ecd4f400a335_mwb0744746_88a2_488e_a483_266747a044c6"] * + u[10] + + reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe = p["reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe_mw9e24066c_51a5_4c7a_af7c_4656155a4eb0"] * + u[11] - + p["reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe_mwab1ef4d4_2acc_4fa2_b07c_fac51fb7bfaf"] * + u[5] * u[12] + + reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db = p["reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db_mwc4824ff0_2b51_4d66_ad48_1145f670a6e1"] * + u[12] * u[9] - + p["reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db_mw0f1d282f_1c6b_455c_8254_3760632c6ecc"] * + u[13] + + reaction_mweda6a945_fb5d_4d99_9958_11b2b2840308 = p["reaction_mweda6a945_fb5d_4d99_9958_11b2b2840308_mw0aa92e25_f9aa_461e_92b8_23b1b5b3ab92"] * + u[13] + + reaction_mwd4bf58ea_70c9_43ea_a831_1fcde130ba28 = p["reaction_mwd4bf58ea_70c9_43ea_a831_1fcde130ba28_mw2a4ed8a2_fce4_44a4_adb9_edc24a06b4e1"] * + u[12] + + reaction_mw4817365e_a33b_451f_bee1_de748377ede2 = p["reaction_mw4817365e_a33b_451f_bee1_de748377ede2_mwe879a9ac_4b8d_4c9a_a157_a3751761cf63"] * + u[11] * u[14] - + p["reaction_mw4817365e_a33b_451f_bee1_de748377ede2_mwa18578d7_236f_4939_baca_52259e38fe15"] * + u[15] + + reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2 = p["reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2_mw289fed85_e6ee_43e6_a69f_77b5f487a452"] * + u[15] * u[9] - + p["reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2_mw8768b5c7_b227_4825_aa55_a525b0d915c2"] * + u[16] + + reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6 = p["reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6_mwd12a67b3_6d98_40e9_a54b_282a577498eb"] * + u[16] + + reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3 = p["reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3_mw6ac313e2_e8a9_42a9_b13a_27e55c1012a2"] * + u[15] * u[17] - + p["reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3_mw93f832d7_eefb_43dd_853c_a0d7a76023cf"] * + u[18] + + reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a = p["reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a_mwbb727dc5_30e8_45f4_9d15_3b34be5c1e93"] * + u[14] * u[17] - + p["reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a_mw7ae1ee96_563e_4684_bc9a_8f4ef373620e"] * + u[20] + + reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc = p["reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc_mwbc5340b6_06b7_4081_bd0c_e7a397f06a92"] * + u[11] * u[20] - + p["reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc_mw0df80c0e_c32b_4f90_99bd_e8f90e4c8109"] * + u[18] + + reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61 = p["reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61_mwc585e0e4_b7e7_4290_8a6d_10fcd9759a2d"] * + u[5] * u[14] - + p["reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61_mwf44d37d0_fe7f_4e47_bf10_1e734fbc3391"] * + u[21] + + reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb = p["reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb_mw3d564c3c_aa54_4c16_90be_662cfcbf8bc8"] * + u[21] * u[9] - + p["reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb_mw371642bb_3836_4ded_93a5_68fa9b464896"] * + u[22] + + reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93 = p["reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93_mw736e4a7b_4a25_4d32_b96b_b088e3bd41e7"] * + u[22] + + reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2 = p["reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2_mw084cd67b_f328_48a7_8e16_1d6256c8c137"] * + u[21] * u[17] - + p["reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2_mw43f177dc_f522_4dd1_b8e5_21b2b8fdfdba"] * + u[23] + + reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd = p["reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd_mwfa6a58ab_0ca5_4c05_92b0_870593ac135d"] * + u[5] * u[20] - + p["reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd_mwb9547c37_09b7_4258_95ab_8039d4088298"] * + u[23] + + reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e = p["reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e_mw7e09242b_bd80_4af0_90c8_e0cddace89fe"] * + u[18] * u[25] - + p["reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e_mw2dfc8a19_1792_4e12_af38_8bfbda31a577"] * + u[26] + + reaction_mw921ee820_1dbb_4b5f_866c_87da620d8f89 = p["reaction_mw921ee820_1dbb_4b5f_866c_87da620d8f89_mw553c0b3c_af7f_4309_8c61_0f1e2c32347c"] * + u[27] + + reaction_mw0bcfad86_59b9_42ff_bcb7_fbb44845049d = p["reaction_mw0bcfad86_59b9_42ff_bcb7_fbb44845049d_mwfc146e94_8070_4727_8416_fb55829068cb"] * + u[26] + + reaction_mwe9b50ac7_dac3_4eba_b1db_b3fd392d8fb7 = p["reaction_mwe9b50ac7_dac3_4eba_b1db_b3fd392d8fb7_mw26688d02_8ab9_4123_89c4_022b981cb72c"] * + u[28] + + reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f = p["reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f_mw5639395a_a5cd_46dd_81b8_30fe72400a2e"] * + u[23] * u[25] - + p["reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f_mw9cc637fe_d9ca_47d2_a4dc_66009d458094"] * + u[28] + + reaction_mw3c617363_649b_4460_a694_36f7a3127a62 = p["reaction_mw3c617363_649b_4460_a694_36f7a3127a62_mw19173345_925d_427b_8658_add0978e5931"] * + u[27] * u[29] - + p["reaction_mw3c617363_649b_4460_a694_36f7a3127a62_mw9f6790d7_19ce_41d9_b4de_a1658c047501"] * + u[30] + + reaction_mwf31259aa_32b7_4104_be70_045297b9a512 = p["reaction_mwf31259aa_32b7_4104_be70_045297b9a512_mw23e16d40_acbb_4658_a336_be5d0b0dd86a"] * + u[30] + + reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c = p["reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c_mw10c97b8e_72aa_4f56_b3b9_c94baad7e213"] * + u[5] * u[29] - + p["reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c_mw0b6eb5f7_b133_4b3d_bf15_9fd6c2e9332d"] * + u[31] + + reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53 = p["reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53_mwe483687f_b591_4c42_9abc_7ea9f47470bf"] * + u[31] * u[27] - + p["reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53_mwcf964aba_9db6_46c5_b687_beafc5d89169"] * + u[32] + + reaction_mw652570eb_c9d3_499b_b877_61d360b10980 = p["reaction_mw652570eb_c9d3_499b_b877_61d360b10980_mwb881f20a_cf8a_493a_aa84_59ee90f26dd9"] * + u[32] + + reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19 = p["reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19_mwb4c6ed27_c7ec_438f_bafd_4a09a9f356f1"] * + u[31] * u[9] - + p["reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19_mwba77a9ba_078d_4ec6_a8b8_d7042a2cefe7"] * + u[33] + + reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a = p["reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a_mwe1743f7b_ca2c_47d4_91d7_aed2748d98c5"] * + u[33] + + reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3 = p["reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3_mw9f1dbbe6_8aa3_4180_bcea_04343649d7ba"] * + u[34] * u[27] - + p["reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3_mwdf20ff60_f0b7_4c2a_b393_586ec1337e67"] * + u[35] + + reaction_mw42c97708_4f85_45a8_9141_d0ae529409ca = p["reaction_mw42c97708_4f85_45a8_9141_d0ae529409ca_mw91f2ca92_9556_4fb8_ae12_0b72f3e3f261"] * + u[35] + + reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33 = p["reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33_mw77c60377_28ae_4aad_b911_5768fc8b824f"] * + u[36] * u[37] - + p["reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33_mw2eed2db0_ba78_435b_b2c8_ee91efdba1b4"] * + u[38] + + reaction_mw1bd186cf_4762_480a_b70d_d7a775462398 = p["reaction_mw1bd186cf_4762_480a_b70d_d7a775462398_mw7e974605_8d9c_4250_8f69_072aab1f24f7"] * + u[38] + + reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2 = p["reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2_mw11cdaca9_941c_4a59_ba2a_3bfeafb65aeb"] * + u[36] * u[39] - + p["reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2_mw58c37b3e_91e7_445e_846e_77cd0b2320af"] * + u[40] + + reaction_mwb49058ff_2997_4187_abe7_4dce4ccf6ff4 = p["reaction_mwb49058ff_2997_4187_abe7_4dce4ccf6ff4_mw432640ec_11b9_484d_ba26_415538ab9a10"] * + u[40] + + reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe = p["reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe_mw11bb74b8_d908_46f0_ac4d_06e8dd1aa5ae"] * + u[41] * u[42] - + p["reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe_mwb44117f5_20b2_495e_adf3_3467cd119fd6"] * + u[43] + + reaction_mwf95f743d_6108_49fe_8ffd_bdcc1a9f9a8d = p["reaction_mwf95f743d_6108_49fe_8ffd_bdcc1a9f9a8d_mwa4c71b8d_fb74_465b_b76e_cec4e4c95484"] * + u[43] + + reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9 = p["reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9_mwc40b3165_cc16_4f78_86b5_e34f2731dcbb"] * + u[41] * u[44] - + p["reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9_mw8bff2fe0_b582_4020_8f05_83f14451b1c0"] * + u[45] + + reaction_mw6fd24d16_f57d_46c6_82f5_3f00759fa16b = p["reaction_mw6fd24d16_f57d_46c6_82f5_3f00759fa16b_mw3d07dc22_f821_49a5_9712_820ba9592353"] * + u[45] + + reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d = p["reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d_mwa8f70790_9f44_4548_988e_49d13016d2f1"] * + u[36] * u[47] - + p["reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d_mwaad540b6_783e_4576_8862_ad522fd897db"] * + u[48] + + reaction_mw87711dc1_43d7_40fc_b9e9_a24e2f92419d = p["reaction_mw87711dc1_43d7_40fc_b9e9_a24e2f92419d_mwfbc395b5_05b8_4e27_9696_c3ba52edaf74"] * + u[48] + + reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b = p["reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b_mwc489f472_68ce_44e7_aad1_f8d2f6dda4ff"] * + u[41] * u[49] - + p["reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b_mw56f1bdc0_66fd_47c0_806a_beeaf123e2f2"] * + u[50] + + reaction_mw40950d59_1012_4361_8418_73e25758e367 = p["reaction_mw40950d59_1012_4361_8418_73e25758e367_mwa17c895f_29d8_4977_a99f_cf9bf6216785"] * + u[50] + + reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419 = p["reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419_mwafd23622_952d_44b3_a437_4aa12422add7"] * + u[39] * u[49] - + p["reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419_mw9d9a7d08_b19a_44f1_a806_151597049345"] * + u[51] + + reaction_mwa4b69c77_6226_46da_b78c_3e6027d0be41 = p["reaction_mwa4b69c77_6226_46da_b78c_3e6027d0be41_mwac85fd83_4e73_43f1_9c42_01773349d50f"] * + u[51] + + reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48 = p["reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48_mwd23d026b_c5b7_4742_aab9_b9beb18ec9bc"] * + u[46] * u[52] - + p["reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48_mwf4c4d7a7_1498_4f6c_9d72_cd5cb012146c"] * + u[54] + + reaction_mw61305f93_7b2d_4a2d_8d16_f7be026d8671 = p["reaction_mw61305f93_7b2d_4a2d_8d16_f7be026d8671_mwe3e5abe4_9f92_43eb_92e4_cea771f5bf14"] * + u[54] + + reaction_mwcc31b497_6c50_446c_bbc2_6c5739507252 = p["reaction_mwcc31b497_6c50_446c_bbc2_6c5739507252_mwa617804d_95cc_4197_a39b_264a2c66b5a3"] * + u[53] + + reaction_mw1d8c2435_bb85_4352_a25f_82033250579e = p["reaction_mw1d8c2435_bb85_4352_a25f_82033250579e_mw254868f8_c9fb_493c_bc1d_807cc83c18e6"] * + u[44] * u[52] - + p["reaction_mw1d8c2435_bb85_4352_a25f_82033250579e_mw78a41659_4abc_4614_9e83_38cbfe1c5262"] * + u[53] + + reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c = p["reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c_mwbc2119ce_ade3_4e2a_a3bc_a29cd77adf72"] * + u[46] * u[18] - + p["reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c_mw54b0e5e9_710f_438e_a8d3_749c594667bc"] * + u[55] + + reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730 = p["reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730_mw1ddaf9f4_dcab_4dc2_a6fa_5ce85b9d7a3a"] * + u[55] + + reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30 = p["reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30_mw60892818_7ef4_4f65_8003_9700a708c66c"] * + u[46] * u[23] - + p["reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30_mw6843d346_6e9f_43d5_97f6_1059f164aa16"] * + u[57] + + reaction_mw4685274a_2b55_429f_927f_3fd863592af6 = p["reaction_mw4685274a_2b55_429f_927f_3fd863592af6_mwdaa378da_64fe_4ea4_b79d_c25733837b9f"] * + u[57] + + reaction_mw8e331e43_16b4_478d_880b_d5a3244540e4 = p["reaction_mw8e331e43_16b4_478d_880b_d5a3244540e4_mw3f5e2165_9bb6_4ac3_992e_50943dd2ea05"] * + u[56] + + reaction_mw47dee769_daa0_4af4_978a_5ab17e504c2f = p["reaction_mw47dee769_daa0_4af4_978a_5ab17e504c2f_mwe49ede89_014e_40f2_acfd_0d1a0cd11fe7"] * + u[58] + + reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b = p["reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b_mw90873203_7a5d_4fca_a789_5e989ff0c999"] * + u[18] * u[6] - + p["reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b_mw92d81b3b_fa59_4637_8540_8cb8482490d9"] * + u[19] + + reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630 = p["reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630_mwcc2a950d_261b_4fd7_9c08_9f3c194ba09d"] * + u[19] * u[60] - + p["reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630_mw1351daea_68be_404a_b7b0_105920ff3371"] * + u[59] + + reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657 = p["reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657_mwc6b3c76f_af7b_488c_8751_28f1d9ab90a1"] * + u[59] + + reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4 = p["reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4_mwf9c81339_e73a_45b5_a714_0854b718d44f"] * + u[23] * u[6] - + p["reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4_mw587125c7_6092_4627_9cdd_2415b77a8307"] * + u[24] + + reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014 = p["reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014_mwa575cf96_3d57_4222_ac71_bd17006ef035"] * + u[24] * u[60] - + p["reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014_mwf7658bc6_acb6_411e_ae2c_9d8de7738d5f"] * + u[61] + + reaction_mweb93165f_cf03_48f1_b035_59d79e324314 = p["reaction_mweb93165f_cf03_48f1_b035_59d79e324314_mwa137184a_0eb0_4bcb_971c_8e19231b2c07"] * + u[61] + + reaction_mw85e457d1_73f8_4236_bb61_a128d300003f = p["reaction_mw85e457d1_73f8_4236_bb61_a128d300003f_mwfa680314_051c_4b10_afc9_7e7fbee49e3f"] * + u[5] * u[6] - + p["reaction_mw85e457d1_73f8_4236_bb61_a128d300003f_mw97b9ab43_02ae_4e42_a524_6b781633a255"] * + u[62] + + reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6 = p["reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6_mwcc0d3fcd_9b9e_4390_b588_e57b57d89d22"] * + u[62] * u[60] - + p["reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6_mw56f1be7e_e303_4a72_be17_5bd08e3eb1f2"] * + u[63] + + reaction_mwc9b3b248_3290_452a_9b7c_8fdada3e6687 = p["reaction_mwc9b3b248_3290_452a_9b7c_8fdada3e6687_mw1decb177_5075_41f3_a348_ca13b8f4497e"] * + u[63] + + reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d = p["reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d_mw001b8124_b461_482a_8c8e_30bffc6718f7"] * + u[5] * u[64] - + p["reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d_mw40eca7d6_80b2_4926_9c2f_330422db0814"] * + u[65] + + reaction_mw2c5858f3_0988_49b0_a94a_057853b84e91 = p["reaction_mw2c5858f3_0988_49b0_a94a_057853b84e91_mwf3d00ca5_89dc_4693_92ec_a47db8150144"] * + u[65] - + p["reaction_mw2c5858f3_0988_49b0_a94a_057853b84e91_mw91a84697_3231_4fa6_b6ff_d69ee86056dc"] * + u[66] + + reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8 = p["reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8_mw901b5284_bdae_4040_b77d_10f1ec267f06"] * + u[65] - + p["reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8_mw94cadd24_0432_4f89_a6fc_96cb0475c44e"] * + u[5] * u[67] + + reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31 = p["reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31_mw688106ee_719d_4995_b1a0_faeefdb0af5a"] * + u[68] * u[67] - + p["reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31_mw85c8ff7d_8d7c_4403_8a58_4996a3e6ac28"] * + u[69] + + reaction_mw837b5ad7_4a8c_4c55_94ff_0fdd63048044 = p["reaction_mw837b5ad7_4a8c_4c55_94ff_0fdd63048044_mw4f6f44d9_408e_49b2_bedf_d34b2448725e"] * + u[69] + + reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621 = p["reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621_mwd3e2533f_8d57_407c_834d_e0dde30b7f4a"] * + u[70] - + p["reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621_mwbd416b7b_f9b6_4464_b9e8_be4ac001d13d"] * + u[68] * u[64] + + reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0 = p["reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0_mw64664eb9_353a_4f1d_a8dc_e22bcb06e2c2"] * + u[67] * u[71] - + p["reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0_mw0573df9d_f365_40b7_83d4_3846a05aefdc"] * + u[72] + + reaction_mw5dcc8719_3180_4bd0_8797_08e256131961 = p["reaction_mw5dcc8719_3180_4bd0_8797_08e256131961_mw134431c3_e8e5_4375_89a0_2c51a03d65dd"] * + u[72] + + reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b = p["reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b_mw22510791_ef7e_4373_907c_9eecbc8adda7"] * + u[74] * u[73] - + p["reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b_mwf59d397b_cfee_4a84_9279_134cc951db8c"] * + u[75] + + reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef = p["reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef_mwe2aded94_f2b5_4513_8670_71a86abf7968"] * + u[75] * u[76] - + p["reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef_mw8d6eacb6_7184_4564_8cde_53e93add2146"] * + u[77] + + reaction_mw98da32e0_b061_40c5_9d32_40744134f3fa = p["reaction_mw98da32e0_b061_40c5_9d32_40744134f3fa_mw3c3648cb_6d56_4d9d_be47_129483778fd6"] * + u[77] + + reaction_mw31369230_1f14_45bd_be02_a44a275c6e31 = p["reaction_mw31369230_1f14_45bd_be02_a44a275c6e31_mw98405e53_330b_4a64_a700_a62bb3f21426"] * + u[78] - + p["reaction_mw31369230_1f14_45bd_be02_a44a275c6e31_mw11f8de84_6639_486d_bf17_8f7021f54b66"] * + u[79] * u[76] + + reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6 = p["reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6_mw65e1222f_39ad_4a29_ae76_04b7d591af38"] * + u[79] - + p["reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6_mw11e520e6_b1f1_4802_af71_92a2bd9cb644"] * + u[80] * u[73] + + reaction_mwf3d393e9_ae09_4eab_a39a_ed0eef0f54bc = p["reaction_mwf3d393e9_ae09_4eab_a39a_ed0eef0f54bc_mw6a4e035b_11a7_4155_9a78_cfba13631cb1"] * + u[81] + + reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92 = p["reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92_mw6eebbe41_cf28_46e8_930c_26f50e08d602"] * + u[82] - + p["reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92_mw751c2663_d807_482f_991b_c8032cb6d996"] * + u[74] * u[83] + + reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9 = p["reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9_mwd2d0b340_bbdb_40bd_9eac_992a2a402b94"] * + u[80] * u[83] - + p["reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9_mwb1b46773_a218_4f99_a000_a98fbc1275d7"] * + u[81] + + reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371 = p["reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371_mw193f2553_1ab3_4b07_9b4b_201ee9e08c96"] * + u[79] * u[83] - + p["reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371_mwb7292ff5_dd13_41aa_b9b8_2c0c75d35fb1"] * + u[84] + + reaction_mw94b3bae0_4da9_4358_a5ac_a46a5cbf621b = p["reaction_mw94b3bae0_4da9_4358_a5ac_a46a5cbf621b_mwf4069175_b898_4633_ac1e_20f44431c36a"] * + u[84] + + reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e = p["reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e_mw6d852e8c_c64a_4926_80c4_781a9c04b20e"] * + u[85] - + p["reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e_mw4d614bfc_3e20_450e_8890_6326afd0a0d7"] * + u[75] * u[83] + + reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5 = p["reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5_mw3676a900_b098_4a74_a511_e15984ca0cd2"] * + u[78] * u[83] - + p["reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5_mwf68a0726_94b5_4be1_933f_1ac48053601d"] * + u[86] + + reaction_mw75acd2d1_3fdf_4c3f_8d99_6d62f825d5e2 = p["reaction_mw75acd2d1_3fdf_4c3f_8d99_6d62f825d5e2_mwb4f0353c_d140_44cc_ab75_566fcc2909c5"] * + u[86] + + reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174 = p["reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174_mw6165953d_ce44_4b21_a18a_c401c04993f1"] * + u[87] - + p["reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174_mw99a30aef_212a_4577_bcfd_8c5764057cca"] * + u[77] * u[83] + + reaction_mw950485f2_4463_4309_a4e4_cc81d16ffb7f = p["reaction_mw950485f2_4463_4309_a4e4_cc81d16ffb7f_mw94b0216f_3353_4b36_b9b7_fd34a0510b08"] * + u88 * u[36] / + (p["reaction_mw950485f2_4463_4309_a4e4_cc81d16ffb7f_mw2034bbe7_27cc_410c_9870_1f8a5986dfa5"] + + u[36]) + + reaction_mw62f71309_e066_47d2_9b99_01f78a51c218 = p["reaction_mw62f71309_e066_47d2_9b99_01f78a51c218_mw0cea56f3_1cdb_410e_a5a4_f3635ba5c94b"] * + u[89] + + reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01 = p["reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01_mw50a0e884_a88c_46a7_b985_788868bc1029"] * + u[5] * u[90] - + p["reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01_mw2c88e0e2_e9c3_4e4c_bb2e_b0cd1f6420f4"] * + u[91] + + reaction_mw65b9e026_bc6c_4c94_8b37_8b9acdf50c8a = p["reaction_mw65b9e026_bc6c_4c94_8b37_8b9acdf50c8a_mw95e2190d_8e39_419b_ad26_7cc141f7b87b"] * + u[91] + + reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3 = p["reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3_mw76d68ace_272d_4178_bba2_74dfdf260c70"] * + u[5] * u[92] - + p["reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3_mwe37b936f_7781_4a01_b59b_96bd7db0c49e"] * + u[93] + + reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618 = p["reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618_mwb6701ead_d3f2_4eb3_8b08_341cea49a4b2"] * + u[92] * u[94] - + p["reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618_mwa5016035_3f9f_44fc_9f69_1d7a0155eb36"] * + u[95] + + reaction_mwe9988e4a_083c_4f8e_b154_3e599c9307b0 = p["reaction_mwe9988e4a_083c_4f8e_b154_3e599c9307b0_mw26164d03_adda_4a21_b5ac_59e1d5a8d8ab"] * + u[95] + + reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735 = p["reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735_mw9fe16c2b_7271_4e4f_b6de_c149721a3198"] * + u[92] * u[92] - + p["reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735_mw74ea5b55_ead0_4b6f_8da0_fd1dcf7e231d"] * + u[97] + + reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2 = p["reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2_mw8cbe6595_6f16_4704_afe2_0dd043a175fa"] * + u[97] * u[94] - + p["reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2_mw21d22acd_ddd4_4794_9700_52201984f75b"] * + u[96] + + reaction_mw75c6078f_fb76_4ca9_9fdd_e221e3ba57ad = p["reaction_mw75c6078f_fb76_4ca9_9fdd_e221e3ba57ad_mw81384973_14a0_4498_ab21_f70666d46d7f"] * + u[96] + + reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2 = p["reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2_mw9f1a7f64_0b37_42df_9dd5_e1a44efdcbba"] * + u[90] * u[92] - + p["reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2_mw366e6f17_4081_4cdc_9fa5_0aeb354d692c"] * + u[98] + + reaction_mwec4127b5_6bcf_4128_aff4_a6b3c470f690 = p["reaction_mwec4127b5_6bcf_4128_aff4_a6b3c470f690_mw1df2caba_8e41_4fe5_a1b5_7777eb98ed1c"] * + u[97] + + reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a = p["reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a_mw5a798f7a_b4eb_4a27_b413_4ff3956b90e9"] * + u[100] * u[100] - + p["reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a_mw54178365_18c1_47e0_94ee_6b96582c52ef"] * + u[99] + + reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7 = p["reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7_mw1ff4e75e_fce5_4a7a_907b_05df4981f80b"] * + u[99] * u[101] - + p["reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7_mw8b269d52_eda9_4dd1_8616_ebcf29c971fa"] * + u[102] + + reaction_mw3b0c171c_6d60_41ca_8193_83cd5e6c188c = p["reaction_mw3b0c171c_6d60_41ca_8193_83cd5e6c188c_mw90b25c4b_ad1a_4ee5_ae20_c60451484516"] * + u[102] + + reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7 = p["reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7_mwa0806e7a_a90d_4187_9c37_6d9ea569a447"] * + u[104] * u[100] - + p["reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7_mw95cb9071_56e2_447d_b7c7_59ac96baa623"] * + u[103] + + reaction_mw45d92b79_0656_4795_87d0_7a465949ca43 = p["reaction_mw45d92b79_0656_4795_87d0_7a465949ca43_mwba545ecf_c7d4_4a6c_8c47_9e91f052d5a9"] * + u[100] * u[101] - + p["reaction_mw45d92b79_0656_4795_87d0_7a465949ca43_mw01c5ceef_57a1_4baa_b2cd_fd39e9588a10"] * + u[105] + + reaction_mwb71945c2_03a8_4fad_a995_e1caeee98525 = p["reaction_mwb71945c2_03a8_4fad_a995_e1caeee98525_mw7aba6db3_c7ec_4192_bb5e_0ac4b466c1a5"] * + u[105] + + reaction_mwd189238c_e8f9_40be_b4ea_18a42bba1b4f = p["reaction_mwd189238c_e8f9_40be_b4ea_18a42bba1b4f_mw31eb851a_c381_419d_b694_f158b7f5cfb6"] * + u[104] + + reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df = p["reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df_mwe09b67b9_0d2a_4b82_91ef_5284216beb94"] * + u[91] * u[6] - + p["reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df_mw77a6c207_ff8c_463c_9b4e_8a7d96652b79"] * + u[106] + + reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e = p["reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e_mw1df53838_48e5_4331_9084_3790409ad5ff"] * + u[106] * u[60] - + p["reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e_mwe4573b2c_5f99_40d0_9f9e_c238caa5ccbe"] * + u[107] + + reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19 = p["reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19_mw8ed5885f_774e_48a0_9338_fe8cdd512023"] * + u[107] + + reaction_mwb205f533_4013_406b_8a4b_691ec3949555 = p["reaction_mwb205f533_4013_406b_8a4b_691ec3949555_mwa6ef5f75_f152_414d_811c_dd037d4b3ca1"] * + u[65] * u[6] - + p["reaction_mwb205f533_4013_406b_8a4b_691ec3949555_mwee51df1b_3f69_43f8_a1d5_5a8c5d0215f2"] * + u[108] + + reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d = p["reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d_mw2e0b4751_7227_4815_bf6f_fa5e2370b1d3"] * + u[108] * u[60] - + p["reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d_mwa8eec8e9_74b9_4afc_b6db_1116fe48e858"] * + u[109] + + reaction_mwfab3a9ec_b094_44f0_bd59_12ac56ca1c99 = p["reaction_mwfab3a9ec_b094_44f0_bd59_12ac56ca1c99_mwc3426c7e_3452_4507_9189_4b83ab147bdd"] * + u[109] + + reaction_mw4fceada8_6eb0_4230_a083_b2ab094d2961 = p["reaction_mw4fceada8_6eb0_4230_a083_b2ab094d2961_mw9cafad09_6002_46e1_8336_bb91c3716d70"] * + u[73] + + # Species: id = mwe2fff28d_182c_4a1c_9882_f17774c0958a; name = EGF; affected by kineticLaw + du[1] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12)) + + # Species: id = mw93907b2d_53db_4080_9e3f_3eb304441ab9; name = EGFR; affected by kineticLaw + du[2] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12) + + (1.0 * reaction_mw47dee769_daa0_4af4_978a_5ab17e504c2f)) + + # Species: id = mw7eacabf9_d68c_491a_aba2_ec0809a8ecc8; name = EGF-EGFR; affected by kineticLaw + du[3] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwa67e40c1_693d_4214_adc8_b2f2b71cef12) + + (-1.0 * reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d) + + (-1.0 * reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d)) + + # Species: id = mwa8f2e7b2_0927_4ab4_a817_dddc43bb4fa3; name = EGF-EGFR2; affected by kineticLaw + du[4] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw877cd1e3_b48b_42e8_ab23_682dd893fd9d) + + (-1.0 * reaction_mw413c6d45_ab23_4d3e_87b3_a8ed4629b923) + + (1.0 * reaction_mw9544e67b_b6d0_4941_b7e0_ecd4f400a335) + + (1.0 * reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6) + + (1.0 * reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93) + + (1.0 * reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a)) + + # Species: id = mwbfcf6773_1915_432c_b1d2_1f246094cc74; name = pEGF-EGFR2; affected by kineticLaw + du[5] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw413c6d45_ab23_4d3e_87b3_a8ed4629b923) + + (-1.0 * reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04) + + (-1.0 * reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644) + + (1.0 * reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe) + + (-1.0 * reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61) + + (-1.0 * reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd) + + (-1.0 * reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c) + + (1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730) + + (1.0 * reaction_mw4685274a_2b55_429f_927f_3fd863592af6) + + (-1.0 * reaction_mw85e457d1_73f8_4236_bb61_a128d300003f) + + (-1.0 * reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d) + + (1.0 * reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8) + + (-1.0 * reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01) + + (1.0 * reaction_mw65b9e026_bc6c_4c94_8b37_8b9acdf50c8a) + + (-1.0 * reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3)) + + # Species: id = mw19122f7d_f92e_4dc0_922f_6b681db65b0b; name = cbl; affected by kineticLaw + du[6] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b) + + (1.0 * reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657) + + (-1.0 * reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4) + + (1.0 * reaction_mweb93165f_cf03_48f1_b035_59d79e324314) + + (-1.0 * reaction_mw85e457d1_73f8_4236_bb61_a128d300003f) + + (1.0 * reaction_mwc9b3b248_3290_452a_9b7c_8fdada3e6687) + + (-1.0 * reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df) + + (1.0 * reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19) + + (-1.0 * reaction_mwb205f533_4013_406b_8a4b_691ec3949555)) + + # Species: id = mw3c2e1b43_29ca_491a_93e9_c723a993d6fb; name = Shc; affected by kineticLaw + du[7] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04) + + (1.0 * reaction_mweda6a945_fb5d_4d99_9958_11b2b2840308) + + (1.0 * reaction_mwd4bf58ea_70c9_43ea_a831_1fcde130ba28)) + + # Species: id = mw5198d3c2_879c_4f0d_b4f8_cd40efe0b1cf; name = pEGF-EGFR2-Shc; affected by kineticLaw + du[8] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwf61e086d_0345_4d4c_b91d_0b105e543d04) + + (-1.0 * reaction_mw974c39f5_b82e_44b3_abec_7a724f46c526)) + + # Species: id = mwe57c3282_5935_405c_8c0b_7fadb7a5de17; name = SHP; affected by kineticLaw + du[9] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644) + + (1.0 * reaction_mw9544e67b_b6d0_4941_b7e0_ecd4f400a335) + + (-1.0 * reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db) + + (1.0 * reaction_mweda6a945_fb5d_4d99_9958_11b2b2840308) + + (-1.0 * reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2) + + (1.0 * reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6) + + (-1.0 * reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb) + + (1.0 * reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93) + + (-1.0 * reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19) + + (1.0 * reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a)) + + # Species: id = mw954e8fcb_ac0a_459d_8878_f19080208a17; name = pEGF-EGFR2-SHP2; affected by kineticLaw + du[10] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw91f49311_efdc_47c6_b8b8_a619e042d644) + + (-1.0 * reaction_mw9544e67b_b6d0_4941_b7e0_ecd4f400a335)) + + # Species: id = mwa98802cb_c977_4fe0_9e67_5000904c2c36; name = pEGF-EGFR2-pShc; affected by kineticLaw + du[11] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw974c39f5_b82e_44b3_abec_7a724f46c526) + + (-1.0 * reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe) + + (-1.0 * reaction_mw4817365e_a33b_451f_bee1_de748377ede2) + + (-1.0 * reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc)) + + # Species: id = mwa0349407_8187_48fc_9e94_5698ccc4e06d; name = pShc; affected by kineticLaw + du[12] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw486c5261_3d03_4589_a1e9_978b62ad2dfe) + + (-1.0 * reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db) + + (-1.0 * reaction_mwd4bf58ea_70c9_43ea_a831_1fcde130ba28) + + (1.0 * reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6) + + (1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730) + + (1.0 * reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657)) + + # Species: id = mwf9999977_6f0e_4e35_9b73_75587f3448e9; name = pShc-SHP2; affected by kineticLaw + du[13] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw2cf8a809_63d8_4717_91fc_070516e6f3db) + + (-1.0 * reaction_mweda6a945_fb5d_4d99_9958_11b2b2840308)) + + # Species: id = mwf430a579_ecbf_48ba_80c2_06e455808f2a; name = Grb2; affected by kineticLaw + du[14] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw4817365e_a33b_451f_bee1_de748377ede2) + + (1.0 * reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6) + + (-1.0 * reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a) + + (-1.0 * reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61) + + (1.0 * reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93) + + (1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730) + + (1.0 * reaction_mw4685274a_2b55_429f_927f_3fd863592af6)) + + # Species: id = mw504578d8_96c3_471f_8a7e_8c14e7535d3d; name = pEGF-EGFR2-pShc-Grb2; affected by kineticLaw + du[15] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw4817365e_a33b_451f_bee1_de748377ede2) + + (-1.0 * reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2) + + (-1.0 * reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3)) + + # Species: id = mw45ab688a_6467_4a3e_a779_2118fa84d69e; name = pEGF-EGFR2-pShc-Grb2-SHP2; affected by kineticLaw + du[16] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw03998474_934b_4e4a_8c0c_ca359e402ac2) + + (-1.0 * reaction_mw7bb43f0a_c87e_41ff_8a43_cdf45c8f05e6)) + + # Species: id = mw9dcaa655_a755_426e_a3fa_1ad7c3c45575; name = SOS; affected by kineticLaw + du[17] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3) + + (-1.0 * reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a) + + (-1.0 * reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2) + + (1.0 * reaction_mw8e331e43_16b4_478d_880b_d5a3244540e4)) + + # Species: id = mwfbda4e09_0cbb_49bc_ae69_f88b7a79ed21; name = pEGF-EGFR2-pShc-Grb2-SOS; affected by kineticLaw + du[18] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwd9262331_e35a_4614_943a_89bcf8a492e3) + + (1.0 * reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc) + + (-1.0 * reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e) + + (1.0 * reaction_mw0bcfad86_59b9_42ff_bcb7_fbb44845049d) + + (-1.0 * reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c) + + (-1.0 * reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b)) + + # Species: id = mwb1bc2058_e6d8_4680_9e6c_d27bb366cde0; name = pEGF-EGFR2-pShc-Grb2-SOS-cbl; affected by kineticLaw + du[19] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwbd8a133e_1b70_44e8_bef8_78b14141166b) + + (-1.0 * reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630)) + + # Species: id = mw1093b3af_1864_4ba3_a541_6009a9921282; name = Grb2-SOS; affected by kineticLaw + du[20] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwc5f121dc_d27d_4c3d_90f2_67d0adaf144a) + + (-1.0 * reaction_mw23a29b42_9813_4e46_b8ae_966e3215e6dc) + + (-1.0 * reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd) + + (1.0 * reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657) + + (1.0 * reaction_mweb93165f_cf03_48f1_b035_59d79e324314)) + + # Species: id = mwd9462e5b_a272_4b66_ab66_fde9266b1a43; name = pEGF-EGFR2-Grb2; affected by kineticLaw + du[21] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw0e459167_515b_4c4d_8b67_bf0a5b3e9d61) + + (-1.0 * reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb) + + (-1.0 * reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2)) + + # Species: id = mw925b938a_fe73_4664_ba6f_e72e57780891; name = pEGF-EGFR2-Grb2-SHP2; affected by kineticLaw + du[22] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwc52e0f9b_1e0c_46ca_8d18_f05ef4a080cb) + + (-1.0 * reaction_mw4f89bf6c_8691_41a6_a1ac_13e6aa8c4b93)) + + # Species: id = mwf8cc7834_bf4f_4ccd_8235_d0890badf0f6; name = pEGF-EGFR2-Grb2-SOS; affected by kineticLaw + du[23] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw35f71989_f89b_4440_b1a4_ebc7b4cc18b2) + + (1.0 * reaction_mwd0d92dd4_81b7_4385_bfd7_5de82e193ecd) + + (1.0 * reaction_mwe9b50ac7_dac3_4eba_b1db_b3fd392d8fb7) + + (-1.0 * reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f) + + (-1.0 * reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30) + + (-1.0 * reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4)) + + # Species: id = mw481cd12b_61ba_44e5_93bf_8b88c6c4a4e7; name = pEGF-EGFR2-Grb2-SOS-cbl; affected by kineticLaw + du[24] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw6bee0112_92dc_4169_9109_2633772b3aa4) + + (-1.0 * reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014)) + + # Species: id = mw8f5a7b5c_ca4c_4a4c_85b1_e5d640c426bf; name = Ras-GDP; affected by kineticLaw + du[25] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e) + + (1.0 * reaction_mw921ee820_1dbb_4b5f_866c_87da620d8f89) + + (-1.0 * reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f) + + (1.0 * reaction_mwf31259aa_32b7_4104_be70_045297b9a512) + + (1.0 * reaction_mw652570eb_c9d3_499b_b877_61d360b10980)) + + # Species: id = mwf40d6176_abfc_4a30_886f_83a19fcffc48; name = pEGF-EGFR2-pShc-Grb2-SOS-Ras-GDP; affected by kineticLaw + du[26] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwbb77e3d6_6065_4344_9361_e30c03514f4e) + + (-1.0 * reaction_mw0bcfad86_59b9_42ff_bcb7_fbb44845049d)) + + # Species: id = mwa54a9c38_c98b_45e5_8432_4119fb777e44; name = Ras-GTP; affected by kineticLaw + du[27] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw921ee820_1dbb_4b5f_866c_87da620d8f89) + + (1.0 * reaction_mw0bcfad86_59b9_42ff_bcb7_fbb44845049d) + + (1.0 * reaction_mwe9b50ac7_dac3_4eba_b1db_b3fd392d8fb7) + + (-1.0 * reaction_mw3c617363_649b_4460_a694_36f7a3127a62) + + (-1.0 * reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53) + + (-1.0 * reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3) + + (1.0 * reaction_mw42c97708_4f85_45a8_9141_d0ae529409ca)) + + # Species: id = mw28464aad_8013_4a23_ae09_a406954859a6; name = pEGF-EGFR2-Grb2-SOS-Ras-GDP; affected by kineticLaw + du[28] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwe9b50ac7_dac3_4eba_b1db_b3fd392d8fb7) + + (1.0 * reaction_mw934c3638_603e_4ff0_a763_68f9405fa01f)) + + # Species: id = mw7cff9a0e_094d_498e_bf7f_7b162c61d63a; name = Ras-GAP; affected by kineticLaw + du[29] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw3c617363_649b_4460_a694_36f7a3127a62) + + (1.0 * reaction_mwf31259aa_32b7_4104_be70_045297b9a512) + + (-1.0 * reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c) + + (1.0 * reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a)) + + # Species: id = mwdf82303e_323f_4c51_a858_56a59233cd98; name = Ras-GTP-Ras-GAP; affected by kineticLaw + du[30] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw3c617363_649b_4460_a694_36f7a3127a62) + + (-1.0 * reaction_mwf31259aa_32b7_4104_be70_045297b9a512)) + + # Species: id = mwd39388fd_4f85_4d1c_b2a3_37857c595a2d; name = pEGF-EGFR2-Ras-GAP; affected by kineticLaw + du[31] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw0a51fbf0_409b_4b45_b4ac_0220af4c4e3c) + + (-1.0 * reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53) + + (1.0 * reaction_mw652570eb_c9d3_499b_b877_61d360b10980) + + (-1.0 * reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19)) + + # Species: id = mwd7bf31ba_b05c_4c45_bb2f_6a2468a2a507; name = pEGF-EGFR2-Ras-GAP-Ras-GTP; affected by kineticLaw + du[32] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw33baddbd_a23f_45bb_b126_0ba60bbf6c53) + + (-1.0 * reaction_mw652570eb_c9d3_499b_b877_61d360b10980)) + + # Species: id = mwbf5cb039_b830_4282_aa22_a3dda6272ec1; name = pEGF-EGFR2-Ras-GAP-SHP2; affected by kineticLaw + du[33] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwc5aae1f8_52e4_4bcd_b044_3768f90b7b19) + + (-1.0 * reaction_mw642ac312_2ee7_4e66_8f3e_e2da2bb6412a)) + + # Species: id = mw66ac98c4_7e7b_4071_954d_43eb17584220; name = Raf1; affected by kineticLaw + du[34] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3) + + (1.0 * reaction_mw87711dc1_43d7_40fc_b9e9_a24e2f92419d)) + + # Species: id = mw83de7813_4941_45a6_a320_a551165bf22a; name = Raf1-Ras-GTP; affected by kineticLaw + du[35] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw584a64d0_560a_4297_9882_80cb4eff73f3) + + (-1.0 * reaction_mw42c97708_4f85_45a8_9141_d0ae529409ca)) + + # Species: id = mwaff92910_ed3d_40b9_a29c_e4866167e828; name = Raf1active; affected by kineticLaw + du[36] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw42c97708_4f85_45a8_9141_d0ae529409ca) + + (-1.0 * reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33) + + (1.0 * reaction_mw1bd186cf_4762_480a_b70d_d7a775462398) + + (-1.0 * reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2) + + (1.0 * reaction_mwb49058ff_2997_4187_abe7_4dce4ccf6ff4) + + (-1.0 * reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d) + + (-1.0 * reaction_mw950485f2_4463_4309_a4e4_cc81d16ffb7f) + + (1.0 * reaction_mw62f71309_e066_47d2_9b99_01f78a51c218)) + + # Species: id = mw0834731b_0477_4217_a53b_30cef851191b; name = MEK; affected by kineticLaw + du[37] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33) + + (1.0 * reaction_mwa4b69c77_6226_46da_b78c_3e6027d0be41)) + + # Species: id = mw4628f984_eb87_4922_9760_4975095ce6eb; name = Raf1active-MEK; affected by kineticLaw + du[38] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwaa65a34e_fabf_4d6d_ae0b_f1d08b068f33) + + (-1.0 * reaction_mw1bd186cf_4762_480a_b70d_d7a775462398)) + + # Species: id = mw9b25f809_18a1_4c14_8f4b_cf18e6d93c28; name = pMEK; affected by kineticLaw + du[39] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw1bd186cf_4762_480a_b70d_d7a775462398) + + (-1.0 * reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2) + + (1.0 * reaction_mw40950d59_1012_4361_8418_73e25758e367) + + (-1.0 * reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419)) + + # Species: id = mw12ba4000_d452_420c_be63_96d2848aca32; name = Raf1active-pMEK; affected by kineticLaw + du[40] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwf5573ddf_ad7f_478a_a784_557a9cddaaf2) + + (-1.0 * reaction_mwb49058ff_2997_4187_abe7_4dce4ccf6ff4)) + + # Species: id = mwf816df4c_4593_4d23_990f_0d7c15ddde5d; name = ppMEK; affected by kineticLaw + du[41] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwb49058ff_2997_4187_abe7_4dce4ccf6ff4) + + (-1.0 * reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe) + + (1.0 * reaction_mwf95f743d_6108_49fe_8ffd_bdcc1a9f9a8d) + + (-1.0 * reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9) + + (1.0 * reaction_mw6fd24d16_f57d_46c6_82f5_3f00759fa16b) + + (-1.0 * reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b)) + + # Species: id = mw7e23b961_186b_47a0_a8b5_5e9957766792; name = ERK; affected by kineticLaw + du[42] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe) + + (1.0 * reaction_mwcc31b497_6c50_446c_bbc2_6c5739507252)) + + # Species: id = mwcedf8ecd_67bd_4b91_aa04_d58782dec2a4; name = ppMEK-ERK; affected by kineticLaw + du[43] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw8301b154_9463_4516_b4c5_c8f8b68691fe) + + (-1.0 * reaction_mwf95f743d_6108_49fe_8ffd_bdcc1a9f9a8d)) + + # Species: id = mwcc894c94_0ddf_42cc_913e_cdcc4d471d94; name = pERK; affected by kineticLaw + du[44] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwf95f743d_6108_49fe_8ffd_bdcc1a9f9a8d) + + (-1.0 * reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9) + + (1.0 * reaction_mw61305f93_7b2d_4a2d_8d16_f7be026d8671) + + (-1.0 * reaction_mw1d8c2435_bb85_4352_a25f_82033250579e)) + + # Species: id = mw6cb74b27_ffef_49bb_8ffb_622d552caa9e; name = ppMEK-pERK; affected by kineticLaw + du[45] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw51d9d6b8_f0c0_4763_9d11_9be61b5cf5c9) + + (-1.0 * reaction_mw6fd24d16_f57d_46c6_82f5_3f00759fa16b)) + + # Species: id = mwd784228d_0cb5_468a_ac70_02d8f04b3d9c; name = ppERK; affected by kineticLaw + du[46] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw6fd24d16_f57d_46c6_82f5_3f00759fa16b) + + (-1.0 * reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48) + + (-1.0 * reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c) + + (1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730) + + (-1.0 * reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30) + + (1.0 * reaction_mw4685274a_2b55_429f_927f_3fd863592af6)) + + # Species: id = mwbaaeb210_4806_4076_9d60_219f4ed945b6; name = Pase; affected by kineticLaw + du[47] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d) + + (1.0 * reaction_mw87711dc1_43d7_40fc_b9e9_a24e2f92419d)) + + # Species: id = mw19a33ad5_5ba4_46c7_84eb_c1287f02bcd5; name = Raf1active-Pase; affected by kineticLaw + du[48] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw9c208e18_c70d_4231_af0b_ad17cd0bba2d) + + (-1.0 * reaction_mw87711dc1_43d7_40fc_b9e9_a24e2f92419d)) + + # Species: id = mwf9e2a044_7774_400b_a74e_a111b4a21f30; name = Pase2; affected by kineticLaw + du[49] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b) + + (1.0 * reaction_mw40950d59_1012_4361_8418_73e25758e367) + + (-1.0 * reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419) + + (1.0 * reaction_mwa4b69c77_6226_46da_b78c_3e6027d0be41)) + + # Species: id = mwcb572fe2_c3ac_40e7_8141_da7d55fce18a; name = ppMEK-Pase2; affected by kineticLaw + du[50] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw4b445876_bdce_42d0_867b_fd3c74128a6b) + + (-1.0 * reaction_mw40950d59_1012_4361_8418_73e25758e367)) + + # Species: id = mwa0acc0ac_5fac_4a42_a3be_e36db44994b0; name = pMEK-Pase2; affected by kineticLaw + du[51] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwbfa79c95_487d_4c6f_b437_9e579451a419) + + (-1.0 * reaction_mwa4b69c77_6226_46da_b78c_3e6027d0be41)) + + # Species: id = mwd087f76b_65dc_47f1_ba21_c43774457686; name = Pase3; affected by kineticLaw + du[52] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48) + + (1.0 * reaction_mw61305f93_7b2d_4a2d_8d16_f7be026d8671) + + (1.0 * reaction_mwcc31b497_6c50_446c_bbc2_6c5739507252) + + (-1.0 * reaction_mw1d8c2435_bb85_4352_a25f_82033250579e)) + + # Species: id = mw35f5adaa_d1c0_433c_817d_76e317f4cb15; name = pERK-Pase3; affected by kineticLaw + du[53] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwcc31b497_6c50_446c_bbc2_6c5739507252) + + (1.0 * reaction_mw1d8c2435_bb85_4352_a25f_82033250579e)) + + # Species: id = mwa7e3103a_6394_472c_b0f4_8ed527f68604; name = ppERK-Pase3; affected by kineticLaw + du[54] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwf8bb22e2_5aa3_4c25_a022_a266b1856a48) + + (-1.0 * reaction_mw61305f93_7b2d_4a2d_8d16_f7be026d8671)) + + # Species: id = mw5babe3d5_a9af_4dfd_ac01_35474ef64af2; name = ppERK-pEGF-EGFR2-pShc-Grb2-SOS; affected by kineticLaw + du[55] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw8dec1159_1925_45d9_af25_3cb709a5017c) + + (-1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730)) + + # Species: id = mw31ac308f_da36_4f73_830f_67f3e5b945d9; name = pSOS; affected by kineticLaw + du[56] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwcf9f1b1d_e19a_4fa8_85ba_8f17e2cec730) + + (1.0 * reaction_mw4685274a_2b55_429f_927f_3fd863592af6) + + (-1.0 * reaction_mw8e331e43_16b4_478d_880b_d5a3244540e4)) + + # Species: id = mw31261227_9cd6_4059_a0bb_04dbf4888080; name = ppERK-pEGF-EGFR2-Grb2-SOS; affected by kineticLaw + du[57] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwa5c135b4_77e2_4411_98e1_2000c39d4b30) + + (-1.0 * reaction_mw4685274a_2b55_429f_927f_3fd863592af6)) + + # Species: id = mw0a0ca6ba_cb28_44c7_a0c0_1593cb720966; name = ProEGFR; affected by kineticLaw + du[58] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw47dee769_daa0_4af4_978a_5ab17e504c2f)) + + # Species: id = mw06b8aada_c92a_48eb_8ee7_af3778cfe62f; name = pEGF-EGFR2-pShc-Grb2-SOS-cbl-EPn; affected by kineticLaw + du[59] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630) + + (-1.0 * reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657)) + + # Species: id = mwb2366216_0b3c_4f28_8303_fec92c68dd57; name = EPn; affected by kineticLaw + du[60] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw3a87ca5a_845d_4ac4_8806_e343cbbfc630) + + (1.0 * reaction_mw363a5271_1f51_4d5e_87a7_42ea25cb5657) + + (-1.0 * reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014) + + (1.0 * reaction_mweb93165f_cf03_48f1_b035_59d79e324314) + + (-1.0 * reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6) + + (1.0 * reaction_mwc9b3b248_3290_452a_9b7c_8fdada3e6687) + + (-1.0 * reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e) + + (1.0 * reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19) + + (-1.0 * reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d) + + (1.0 * reaction_mwfab3a9ec_b094_44f0_bd59_12ac56ca1c99)) + + # Species: id = mw1d5948e7_5504_4224_9d71_227911b4f1ee; name = pEGF-EGFR2-Grb2-SOS-cbl-EPn; affected by kineticLaw + du[61] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwbac9e6ff_2df1_45eb_b3f4_4cae74c64014) + + (-1.0 * reaction_mweb93165f_cf03_48f1_b035_59d79e324314)) + + # Species: id = mwec1b368b_8f73_47eb_9636_9956389836eb; name = pEGF-EGFR2-cbl; affected by kineticLaw + du[62] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw85e457d1_73f8_4236_bb61_a128d300003f) + + (-1.0 * reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6)) + + # Species: id = mwa455ec7e_1a12_4659_95a2_a5695d09ca60; name = pEGF-EGFR2-cbl-EPn; affected by kineticLaw + du[63] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw6b159c8f_eee0_4337_b711_2e230c9e2cf6) + + (-1.0 * reaction_mwc9b3b248_3290_452a_9b7c_8fdada3e6687)) + + # Species: id = mw2ba1db9a_4483_44fa_a3a2_b4a5ea66898c; name = PI3K; affected by kineticLaw + du[64] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d) + + (1.0 * reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621) + + (1.0 * reaction_mwfab3a9ec_b094_44f0_bd59_12ac56ca1c99)) + + # Species: id = mw0dc4e5eb_4366_4799_bebc_cfcffe5c06f5; name = pEGF-EGFR2-PI3K; affected by kineticLaw + du[65] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw77484632_4e33_468a_9937_24e9bfd0e17d) + + (-1.0 * reaction_mw2c5858f3_0988_49b0_a94a_057853b84e91) + + (-1.0 * reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8) + + (-1.0 * reaction_mwb205f533_4013_406b_8a4b_691ec3949555)) + + # Species: id = mw1e591998_65c0_484e_8a3b_537a38d94de1; name = pEGF-EGFR2-pPI3K; affected by kineticLaw + du[66] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw2c5858f3_0988_49b0_a94a_057853b84e91)) + + # Species: id = mw78e207c4_4faf_4b48_8e22_1ee666e9cc4c; name = pPI3K; affected by kineticLaw + du[67] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwd3a36af9_3ccc_4bb1_9867_3b9823ba4ac8) + + (-1.0 * reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31) + + (-1.0 * reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0) + + (1.0 * reaction_mw5dcc8719_3180_4bd0_8797_08e256131961)) + + # Species: id = mwfc4a9c3d_3ebb_4033_8b7d_f4d7613d2078; name = TP4; affected by kineticLaw + du[68] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31) + + (1.0 * reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621)) + + # Species: id = mwbd6bb050_89bd_41df_8cea_d2e1fb77bafe; name = TP4-pPI3K; affected by kineticLaw + du[69] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw9f000f29_2512_4d4a_9dd9_e59aaf296d31) + + (-1.0 * reaction_mw837b5ad7_4a8c_4c55_94ff_0fdd63048044)) + + # Species: id = mw7033dfd6_53c5_433b_a132_f8cb34dea20f; name = TP4-PI3K; affected by kineticLaw + du[70] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw837b5ad7_4a8c_4c55_94ff_0fdd63048044) + + (-1.0 * reaction_mwd15926b3_069a_4b16_a6fc_c0c15083d621)) + + # Species: id = mwb561d9f3_a9ed_4bdb_8d40_87be5cc3237a; name = PIP2; affected by kineticLaw + du[71] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0) + + (1.0 * reaction_mw4fceada8_6eb0_4230_a083_b2ab094d2961)) + + # Species: id = mw014cc419_b720_4b90_9192_2ec6e706c87d; name = pPI3K-PIP2; affected by kineticLaw + du[72] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw3a5e0932_d50f_4fe6_b8cb_0ad649f305b0) + + (-1.0 * reaction_mw5dcc8719_3180_4bd0_8797_08e256131961)) + + # Species: id = mwd7f41594_8377_4e2e_9528_45d5a82ffdb4; name = PIP3; affected by kineticLaw + du[73] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw5dcc8719_3180_4bd0_8797_08e256131961) + + (-1.0 * reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b) + + (1.0 * reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6) + + (-1.0 * reaction_mw4fceada8_6eb0_4230_a083_b2ab094d2961)) + + # Species: id = mwcef73e0e_d195_4077_ae71_723664ee1602; name = Akt; affected by kineticLaw + du[74] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b) + + (1.0 * reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92)) + + # Species: id = mw62bf5275_ce02_4e86_b3b6_3f87a335e1de; name = Aktm; affected by kineticLaw + du[75] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw376b0685_ef73_4fcc_94af_2ada24cf8a8b) + + (-1.0 * reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef) + + (1.0 * reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e)) + + # Species: id = mw6e01967b_3e2a_433d_bec6_9f9cf3ba243c; name = PDK1; affected by kineticLaw + du[76] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef) + + (1.0 * reaction_mw31369230_1f14_45bd_be02_a44a275c6e31)) + + # Species: id = mw6353aa36_d4a4_4254_8a1f_1f7f571d4233; name = Aktm-PDK1; affected by kineticLaw + du[77] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwcc7cfa9c_4945_403a_938e_b237c371a5ef) + + (-1.0 * reaction_mw98da32e0_b061_40c5_9d32_40744134f3fa) + + (1.0 * reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174)) + + # Species: id = mwc1935afc_56b1_4a87_923c_ae6d82455d80; name = pAktm-PDK1; affected by kineticLaw + du[78] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw98da32e0_b061_40c5_9d32_40744134f3fa) + + (-1.0 * reaction_mw31369230_1f14_45bd_be02_a44a275c6e31) + + (-1.0 * reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5)) + + # Species: id = mw3d81860d_d786_4fcc_b8bb_64f1a2d7739d; name = pAktm; affected by kineticLaw + du[79] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw31369230_1f14_45bd_be02_a44a275c6e31) + + (-1.0 * reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6) + + (-1.0 * reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371)) + + # Species: id = mw16796ffe_4764_4a9f_942e_149f42c1cd28; name = pAkt; affected by kineticLaw + du[80] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw12311a84_3f8d_40c6_8b14_961a8a58d1b6) + + (-1.0 * reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9)) + + # Species: id = mwa6e82fc9_a0ce_461c_93c8_17f3c807c1a1; name = pAkt-Takt; affected by kineticLaw + du[81] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwf3d393e9_ae09_4eab_a39a_ed0eef0f54bc) + + (1.0 * reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9)) + + # Species: id = mw236a3250_4c96_4f6e_b94c_ab3d12852801; name = Akt-Takt; affected by kineticLaw + du[82] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwf3d393e9_ae09_4eab_a39a_ed0eef0f54bc) + + (-1.0 * reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92)) + + # Species: id = mw11a8b702_b8ac_4513_b4aa_063e51089812; name = Takt; affected by kineticLaw + du[83] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw2698f402_d00b_451e_8b22_93a322fe9a92) + + (-1.0 * reaction_mw028e8b3e_b531_4466_9c3a_e3fcf7fc9be9) + + (-1.0 * reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371) + + (1.0 * reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e) + + (-1.0 * reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5) + + (1.0 * reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174)) + + # Species: id = mw1a0cb97a_b657_430b_963c_92217f643081; name = pAktm-Takt; affected by kineticLaw + du[84] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwc5e0c166_6a3a_4913_9ed1_dafe97bdb371) + + (-1.0 * reaction_mw94b3bae0_4da9_4358_a5ac_a46a5cbf621b)) + + # Species: id = mw9b937ca3_0d82_46d5_8f5a_0f9701002797; name = Aktm-Takt; affected by kineticLaw + du[85] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw94b3bae0_4da9_4358_a5ac_a46a5cbf621b) + + (-1.0 * reaction_mw362ca1b3_224a_42fb_a14b_6ff467748a5e)) + + # Species: id = mw57a44eb0_ace7_4294_905a_219e87d3c281; name = pAktm-PDK1-Takt; affected by kineticLaw + du[86] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw3994e898_7232_4b70_9c58_b3476e8655f5) + + (-1.0 * reaction_mw75acd2d1_3fdf_4c3f_8d99_6d62f825d5e2)) + + # Species: id = mwd746a5d5_5e65_4a4c_9f84_0e4a3cb7d2fc; name = Aktm-PDK1-Takt; affected by kineticLaw + du[87] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw75acd2d1_3fdf_4c3f_8d99_6d62f825d5e2) + + (-1.0 * reaction_mw4a334f7d_9bce_4690_b623_a427ed66a174)) + + # Species: id = mwa6994523_5d45_4000_af0c_3e94073bf183, name = pAkt_total, defined in a rule du[88] = u[88] + + # Species: id = mwdf92bdc0_f426_45b0_9ad0_876521f41312; name = pRaf1active; affected by kineticLaw + du[89] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw950485f2_4463_4309_a4e4_cc81d16ffb7f) + + (-1.0 * reaction_mw62f71309_e066_47d2_9b99_01f78a51c218)) + + # Species: id = mw13abe2a6_9905_40e5_8c23_3fc8834b572a; name = STAT3c; affected by kineticLaw + du[90] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01) + + (1.0 * reaction_mwe9988e4a_083c_4f8e_b154_3e599c9307b0) + + (-1.0 * reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2) + + (1.0 * reaction_mwd189238c_e8f9_40be_b4ea_18a42bba1b4f) + + (1.0 * reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19)) + + # Species: id = mw2fd710a6_7fe2_4484_bca6_59c187bade8b; name = pEGF-EGFR2-STAT3c; affected by kineticLaw + du[91] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwe8647e48_f4a9_40f4_9b32_f89ded572e01) + + (-1.0 * reaction_mw65b9e026_bc6c_4c94_8b37_8b9acdf50c8a) + + (-1.0 * reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df)) + + # Species: id = mwb6a9aa2c_62e7_410f_9c33_dbe36dfcc4af; name = pSTAT3c; affected by kineticLaw + du[92] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw65b9e026_bc6c_4c94_8b37_8b9acdf50c8a) + + (-1.0 * reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3) + + (-1.0 * reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618) + + (-1.0 * reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735) + + (-1.0 * reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735) + + (-1.0 * reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2)) + + # Species: id = mw341082a0_8017_4cc7_9d00_b1211a196072; name = pEGF-EGFR2-pSTAT3c; affected by kineticLaw + du[93] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw1c9d29fa_bff4_4d2f_9d5f_f1791e4882a3)) + + # Species: id = mwcea1f1c1_2f85_4af1_98ea_ef14cf580c09; name = PP1; affected by kineticLaw + du[94] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618) + + (1.0 * reaction_mwe9988e4a_083c_4f8e_b154_3e599c9307b0) + + (-1.0 * reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2) + + (1.0 * reaction_mw75c6078f_fb76_4ca9_9fdd_e221e3ba57ad)) + + # Species: id = mwdc34472c_a6f9_4002_951d_e0e8da64eb42; name = pSTAT3c-PP1; affected by kineticLaw + du[95] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwad97bd5a_3dae_49d9_990b_2e6574740618) + + (-1.0 * reaction_mwe9988e4a_083c_4f8e_b154_3e599c9307b0)) + + # Species: id = mw472d5cb9_120e_4f60_bbae_1ae2552837dd; name = pSTAT3c-pSTAT3c-PP1; affected by kineticLaw + du[96] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2) + + (-1.0 * reaction_mw75c6078f_fb76_4ca9_9fdd_e221e3ba57ad)) + + # Species: id = mw4f575c55_7dff_45d7_94ad_cda9621d5b63; name = pSTAT3c-pSTAT3c; affected by kineticLaw + du[97] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwf8bacf1a_6c1a_49b6_b344_2d3bd404a735) + + (-1.0 * reaction_mwc9b945cf_3a14_4bd9_b253_7064498c75e2) + + (-1.0 * reaction_mwec4127b5_6bcf_4128_aff4_a6b3c470f690)) + + # Species: id = mwd2c465fb_eea7_499a_8ea4_f318a64cb9ee; name = STAT3c-pSTAT3c; affected by kineticLaw + du[98] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw75c6078f_fb76_4ca9_9fdd_e221e3ba57ad) + + (1.0 * reaction_mw177fa7b0_f0be_4c3e_8b47_2ac4e13159a2)) + + # Species: id = mw4110f531_7513_4786_8896_7c9d969ff558; name = pSTAT3n-pSTAT3n; affected by kineticLaw + du[99] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwec4127b5_6bcf_4128_aff4_a6b3c470f690) + + (1.0 * reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a) + + (-1.0 * reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7)) + + # Species: id = mwe3fd7f65_b0d1_44d9_b6f3_d2f7d332f664; name = pSTAT3n; affected by kineticLaw + du[100] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a) + + (-1.0 * reaction_mw5c806b00_59a1_491e_99a1_2c932b2d5d7a) + + (-1.0 * reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7) + + (-1.0 * reaction_mw45d92b79_0656_4795_87d0_7a465949ca43)) + + # Species: id = mw0e1be972_fded_4bff_a93d_091ec942485f; name = PP2; affected by kineticLaw + du[101] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7) + + (1.0 * reaction_mw3b0c171c_6d60_41ca_8193_83cd5e6c188c) + + (-1.0 * reaction_mw45d92b79_0656_4795_87d0_7a465949ca43) + + (1.0 * reaction_mwb71945c2_03a8_4fad_a995_e1caeee98525)) + + # Species: id = mw0facb8f2_95cf_4ddf_a959_b24ba64f320b; name = pSTAT3n-pSTAT3n-PP2; affected by kineticLaw + du[102] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw26fdabae_323b_4a78_b134_4c2eb70ea6a7) + + (-1.0 * reaction_mw3b0c171c_6d60_41ca_8193_83cd5e6c188c)) + + # Species: id = mw9686f53e_d343_45fd_b441_9c992219546a; name = STAT3n-pSTAT3n; affected by kineticLaw + du[103] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw3b0c171c_6d60_41ca_8193_83cd5e6c188c) + + (1.0 * reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7)) + + # Species: id = mw960bddeb_e567_46dd_b2f3_ed5e6a5c7972; name = STAT3n; affected by kineticLaw + du[104] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((-1.0 * reaction_mwc38a99c8_74cf_49f2_a16b_f6610ca1a0a7) + + (1.0 * reaction_mwb71945c2_03a8_4fad_a995_e1caeee98525) + + (-1.0 * reaction_mwd189238c_e8f9_40be_b4ea_18a42bba1b4f)) + + # Species: id = mw8c85ff7f_6368_4b11_a2ed_ce83481b55e6; name = pSTAT3n-PP2; affected by kineticLaw + du[105] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw45d92b79_0656_4795_87d0_7a465949ca43) + + (-1.0 * reaction_mwb71945c2_03a8_4fad_a995_e1caeee98525)) + + # Species: id = mw548c81c2_c626_4df8_9177_a1a6fc3d4ce8; name = pEGF-EGFR2-STAT3c-cbl; affected by kineticLaw + du[106] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwcb637bf1_7618_4d8a_ab5c_399145ecf1df) + + (-1.0 * reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e)) + + # Species: id = mw142e6dc4_ec15_459d_a184_6b20be04f08d; name = pEGF-EGFR2-STAT3c-cbl-EPn; affected by kineticLaw + du[107] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw401dde7e_c0a1_4780_b6cc_8f98681c862e) + + (-1.0 * reaction_mw0dd5a91d_d76c_494e_9dd6_57f2836aaa19)) + + # Species: id = mw2c47ae3f_06d9_40ec_a252_535db0ae5caa; name = pEGF-EGFR2-PI3K-cbl; affected by kineticLaw + du[108] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mwb205f533_4013_406b_8a4b_691ec3949555) + + (-1.0 * reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d)) + + # Species: id = mwd32d108b_49c2_4df2_9b67_d6c6b84f54b9; name = pEGF-EGFR2-PI3K-cbl-EPn; affected by kineticLaw + du[109] = (1 / (p["compartment_mw1637dd35_5f09_4a8d_bb7f_58717cdf1612"])) * + ((1.0 * reaction_mw602726ea_89ee_41b8_bda6_e2811bb42c1d) + + (-1.0 * reaction_mwfab3a9ec_b094_44f0_bd59_12ac56ca1c99)) +end + +u0=zeros(109) +u0[1] = 0.0081967 +u0[2] = 0.3 +u0[3] = 0.0 +u0[4] = 0.0 +u0[5] = 0.0 +u0[6] = 0.8 +u0[7] = 1.0 +u0[8] = 0.0 +u0[9] = 0.1 +u0[10] = 0.0 +u0[11] = 0.0 +u0[12] = 0.0 +u0[13] = 0.0 +u0[14] = 1.0 +u0[15] = 0.0 +u0[16] = 0.0 +u0[17] = 0.3 +u0[18] = 0.0 +u0[19] = 0.0 +u0[20] = 0.0 +u0[21] = 0.0 +u0[22] = 0.0 +u0[23] = 0.0 +u0[24] = 0.0 +u0[25] = 0.15 +u0[26] = 0.0 +u0[27] = 0.0 +u0[28] = 0.0 +u0[29] = 0.1 +u0[30] = 0.0 +u0[31] = 0.0 +u0[32] = 0.0 +u0[33] = 0.0 +u0[34] = 0.5 +u0[35] = 0.0 +u0[36] = 0.0 +u0[37] = 0.68 +u0[38] = 0.0 +u0[39] = 0.0 +u0[40] = 0.0 +u0[41] = 0.0 +u0[42] = 0.4 +u0[43] = 0.0 +u0[44] = 0.0 +u0[45] = 0.0 +u0[46] = 0.0 +u0[47] = 0.5 +u0[48] = 0.0 +u0[49] = 0.02 +u0[50] = 0.0 +u0[51] = 0.0 +u0[52] = 0.002 +u0[53] = 0.0 +u0[54] = 0.0 +u0[55] = 0.0 +u0[56] = 0.0 +u0[57] = 0.0 +u0[58] = 1.0 +u0[59] = 0.0 +u0[60] = 0.5 +u0[61] = 0.0 +u0[62] = 0.0 +u0[63] = 0.0 +u0[64] = 0.2 +u0[65] = 0.0 +u0[66] = 0.0 +u0[67] = 0.0 +u0[68] = 0.2 +u0[69] = 0.0 +u0[70] = 0.0 +u0[71] = 0.5 +u0[72] = 0.0 +u0[73] = 0.0 +u0[74] = 0.1 +u0[75] = 0.0 +u0[76] = 0.1 +u0[77] = 0.0 +u0[78] = 0.0 +u0[79] = 0.0 +u0[80] = 0.0 +u0[81] = 0.0 +u0[82] = 0.0 +u0[83] = 0.1 +u0[84] = 0.0 +u0[85] = 0.0 +u0[86] = 0.0 +u0[87] = 0.0 +u0[88] = 0.0 +u0[89] = 0.0 +u0[90] = 1.0 +u0[91] = 0.0 +u0[92] = 0.0 +u0[93] = 0.0 +u0[94] = 0.5 +u0[95] = 0.0 +u0[96] = 0.0 +u0[97] = 0.0 +u0[98] = 0.0 +u0[99] = 0.0 +u0[100] = 0.0 +u0[101] = 0.6 +u0[102] = 0.0 +u0[103] = 0.0 +u0[104] = 0.0 +u0[105] = 0.0 +u0[106] = 0.0 +u0[107] = 0.0 +u0[108] = 0.0 +u0[109] = 0.0 + +tspan = (0.0, 100.0) + +prob = ODEProblem{true, SciMLBase.FullSpecialize}(sbml_model!, u0, tspan, par) + +sys = modelingtoolkitize(prob) + +sys = structural_simplify(sys) + +const to = TimerOutput() + +@timeit to "ODEProb No Jac" oprob = ODEProblem{true, SciMLBase.FullSpecialize}(sys, Float64[], tspan, Float64[]) +@timeit to "ODEProb DenseJac" densejacprob = ODEProblem{true, SciMLBase.FullSpecialize}( + sys, Float64[], tspan, Float64[], jac = true) +``` + +```julia +@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true, SciMLBase.FullSpecialize}( + sys, Float64[], tspan, Float64[], jac = true, sparse = true) +show(to) +``` + +## Picture of the solution + +```julia +sol = solve(oprob, CVODE_BDF()) +plot(sol, legend = false, fmt = :png) +``` + +For these benchmarks we will be using the time-series error with these saving +points since the final time point is not well-indicative of the solution +behavior (capturing the oscillation is the key!). + +## Generate Test Solution + +```julia +@time sol = solve(oprob, CVODE_BDF(), abstol = 1/10^14, reltol = 1/10^14) +test_sol = TestSolution(sol) +``` + +## Setups + +```julia + +abstols = 1.0 ./ 10.0 .^ (9:13) +reltols = 1.0 ./ 10.0 .^ (6:10) + +setups = [ + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>Rodas4()), + Dict(:alg=>QNDF()), + Dict(:alg=>lsoda()), + Dict(:alg=>radau()), + Dict(:alg=>seulex()), + Dict(:alg=>ImplicitEulerExtrapolation( + min_order = 8, init_order = 9, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitEulerExtrapolation(min_order = 8, init_order = 9, threading = false)), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation( + min_order = 7, init_order = 8, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 7, init_order = 8, threading = false)), + Dict(:alg=>ImplicitHairerWannerExtrapolation( + init_order = 5, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitHairerWannerExtrapolation(init_order = 5, threading = false)) +] + +solnames = ["CVODE_BDF", "KenCarp4", "Rodas4", "QNDF", "lsoda", "radau", "seulex", + "ImplEulerExtpl (threaded)", "ImplEulerExtpl (non-threaded)", + "ImplEulerBaryExtpl (threaded)", "ImplEulerBaryExtpl (non-threaded)", + "ImplHWExtpl (threaded)", "ImplHWExtpl (non-threaded)"] + +``` + +## Automatic Jacobian Solves + +First we test using auto-generated Jacobians (finite difference) + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; + names = solnames, appxsol = test_sol, save_everystep = false, maxiters = Int(1e5), numruns = 10) + +plot( + wp, title = "Implicit Methods: SBML Model", legend = :outertopleft, size = (1000, 500), + xticks = 10.0 .^ (-15:1:1), + yticks = 10.0 .^ (-6:0.3:5), + bottom_margin = 5Plots.mm) + +``` + +## Analytical Jacobian + +Now we test using the generated analytic Jacobian function. + +```julia +setups = [ + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>Rodas4()), + Dict(:alg=>QNDF()), + #Dict(:alg=>lsoda()), + #Dict(:alg=>radau()), + #Dict(:alg=>seulex()), + Dict(:alg=>ImplicitEulerExtrapolation( + min_order = 8, init_order = 9, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitEulerExtrapolation(min_order = 8, init_order = 9, threading = false)), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation( + min_order = 7, init_order = 8, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 7, init_order = 8, threading = false)), + Dict(:alg=>ImplicitHairerWannerExtrapolation( + init_order = 5, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitHairerWannerExtrapolation(init_order = 5, threading = false)) +] + +solnames = ["CVODE_BDF", "KenCarp4", "Rodas4", "QNDF", + "ImplEulerExtpl (threaded)", "ImplEulerExtpl (non-threaded)", + "ImplEulerBaryExtpl (threaded)", "ImplEulerBaryExtpl (non-threaded)", + "ImplHWExtpl (threaded)", "ImplHWExtpl (non-threaded)"] + +wp = WorkPrecisionSet(densejacprob, abstols, reltols, setups; + names = solnames, appxsol = test_sol, save_everystep = false, maxiters = Int(1e5), numruns = 10) + +plot( + wp, title = "Implicit Methods: SBML Model", legend = :outertopleft, size = (1000, 500), + xticks = 10.0 .^ (-15:1:1), + yticks = 10.0 .^ (-6:0.3:5), + bottom_margin = 5Plots.mm) +``` + +## Sparse Jacobian + +Finally we test using the generated sparse analytic Jacobian function. + +Note that the extrapolation methods currently do not support sparse Jacobians. + +```julia +setups = [ + #Dict(:alg=>CVODE_BDF()), #Fails! + Dict(:alg=>KenCarp4(autodiff = false)), + Dict(:alg=>Rodas4(autodiff = false)), + Dict(:alg=>QNDF(autodiff = false)) #Dict(:alg=>lsoda()), + #Dict(:alg=>radau()), + #Dict(:alg=>seulex()), + #Dict(:alg=>ImplicitEulerExtrapolation(autodiff = false,min_order = 8, init_order = 9,threading = OrdinaryDiffEq.PolyesterThreads())), + #Dict(:alg=>ImplicitEulerExtrapolation(autodiff = false,min_order = 8, init_order = 9,threading = false)), + #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(autodiff = false,min_order = 7, init_order = 8,threading = OrdinaryDiffEq.PolyesterThreads())), + #Dict(:alg=>ImplicitEulerBarycentricExtrapolation(autodiff = false,min_order = 7, init_order = 8,threading = false)), + #Dict(:alg=>ImplicitHairerWannerExtrapolation(autodiff = false,init_order = 5,threading = OrdinaryDiffEq.PolyesterThreads())), + #Dict(:alg=>ImplicitHairerWannerExtrapolation(autodiff = false,init_order = 5, threading = false)), +] + +solnames = ["KenCarp4", "Rodas4", "QNDF"#"ImplEulerExtpl (threaded)", "ImplEulerExtpl (non-threaded)", #"ImplEulerBaryExtpl (threaded)","ImplEulerBaryExtpl (non-threaded)","ImplHWExtpl (threaded)","ImplHWExtpl (non-threaded)" +] + +wp = WorkPrecisionSet(sparsejacprob, abstols, reltols, setups; + names = solnames, appxsol = test_sol, save_everystep = false, maxiters = Int(1e5), numruns = 10) + +plot( + wp, title = "Implicit Methods: SBML Model", legend = :outertopleft, size = (1000, 500), + xticks = 10.0 .^ (-15:1:1), + yticks = 10.0 .^ (-6:0.3:5), + bottom_margin = 5Plots.mm) +``` + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/Bio/egfr_net.jmd b/benchmarks/Bio/egfr_net.jmd index b9d604448..d20f2ab4d 100644 --- a/benchmarks/Bio/egfr_net.jmd +++ b/benchmarks/Bio/egfr_net.jmd @@ -1,271 +1,290 @@ ---- -title: Egfr_net Work-Precision Diagrams -author: Torkel Loman ---- - -The following benchmark is of 356 ODEs with 3749 terms that describe a -chemical reaction network. This egfr_net model was used as a benchmark model in [Gupta et -al.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6013266/). It describes the epidermal growth factor receptor signalling system [Blinov et -al.](https://pubmed.ncbi.nlm.nih.gov/16233948/). We use -[`ReactionNetworkImporters`](https://github.com/isaacsas/ReactionNetworkImporters.jl) -to load the BioNetGen model files as a -[Catalyst](https://github.com/SciML/Catalyst.jl) model, and then use -[ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl) to convert the -Catalyst network model to ODEs. - - -```julia -using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, - Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, - LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, - LinearSolve, RecursiveFactorization - -gr() -const to = TimerOutput() -tf = 10.0 - -# generate ModelingToolkit ODEs -@timeit to "Parse Network" prnbng = loadrxnetwork(BNGNetwork(), joinpath(@__DIR__, "Models/egfr_net.net")) -show(to) -rn = complete(prnbng.rn) -obs = [eq.lhs for eq in observed(rn)] - -@timeit to "Create ODESys" osys = complete(convert(ODESystem, rn)) -show(to) - -tspan = (0.,tf) -@timeit to "ODEProb No Jac" oprob = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[]) -show(to); -``` - -```julia -@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[], jac=true, sparse=true) -show(to) -``` - - -```julia -@show numspecies(rn) # Number of ODEs -@show numreactions(rn) # Apprx. number of terms in the ODE -@show length(parameters(rn)); # Number of Parameters -``` - -## Time ODE derivative function compilation -As compiling the ODE derivative functions has in the past taken longer than -running a simulation, we first force compilation by evaluating these functions -one time. -```julia -u = oprob.u0 -du = copy(u) -p = oprob.p -@timeit to "ODE rhs Eval1" oprob.f(du,u,p,0.) -@timeit to "ODE rhs Eval2" oprob.f(du,u,p,0.) -sparsejacprob.f(du,u,p,0.) -``` - -We also time the ODE rhs function with BenchmarkTools as it is more accurate -given how fast evaluating `f` is: -```julia -@btime oprob.f($du,$u,$p,0.) -``` - -## Picture of the solution - -```julia -sol = solve(oprob, CVODE_BDF(), saveat=tf/1000., reltol=1e-5, abstol=1e-5) -plot(sol; idxs=obs, legend=false, fmt=:png) -``` - -For these benchmarks we will be using the time-series error with these saving -points. - -## Generate Test Solution - -```julia -@time sol = solve(oprob, CVODE_BDF(), abstol=1/10^14, reltol=1/10^14) -test_sol = TestSolution(sol); -``` -## Setups - -#### Sets plotting defaults - -```julia -default(legendfontsize=7,framestyle=:box,gridalpha=0.3,gridlinewidth=2.5) -``` - -#### Sets tolerances - -```julia -abstols = 1.0 ./ 10.0 .^ (6:10) -reltols = 1.0 ./ 10.0 .^ (6:10); -``` - -## Implicit Work-Precision Diagrams - -Benchmarks for implicit solvers. - -#### Declare solvers (using default linear solver) - -We designate the solvers we wish to use. -```julia -setups = [ - Dict(:alg=>lsoda()), - Dict(:alg=>CVODE_BDF()), - Dict(:alg=>CVODE_BDF(linear_solver=:LapackDense)), - Dict(:alg=>CVODE_Adams()), - Dict(:alg=>TRBDF2()), - Dict(:alg=>QNDF()), - Dict(:alg=>FBDF()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>Rosenbrock23()), - Dict(:alg=>Rodas4()), - Dict(:alg=>Rodas5P()) - ]; -``` - - -#### Plot Work-Precision Diagram (using default linear solver) - -Finally, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=100) - -names = ["lsoda" "CVODE_BDF" "CVODE_BDF (Lapack Dense)" "CVODE_Adams" "TRBDF2" "QNDF" "FBDF" "KenCarp4" "Rosenbrock23" "Rodas4" "Rodas5P"] -plot(wp;label=names) -``` - -#### Declare solvers (using GMRES linear solver) - -We designate the solvers we wish to use. -```julia -setups = [ - Dict(:alg=>lsoda()), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES)), - Dict(:alg=>TRBDF2(linsolve=KrylovJL_GMRES())), - Dict(:alg=>QNDF(linsolve=KrylovJL_GMRES())), - Dict(:alg=>FBDF(linsolve=KrylovJL_GMRES())), - Dict(:alg=>KenCarp4(linsolve=KrylovJL_GMRES())), - Dict(:alg=>Rosenbrock23(linsolve=KrylovJL_GMRES())), - Dict(:alg=>Rodas4(linsolve=KrylovJL_GMRES())), - Dict(:alg=>Rodas5P(linsolve=KrylovJL_GMRES())) - ]; -``` - - -#### Plot Work-Precision Diagram (using GMRES linear solver) - -Finally, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=100) - -names = ["lsoda" "CVODE_BDF (GMRES)" "TRBDF2 (GMRES)" "QNDF (GMRES)" "FBDF (GMRES)" "KenCarp4 (GMRES)" "Rosenbrock23 (GMRES)" "Rodas4 (GMRES)" "Rodas5P (GMRES)"] -plot(wp;label=names) -``` - -#### Declare solvers (using sparse jacobian) - -We designate the solvers we wish to use. -```julia -setups = [ - Dict(:alg=>CVODE_BDF(linear_solver=:KLU)), - Dict(:alg=>TRBDF2(linsolve=KLUFactorization())), - Dict(:alg=>QNDF(linsolve=KLUFactorization())), - Dict(:alg=>FBDF(linsolve=KLUFactorization())), - Dict(:alg=>KenCarp4(linsolve=KLUFactorization())), - Dict(:alg=>Rosenbrock23(linsolve=KLUFactorization())), - Dict(:alg=>Rodas4(linsolve=KLUFactorization())), - Dict(:alg=>Rodas5P(linsolve=KLUFactorization())) - ]; -``` - - -#### Plot Work-Precision Diagram (using sparse jacobian) - -Finally, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet(sparsejacprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=100) - -names = ["CVODE_BDF (KLU, sparse jac)" "TRBDF2 (KLU, sparse jac)" "QNDF (KLU, sparse jac)" "FBDF (KLU, sparse jac)" "KenCarp4 (KLU, sparse jac)" "Rosenbrock23 (KLU, sparse jac)" "Rodas4 (KLU, sparse jac)" "Rodas5P (KLU, sparse jac)"] -plot(wp;label=names) -``` - -## Explicit Work-Precision Diagram - -Benchmarks for explicit solvers. - -#### Declare solvers - -We designate the solvers we wish to use, this also includes lsoda and CVODE. -```julia -setups = [ - Dict(:alg=>lsoda()), - Dict(:alg=>CVODE_Adams()), - Dict(:alg=>Tsit5()), - Dict(:alg=>BS5()), - Dict(:alg=>VCABM()), - Dict(:alg=>Vern6()), - Dict(:alg=>Vern7()), - Dict(:alg=>Vern8()), - Dict(:alg=>Vern9()), - Dict(:alg=>ROCK4()) - ]; -``` - -#### Plot Work-Precision Diagram - -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=200) - -names = ["lsoda" "CVODE_Adams" "Tsit5" "BS5" "VCABM" "Vern6" "Vern7" "Vern8" "Vern9" "ROCK4"] -plot(wp;label=names) -``` - -#### Additional explicit solvers -One additional explicit solver, `ROCK2`, performs noticeably worse as compared to the other ones. -```julia -setups = [Dict(:alg=>ROCK2())]; -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=200) -names = ["ROCK2"] -plot(wp;label=names) -``` - -## Summary of results -Finally, we compute a single diagram comparing the various solvers used. - -#### Declare solvers -We designate the solvers we wish to compare. -```julia -setups = [ - Dict(:alg=>lsoda(), :prob_choice => 1), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES), :prob_choice => 1), - Dict(:alg=>QNDF(linsolve=KrylovJL_GMRES()), :prob_choice => 2), - Dict(:alg=>QNDF(linsolve=KLUFactorization()), :prob_choice => 2), - Dict(:alg=>BS5(), :prob_choice => 1), - Dict(:alg=>Vern6(), :prob_choice => 1), - Dict(:alg=>ROCK4(), :prob_choice => 1) - ]; -``` - -#### Plot Work-Precision Diagram - -For these, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet([oprob,sparsejacprob],abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=[test_sol,test_sol],maxiters=Int(1e9),numruns=200) - -names = ["lsoda" "CVODE_BDF (GMRES)" "QNDF (GMRES)" "QNDF (KLU)" "BS5" "Vern6" "ROCK4"] -colors = [:seagreen1 :darkgreen :deepskyblue1 :deepskyblue4 :thistle2 :lightslateblue :purple4] -markershapes = [:star4 :rect :hexagon :octagon :star8 :rtriangle :square] -plot(wp;label=names,left_margin=10Plots.mm,right_margin=10Plots.mm,xticks=[1e-9,1e-8,1e-7,1e-6,1e-5,1e-4,1e-3,1e-2],yticks=[1e-2,1e-1],color=colors,markershape=markershapes,legendfontsize=15,tickfontsize=15,guidefontsize=15, legend=:topright, lw=20, la=0.8, markersize=20,markerstrokealpha=1.0, markerstrokewidth=1.5, gridalpha=0.3, gridlinewidth=7.5,size=(1100,1000)) -``` - - -```julia, echo = false -using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` +--- +title: Egfr_net Work-Precision Diagrams +author: Torkel Loman +--- + +The following benchmark is of 356 ODEs with 3749 terms that describe a +chemical reaction network. This egfr_net model was used as a benchmark model in [Gupta et +al.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6013266/). It describes the epidermal growth factor receptor signalling system [Blinov et +al.](https://pubmed.ncbi.nlm.nih.gov/16233948/). We use +[`ReactionNetworkImporters`](https://github.com/isaacsas/ReactionNetworkImporters.jl) +to load the BioNetGen model files as a +[Catalyst](https://github.com/SciML/Catalyst.jl) model, and then use +[ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl) to convert the +Catalyst network model to ODEs. + +```julia +using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, + Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, + LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, + LinearSolve, RecursiveFactorization + +gr() +const to = TimerOutput() +tf = 10.0 + +# generate ModelingToolkit ODEs +@timeit to "Parse Network" prnbng = loadrxnetwork(BNGNetwork(), joinpath(@__DIR__, "Models/egfr_net.net")) +show(to) +rn = complete(prnbng.rn) +obs = [eq.lhs for eq in observed(rn)] + +@timeit to "Create ODESys" osys = complete(convert(ODESystem, rn)) +show(to) + +tspan = (0.0, tf) +@timeit to "ODEProb No Jac" oprob = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[]) +show(to); +``` + +```julia +@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[], jac = true, sparse = true) +show(to) +``` + +```julia +@show numspecies(rn) # Number of ODEs +@show numreactions(rn) # Apprx. number of terms in the ODE +@show length(parameters(rn)); # Number of Parameters +``` + +## Time ODE derivative function compilation + +As compiling the ODE derivative functions has in the past taken longer than +running a simulation, we first force compilation by evaluating these functions +one time. + +```julia +u = oprob.u0 +du = copy(u) +p = oprob.p +@timeit to "ODE rhs Eval1" oprob.f(du, u, p, 0.0) +@timeit to "ODE rhs Eval2" oprob.f(du, u, p, 0.0) +sparsejacprob.f(du, u, p, 0.0) +``` + +We also time the ODE rhs function with BenchmarkTools as it is more accurate +given how fast evaluating `f` is: + +```julia +@btime oprob.f($du, $u, $p, 0.0) +``` + +## Picture of the solution + +```julia +sol = solve(oprob, CVODE_BDF(), saveat = tf/1000.0, reltol = 1e-5, abstol = 1e-5) +plot(sol; idxs = obs, legend = false, fmt = :png) +``` + +For these benchmarks we will be using the time-series error with these saving +points. + +## Generate Test Solution + +```julia +@time sol = solve(oprob, CVODE_BDF(), abstol = 1/10^14, reltol = 1/10^14) +test_sol = TestSolution(sol); +``` + +## Setups + +#### Sets plotting defaults + +```julia +default(legendfontsize = 7, framestyle = :box, gridalpha = 0.3, gridlinewidth = 2.5) +``` + +#### Sets tolerances + +```julia +abstols = 1.0 ./ 10.0 .^ (6:10) +reltols = 1.0 ./ 10.0 .^ (6:10); +``` + +## Implicit Work-Precision Diagrams + +Benchmarks for implicit solvers. + +#### Declare solvers (using default linear solver) + +We designate the solvers we wish to use. + +```julia +setups = [ + Dict(:alg=>lsoda()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>CVODE_BDF(linear_solver = :LapackDense)), + Dict(:alg=>CVODE_Adams()), + Dict(:alg=>TRBDF2()), + Dict(:alg=>QNDF()), + Dict(:alg=>FBDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>Rosenbrock23()), + Dict(:alg=>Rodas4()), + Dict(:alg=>Rodas5P()) +]; +``` + +#### Plot Work-Precision Diagram (using default linear solver) + +Finally, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 100) + +names = ["lsoda" "CVODE_BDF" "CVODE_BDF (Lapack Dense)" "CVODE_Adams" "TRBDF2" "QNDF" "FBDF" "KenCarp4" "Rosenbrock23" "Rodas4" "Rodas5P"] +plot(wp; label = names) +``` + +#### Declare solvers (using GMRES linear solver) + +We designate the solvers we wish to use. + +```julia +setups = [ + Dict(:alg=>lsoda()), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES)), + Dict(:alg=>TRBDF2(linsolve = KrylovJL_GMRES())), + Dict(:alg=>QNDF(linsolve = KrylovJL_GMRES())), + Dict(:alg=>FBDF(linsolve = KrylovJL_GMRES())), + Dict(:alg=>KenCarp4(linsolve = KrylovJL_GMRES())), + Dict(:alg=>Rosenbrock23(linsolve = KrylovJL_GMRES())), + Dict(:alg=>Rodas4(linsolve = KrylovJL_GMRES())), + Dict(:alg=>Rodas5P(linsolve = KrylovJL_GMRES())) +]; +``` + +#### Plot Work-Precision Diagram (using GMRES linear solver) + +Finally, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 100) + +names = ["lsoda" "CVODE_BDF (GMRES)" "TRBDF2 (GMRES)" "QNDF (GMRES)" "FBDF (GMRES)" "KenCarp4 (GMRES)" "Rosenbrock23 (GMRES)" "Rodas4 (GMRES)" "Rodas5P (GMRES)"] +plot(wp; label = names) +``` + +#### Declare solvers (using sparse jacobian) + +We designate the solvers we wish to use. + +```julia +setups = [ + Dict(:alg=>CVODE_BDF(linear_solver = :KLU)), + Dict(:alg=>TRBDF2(linsolve = KLUFactorization())), + Dict(:alg=>QNDF(linsolve = KLUFactorization())), + Dict(:alg=>FBDF(linsolve = KLUFactorization())), + Dict(:alg=>KenCarp4(linsolve = KLUFactorization())), + Dict(:alg=>Rosenbrock23(linsolve = KLUFactorization())), + Dict(:alg=>Rodas4(linsolve = KLUFactorization())), + Dict(:alg=>Rodas5P(linsolve = KLUFactorization())) +]; +``` + +#### Plot Work-Precision Diagram (using sparse jacobian) + +Finally, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet(sparsejacprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 100) + +names = ["CVODE_BDF (KLU, sparse jac)" "TRBDF2 (KLU, sparse jac)" "QNDF (KLU, sparse jac)" "FBDF (KLU, sparse jac)" "KenCarp4 (KLU, sparse jac)" "Rosenbrock23 (KLU, sparse jac)" "Rodas4 (KLU, sparse jac)" "Rodas5P (KLU, sparse jac)"] +plot(wp; label = names) +``` + +## Explicit Work-Precision Diagram + +Benchmarks for explicit solvers. + +#### Declare solvers + +We designate the solvers we wish to use, this also includes lsoda and CVODE. + +```julia +setups = [ + Dict(:alg=>lsoda()), + Dict(:alg=>CVODE_Adams()), + Dict(:alg=>Tsit5()), + Dict(:alg=>BS5()), + Dict(:alg=>VCABM()), + Dict(:alg=>Vern6()), + Dict(:alg=>Vern7()), + Dict(:alg=>Vern8()), + Dict(:alg=>Vern9()), + Dict(:alg=>ROCK4()) +]; +``` + +#### Plot Work-Precision Diagram + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 200) + +names = ["lsoda" "CVODE_Adams" "Tsit5" "BS5" "VCABM" "Vern6" "Vern7" "Vern8" "Vern9" "ROCK4"] +plot(wp; label = names) +``` + +#### Additional explicit solvers + +One additional explicit solver, `ROCK2`, performs noticeably worse as compared to the other ones. + +```julia +setups = [Dict(:alg=>ROCK2())]; +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 200) +names = ["ROCK2"] +plot(wp; label = names) +``` + +## Summary of results + +Finally, we compute a single diagram comparing the various solvers used. + +#### Declare solvers + +We designate the solvers we wish to compare. + +```julia +setups = [ + Dict(:alg=>lsoda(), :prob_choice => 1), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES), :prob_choice => 1), + Dict(:alg=>QNDF(linsolve = KrylovJL_GMRES()), :prob_choice => 2), + Dict(:alg=>QNDF(linsolve = KLUFactorization()), :prob_choice => 2), + Dict(:alg=>BS5(), :prob_choice => 1), + Dict(:alg=>Vern6(), :prob_choice => 1), + Dict(:alg=>ROCK4(), :prob_choice => 1) +]; +``` + +#### Plot Work-Precision Diagram + +For these, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet( + [oprob, sparsejacprob], abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = [test_sol, test_sol], maxiters = Int(1e9), numruns = 200) + +names = ["lsoda" "CVODE_BDF (GMRES)" "QNDF (GMRES)" "QNDF (KLU)" "BS5" "Vern6" "ROCK4"] +colors = [:seagreen1 :darkgreen :deepskyblue1 :deepskyblue4 :thistle2 :lightslateblue :purple4] +markershapes = [:star4 :rect :hexagon :octagon :star8 :rtriangle :square] +plot(wp; label = names, left_margin = 10Plots.mm, right_margin = 10Plots.mm, + xticks = [1e-9, 1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2], yticks = [1e-2, 1e-1], + color = colors, markershape = markershapes, legendfontsize = 15, + tickfontsize = 15, guidefontsize = 15, legend = :topright, lw = 20, + la = 0.8, markersize = 20, markerstrokealpha = 1.0, markerstrokewidth = 1.5, + gridalpha = 0.3, gridlinewidth = 7.5, size = (1100, 1000)) +``` + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/Bio/fceri_gamma2.jmd b/benchmarks/Bio/fceri_gamma2.jmd index 1e9bc1fd6..cb8a2fdd8 100644 --- a/benchmarks/Bio/fceri_gamma2.jmd +++ b/benchmarks/Bio/fceri_gamma2.jmd @@ -1,314 +1,344 @@ ---- -title: Fceri_gamma2 Work-Precision Diagrams -author: Torkel Loman ---- - -The following benchmark is of 356 ODEs with 3749 terms that describe a stiff -chemical reaction network. This fceri_gamma2 model was used as a benchmark model in [Gupta et -al.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6013266/). It describes high-affinity human IgE receptor signalling [Faeder et -al.](https://www.jimmunol.org/content/170/7/3769.long). We use -[`ReactionNetworkImporters`](https://github.com/isaacsas/ReactionNetworkImporters.jl) -to load the BioNetGen model files as a -[Catalyst](https://github.com/SciML/Catalyst.jl) model, and then use -[ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl) to convert the -Catalyst network model to ODEs. - -```julia -using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, - Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, - LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, - LinearSolve, RecursiveFactorization - -gr() -const to = TimerOutput() -tf = 150.0 - -# generate ModelingToolkit ODEs -@timeit to "Parse Network" prnbng = loadrxnetwork(BNGNetwork(), joinpath(@__DIR__, "Models/fceri_gamma2.net")) -show(to) -rn = complete(prnbng.rn) -obs = [eq.lhs for eq in observed(rn)] - -@timeit to "Create ODESys" osys = complete(convert(ODESystem, rn)) -show(to) - -tspan = (0.,tf) -@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[], jac=true, sparse=true) -show(to) -@timeit to "ODEProb No Jac" oprob = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[]) -show(to) -oprob_sparse = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[]; sparse=true); -``` - -```julia -@show numspecies(rn) # Number of ODEs -@show numreactions(rn) # Apprx. number of terms in the ODE -@show length(parameters(rn)); # Number of Parameters -``` - -## Time ODE derivative function compilation -As compiling the ODE derivative functions has in the past taken longer than -running a simulation, we first force compilation by evaluating these functions -one time. -```julia -u = oprob.u0 -du = copy(u) -p = oprob.p -@timeit to "ODE rhs Eval1" sparsejacprob.f(du,u,p,0.) -sparsejacprob.f(du,u,p,0.) -``` - -We also time the ODE rhs function with BenchmarkTools as it is more accurate -given how fast evaluating `f` is: -```julia -@btime sparsejacprob.f($du,$u,$p,0.) -``` - -## Picture of the solution - -```julia -sol = solve(oprob, CVODE_BDF(), saveat=tf/1000., reltol=1e-5, abstol=1e-5) -plot(sol; idxs=obs, legend=false, fmt=:png) -``` - -For these benchmarks we will be using the time-series error with these saving -points. - -## Generate Test Solution - -```julia -@time sol = solve(sparsejacprob, CVODE_BDF(linear_solver=:GMRES), reltol=1e-15, abstol=1e-15) -test_sol = TestSolution(sol); -``` - -## Setups - -#### Sets plotting defaults - -```julia -default(legendfontsize=7,framestyle=:box,gridalpha=0.3,gridlinewidth=2.5) -``` - -#### Declare pre-conditioners -```julia -using IncompleteLU, LinearAlgebra - -jaccache = sparsejacprob.f.jac(oprob.u0,oprob.p,0.0) -W = I - 1.0*jaccache -prectmp = ilu(W, τ = 50.0) -preccache = Ref(prectmp) - -const τ1 = 5 -function psetupilu(p, t, u, du, jok, jcurPtr, gamma) - if !jok - sparsejacprob.f.jac(jaccache,u,p,t) - jcurPtr[] = true - - # W = I - gamma*J - @. W = -gamma*jaccache - idxs = diagind(W) - @. @view(W[idxs]) = @view(W[idxs]) + 1 - - # Build preconditioner on W - preccache[] = ilu(W, τ = τ1) - end -end -function precilu(z,r,p,t,y,fy,gamma,delta,lr) - ldiv!(z,preccache[],r) -end - -const τ2 = 5 -function incompletelu(W,du,u,p,t,newW,Plprev,Prprev,solverdata) - if newW === nothing || newW - Pl = ilu(convert(AbstractMatrix,W), τ = τ2) - else - Pl = Plprev - end - Pl,nothing -end; -``` - -#### Sets tolerances - -```julia -abstols = 1.0 ./ 10.0 .^ (5:8) -reltols = 1.0 ./ 10.0 .^ (5:8); -``` - -## Work-Precision Diagrams (CVODE and lsoda solvers) - -#### Declare solvers. - -```julia -setups = [ - Dict(:alg=>lsoda(), :prob_choice => 1), - Dict(:alg=>CVODE_BDF(), :prob_choice => 1), - Dict(:alg=>CVODE_BDF(linear_solver=:LapackDense), :prob_choice => 1), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES), :prob_choice => 1), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precilu,psetup=psetupilu,prec_side=1), :prob_choice => 2), - Dict(:alg=>CVODE_BDF(linear_solver=:KLU), :prob_choice => 3) - ]; -``` - -#### Plot Work-Precision Diagram. - -```julia -wp = WorkPrecisionSet([oprob,oprob_sparse,sparsejacprob],abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=[test_sol,test_sol,test_sol],maxiters=Int(1e9),numruns=10) - -names = ["lsoda" "CVODE_BDF" "CVODE_BDF (LapackDense)" "CVODE_BDF (GMRES)" "CVODE_BDF (GMRES, iLU)" "CVODE_BDF (KLU, sparse jac)"] -plot(wp;label=names) -``` - -## Work-Precision Diagrams (various Julia solvers) - -#### Declare solvers (using default linear solver). - -```julia -setups = [ - Dict(:alg=>TRBDF2(autodiff=false)), - Dict(:alg=>QNDF(autodiff=false)), - Dict(:alg=>FBDF(autodiff=false)), - Dict(:alg=>KenCarp4(autodiff=false)) - ]; -``` - -#### Plot Work-Precision Diagram (using default linear solver). - -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e12),dtmin=1e-18,numruns=10) - -names = ["TRBDF2" "QNDF" "FBDF" "KenCarp4"] -plot(wp;label=names) -``` - -#### Declare solvers (using GMRES linear solver). - -```julia -setups = [ - Dict(:alg=>TRBDF2(linsolve=KrylovJL_GMRES(),autodiff=false)), - Dict(:alg=>QNDF(linsolve=KrylovJL_GMRES(),autodiff=false)), - Dict(:alg=>FBDF(linsolve=KrylovJL_GMRES(),autodiff=false)), - Dict(:alg=>KenCarp4(linsolve=KrylovJL_GMRES(),autodiff=false)) - ]; -``` - -#### Plot Work-Precision Diagram (using GMRES linear solver). - -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e12),dtmin=1e-18,numruns=10) - -names = ["TRBDF2 (GMRES)" "QNDF (GMRES)" "FBDF (GMRES)" "KenCarp4 (GMRES)"] -plot(wp;label=names) -``` - -#### Declare solvers (using GMRES linear solver, with pre-conditioner). - -```julia -setups = [ - Dict(:alg=>TRBDF2(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true)), - Dict(:alg=>QNDF(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true)), - Dict(:alg=>FBDF(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true)), - Dict(:alg=>KenCarp4(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true)) - ]; -``` - -#### Plot Work-Precision Diagram (using GMRES linear solver, with pre-conditioner). - -```julia -wp = WorkPrecisionSet(sparsejacprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e12),dtmin=1e-18,numruns=10) - -names = ["TRBDF2 (GMRES, iLU)" "QNDF (GMRES, iLU)" "FBDF (GMRES, iLU)" "KenCarp4 (GMRES, iLU)"] -plot(wp;label=names) -``` - -#### Declare solvers (using sparse jacobian) - -We designate the solvers we wish to use. -```julia -setups = [ - Dict(:alg=>TRBDF2(linsolve=KLUFactorization(),autodiff=false)), - Dict(:alg=>QNDF(linsolve=KLUFactorization(),autodiff=false)), - Dict(:alg=>FBDF(linsolve=KLUFactorization(),autodiff=false)), - Dict(:alg=>KenCarp4(linsolve=KLUFactorization(),autodiff=false)) - ]; -``` - - -#### Plot Work-Precision Diagram (using sparse jacobian) - -Finally, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet(sparsejacprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e12),dtmin=1e-18,numruns=10) - -names = ["TRBDF2 (KLU, sparse jac)" "QNDF (KLU, sparse jac)" "FBDF (KLU, sparse jac)" "KenCarp4 (KLU, sparse jac)"] -plot(wp;label=names) -``` - -## Explicit Work-Precision Diagram - -Benchmarks for explicit solvers. - -#### Declare solvers - -We designate the solvers we wish to use, this also includes lsoda and CVODE. -```julia -setups = [ - Dict(:alg=>CVODE_Adams()), - Dict(:alg=>Tsit5()), - Dict(:alg=>BS5()), - Dict(:alg=>VCABM()), - Dict(:alg=>Vern6()), - Dict(:alg=>Vern7()), - Dict(:alg=>Vern8()), - Dict(:alg=>Vern9()) - ]; -``` - -#### Plot Work-Precision Diagram - -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=10) - -names = ["CVODE_Adams" "Tsit5" "BS5" "Vern6" "Vern7" "Vern8" "Vern9"] -plot(wp;label=names) -``` - -## Summary of results -Finally, we compute a single diagram comparing the various solvers used. - -#### Declare solvers -We designate the solvers we wish to compare. -```julia -setups = [ - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES), :prob_choice => 1), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precilu,psetup=psetupilu,prec_side=1), :prob_choice => 2), - Dict(:alg=>QNDF(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true), :prob_choice => 3), - Dict(:alg=>FBDF(linsolve=KrylovJL_GMRES(),autodiff=false,precs=incompletelu,concrete_jac=true), :prob_choice => 3), - Dict(:alg=>Tsit5()) - ]; -``` - -#### Plot Work-Precision Diagram - -For these, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet([oprob,oprob_sparse,sparsejacprob],abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=[test_sol,test_sol,test_sol],maxiters=Int(1e9),numruns=200) - -names = ["CVODE_BDF (GMRES)" "CVODE_BDF (GMRES, iLU)" "QNDF (GMRES, iLU)" "FBDF (GMRES, iLU)" "Tsit5"] -colors = [:darkgreen :green :deepskyblue1 :dodgerblue2 :orchid2] -markershapes = [:rect :octagon :hexagon :rtriangle :ltriangle] -plot(wp;label=names,left_margin=10Plots.mm,right_margin=10Plots.mm,xticks=[1e-9,1e-8,1e-7,1e-6,1e-5,1e-4,1e-3,1e-2,1e-1],yticks=[1e-1,1e0,1e1,1e2],color=colors,markershape=markershapes,legendfontsize=15,tickfontsize=15,guidefontsize=15, legend=:topright, lw=20, la=0.8, markersize=20,markerstrokealpha=1.0, markerstrokewidth=1.5, gridalpha=0.3, gridlinewidth=7.5,size=(1100,1000)) -``` - -```julia -echo = false -using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` +--- +title: Fceri_gamma2 Work-Precision Diagrams +author: Torkel Loman +--- + +The following benchmark is of 356 ODEs with 3749 terms that describe a stiff +chemical reaction network. This fceri_gamma2 model was used as a benchmark model in [Gupta et +al.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6013266/). It describes high-affinity human IgE receptor signalling [Faeder et +al.](https://www.jimmunol.org/content/170/7/3769.long). We use +[`ReactionNetworkImporters`](https://github.com/isaacsas/ReactionNetworkImporters.jl) +to load the BioNetGen model files as a +[Catalyst](https://github.com/SciML/Catalyst.jl) model, and then use +[ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl) to convert the +Catalyst network model to ODEs. + +```julia +using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, + Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, + LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, + LinearSolve, RecursiveFactorization + +gr() +const to = TimerOutput() +tf = 150.0 + +# generate ModelingToolkit ODEs +@timeit to "Parse Network" prnbng = loadrxnetwork(BNGNetwork(), joinpath(@__DIR__, "Models/fceri_gamma2.net")) +show(to) +rn = complete(prnbng.rn) +obs = [eq.lhs for eq in observed(rn)] + +@timeit to "Create ODESys" osys = complete(convert(ODESystem, rn)) +show(to) + +tspan = (0.0, tf) +@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[], jac = true, sparse = true) +show(to) +@timeit to "ODEProb No Jac" oprob = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[]) +show(to) +oprob_sparse = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[]; sparse = true); +``` + +```julia +@show numspecies(rn) # Number of ODEs +@show numreactions(rn) # Apprx. number of terms in the ODE +@show length(parameters(rn)); # Number of Parameters +``` + +## Time ODE derivative function compilation + +As compiling the ODE derivative functions has in the past taken longer than +running a simulation, we first force compilation by evaluating these functions +one time. + +```julia +u = oprob.u0 +du = copy(u) +p = oprob.p +@timeit to "ODE rhs Eval1" sparsejacprob.f(du, u, p, 0.0) +sparsejacprob.f(du, u, p, 0.0) +``` + +We also time the ODE rhs function with BenchmarkTools as it is more accurate +given how fast evaluating `f` is: + +```julia +@btime sparsejacprob.f($du, $u, $p, 0.0) +``` + +## Picture of the solution + +```julia +sol = solve(oprob, CVODE_BDF(), saveat = tf/1000.0, reltol = 1e-5, abstol = 1e-5) +plot(sol; idxs = obs, legend = false, fmt = :png) +``` + +For these benchmarks we will be using the time-series error with these saving +points. + +## Generate Test Solution + +```julia +@time sol = solve(sparsejacprob, CVODE_BDF(linear_solver = :GMRES), reltol = 1e-15, abstol = 1e-15) +test_sol = TestSolution(sol); +``` + +## Setups + +#### Sets plotting defaults + +```julia +default(legendfontsize = 7, framestyle = :box, gridalpha = 0.3, gridlinewidth = 2.5) +``` + +#### Declare pre-conditioners + +```julia +using IncompleteLU, LinearAlgebra + +jaccache = sparsejacprob.f.jac(oprob.u0, oprob.p, 0.0) +W = I - 1.0*jaccache +prectmp = ilu(W, τ = 50.0) +preccache = Ref(prectmp) + +const τ1 = 5 +function psetupilu(p, t, u, du, jok, jcurPtr, gamma) + if !jok + sparsejacprob.f.jac(jaccache, u, p, t) + jcurPtr[] = true + + # W = I - gamma*J + @. W = -gamma*jaccache + idxs = diagind(W) + @. @view(W[idxs]) = @view(W[idxs]) + 1 + + # Build preconditioner on W + preccache[] = ilu(W, τ = τ1) + end +end +function precilu(z, r, p, t, y, fy, gamma, delta, lr) + ldiv!(z, preccache[], r) +end + +const τ2 = 5 +function incompletelu(W, du, u, p, t, newW, Plprev, Prprev, solverdata) + if newW === nothing || newW + Pl = ilu(convert(AbstractMatrix, W), τ = τ2) + else + Pl = Plprev + end + Pl, nothing +end; +``` + +#### Sets tolerances + +```julia +abstols = 1.0 ./ 10.0 .^ (5:8) +reltols = 1.0 ./ 10.0 .^ (5:8); +``` + +## Work-Precision Diagrams (CVODE and lsoda solvers) + +#### Declare solvers. + +```julia +setups = [ + Dict(:alg=>lsoda(), :prob_choice => 1), + Dict(:alg=>CVODE_BDF(), :prob_choice => 1), + Dict(:alg=>CVODE_BDF(linear_solver = :LapackDense), :prob_choice => 1), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES), :prob_choice => 1), + Dict( + :alg=>CVODE_BDF(linear_solver = :GMRES, prec = precilu, psetup = psetupilu, prec_side = 1), + :prob_choice => 2), + Dict(:alg=>CVODE_BDF(linear_solver = :KLU), :prob_choice => 3) +]; +``` + +#### Plot Work-Precision Diagram. + +```julia +wp = WorkPrecisionSet( + [oprob, oprob_sparse, sparsejacprob], abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = [test_sol, test_sol, test_sol], maxiters = Int(1e9), numruns = 10) + +names = ["lsoda" "CVODE_BDF" "CVODE_BDF (LapackDense)" "CVODE_BDF (GMRES)" "CVODE_BDF (GMRES, iLU)" "CVODE_BDF (KLU, sparse jac)"] +plot(wp; label = names) +``` + +## Work-Precision Diagrams (various Julia solvers) + +#### Declare solvers (using default linear solver). + +```julia +setups = [ + Dict(:alg=>TRBDF2(autodiff = false)), + Dict(:alg=>QNDF(autodiff = false)), + Dict(:alg=>FBDF(autodiff = false)), + Dict(:alg=>KenCarp4(autodiff = false)) +]; +``` + +#### Plot Work-Precision Diagram (using default linear solver). + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e12), dtmin = 1e-18, numruns = 10) + +names = ["TRBDF2" "QNDF" "FBDF" "KenCarp4"] +plot(wp; label = names) +``` + +#### Declare solvers (using GMRES linear solver). + +```julia +setups = [ + Dict(:alg=>TRBDF2(linsolve = KrylovJL_GMRES(), autodiff = false)), + Dict(:alg=>QNDF(linsolve = KrylovJL_GMRES(), autodiff = false)), + Dict(:alg=>FBDF(linsolve = KrylovJL_GMRES(), autodiff = false)), + Dict(:alg=>KenCarp4(linsolve = KrylovJL_GMRES(), autodiff = false)) +]; +``` + +#### Plot Work-Precision Diagram (using GMRES linear solver). + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e12), dtmin = 1e-18, numruns = 10) + +names = ["TRBDF2 (GMRES)" "QNDF (GMRES)" "FBDF (GMRES)" "KenCarp4 (GMRES)"] +plot(wp; label = names) +``` + +#### Declare solvers (using GMRES linear solver, with pre-conditioner). + +```julia +setups = [ + Dict(:alg=>TRBDF2( + linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true)), + Dict(:alg=>QNDF(linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true)), + Dict(:alg=>FBDF(linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true)), + Dict(:alg=>KenCarp4( + linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true)) +]; +``` + +#### Plot Work-Precision Diagram (using GMRES linear solver, with pre-conditioner). + +```julia +wp = WorkPrecisionSet(sparsejacprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e12), dtmin = 1e-18, numruns = 10) + +names = ["TRBDF2 (GMRES, iLU)" "QNDF (GMRES, iLU)" "FBDF (GMRES, iLU)" "KenCarp4 (GMRES, iLU)"] +plot(wp; label = names) +``` + +#### Declare solvers (using sparse jacobian) + +We designate the solvers we wish to use. + +```julia +setups = [ + Dict(:alg=>TRBDF2(linsolve = KLUFactorization(), autodiff = false)), + Dict(:alg=>QNDF(linsolve = KLUFactorization(), autodiff = false)), + Dict(:alg=>FBDF(linsolve = KLUFactorization(), autodiff = false)), + Dict(:alg=>KenCarp4(linsolve = KLUFactorization(), autodiff = false)) +]; +``` + +#### Plot Work-Precision Diagram (using sparse jacobian) + +Finally, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet(sparsejacprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e12), dtmin = 1e-18, numruns = 10) + +names = ["TRBDF2 (KLU, sparse jac)" "QNDF (KLU, sparse jac)" "FBDF (KLU, sparse jac)" "KenCarp4 (KLU, sparse jac)"] +plot(wp; label = names) +``` + +## Explicit Work-Precision Diagram + +Benchmarks for explicit solvers. + +#### Declare solvers + +We designate the solvers we wish to use, this also includes lsoda and CVODE. + +```julia +setups = [ + Dict(:alg=>CVODE_Adams()), + Dict(:alg=>Tsit5()), + Dict(:alg=>BS5()), + Dict(:alg=>VCABM()), + Dict(:alg=>Vern6()), + Dict(:alg=>Vern7()), + Dict(:alg=>Vern8()), + Dict(:alg=>Vern9()) +]; +``` + +#### Plot Work-Precision Diagram + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 10) + +names = ["CVODE_Adams" "Tsit5" "BS5" "Vern6" "Vern7" "Vern8" "Vern9"] +plot(wp; label = names) +``` + +## Summary of results + +Finally, we compute a single diagram comparing the various solvers used. + +#### Declare solvers + +We designate the solvers we wish to compare. + +```julia +setups = [ + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES), :prob_choice => 1), + Dict( + :alg=>CVODE_BDF(linear_solver = :GMRES, prec = precilu, psetup = psetupilu, prec_side = 1), + :prob_choice => 2), + Dict( + :alg=>QNDF(linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true), + :prob_choice => 3), + Dict( + :alg=>FBDF(linsolve = KrylovJL_GMRES(), autodiff = false, precs = incompletelu, concrete_jac = true), + :prob_choice => 3), + Dict(:alg=>Tsit5()) +]; +``` + +#### Plot Work-Precision Diagram + +For these, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet( + [oprob, oprob_sparse, sparsejacprob], abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = [test_sol, test_sol, test_sol], maxiters = Int(1e9), numruns = 200) + +names = ["CVODE_BDF (GMRES)" "CVODE_BDF (GMRES, iLU)" "QNDF (GMRES, iLU)" "FBDF (GMRES, iLU)" "Tsit5"] +colors = [:darkgreen :green :deepskyblue1 :dodgerblue2 :orchid2] +markershapes = [:rect :octagon :hexagon :rtriangle :ltriangle] +plot(wp; label = names, left_margin = 10Plots.mm, right_margin = 10Plots.mm, + xticks = [1e-9, 1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1], + yticks = [1e-1, 1e0, 1e1, 1e2], color = colors, markershape = markershapes, + legendfontsize = 15, tickfontsize = 15, guidefontsize = 15, legend = :topright, + lw = 20, la = 0.8, markersize = 20, markerstrokealpha = 1.0, + markerstrokewidth = 1.5, gridalpha = 0.3, gridlinewidth = 7.5, size = (1100, 1000)) +``` + +```julia +echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/Bio/multisite2.jmd b/benchmarks/Bio/multisite2.jmd index 0dd7c3599..a5826fe28 100644 --- a/benchmarks/Bio/multisite2.jmd +++ b/benchmarks/Bio/multisite2.jmd @@ -1,239 +1,258 @@ ---- -title: Multisite2 Work-Precision Diagrams -author: Torkel Loman ---- - -The following benchmark is of 66 ODEs with 288 terms that describe a -chemical reaction network. This multisite2 model was used as a benchmark model in [Gupta et -al.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6013266/). We use -[`ReactionNetworkImporters`](https://github.com/isaacsas/ReactionNetworkImporters.jl) -to load the BioNetGen model files as a -[Catalyst](https://github.com/SciML/Catalyst.jl) model, and then use -[ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl) to convert the -Catalyst network model to ODEs. - -```julia -using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, - Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, - LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, - LinearSolve, RecursiveFactorization - -gr() -const to = TimerOutput() -tf = 2.0 - -# generate ModelingToolkit ODEs -@timeit to "Parse Network" prnbng = loadrxnetwork(BNGNetwork(), joinpath(@__DIR__, "Models/multisite2.net")) -show(to) -rn = complete(prnbng.rn) -obs = [eq.lhs for eq in observed(rn)] - -@timeit to "Create ODESys" osys = complete(convert(ODESystem, rn)) -show(to) - -tspan = (0.,tf) -@timeit to "ODEProb No Jac" oprob = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[]) -show(to); -``` - -```julia -@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[], jac=true, sparse=true) -show(to) -``` - - -```julia -@show numspecies(rn) # Number of ODEs -@show numreactions(rn) # Apprx. number of terms in the ODE -@show length(parameters(rn)); # Number of Parameters -``` - -## Time ODE derivative function compilation -As compiling the ODE derivative functions has in the past taken longer than -running a simulation, we first force compilation by evaluating these functions -one time. -```julia -u = oprob.u0 -du = copy(u) -p = oprob.p -@timeit to "ODE rhs Eval1" oprob.f(du,u,p,0.) -@timeit to "ODE rhs Eval2" oprob.f(du,u,p,0.) -sparsejacprob.f(du,u,p,0.) -``` - -We also time the ODE rhs function with BenchmarkTools as it is more accurate -given how fast evaluating `f` is: -```julia -@btime oprob.f($du,$u,$p,0.) -``` - -## Picture of the solution - -```julia -sol = solve(oprob, CVODE_BDF(), saveat=tf/1000., reltol=1e-5, abstol=1e-5) -plot(sol; idxs=obs, legend=false, fmt=:png) -``` - -For these benchmarks we will be using the time-series error with these saving -points. - -## Generate Test Solution - -```julia -@time sol = solve(oprob, CVODE_BDF(), reltol=1e-15, abstol=1e-15) -test_sol = TestSolution(sol); -``` - -## Setups - -#### Sets plotting defaults - -```julia -default(legendfontsize=7,framestyle=:box,gridalpha=0.3,gridlinewidth=2.5) -``` - -#### Sets tolerances - -```julia -abstols = 1.0 ./ 10.0 .^ (6:10) -reltols = 1.0 ./ 10.0 .^ (6:10); -``` - -## Work-Precision Diagram -We start by trying lsoda and CVODE solvers. - -#### Declare solvers - -We designate the solvers (and options) we wish to use. -```julia -setups = [ - Dict(:alg=>lsoda()), - Dict(:alg=>CVODE_BDF()), - Dict(:alg=>CVODE_BDF(linear_solver=:LapackDense)), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES)) - ]; -``` - -#### Plot Work-Precision Diagram - -Finally, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=200) - -names = ["lsoda" "CVODE_BDF" "CVODE_BDF (LapackDense)" "CVODE_BDF (GMRES)"] -plot(wp;label=names) -``` - -## Implicit Work-Precision Diagram - -Next, we try a couple of implicit Julia solvers. - -#### Declare solvers - -We designate the solvers we wish to use. -```julia -setups = [ - Dict(:alg=>TRBDF2()), - Dict(:alg=>QNDF()), - Dict(:alg=>FBDF()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>Rosenbrock23()), - Dict(:alg=>Rodas4()), - Dict(:alg=>Rodas5P()) - ]; -``` - - -#### Plot Work-Precision Diagram - -Finally, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e12),dtmin=1e-18,numruns=200) - -names = ["TRBDF2" "QNDF" "FBDF" "KenCarp4" "Rosenbrock23" "Rodas4" "Rodas5P"] -plot(wp;label=names) -``` - -Implicit methods doing poorly suggests it's non-stiff. - -## Explicit Work-Precision Diagram - -Benchmarks for explicit solvers. - -#### Declare solvers - -We designate the solvers we wish to use, this also includes lsoda and CVODE. -```julia -setups = [ - Dict(:alg=>lsoda()), - Dict(:alg=>CVODE_Adams()), - Dict(:alg=>Tsit5()), - Dict(:alg=>BS5()), - Dict(:alg=>VCABM()), - Dict(:alg=>Vern6()), - Dict(:alg=>Vern7()), - Dict(:alg=>Vern8()), - Dict(:alg=>Vern9()), - Dict(:alg=>ROCK4()) - ]; -``` - -#### Plot Work-Precision Diagram - -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=200) - -names = ["lsoda" "CVODE_Adams" "Tsit5" "BS5" "VCABM" "Vern6" "Vern7" "Vern8" "Vern9" "ROCK4"] -plot(wp;label=names) -``` - -#### Additional explicit solvers -One additional explicit solver, `ROCK2`, performs noticeably worse as compared to the other ones. -```julia -setups = [Dict(:alg=>ROCK2())]; -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=200) -names = ["ROCK2"] -plot(wp;label=names) -``` - -## Summary of results -Finally, we compute a single diagram comparing the various solvers used. - -#### Declare solvers -We designate the solvers we wish to compare. -```julia -setups = [ - Dict(:alg=>lsoda()), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES)), - Dict(:alg=>QNDF()), - Dict(:alg=>FBDF()), - Dict(:alg=>Rodas5P()), - Dict(:alg=>BS5()), - Dict(:alg=>VCABM()), - Dict(:alg=>Vern6()), - Dict(:alg=>ROCK4()) - ]; -``` - -#### Plot Work-Precision Diagram - -For these, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=200) - -names = ["lsoda" "CVODE_BDF (GMRES)" "QNDF" "FBDF" "Rodas5P" "BS5" "VCABM" "Vern6" "ROCK4"] -colors = [:seagreen1 :darkgreen :deepskyblue1 :dodgerblue2 :blue :thistle2 :lightsteelblue2 :lightslateblue :purple4] -markershapes = [:star4 :rect :hexagon :rtriangle :heptagon :star8 :heptagon :rtriangle :square] -plot(wp;label=names,left_margin=10Plots.mm,right_margin=10Plots.mm,xticks=[1e-10,1e-9,1e-8,1e-7,1e-6,1e-5,1e-4,1e-3],yticks=[1e-3,1e-2,1e-1],color=colors,markershape=markershapes,legendfontsize=15,tickfontsize=15,guidefontsize=15, legend=:topright, lw=20, la=0.8, markersize=20,markerstrokealpha=1.0, markerstrokewidth=1.5, gridalpha=0.3, gridlinewidth=7.5,size=(1100,1000)) -``` - - -```julia, echo = false -using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` +--- +title: Multisite2 Work-Precision Diagrams +author: Torkel Loman +--- + +The following benchmark is of 66 ODEs with 288 terms that describe a +chemical reaction network. This multisite2 model was used as a benchmark model in [Gupta et +al.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6013266/). We use +[`ReactionNetworkImporters`](https://github.com/isaacsas/ReactionNetworkImporters.jl) +to load the BioNetGen model files as a +[Catalyst](https://github.com/SciML/Catalyst.jl) model, and then use +[ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl) to convert the +Catalyst network model to ODEs. + +```julia +using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, + Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, + LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, + LinearSolve, RecursiveFactorization + +gr() +const to = TimerOutput() +tf = 2.0 + +# generate ModelingToolkit ODEs +@timeit to "Parse Network" prnbng = loadrxnetwork(BNGNetwork(), joinpath(@__DIR__, "Models/multisite2.net")) +show(to) +rn = complete(prnbng.rn) +obs = [eq.lhs for eq in observed(rn)] + +@timeit to "Create ODESys" osys = complete(convert(ODESystem, rn)) +show(to) + +tspan = (0.0, tf) +@timeit to "ODEProb No Jac" oprob = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[]) +show(to); +``` + +```julia +@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[], jac = true, sparse = true) +show(to) +``` + +```julia +@show numspecies(rn) # Number of ODEs +@show numreactions(rn) # Apprx. number of terms in the ODE +@show length(parameters(rn)); # Number of Parameters +``` + +## Time ODE derivative function compilation + +As compiling the ODE derivative functions has in the past taken longer than +running a simulation, we first force compilation by evaluating these functions +one time. + +```julia +u = oprob.u0 +du = copy(u) +p = oprob.p +@timeit to "ODE rhs Eval1" oprob.f(du, u, p, 0.0) +@timeit to "ODE rhs Eval2" oprob.f(du, u, p, 0.0) +sparsejacprob.f(du, u, p, 0.0) +``` + +We also time the ODE rhs function with BenchmarkTools as it is more accurate +given how fast evaluating `f` is: + +```julia +@btime oprob.f($du, $u, $p, 0.0) +``` + +## Picture of the solution + +```julia +sol = solve(oprob, CVODE_BDF(), saveat = tf/1000.0, reltol = 1e-5, abstol = 1e-5) +plot(sol; idxs = obs, legend = false, fmt = :png) +``` + +For these benchmarks we will be using the time-series error with these saving +points. + +## Generate Test Solution + +```julia +@time sol = solve(oprob, CVODE_BDF(), reltol = 1e-15, abstol = 1e-15) +test_sol = TestSolution(sol); +``` + +## Setups + +#### Sets plotting defaults + +```julia +default(legendfontsize = 7, framestyle = :box, gridalpha = 0.3, gridlinewidth = 2.5) +``` + +#### Sets tolerances + +```julia +abstols = 1.0 ./ 10.0 .^ (6:10) +reltols = 1.0 ./ 10.0 .^ (6:10); +``` + +## Work-Precision Diagram + +We start by trying lsoda and CVODE solvers. + +#### Declare solvers + +We designate the solvers (and options) we wish to use. + +```julia +setups = [ + Dict(:alg=>lsoda()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>CVODE_BDF(linear_solver = :LapackDense)), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES)) +]; +``` + +#### Plot Work-Precision Diagram + +Finally, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 200) + +names = ["lsoda" "CVODE_BDF" "CVODE_BDF (LapackDense)" "CVODE_BDF (GMRES)"] +plot(wp; label = names) +``` + +## Implicit Work-Precision Diagram + +Next, we try a couple of implicit Julia solvers. + +#### Declare solvers + +We designate the solvers we wish to use. + +```julia +setups = [ + Dict(:alg=>TRBDF2()), + Dict(:alg=>QNDF()), + Dict(:alg=>FBDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>Rosenbrock23()), + Dict(:alg=>Rodas4()), + Dict(:alg=>Rodas5P()) +]; +``` + +#### Plot Work-Precision Diagram + +Finally, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e12), dtmin = 1e-18, numruns = 200) + +names = ["TRBDF2" "QNDF" "FBDF" "KenCarp4" "Rosenbrock23" "Rodas4" "Rodas5P"] +plot(wp; label = names) +``` + +Implicit methods doing poorly suggests it's non-stiff. + +## Explicit Work-Precision Diagram + +Benchmarks for explicit solvers. + +#### Declare solvers + +We designate the solvers we wish to use, this also includes lsoda and CVODE. + +```julia +setups = [ + Dict(:alg=>lsoda()), + Dict(:alg=>CVODE_Adams()), + Dict(:alg=>Tsit5()), + Dict(:alg=>BS5()), + Dict(:alg=>VCABM()), + Dict(:alg=>Vern6()), + Dict(:alg=>Vern7()), + Dict(:alg=>Vern8()), + Dict(:alg=>Vern9()), + Dict(:alg=>ROCK4()) +]; +``` + +#### Plot Work-Precision Diagram + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 200) + +names = ["lsoda" "CVODE_Adams" "Tsit5" "BS5" "VCABM" "Vern6" "Vern7" "Vern8" "Vern9" "ROCK4"] +plot(wp; label = names) +``` + +#### Additional explicit solvers + +One additional explicit solver, `ROCK2`, performs noticeably worse as compared to the other ones. + +```julia +setups = [Dict(:alg=>ROCK2())]; +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 200) +names = ["ROCK2"] +plot(wp; label = names) +``` + +## Summary of results + +Finally, we compute a single diagram comparing the various solvers used. + +#### Declare solvers + +We designate the solvers we wish to compare. + +```julia +setups = [ + Dict(:alg=>lsoda()), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES)), + Dict(:alg=>QNDF()), + Dict(:alg=>FBDF()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>BS5()), + Dict(:alg=>VCABM()), + Dict(:alg=>Vern6()), + Dict(:alg=>ROCK4()) +]; +``` + +#### Plot Work-Precision Diagram + +For these, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 200) + +names = ["lsoda" "CVODE_BDF (GMRES)" "QNDF" "FBDF" "Rodas5P" "BS5" "VCABM" "Vern6" "ROCK4"] +colors = [:seagreen1 :darkgreen :deepskyblue1 :dodgerblue2 :blue :thistle2 :lightsteelblue2 :lightslateblue :purple4] +markershapes = [:star4 :rect :hexagon :rtriangle :heptagon :star8 :heptagon :rtriangle :square] +plot(wp; label = names, left_margin = 10Plots.mm, right_margin = 10Plots.mm, + xticks = [1e-10, 1e-9, 1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3], + yticks = [1e-3, 1e-2, 1e-1], color = colors, markershape = markershapes, + legendfontsize = 15, tickfontsize = 15, guidefontsize = 15, + legend = :topright, lw = 20, la = 0.8, markersize = 20, markerstrokealpha = 1.0, + markerstrokewidth = 1.5, gridalpha = 0.3, gridlinewidth = 7.5, size = (1100, 1000)) +``` + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/Bio/multistate.jmd b/benchmarks/Bio/multistate.jmd index 3d2a05c64..ddcff7eb4 100644 --- a/benchmarks/Bio/multistate.jmd +++ b/benchmarks/Bio/multistate.jmd @@ -1,237 +1,257 @@ ---- -title: Multistate Work-Precision Diagrams -author: Torkel Loman ---- - -The following benchmark is of 9 ODEs with 18 terms that describe a -chemical reaction network. This multistate model was used as a benchmark model in [Gupta et -al.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6013266/). We use -[`ReactionNetworkImporters`](https://github.com/isaacsas/ReactionNetworkImporters.jl) -to load the BioNetGen model files as a -[Catalyst](https://github.com/SciML/Catalyst.jl) model, and then use -[ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl) to convert the -Catalyst network model to ODEs. - -```julia -using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, - Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, - LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, - RecursiveFactorization - -gr() -const to = TimerOutput() -tf = 20.0 - -# generate ModelingToolkit ODEs -@timeit to "Parse Network" prnbng = loadrxnetwork(BNGNetwork(), joinpath(@__DIR__, "Models/multistate.net")) -show(to) -rn = complete(prnbng.rn) -obs = [eq.lhs for eq in observed(rn)] - -@timeit to "Create ODESys" osys = complete(convert(ODESystem, rn)) -show(to) - -tspan = (0.,tf) -@timeit to "ODEProb No Jac" oprob = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[]) -show(to); -``` - -```julia -@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true, SciMLBase.FullSpecialize}(osys, Float64[], tspan, Float64[], jac=true, sparse=true) -show(to) -``` - - -```julia -@show numspecies(rn) # Number of ODEs -@show numreactions(rn) # Apprx. number of terms in the ODE -@show length(parameters(rn)); # Number of Parameters -``` - -## Time ODE derivative function compilation -As compiling the ODE derivative functions has in the past taken longer than -running a simulation, we first force compilation by evaluating these functions -one time. -```julia -u = oprob.u0 -du = copy(u) -p = oprob.p -@timeit to "ODE rhs Eval1" oprob.f(du,u,p,0.) -@timeit to "ODE rhs Eval2" oprob.f(du,u,p,0.) -sparsejacprob.f(du,u,p,0.) -``` - -We also time the ODE rhs function with BenchmarkTools as it is more accurate -given how fast evaluating `f` is: -```julia -@btime oprob.f($du,$u,$p,0.) -``` - -## Picture of the solution - -```julia -sol = solve(oprob, CVODE_BDF(), saveat=tf/1000., reltol=1e-5, abstol=1e-5) -plot(sol; idxs=obs, legend=false, fmt=:png) -``` - -For these benchmarks we will be using the time-series error with these saving -points. - -## Generate Test Solution - -```julia -@time sol = solve(oprob, CVODE_BDF(), reltol=1e-15, abstol=1e-15) -test_sol = TestSolution(sol); -``` - -## Setups - -#### Sets plotting defaults - -```julia -default(legendfontsize=7,framestyle=:box,gridalpha=0.3,gridlinewidth=2.5) -``` - -#### Sets tolerances - -```julia -abstols = 1.0 ./ 10.0 .^ (6:10) -reltols = 1.0 ./ 10.0 .^ (6:10); -``` - -## Work-Precision Diagram -We start by trying lsoda and CVODE solvers. - -#### Declare solvers - -We designate the solvers (and options) we wish to use. -```julia -setups = [ - Dict(:alg=>lsoda()), - Dict(:alg=>CVODE_BDF()), - Dict(:alg=>CVODE_BDF(linear_solver=:LapackDense)), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES)) - ]; -``` - -#### Plot Work-Precision Diagram - -Finally, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=200) - -names = ["lsoda" "CVODE_BDF" "CVODE_BDF (LapackDense)" "CVODE_BDF (GMRES)"] -plot(wp;label=names) -``` - -## Implicit Work-Precision Diagram - -Next, we try a couple of implicit Julia solvers. - -#### Declare solvers - -We designate the solvers we wish to use. -```julia -setups = [ - Dict(:alg=>TRBDF2()), - Dict(:alg=>QNDF()), - Dict(:alg=>FBDF()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>Rosenbrock23()), - Dict(:alg=>Rodas4()), - Dict(:alg=>Rodas5P()) - ]; -``` - - -#### Plot Work-Precision Diagram - -Finally, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e12),dtmin=1e-18,numruns=200) - -names = ["TRBDF2" "QNDF" "FBDF" "KenCarp4" "Rosenbrock23" "Rodas4" "Rodas5P"] -plot(wp;label=names) -``` - -Implicit methods doing poorly suggests it's non-stiff. - -## Explicit Work-Precision Diagram - -Benchmarks for explicit solvers. - -#### Declare solvers - -We designate the solvers we wish to use, this also includes lsoda and CVODE. -```julia -setups = [ - Dict(:alg=>lsoda()), - Dict(:alg=>Tsit5()), - Dict(:alg=>BS5()), - Dict(:alg=>VCABM()), - Dict(:alg=>Vern6()), - Dict(:alg=>Vern7()), - Dict(:alg=>Vern8()), - Dict(:alg=>Vern9()), - Dict(:alg=>ROCK4()) - ]; -``` - -#### Plot Work-Precision Diagram - -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=200) - -names = ["lsoda" "Tsit5" "BS5" "VCABM" "Vern6" "Vern7" "Vern8" "Vern9" "ROCK4"] -plot(wp;label=names) -``` - -#### Additional explicit solvers -Two additional explicit solvers, `CVODE_Adams` and `ROCK2`, perform noticeably worse as compared to the other ones. -```julia -setups = [Dict(:alg=>CVODE_Adams()), Dict(:alg=>ROCK2())]; -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=200) -names = ["CVODE_Adams" "ROCK2"] -plot(wp;label=names) -``` - -## Summary of results -Finally, we compute a single diagram comparing the various solvers used. - -#### Declare solvers -We designate the solvers we wish to compare. -```julia -setups = [ - Dict(:alg=>lsoda()), - Dict(:alg=>CVODE_BDF()), - Dict(:alg=>QNDF()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>Rodas5P()), - Dict(:alg=>Tsit5()), - Dict(:alg=>BS5()), - Dict(:alg=>VCABM()), - Dict(:alg=>Vern7()) - ]; -``` - -#### Plot Work-Precision Diagram - -For these, we generate a work-precision diagram for the selection of solvers. -```julia -wp = WorkPrecisionSet(oprob,abstols,reltols,setups;error_estimate=:l2, - saveat=tf/10000.,appxsol=test_sol,maxiters=Int(1e9),numruns=200) - -names = ["lsoda" "CVODE_BDF" "QNDF" "KenCarp4" "Rodas5P" "Tsit5" "BS5" "VCABM" "Vern7"] -colors = [:seagreen1 :chartreuse1 :deepskyblue1 :lightskyblue :blue :orchid2 :thistle2 :lightsteelblue2 :mediumpurple1] -markershapes = [:star4 :circle :hexagon :star5 :heptagon :ltriangle :star8 :heptagon :star6] -plot(wp;label=names,left_margin=10Plots.mm,right_margin=10Plots.mm,xticks=[1e-12,1e-11,1e-10,1e-9,1e-8,1e-7,1e-6,1e-5,1e-4,1e-3,1e-2],yticks=[1e-3,1e-2],color=colors,markershape=markershapes,legendfontsize=15,tickfontsize=15,guidefontsize=15, legend=:topright, lw=20, la=0.8, markersize=20,markerstrokealpha=1.0, markerstrokewidth=1.5, gridalpha=0.3, gridlinewidth=7.5,size=(1100,1000)) -``` - -```julia, echo = false -using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` +--- +title: Multistate Work-Precision Diagrams +author: Torkel Loman +--- + +The following benchmark is of 9 ODEs with 18 terms that describe a +chemical reaction network. This multistate model was used as a benchmark model in [Gupta et +al.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6013266/). We use +[`ReactionNetworkImporters`](https://github.com/isaacsas/ReactionNetworkImporters.jl) +to load the BioNetGen model files as a +[Catalyst](https://github.com/SciML/Catalyst.jl) model, and then use +[ModelingToolkit](https://github.com/SciML/ModelingToolkit.jl) to convert the +Catalyst network model to ODEs. + +```julia +using DiffEqBase, OrdinaryDiffEq, Catalyst, ReactionNetworkImporters, + Sundials, Plots, DiffEqDevTools, ODEInterface, ODEInterfaceDiffEq, + LSODA, TimerOutputs, LinearAlgebra, ModelingToolkit, BenchmarkTools, + RecursiveFactorization + +gr() +const to = TimerOutput() +tf = 20.0 + +# generate ModelingToolkit ODEs +@timeit to "Parse Network" prnbng = loadrxnetwork(BNGNetwork(), joinpath(@__DIR__, "Models/multistate.net")) +show(to) +rn = complete(prnbng.rn) +obs = [eq.lhs for eq in observed(rn)] + +@timeit to "Create ODESys" osys = complete(convert(ODESystem, rn)) +show(to) + +tspan = (0.0, tf) +@timeit to "ODEProb No Jac" oprob = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[]) +show(to); +``` + +```julia +@timeit to "ODEProb SparseJac" sparsejacprob = ODEProblem{true, SciMLBase.FullSpecialize}( + osys, Float64[], tspan, Float64[], jac = true, sparse = true) +show(to) +``` + +```julia +@show numspecies(rn) # Number of ODEs +@show numreactions(rn) # Apprx. number of terms in the ODE +@show length(parameters(rn)); # Number of Parameters +``` + +## Time ODE derivative function compilation + +As compiling the ODE derivative functions has in the past taken longer than +running a simulation, we first force compilation by evaluating these functions +one time. + +```julia +u = oprob.u0 +du = copy(u) +p = oprob.p +@timeit to "ODE rhs Eval1" oprob.f(du, u, p, 0.0) +@timeit to "ODE rhs Eval2" oprob.f(du, u, p, 0.0) +sparsejacprob.f(du, u, p, 0.0) +``` + +We also time the ODE rhs function with BenchmarkTools as it is more accurate +given how fast evaluating `f` is: + +```julia +@btime oprob.f($du, $u, $p, 0.0) +``` + +## Picture of the solution + +```julia +sol = solve(oprob, CVODE_BDF(), saveat = tf/1000.0, reltol = 1e-5, abstol = 1e-5) +plot(sol; idxs = obs, legend = false, fmt = :png) +``` + +For these benchmarks we will be using the time-series error with these saving +points. + +## Generate Test Solution + +```julia +@time sol = solve(oprob, CVODE_BDF(), reltol = 1e-15, abstol = 1e-15) +test_sol = TestSolution(sol); +``` + +## Setups + +#### Sets plotting defaults + +```julia +default(legendfontsize = 7, framestyle = :box, gridalpha = 0.3, gridlinewidth = 2.5) +``` + +#### Sets tolerances + +```julia +abstols = 1.0 ./ 10.0 .^ (6:10) +reltols = 1.0 ./ 10.0 .^ (6:10); +``` + +## Work-Precision Diagram + +We start by trying lsoda and CVODE solvers. + +#### Declare solvers + +We designate the solvers (and options) we wish to use. + +```julia +setups = [ + Dict(:alg=>lsoda()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>CVODE_BDF(linear_solver = :LapackDense)), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES)) +]; +``` + +#### Plot Work-Precision Diagram + +Finally, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 200) + +names = ["lsoda" "CVODE_BDF" "CVODE_BDF (LapackDense)" "CVODE_BDF (GMRES)"] +plot(wp; label = names) +``` + +## Implicit Work-Precision Diagram + +Next, we try a couple of implicit Julia solvers. + +#### Declare solvers + +We designate the solvers we wish to use. + +```julia +setups = [ + Dict(:alg=>TRBDF2()), + Dict(:alg=>QNDF()), + Dict(:alg=>FBDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>Rosenbrock23()), + Dict(:alg=>Rodas4()), + Dict(:alg=>Rodas5P()) +]; +``` + +#### Plot Work-Precision Diagram + +Finally, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e12), dtmin = 1e-18, numruns = 200) + +names = ["TRBDF2" "QNDF" "FBDF" "KenCarp4" "Rosenbrock23" "Rodas4" "Rodas5P"] +plot(wp; label = names) +``` + +Implicit methods doing poorly suggests it's non-stiff. + +## Explicit Work-Precision Diagram + +Benchmarks for explicit solvers. + +#### Declare solvers + +We designate the solvers we wish to use, this also includes lsoda and CVODE. + +```julia +setups = [ + Dict(:alg=>lsoda()), + Dict(:alg=>Tsit5()), + Dict(:alg=>BS5()), + Dict(:alg=>VCABM()), + Dict(:alg=>Vern6()), + Dict(:alg=>Vern7()), + Dict(:alg=>Vern8()), + Dict(:alg=>Vern9()), + Dict(:alg=>ROCK4()) +]; +``` + +#### Plot Work-Precision Diagram + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 200) + +names = ["lsoda" "Tsit5" "BS5" "VCABM" "Vern6" "Vern7" "Vern8" "Vern9" "ROCK4"] +plot(wp; label = names) +``` + +#### Additional explicit solvers + +Two additional explicit solvers, `CVODE_Adams` and `ROCK2`, perform noticeably worse as compared to the other ones. + +```julia +setups = [Dict(:alg=>CVODE_Adams()), Dict(:alg=>ROCK2())]; +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 200) +names = ["CVODE_Adams" "ROCK2"] +plot(wp; label = names) +``` + +## Summary of results + +Finally, we compute a single diagram comparing the various solvers used. + +#### Declare solvers + +We designate the solvers we wish to compare. + +```julia +setups = [ + Dict(:alg=>lsoda()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>QNDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>Tsit5()), + Dict(:alg=>BS5()), + Dict(:alg=>VCABM()), + Dict(:alg=>Vern7()) +]; +``` + +#### Plot Work-Precision Diagram + +For these, we generate a work-precision diagram for the selection of solvers. + +```julia +wp = WorkPrecisionSet(oprob, abstols, reltols, setups; error_estimate = :l2, + saveat = tf/10000.0, appxsol = test_sol, maxiters = Int(1e9), numruns = 200) + +names = ["lsoda" "CVODE_BDF" "QNDF" "KenCarp4" "Rodas5P" "Tsit5" "BS5" "VCABM" "Vern7"] +colors = [:seagreen1 :chartreuse1 :deepskyblue1 :lightskyblue :blue :orchid2 :thistle2 :lightsteelblue2 :mediumpurple1] +markershapes = [:star4 :circle :hexagon :star5 :heptagon :ltriangle :star8 :heptagon :star6] +plot(wp; label = names, left_margin = 10Plots.mm, right_margin = 10Plots.mm, + xticks = [1e-12, 1e-11, 1e-10, 1e-9, 1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2], + yticks = [1e-3, 1e-2], color = colors, markershape = markershapes, + legendfontsize = 15, tickfontsize = 15, guidefontsize = 15, legend = :topright, + lw = 20, la = 0.8, markersize = 20, markerstrokealpha = 1.0, + markerstrokewidth = 1.5, gridalpha = 0.3, gridlinewidth = 7.5, size = (1100, 1000)) +``` + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/ComplicatedPDE/Filament.jmd b/benchmarks/ComplicatedPDE/Filament.jmd index 7c85a6cd5..e83bbaefa 100644 --- a/benchmarks/ComplicatedPDE/Filament.jmd +++ b/benchmarks/ComplicatedPDE/Filament.jmd @@ -31,62 +31,65 @@ abstract type AbstractSolverCache end ```julia struct FerromagneticContinuous <: AbstractMagneticForce - ω :: T - F :: Vector{T} + ω::T + F::Vector{T} end mutable struct FilamentCache{ - MagneticForce <: AbstractMagneticForce, - InextensibilityCache <: AbstractInextensibilityCache, - SolverCache <: AbstractSolverCache - } <: AbstractFilamentCache - N :: Int - μ :: T - Cm :: T - x :: SubArray{T,1,Vector{T},Tuple{StepRange{Int,Int}},true} - y :: SubArray{T,1,Vector{T},Tuple{StepRange{Int,Int}},true} - z :: SubArray{T,1,Vector{T},Tuple{StepRange{Int,Int}},true} - A :: Matrix{T} - P :: InextensibilityCache - F :: MagneticForce - Sc :: SolverCache + MagneticForce <: AbstractMagneticForce, + InextensibilityCache <: AbstractInextensibilityCache, + SolverCache <: AbstractSolverCache +} <: AbstractFilamentCache + N::Int + μ::T + Cm::T + x::SubArray{T, 1, Vector{T}, Tuple{StepRange{Int, Int}}, true} + y::SubArray{T, 1, Vector{T}, Tuple{StepRange{Int, Int}}, true} + z::SubArray{T, 1, Vector{T}, Tuple{StepRange{Int, Int}}, true} + A::Matrix{T} + P::InextensibilityCache + F::MagneticForce + Sc::SolverCache end ``` ```julia struct NoHydroProjectionCache <: AbstractInextensibilityCache - J :: Matrix{T} - P :: Matrix{T} - J_JT :: Matrix{T} - J_JT_LDLT :: LinearAlgebra.LDLt{T, SymTridiagonal{T}} - P0 :: Matrix{T} - - NoHydroProjectionCache(N::Int) = new( - zeros(N, 3*(N+1)), # J - zeros(3*(N+1), 3*(N+1)), # P - zeros(N,N), # J_JT - LinearAlgebra.LDLt{T,SymTridiagonal{T}}(SymTridiagonal(zeros(N), zeros(N-1))), - zeros(N, 3*(N+1)) - ) + J::Matrix{T} + P::Matrix{T} + J_JT::Matrix{T} + J_JT_LDLT::LinearAlgebra.LDLt{T, SymTridiagonal{T}} + P0::Matrix{T} + + function NoHydroProjectionCache(N::Int) + new( + zeros(N, 3*(N+1)), # J + zeros(3*(N+1), 3*(N+1)), # P + zeros(N, N), # J_JT + LinearAlgebra.LDLt{T, SymTridiagonal{T}}(SymTridiagonal(zeros(N), zeros(N-1))), + zeros(N, 3*(N+1)) + ) + end end ``` ```julia struct DiffEqSolverCache <: AbstractSolverCache - S1 :: Vector{T} - S2 :: Vector{T} + S1::Vector{T} + S2::Vector{T} - DiffEqSolverCache(N::Integer) = new(zeros(T,3*(N+1)), zeros(T,3*(N+1))) + DiffEqSolverCache(N::Integer) = new(zeros(T, 3*(N+1)), zeros(T, 3*(N+1))) end ``` ```julia -function FilamentCache(N=20; Cm=32, ω=200, Solver=SolverDiffEq) +function FilamentCache(N = 20; Cm = 32, ω = 200, Solver = SolverDiffEq) InextensibilityCache = NoHydroProjectionCache SolverCache = DiffEqSolverCache tmp = zeros(3*(N+1)) FilamentCache{FerromagneticContinuous, InextensibilityCache, SolverCache}( - N, N+1, Cm, view(tmp,1:3:3*(N+1)), view(tmp,2:3:3*(N+1)), view(tmp,3:3:3*(N+1)), + N, N+1, Cm, view(tmp, 1:3:(3 * (N + 1))), + view(tmp, 2:3:(3 * (N + 1))), view(tmp, 3:3:(3 * (N + 1))), zeros(3*(N+1), 3*(N+1)), # A InextensibilityCache(N), # P FerromagneticContinuous(ω, zeros(3*(N+1))), @@ -99,33 +102,34 @@ end function stiffness_matrix!(f::AbstractFilamentCache) N, μ, A = f.N, f.μ, f.A @inbounds for j in axes(A, 2), i in axes(A, 1) - A[i, j] = j == i ? 1 : 0 + + A[i, j] = j == i ? 1 : 0 end - @inbounds for i in 1 : 3 - A[i,i] = 1 - A[i,3+i] = -2 - A[i,6+i] = 1 - - A[3+i,i] = -2 - A[3+i,3+i] = 5 - A[3+i,6+i] = -4 - A[3+i,9+i] = 1 - - A[3*(N-1)+i,3*(N-3)+i] = 1 - A[3*(N-1)+i,3*(N-2)+i] = -4 - A[3*(N-1)+i,3*(N-1)+i] = 5 - A[3*(N-1)+i,3*N+i] = -2 - - A[3*N+i,3*(N-2)+i] = 1 - A[3*N+i,3*(N-1)+i] = -2 - A[3*N+i,3*N+i] = 1 - - for j in 2 : N-2 - A[3*j+i,3*j+i] = 6 - A[3*j+i,3*(j-1)+i] = -4 - A[3*j+i,3*(j+1)+i] = -4 - A[3*j+i,3*(j-2)+i] = 1 - A[3*j+i,3*(j+2)+i] = 1 + @inbounds for i in 1:3 + A[i, i] = 1 + A[i, 3 + i] = -2 + A[i, 6 + i] = 1 + + A[3 + i, i] = -2 + A[3 + i, 3 + i] = 5 + A[3 + i, 6 + i] = -4 + A[3 + i, 9 + i] = 1 + + A[3 * (N - 1) + i, 3 * (N - 3) + i] = 1 + A[3 * (N - 1) + i, 3 * (N - 2) + i] = -4 + A[3 * (N - 1) + i, 3 * (N - 1) + i] = 5 + A[3 * (N - 1) + i, 3 * N + i] = -2 + + A[3 * N + i, 3 * (N - 2) + i] = 1 + A[3 * N + i, 3 * (N - 1) + i] = -2 + A[3 * N + i, 3 * N + i] = 1 + + for j in 2:(N - 2) + A[3 * j + i, 3 * j + i] = 6 + A[3 * j + i, 3 * (j - 1) + i] = -4 + A[3 * j + i, 3 * (j + 1) + i] = -4 + A[3 * j + i, 3 * (j - 2) + i] = 1 + A[3 * j + i, 3 * (j + 2) + i] = 1 end end rmul!(A, -μ^4) @@ -136,20 +140,20 @@ end ```julia function update_separate_coordinates!(f::AbstractFilamentCache, r) N, x, y, z = f.N, f.x, f.y, f.z - @inbounds for i in 1 : length(x) - x[i] = r[3*i-2] - y[i] = r[3*i-1] - z[i] = r[3*i] + @inbounds for i in 1:length(x) + x[i] = r[3 * i - 2] + y[i] = r[3 * i - 1] + z[i] = r[3 * i] end nothing end function update_united_coordinates!(f::AbstractFilamentCache, r) N, x, y, z = f.N, f.x, f.y, f.z - @inbounds for i in 1 : length(x) - r[3*i-2] = x[i] - r[3*i-1] = y[i] - r[3*i] = z[i] + @inbounds for i in 1:length(x) + r[3 * i - 2] = x[i] + r[3 * i - 1] = y[i] + r[3 * i] = z[i] end nothing end @@ -165,7 +169,7 @@ end function initialize!(initial_conf_type::Symbol, f::AbstractFilamentCache) N, x, y, z = f.N, f.x, f.y, f.z if initial_conf_type == :StraightX - x .= range(0, stop=1, length=N+1) + x .= range(0, stop = 1, length = N+1) y .= 0 z .= 0 else @@ -179,10 +183,10 @@ end function magnetic_force!(::FerromagneticContinuous, f::AbstractFilamentCache, t) # TODO: generalize this for different magnetic fields as well N, μ, Cm, ω, F = f.N, f.μ, f.Cm, f.F.ω, f.F.F - F[1] = -μ * Cm * cos(ω*t) - F[2] = -μ * Cm * sin(ω*t) - F[3*(N+1)-2] = μ * Cm * cos(ω*t) - F[3*(N+1)-1] = μ * Cm * sin(ω*t) + F[1] = -μ * Cm * cos(ω*t) + F[2] = -μ * Cm * sin(ω*t) + F[3 * (N + 1) - 2] = μ * Cm * cos(ω*t) + F[3 * (N + 1) - 1] = μ * Cm * sin(ω*t) nothing end ``` @@ -209,13 +213,13 @@ end ```julia function jacobian!(f::FilamentCache) N, x, y, z, J = f.N, f.x, f.y, f.z, f.P.J - @inbounds for i in 1 : N - J[i, 3*i-2] = -2 * (x[i+1]-x[i]) - J[i, 3*i-1] = -2 * (y[i+1]-y[i]) - J[i, 3*i] = -2 * (z[i+1]-z[i]) - J[i, 3*(i+1)-2] = 2 * (x[i+1]-x[i]) - J[i, 3*(i+1)-1] = 2 * (y[i+1]-y[i]) - J[i, 3*(i+1)] = 2 * (z[i+1]-z[i]) + @inbounds for i in 1:N + J[i, 3 * i - 2] = -2 * (x[i + 1]-x[i]) + J[i, 3 * i - 1] = -2 * (y[i + 1]-y[i]) + J[i, 3 * i] = -2 * (z[i + 1]-z[i]) + J[i, 3 * (i + 1) - 2] = 2 * (x[i + 1]-x[i]) + J[i, 3 * (i + 1) - 1] = 2 * (y[i + 1]-y[i]) + J[i, 3 * (i + 1)] = 2 * (z[i + 1]-z[i]) end nothing end @@ -237,26 +241,27 @@ end ```julia function subtract_from_identity!(A) lmul!(-1, A) - @inbounds for i in 1 : size(A,1) - A[i,i] += 1 + @inbounds for i in 1:size(A, 1) + A[i, i] += 1 end nothing end ``` ```julia -function LDLt_inplace!(L::LinearAlgebra.LDLt{T,SymTridiagonal{T}}, A::Matrix{T}) where {T<:Real} - n = size(A,1) +function LDLt_inplace!(L::LinearAlgebra.LDLt{T, SymTridiagonal{T}}, A::Matrix{T}) where {T <: + Real} + n = size(A, 1) dv, ev = L.data.dv, L.data.ev - @inbounds for (i,d) in enumerate(diagind(A)) + @inbounds for (i, d) in enumerate(diagind(A)) dv[i] = A[d] end - @inbounds for (i,d) in enumerate(diagind(A,-1)) + @inbounds for (i, d) in enumerate(diagind(A, -1)) ev[i] = A[d] end - @inbounds @simd for i in 1 : n-1 - ev[i] /= dv[i] - dv[i+1] -= abs2(ev[i]) * dv[i] + @inbounds @simd for i in 1:(n - 1) + ev[i] /= dv[i] + dv[i + 1] -= abs2(ev[i]) * dv[i] end L end @@ -267,12 +272,14 @@ end Let's take a look at what results of the model look like: ```julia -function run(::SolverDiffEq; N=20, Cm=32, ω=200, time_end=1., solver=TRBDF2(autodiff=false), reltol=1e-6, abstol=1e-6) - f = FilamentCache(N, Solver=SolverDiffEq, Cm=Cm, ω=ω) +function run(::SolverDiffEq; N = 20, Cm = 32, ω = 200, time_end = 1.0, + solver = TRBDF2(autodiff = false), reltol = 1e-6, abstol = 1e-6) + f = FilamentCache(N, Solver = SolverDiffEq, Cm = Cm, ω = ω) r0 = initialize!(:StraightX, f) stiffness_matrix!(f) - prob = ODEProblem(ODEFunction(f, jac=(J, u, p, t)->(mul!(J, f.P.P, f.A); nothing)), r0, (0., time_end)) - sol = solve(prob, solver, dense=false, reltol=reltol, abstol=abstol) + prob = ODEProblem(ODEFunction(f, jac = (J, u, p, t)->(mul!(J, f.P.P, f.A); nothing)), r0, ( + 0.0, time_end)) + sol = solve(prob, solver, dense = false, reltol = reltol, abstol = abstol) end ``` @@ -280,7 +287,7 @@ This method runs the model with the `TRBDF2` method and the default parameters. ```julia sol = run(SolverDiffEq()) -plot(sol,vars = (0,25)) +plot(sol, vars = (0, 25)) ``` The model quickly falls into a highly oscillatory mode which then dominates throughout the rest of the solution. @@ -291,34 +298,34 @@ Now let's build the problem and solve it once at high accuracy to get a referenc ```julia N=20 -f = FilamentCache(N, Solver=SolverDiffEq) +f = FilamentCache(N, Solver = SolverDiffEq) r0 = initialize!(:StraightX, f) stiffness_matrix!(f) -prob = ODEProblem(f, r0, (0., 0.01)) +prob = ODEProblem(f, r0, (0.0, 0.01)) -sol = solve(prob, Vern9(), reltol=1e-14, abstol=1e-14) +sol = solve(prob, Vern9(), reltol = 1e-14, abstol = 1e-14) test_sol = TestSolution(sol); ``` ## Omissions ```julia;eval=false -abstols=1 ./10 .^(3:8) -reltols=1 ./10 .^(3:8) +abstols=1 ./ 10 .^ (3:8) +reltols=1 ./ 10 .^ (3:8) setups = [ Dict(:alg => CVODE_BDF()), - Dict(:alg => Rosenbrock23(autodiff=false)), - Dict(:alg => Rodas4(autodiff=false)), + Dict(:alg => Rosenbrock23(autodiff = false)), + Dict(:alg => Rodas4(autodiff = false)), Dict(:alg => radau()), - Dict(:alg=>Exprb43(autodiff=false)), - Dict(:alg=>Exprb32(autodiff=false)), - Dict(:alg=>ImplicitEulerExtrapolation(autodiff=false)), - Dict(:alg=>ImplicitDeuflhardExtrapolation(autodiff=false)), - Dict(:alg=>ImplicitHairerWannerExtrapolation(autodiff=false)), - ]; - -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false) + Dict(:alg=>Exprb43(autodiff = false)), + Dict(:alg=>Exprb32(autodiff = false)), + Dict(:alg=>ImplicitEulerExtrapolation(autodiff = false)), + Dict(:alg=>ImplicitDeuflhardExtrapolation(autodiff = false)), + Dict(:alg=>ImplicitHairerWannerExtrapolation(autodiff = false)) +]; + +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` @@ -334,23 +341,23 @@ early. It is thus removed from the next sections. The EPIRK methods currently do not work on this problem ```julia -sol = solve(prob, EPIRK4s3B(autodiff=false), dt=2^-3) +sol = solve(prob, EPIRK4s3B(autodiff = false), dt = 2^-3) ``` but would be called like: ```julia;eval=false -abstols=1 ./10 .^(3:5) -reltols=1 ./10 .^(3:5) +abstols=1 ./ 10 .^ (3:5) +reltols=1 ./ 10 .^ (3:5) setups = [ Dict(:alg => CVODE_BDF()), - Dict(:alg => HochOst4(),:dts=>2.0.^(-3:-1:-5)), - Dict(:alg => EPIRK4s3B(),:dts=>2.0.^(-3:-1:-5)), - Dict(:alg => EXPRB53s3(),:dts=>2.0.^(-3:-1:-5)), - ]; + Dict(:alg => HochOst4(), :dts=>2.0 .^ (-3:-1:-5)), + Dict(:alg => EPIRK4s3B(), :dts=>2.0 .^ (-3:-1:-5)), + Dict(:alg => EXPRB53s3(), :dts=>2.0 .^ (-3:-1:-5)) +]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` @@ -359,59 +366,59 @@ plot(wp) ### Endpoint Error ```julia -abstols=1 ./10 .^(3:8) -reltols=1 ./10 .^(3:8) +abstols=1 ./ 10 .^ (3:8) +reltols=1 ./ 10 .^ (3:8) setups = [ Dict(:alg => CVODE_BDF()), Dict(:alg => BS3()), Dict(:alg => Tsit5()), - Dict(:alg => ImplicitEuler(autodiff=false)), - Dict(:alg => Trapezoid(autodiff=false)), - Dict(:alg => TRBDF2(autodiff=false)), + Dict(:alg => ImplicitEuler(autodiff = false)), + Dict(:alg => Trapezoid(autodiff = false)), + Dict(:alg => TRBDF2(autodiff = false)), Dict(:alg => rodas()), Dict(:alg => dop853()), Dict(:alg => lsoda()), Dict(:alg => ROCK2()), Dict(:alg => ROCK4()), Dict(:alg => ESERK5()) - ]; +]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` ```julia -abstols=1 ./10 .^(3:8) -reltols=1 ./10 .^(3:8) +abstols=1 ./ 10 .^ (3:8) +reltols=1 ./ 10 .^ (3:8) setups = [ Dict(:alg => CVODE_BDF()), - Dict(:alg => ImplicitEuler(autodiff=false)), - Dict(:alg => TRBDF2(autodiff=false)), - Dict(:alg => KenCarp3(autodiff=false)), - Dict(:alg => KenCarp4(autodiff=false)), - Dict(:alg => Kvaerno3(autodiff=false)), - Dict(:alg => Kvaerno4(autodiff=false)), - Dict(:alg => ABDF2(autodiff=false)), - Dict(:alg => QNDF(autodiff=false)), - Dict(:alg => RadauIIA5(autodiff=false)), + Dict(:alg => ImplicitEuler(autodiff = false)), + Dict(:alg => TRBDF2(autodiff = false)), + Dict(:alg => KenCarp3(autodiff = false)), + Dict(:alg => KenCarp4(autodiff = false)), + Dict(:alg => Kvaerno3(autodiff = false)), + Dict(:alg => Kvaerno4(autodiff = false)), + Dict(:alg => ABDF2(autodiff = false)), + Dict(:alg => QNDF(autodiff = false)), + Dict(:alg => RadauIIA5(autodiff = false)) ]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` ```julia -abstols=1 ./10 .^(3:8) -reltols=1 ./10 .^(3:8) +abstols=1 ./ 10 .^ (3:8) +reltols=1 ./ 10 .^ (3:8) setups = [ Dict(:alg => CVODE_BDF()), - Dict(:alg => CVODE_BDF(linear_solver=:GMRES)), - Dict(:alg => TRBDF2(autodiff=false)), - Dict(:alg => TRBDF2(autodiff=false,linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp4(autodiff=false)), - Dict(:alg => KenCarp4(autodiff=false,linsolve=KrylovJL_GMRES())), + Dict(:alg => CVODE_BDF(linear_solver = :GMRES)), + Dict(:alg => TRBDF2(autodiff = false)), + Dict(:alg => TRBDF2(autodiff = false, linsolve = KrylovJL_GMRES())), + Dict(:alg => KenCarp4(autodiff = false)), + Dict(:alg => KenCarp4(autodiff = false, linsolve = KrylovJL_GMRES())) ]; names = [ @@ -420,36 +427,36 @@ names = [ "TRBDF2", "TRBDF2 (GMRES)", "KenCarp4", - "KenCarp4 (GMRES)", + "KenCarp4 (GMRES)" ]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; names=names, appxsol=test_sol, - maxiters=Int(1e6), verbose = false) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; names = names, appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` ### Timeseries Error ```julia -abstols=1 ./10 .^(3:8) -reltols=1 ./10 .^(3:8) +abstols=1 ./ 10 .^ (3:8) +reltols=1 ./ 10 .^ (3:8) setups = [ Dict(:alg => CVODE_BDF()), - Dict(:alg => Trapezoid(autodiff=false)), - Dict(:alg => TRBDF2(autodiff=false)), + Dict(:alg => Trapezoid(autodiff = false)), + Dict(:alg => TRBDF2(autodiff = false)), Dict(:alg => rodas()), Dict(:alg => lsoda()), - Dict(:alg => KenCarp3(autodiff=false)), - Dict(:alg => KenCarp4(autodiff=false)), - Dict(:alg => Kvaerno3(autodiff=false)), - Dict(:alg => Kvaerno4(autodiff=false)), + Dict(:alg => KenCarp3(autodiff = false)), + Dict(:alg => KenCarp4(autodiff = false)), + Dict(:alg => Kvaerno3(autodiff = false)), + Dict(:alg => Kvaerno4(autodiff = false)), Dict(:alg => ROCK2()), Dict(:alg => ROCK4()), Dict(:alg => ESERK5()) ]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` @@ -461,22 +468,22 @@ so these are turned off in future benchmarks. ### Dense Error ```julia -abstols=1 ./10 .^(3:8) -reltols=1 ./10 .^(3:8) +abstols=1 ./ 10 .^ (3:8) +reltols=1 ./ 10 .^ (3:8) setups = [ Dict(:alg => CVODE_BDF()), - Dict(:alg => TRBDF2(autodiff=false)), - Dict(:alg => KenCarp3(autodiff=false)), - Dict(:alg => KenCarp4(autodiff=false)), - Dict(:alg => Kvaerno3(autodiff=false)), - Dict(:alg => Kvaerno4(autodiff=false)), + Dict(:alg => TRBDF2(autodiff = false)), + Dict(:alg => KenCarp3(autodiff = false)), + Dict(:alg => KenCarp4(autodiff = false)), + Dict(:alg => Kvaerno3(autodiff = false)), + Dict(:alg => Kvaerno4(autodiff = false)), Dict(:alg => ROCK2()), Dict(:alg => ROCK4()), Dict(:alg => ESERK5()) ]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false, dense_errors = true, error_estimate=:L2) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false, dense_errors = true, error_estimate = :L2) plot(wp) ``` @@ -488,89 +495,89 @@ these are turned off in future benchmarks. ## Low Tolerance (High Accuracy) ```julia -abstols=1 ./10 .^(6:12) -reltols=1 ./10 .^(6:12) +abstols=1 ./ 10 .^ (6:12) +reltols=1 ./ 10 .^ (6:12) setups = [ Dict(:alg => CVODE_BDF()), Dict(:alg => Vern7()), Dict(:alg => Vern9()), - Dict(:alg => TRBDF2(autodiff=false)), + Dict(:alg => TRBDF2(autodiff = false)), Dict(:alg => dop853()), Dict(:alg => ROCK4()) ]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` ```julia -abstols=1 ./10 .^(6:12) -reltols=1 ./10 .^(6:12) +abstols=1 ./ 10 .^ (6:12) +reltols=1 ./ 10 .^ (6:12) setups = [ Dict(:alg => CVODE_BDF()), Dict(:alg => radau()), - Dict(:alg => RadauIIA5(autodiff=false)), - Dict(:alg => TRBDF2(autodiff=false)), - Dict(:alg => Kvaerno3(autodiff=false)), - Dict(:alg => KenCarp3(autodiff=false)), - Dict(:alg => Kvaerno4(autodiff=false)), - Dict(:alg => KenCarp4(autodiff=false)), - Dict(:alg => Kvaerno5(autodiff=false)), - Dict(:alg => KenCarp5(autodiff=false)), - Dict(:alg => lsoda()), + Dict(:alg => RadauIIA5(autodiff = false)), + Dict(:alg => TRBDF2(autodiff = false)), + Dict(:alg => Kvaerno3(autodiff = false)), + Dict(:alg => KenCarp3(autodiff = false)), + Dict(:alg => Kvaerno4(autodiff = false)), + Dict(:alg => KenCarp4(autodiff = false)), + Dict(:alg => Kvaerno5(autodiff = false)), + Dict(:alg => KenCarp5(autodiff = false)), + Dict(:alg => lsoda()) ]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` ### Timeseries Error ```julia;eval=false -abstols=1 ./10 .^(6:12) -reltols=1 ./10 .^(6:12) +abstols=1 ./ 10 .^ (6:12) +reltols=1 ./ 10 .^ (6:12) setups = [ Dict(:alg => CVODE_BDF()), Dict(:alg => radau()), - Dict(:alg => RadauIIA5(autodiff=false)), - Dict(:alg => TRBDF2(autodiff=false)), - Dict(:alg => Kvaerno3(autodiff=false)), - Dict(:alg => KenCarp3(autodiff=false)), - Dict(:alg => Kvaerno4(autodiff=false)), - Dict(:alg => KenCarp4(autodiff=false)), - Dict(:alg => Kvaerno5(autodiff=false)), - Dict(:alg => KenCarp5(autodiff=false)), - Dict(:alg => lsoda()), + Dict(:alg => RadauIIA5(autodiff = false)), + Dict(:alg => TRBDF2(autodiff = false)), + Dict(:alg => Kvaerno3(autodiff = false)), + Dict(:alg => KenCarp3(autodiff = false)), + Dict(:alg => Kvaerno4(autodiff = false)), + Dict(:alg => KenCarp4(autodiff = false)), + Dict(:alg => Kvaerno5(autodiff = false)), + Dict(:alg => KenCarp5(autodiff = false)), + Dict(:alg => lsoda()) ]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false, error_estimate = :l2) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false, error_estimate = :l2) plot(wp) ``` ### Dense Error ```julia;eval=false -abstols=1 ./10 .^(6:12) -reltols=1 ./10 .^(6:12) +abstols=1 ./ 10 .^ (6:12) +reltols=1 ./ 10 .^ (6:12) setups = [ Dict(:alg => CVODE_BDF()), Dict(:alg => radau()), - Dict(:alg => RadauIIA5(autodiff=false)), - Dict(:alg => TRBDF2(autodiff=false)), - Dict(:alg => Kvaerno3(autodiff=false)), - Dict(:alg => KenCarp3(autodiff=false)), - Dict(:alg => Kvaerno4(autodiff=false)), - Dict(:alg => KenCarp4(autodiff=false)), - Dict(:alg => Kvaerno5(autodiff=false)), - Dict(:alg => KenCarp5(autodiff=false)), - Dict(:alg => lsoda()), + Dict(:alg => RadauIIA5(autodiff = false)), + Dict(:alg => TRBDF2(autodiff = false)), + Dict(:alg => Kvaerno3(autodiff = false)), + Dict(:alg => KenCarp3(autodiff = false)), + Dict(:alg => Kvaerno4(autodiff = false)), + Dict(:alg => KenCarp4(autodiff = false)), + Dict(:alg => Kvaerno5(autodiff = false)), + Dict(:alg => KenCarp5(autodiff = false)), + Dict(:alg => lsoda()) ]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false, dense_errors=true, error_estimate = :L2) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false, dense_errors = true, error_estimate = :L2) plot(wp) ``` @@ -582,70 +589,70 @@ Note that the pre-caching means that the model is not compatible with autodiffer ```julia N=20 -f = FilamentCache(N, Solver=SolverDiffEq) +f = FilamentCache(N, Solver = SolverDiffEq) r0 = initialize!(:StraightX, f) stiffness_matrix!(f) -prob = ODEProblem(ODEFunction(f, jac=nothing), r0, (0., 0.01)) +prob = ODEProblem(ODEFunction(f, jac = nothing), r0, (0.0, 0.01)) -sol = solve(prob, Vern9(), reltol=1e-14, abstol=1e-14) +sol = solve(prob, Vern9(), reltol = 1e-14, abstol = 1e-14) test_sol = TestSolution(sol.t, sol.u); ``` ## High Tolerance (Low Accuracy) ```julia -abstols=1 ./10 .^(3:8) -reltols=1 ./10 .^(3:8) +abstols=1 ./ 10 .^ (3:8) +reltols=1 ./ 10 .^ (3:8) setups = [ Dict(:alg => CVODE_BDF()), Dict(:alg => BS3()), Dict(:alg => Tsit5()), - Dict(:alg => ImplicitEuler(autodiff=false)), - Dict(:alg => Trapezoid(autodiff=false)), - Dict(:alg => TRBDF2(autodiff=false)), + Dict(:alg => ImplicitEuler(autodiff = false)), + Dict(:alg => Trapezoid(autodiff = false)), + Dict(:alg => TRBDF2(autodiff = false)), Dict(:alg => rodas()), Dict(:alg => dop853()), Dict(:alg => lsoda()) - ]; +]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` ```julia -abstols=1 ./10 .^(3:8) -reltols=1 ./10 .^(3:8) +abstols=1 ./ 10 .^ (3:8) +reltols=1 ./ 10 .^ (3:8) setups = [ Dict(:alg => CVODE_BDF()), Dict(:alg => BS3()), Dict(:alg => Tsit5()), - Dict(:alg => ImplicitEuler(autodiff=false)), - Dict(:alg => Trapezoid(autodiff=false)), - Dict(:alg => TRBDF2(autodiff=false)), + Dict(:alg => ImplicitEuler(autodiff = false)), + Dict(:alg => Trapezoid(autodiff = false)), + Dict(:alg => TRBDF2(autodiff = false)), Dict(:alg => rodas()), Dict(:alg => dop853()), Dict(:alg => lsoda()), Dict(:alg => ROCK2()), Dict(:alg => ROCK4()), Dict(:alg => ESERK5()) - ]; +]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` ```julia -abstols=1 ./10 .^(3:8) -reltols=1 ./10 .^(3:8) +abstols=1 ./ 10 .^ (3:8) +reltols=1 ./ 10 .^ (3:8) setups = [ Dict(:alg => CVODE_BDF()), - Dict(:alg => CVODE_BDF(linear_solver=:GMRES)), - Dict(:alg => TRBDF2(autodiff=false)), - Dict(:alg => TRBDF2(autodiff=false,linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp4(autodiff=false)), - Dict(:alg => KenCarp4(autodiff=false,linsolve=KrylovJL_GMRES())), + Dict(:alg => CVODE_BDF(linear_solver = :GMRES)), + Dict(:alg => TRBDF2(autodiff = false)), + Dict(:alg => TRBDF2(autodiff = false, linsolve = KrylovJL_GMRES())), + Dict(:alg => KenCarp4(autodiff = false)), + Dict(:alg => KenCarp4(autodiff = false, linsolve = KrylovJL_GMRES())) ]; names = [ @@ -654,34 +661,34 @@ names = [ "TRBDF2", "TRBDF2 (GMRES)", "KenCarp4", - "KenCarp4 (GMRES)", + "KenCarp4 (GMRES)" ]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; names=names, appxsol=test_sol, - maxiters=Int(1e6), verbose = false) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; names = names, appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` ## Low Tolerance (High Accuracy) ```julia -abstols=1 ./10 .^(6:12) -reltols=1 ./10 .^(6:12) +abstols=1 ./ 10 .^ (6:12) +reltols=1 ./ 10 .^ (6:12) setups = [ Dict(:alg => CVODE_BDF()), Dict(:alg => radau()), - Dict(:alg => RadauIIA5(autodiff=false)), - Dict(:alg => TRBDF2(autodiff=false)), - Dict(:alg => Kvaerno3(autodiff=false)), - Dict(:alg => KenCarp3(autodiff=false)), - Dict(:alg => Kvaerno4(autodiff=false)), - Dict(:alg => KenCarp4(autodiff=false)), - Dict(:alg => Kvaerno5(autodiff=false)), - Dict(:alg => KenCarp5(autodiff=false)), - Dict(:alg => lsoda()), + Dict(:alg => RadauIIA5(autodiff = false)), + Dict(:alg => TRBDF2(autodiff = false)), + Dict(:alg => Kvaerno3(autodiff = false)), + Dict(:alg => KenCarp3(autodiff = false)), + Dict(:alg => Kvaerno4(autodiff = false)), + Dict(:alg => KenCarp4(autodiff = false)), + Dict(:alg => Kvaerno5(autodiff = false)), + Dict(:alg => KenCarp5(autodiff = false)), + Dict(:alg => lsoda()) ]; -wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol=test_sol, - maxiters=Int(1e6), verbose = false) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + maxiters = Int(1e6), verbose = false) plot(wp) ``` @@ -691,5 +698,5 @@ Sundials' `CVODE_BDF` does the best in this test. When the Jacobian is given, th ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/ComplicatedPDE/SpringBlockNonLinearResistance.jmd b/benchmarks/ComplicatedPDE/SpringBlockNonLinearResistance.jmd index 7ba74b359..5721bb811 100644 --- a/benchmarks/ComplicatedPDE/SpringBlockNonLinearResistance.jmd +++ b/benchmarks/ComplicatedPDE/SpringBlockNonLinearResistance.jmd @@ -2,31 +2,34 @@ title: Spring-Block PDE Work-Precision Diagrams author: Luis Munoz Heinen --- + see https://discourse.julialang.org/t/boundserror-on-odeproblem-accelerated-with-modelingtoolkit-jl + ```julia using OrdinaryDiffEq, Symbolics, ModelingToolkit, Sundials, LinearSolve, SparseArrays using NonlinearSolve using GaussianRandomFields using StableRNGs using DiffEqDevTools, RecursiveFactorization -using Plots; gr() - +using Plots; +gr() rng = StableRNG(3); #make the example reproducible #Function which defines the spatial distribution of Parameters -function get_parameterDistribution(xmin,xmax;l = 6,p = 3) +function get_parameterDistribution(xmin, xmax; l = 6, p = 3) #parameters vary from 'xmin' at the center to 'xmax' at the boundaries, over a number of blocks l, with p defining the order of the transition-curve - x = xmin .* ones(Ny,Nx); - [x[l-i+1:Ny-(l-i),l-i+1:Nx-(l-i)] .= (xmax-xmin)*(i-1)^p/(l-1)^p+xmin for i = l:-1:1] + x = xmin .* ones(Ny, Nx); + [x[(l - i + 1):(Ny - (l - i)), (l - i + 1):(Nx - (l - i))] .= (xmax-xmin)*(i-1)^p/(l-1)^p+xmin + for i in l:-1:1] return x end #Helper function to convert from vectorized form back to matrix implementation function vec2matrix(uvec) - m = zeros(Ny,Nx) + m = zeros(Ny, Nx) i = 1 - for x = 1:Nx - for y = 1:Ny - m[y,x] = uvec[i] + for x in 1:Nx + for y in 1:Ny + m[y, x] = uvec[i] i += 1 end end @@ -34,10 +37,10 @@ function vec2matrix(uvec) end #Helper function to convert initial conditions from vectorized form back to matrix implementation function convU0(uvec) - m = zeros(Ny,Nx,3) - m[:,:,1] = vec2matrix(uvec[1:Nx*Ny]) - m[:,:,2] = vec2matrix(uvec[Nx*Ny+1:2*Nx*Ny]) - m[:,:,3] = vec2matrix(uvec[2Nx*Ny+1:3*Nx*Ny]) + m = zeros(Ny, Nx, 3) + m[:, :, 1] = vec2matrix(uvec[1:(Nx * Ny)]) + m[:, :, 2] = vec2matrix(uvec[(Nx * Ny + 1):(2 * Nx * Ny)]) + m[:, :, 3] = vec2matrix(uvec[(2Nx * Ny + 1):(3 * Nx * Ny)]) return m end @@ -51,117 +54,149 @@ const m = 2.5; const v = 34*1e-3/(365*24*60*60); #stiffness const kp = 8.0; -const kc = 44.0; +const kc = 44.0; #resistance (rate and state type) const v0 = 1e-3; -const σn = [1.8y+46 for y in 1:Ny,x = 1:Nx]; +const σn = [1.8y+46 for y in 1:Ny, x in 1:Nx]; const τ0 = 0.4; -const Dc = get_parameterDistribution(0.004,1e2*0.004); +const Dc = get_parameterDistribution(0.004, 1e2*0.004); const a = 0.015; -const b = get_parameterDistribution(0.02,0.01); +const b = get_parameterDistribution(0.02, 0.01); -function f0(du,u,p,t) +function f0(du, u, p, t) #du+dθ----------------------------------------------------------------------- @inbounds for i in 1:Nx, j in 1:Ny - du[j,i,1] = @. u[j,i,2] - v - du[j,i,3] = @. 1.0 - u[j,i,2]*u[j,i,3]/Dc[j,i] + + du[j, i, 1] = @. u[j, i, 2] - v + du[j, i, 3] = @. 1.0 - u[j, i, 2]*u[j, i, 3]/Dc[j, i] end #dv-------------------------------------------------------------------------- - #inner blocks - @inbounds for i in 2:Nx-1, j in 2:Ny-1 - du[j,i,2] = @. 1/m*kc*(u[j,i+1,1]+u[j,i-1,1]+u[j+1,i,1]+u[j-1,i,1]-4*u[j,i,1]) - 1/m*kp*u[j,i,1] - 1/m*σn[j,i]*a*asinh(u[j,i,2]/2/v0*exp((τ0+b[j,i]*log(v0*abs(u[j,i,3])/Dc[j,i]))/a)) - end - #left right blocks - @inbounds for j in 2:Ny-1 - #first col - du[j,1,2] = @. 1/m*kc*(u[j,2,1]+u[j+1,1,1]+u[j-1,1,1]-3*u[j,1,1]) - 1/m*kp*u[j,1,1] - 1/m*σn[j,1]*a*asinh(u[j,1,2]/2/v0*exp((τ0+b[j,1]*log(v0*abs(u[j,1,3])/Dc[j,1]))/a)) - #right (last col) - du[j,Nx,2] = @. 1/m*kc*(u[j,Nx-1,1]+u[j+1,Nx,1]+u[j-1,Nx,1]-3*u[j,Nx,1]) - 1/m*kp*u[j,Nx,1] - 1/m*σn[j,Nx]*a*asinh(u[j,Nx,2]/2/v0*exp((τ0+b[j,Nx]*log(v0*abs(u[j,Nx,3])/Dc[j,Nx]))/a)) - end - #top bottom blocks - @inbounds for i in 2:Nx-1 - #top (first row) - du[1,i,2] = @. 1/m*kc*(u[1,i+1,1]+u[1,i-1,1]+u[2,i,1]-3*u[1,i,1]) - 1/m*kp*u[1,i,1] - 1/m*σn[1,i]*a*asinh(u[1,i,2]/2/v0*exp((τ0+b[1,i]*log(v0*abs(u[1,i,3])/Dc[1,i]))/a)) - #botoom (last row) - du[Ny,i,2] = @. 1/m*kc*(u[Ny,i+1,1]+u[Ny,i-1,1]+u[Ny-1,i,1]-3*u[Ny,i,1]) - 1/m*kp*u[Ny,i,1] - 1/m*σn[Ny,i]*a*asinh(u[Ny,i,2]/2/v0*exp((τ0+b[Ny,i]*log(v0*abs(u[Ny,i,3])/Dc[Ny,i]))/a)) - end - #Corner Blocks (closed loop) - @inbounds begin - du[1,1,2] = @. 1/m*kc*(u[1,2,1]+u[2,1,1]-2*u[1,1,1]) - 1/m*kp*u[1,1,1] - 1/m*σn[1,1]*a*asinh(u[1,1,2]/2/v0*exp((τ0+b[1,1]*log(v0*abs(u[1,1,3])/Dc[1,1]))/a)) - du[1,Nx,2] = @. 1/m*kc*(u[1,Nx-1,1]+u[2,Nx,1]-2*u[1,Nx,1]) - 1/m*kp*u[1,Nx,1] - 1/m*σn[1,Nx]*a*asinh(u[1,Nx,2]/2/v0*exp((τ0+b[1,Nx]*log(v0*abs(u[1,Nx,3])/Dc[1,Nx]))/a)) - du[Ny,1,2] = @. 1/m*kc*(u[Ny,2,1]+u[Ny-1,1,1]-2*u[Ny,1,1]) - 1/m*kp*u[Ny,1,1] - 1/m*σn[Ny,1]*a*asinh(u[Ny,1,2]/2/v0*exp((τ0+b[Ny,1]*log(v0*abs(u[Ny,1,3])/Dc[Ny,1]))/a)) - du[Ny,Nx,2] = @. 1/m*kc*(u[Ny,Nx-1,1]+u[Ny-1,Nx,1]-2*u[Ny,Nx,1]) - 1/m*kp*u[Ny,Nx,1] - 1/m*σn[Ny,Nx]*a*asinh(u[Ny,Nx,2]/2/v0*exp((τ0+b[Ny,Nx]*log(v0*abs(u[Ny,Nx,3])/Dc[Ny,Nx]))/a)) - end + #inner blocks + @inbounds for i in 2:(Nx - 1), j in 2:(Ny - 1) + + du[j, i, 2] = @. 1/m*kc*(u[j, i + 1, 1]+u[j, i - 1, 1]+u[j + 1, i, 1]+u[j - 1, i, 1]-4*u[j, i, 1]) - + 1/m*kp*u[j, i, 1] - + 1/m*σn[j, i]*a*asinh(u[j, i, 2]/2/v0*exp((τ0+b[j, i]*log(v0*abs(u[j, i, 3])/Dc[j, i]))/a)) + end + #left right blocks + @inbounds for j in 2:(Ny - 1) + #first col + du[j, 1, 2] = @. 1/m*kc*(u[j, 2, 1]+u[j + 1, 1, 1]+u[j - 1, 1, 1]-3*u[j, 1, 1]) - + 1/m*kp*u[j, 1, 1] - + 1/m*σn[j, 1]*a*asinh(u[j, 1, 2]/2/v0*exp((τ0+b[j, 1]*log(v0*abs(u[j, 1, 3])/Dc[j, 1]))/a)) + #right (last col) + du[j, Nx, 2] = @. 1/m*kc*(u[j, Nx - 1, 1]+u[j + 1, Nx, 1]+u[j - 1, Nx, 1]-3*u[j, Nx, 1]) - + 1/m*kp*u[j, Nx, 1] - + 1/m*σn[j, Nx]*a*asinh(u[j, Nx, 2]/2/v0*exp((τ0+b[j, Nx]*log(v0*abs(u[j, Nx, 3])/Dc[j, Nx]))/a)) + end + #top bottom blocks + @inbounds for i in 2:(Nx - 1) + #top (first row) + du[1, i, 2] = @. 1/m*kc*(u[1, i + 1, 1]+u[1, i - 1, 1]+u[2, i, 1]-3*u[1, i, 1]) - + 1/m*kp*u[1, i, 1] - + 1/m*σn[1, i]*a*asinh(u[1, i, 2]/2/v0*exp((τ0+b[1, i]*log(v0*abs(u[1, i, 3])/Dc[1, i]))/a)) + #botoom (last row) + du[Ny, i, 2] = @. 1/m*kc*(u[Ny, i + 1, 1]+u[Ny, i - 1, 1]+u[Ny - 1, i, 1]-3*u[Ny, i, 1]) - + 1/m*kp*u[Ny, i, 1] - + 1/m*σn[Ny, i]*a*asinh(u[Ny, i, 2]/2/v0*exp((τ0+b[Ny, i]*log(v0*abs(u[Ny, i, 3])/Dc[Ny, i]))/a)) + end + #Corner Blocks (closed loop) + @inbounds begin + du[1, 1, 2] = @. 1/m*kc*(u[1, 2, 1]+u[2, 1, 1]-2*u[1, 1, 1]) - 1/m*kp*u[1, 1, 1] - + 1/m*σn[1, 1]*a*asinh(u[1, 1, 2]/2/v0*exp((τ0+b[1, 1]*log(v0*abs(u[1, 1, 3])/Dc[1, 1]))/a)) + du[1, Nx, 2] = @. 1/m*kc*(u[1, Nx - 1, 1]+u[2, Nx, 1]-2*u[1, Nx, 1]) - + 1/m*kp*u[1, Nx, 1] - + 1/m*σn[1, Nx]*a*asinh(u[1, Nx, 2]/2/v0*exp((τ0+b[1, Nx]*log(v0*abs(u[1, Nx, 3])/Dc[1, Nx]))/a)) + du[Ny, 1, 2] = @. 1/m*kc*(u[Ny, 2, 1]+u[Ny - 1, 1, 1]-2*u[Ny, 1, 1]) - + 1/m*kp*u[Ny, 1, 1] - + 1/m*σn[Ny, 1]*a*asinh(u[Ny, 1, 2]/2/v0*exp((τ0+b[Ny, 1]*log(v0*abs(u[Ny, 1, 3])/Dc[Ny, 1]))/a)) + du[Ny, Nx, 2] = @. 1/m*kc*(u[Ny, Nx - 1, 1]+u[Ny - 1, Nx, 1]-2*u[Ny, Nx, 1]) - + 1/m*kp*u[Ny, Nx, 1] - + 1/m*σn[Ny, Nx]*a*asinh(u[ + Ny, Nx, 2]/2/v0*exp((τ0+b[Ny, Nx]*log(v0*abs(u[Ny, Nx, 3])/Dc[Ny, Nx]))/a)) + end end function get_IC() #derives initial conditions from equilibrium + perturbation of the initial position using GaussianRandomFields - probN = NonlinearProblem(f,input, nothing); - u0 = solve(probN, NewtonRaphson(), reltol = 1e-8,abstol = 1e-12).u; + probN = NonlinearProblem(f, input, nothing); + u0 = solve(probN, NewtonRaphson(), reltol = 1e-8, abstol = 1e-12).u; #smooth spatial perturbation (see GaussianRandomFields docs) cov = CovarianceFunction(2, Matern(20, 2)) - pts = range(1, stop=66, step=1/1) - grf = GaussianRandomField(cov, CirculantEmbedding(), pts, pts, minpadding=256) - rn = randn(rng,Int(1e7)) - s = GaussianRandomFields.sample(grf,xi = rn[1:randdim(grf)]) - u0[:,:,1] = (1.0.+0.001.-1e-7.*s[1:Ny,1:Nx]).*u0[:,:,1] #makes sure only forward acceleration takes place when launching the simulation + pts = range(1, stop = 66, step = 1/1) + grf = GaussianRandomField(cov, CirculantEmbedding(), pts, pts, minpadding = 256) + rn = randn(rng, Int(1e7)) + s = GaussianRandomFields.sample(grf, xi = rn[1:randdim(grf)]) + u0[:, :, 1] = (1.0 .+ 0.001 .- 1e-7 .* s[1:Ny, 1:Nx]) .* u0[:, :, 1] #makes sure only forward acceleration takes place when launching the simulation return u0 end -input = rand(Ny,Nx,3); +input = rand(Ny, Nx, 3); output = similar(input); -sparsity_pattern = Symbolics.jacobian_sparsity(f0,output,input,nothing,0.0); +sparsity_pattern = Symbolics.jacobian_sparsity(f0, output, input, nothing, 0.0); jac_sparsity = Float64.(sparse(sparsity_pattern)); -f = ODEFunction{true, SciMLBase.FullSpecialize}(f0;jac_prototype=jac_sparsity); +f = ODEFunction{true, SciMLBase.FullSpecialize}(f0; jac_prototype = jac_sparsity); #Callbacks-------------------------------------------------------------------------------------------------------------------- -is_start(u,t,integrator) = sum(abs.(integrator.u[Ny*Nx+1:2*Ny*Nx]))>0.01 #detects onset of high cumulative velocity phase -is_end(u,t,integrator) = sum(abs.(integrator.u[Ny*Nx+1:2*Ny*Nx]))<0.01 #detects end of high cumulative velocity phase +is_start(u, t, integrator) = sum(abs.(integrator.u[(Ny * Nx + 1):(2 * Ny * Nx)]))>0.01 #detects onset of high cumulative velocity phase +is_end(u, t, integrator) = sum(abs.(integrator.u[(Ny * Nx + 1):(2 * Ny * Nx)]))<0.01 #detects end of high cumulative velocity phase affect!(integrator) = terminate!(integrator) -cb1 = DiscreteCallback(is_start,terminate!,save_positions=(false,false)) -cb2 = DiscreteCallback(is_end,terminate!,save_positions=(false,false)) +cb1 = DiscreteCallback(is_start, terminate!, save_positions = (false, false)) +cb2 = DiscreteCallback(is_end, terminate!, save_positions = (false, false)) #Solver Setup------------------------------------------------------------------------------------------------------------------- -solver = KenCarp47(linsolve=KLUFactorization()); +solver = KenCarp47(linsolve = KLUFactorization()); abstol = 1e-12; reltol = 1e-8; u0 = get_IC(); -tspan = (0.0,1e9); -prob1 = ODEProblem(f,u0,tspan,nothing); +tspan = (0.0, 1e9); +prob1 = ODEProblem(f, u0, tspan, nothing); sys = modelingtoolkitize(prob1); sys_simplified = structural_simplify(sys) -prob_mtk1 = ODEProblem(sys_simplified,[],tspan,jac=true,sparse=true); -global sol,tcpu, bytes, gctime, memallocs = @timed solve(prob_mtk1,solver,reltol = reltol,abstol = abstol,maxiters = Int(1e12),save_everystep = false,dtmin = 1e-20,callback = cb1); #about 55 sec +prob_mtk1 = ODEProblem(sys_simplified, [], tspan, jac = true, sparse = true); +global sol, tcpu, +bytes, +gctime, +memallocs = @timed solve( + prob_mtk1, solver, reltol = reltol, abstol = abstol, maxiters = Int(1e12), + save_everystep = false, dtmin = 1e-20, callback = cb1); #about 55 sec u1 = sol.u[end]; t1 = sol.t[end]; test_sol1 = TestSolution(sol) #code (2): high cumulative velocity (>0.01) following phase (1) -tspan = (0.0,1e4); -prob2 = ODEProblem(f,convU0(u1),tspan,nothing); +tspan = (0.0, 1e4); +prob2 = ODEProblem(f, convU0(u1), tspan, nothing); sys2 = modelingtoolkitize(prob2); sys2_simplified = structural_simplify(sys2) -prob_mtk2 = ODEProblem(sys2_simplified,[],tspan,jac=true,sparse=true); -global sol,tcpu, bytes, gctime, memallocs = @timed solve(prob_mtk2,solver,reltol = reltol,abstol = abstol,maxiters = Int(1e12),save_everystep = false,dtmin = 1e-20,callback = cb2); #about 175 sec +prob_mtk2 = ODEProblem(sys2_simplified, [], tspan, jac = true, sparse = true); +global sol, tcpu, +bytes, +gctime, +memallocs = @timed solve( + prob_mtk2, solver, reltol = reltol, abstol = abstol, maxiters = Int(1e12), + save_everystep = false, dtmin = 1e-20, callback = cb2); #about 175 sec u2 = sol.u[end]; t2 = t1 + sol.t[end]; test_sol2 = TestSolution(sol) ``` + The WP diagram setup: + ```julia abstols = 1.0 ./ 10.0 .^ (6:12) reltols = 1.0 ./ 10.0 .^ (2:8) setups = [ - Dict(:alg=>KenCarp47(linsolve=KLUFactorization()), :prob_choice=>1), + Dict(:alg=>KenCarp47(linsolve = KLUFactorization()), :prob_choice=>1), Dict(:alg=>Rodas5(), :prob_choice=>1), - Dict(:alg=>Rodas5P(), :prob_choice=>1), + Dict(:alg=>Rodas5P(), :prob_choice=>1) ]; -names = ["KenCarp47 KLU MTK","Rodas5 KLU MTK","Rodas5P KLU MTK"] +names = ["KenCarp47 KLU MTK", "Rodas5 KLU MTK", "Rodas5P KLU MTK"] probs = [prob_mtk1, prob_mtk2] test_sols = [test_sol1, test_sol2] -wp = WorkPrecisionSet(probs, abstols, reltols, setups; names=names, - save_everystep=false, maxiters=Int(1e5), - numruns=10, appxsol=test_sols, callback = cb2, dtmin=1e-20) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; names = names, + save_everystep = false, maxiters = Int(1e5), + numruns = 10, appxsol = test_sols, callback = cb2, dtmin = 1e-20) -plot(wp, label = reduce(hcat, names), markershape=:auto, title="Spring Block PDE work precision set") +plot(wp, label = reduce(hcat, names), markershape = :auto, title = "Spring Block PDE work precision set") ``` diff --git a/benchmarks/DAE/ChemicalAkzoNobel.jmd b/benchmarks/DAE/ChemicalAkzoNobel.jmd index 88f4cc105..6ea964838 100644 --- a/benchmarks/DAE/ChemicalAkzoNobel.jmd +++ b/benchmarks/DAE/ChemicalAkzoNobel.jmd @@ -10,55 +10,53 @@ using LinearAlgebra using ModelingToolkit: t_nounits as t, D_nounits as D ModelingToolkit.@parameters begin - k₁=18.7 - k₂=0.58 - k₃=0.09 - k₄=0.42 - kbig=34.4 - kla=3.3 - ks=115.83 - po2=0.9 - hen=737 + k₁=18.7 + k₂=0.58 + k₃=0.09 + k₄=0.42 + kbig=34.4 + kla=3.3 + ks=115.83 + po2=0.9 + hen=737 end @variables begin - y₁(t) = 0.444 - y₂(t) = 0.00123 - y₃(t) = 0.0 - y₄(t) = 0.007 - y₅(t) = 1.0 - y₆(t) = 115.83*0.444*0.007 # ks*y₁*y₄ + y₁(t) = 0.444 + y₂(t) = 0.00123 + y₃(t) = 0.0 + y₄(t) = 0.007 + y₅(t) = 1.0 + y₆(t) = 115.83*0.444*0.007 # ks*y₁*y₄ end -r₁ = k₁ * (y₁^4.)*sqrt(abs(y₂)) -r₂ = k₂ * y₃ * y₄ -r₃ = k₂/kbig * y₁ * y₅ -r₄ = k₃*y₁*(y₄^2) -r₅ = k₄*(y₆^2)*sqrt(abs(y₂)) +r₁ = k₁ * (y₁^4.0) * sqrt(abs(y₂)) +r₂ = k₂ * y₃ * y₄ +r₃ = k₂/kbig * y₁ * y₅ +r₄ = k₃*y₁*(y₄^2) +r₅ = k₄*(y₆^2)*sqrt(abs(y₂)) fin = kla*(po2/hen-y₂) -eqs = [ - D(y₁) ~ -2. * r₁ + r₂ - r₃ - r₄ - D(y₂) ~ -0.5 * r₁ - r₄ - 0.5*r₅ + fin - D(y₃) ~ r₁ - r₂ + r₃ - D(y₄) ~ -r₂ + r₃ - 2. * r₄ - D(y₅) ~ r₂ - r₃ + r₅ - 0. ~ ks * y₁ * y₄ - y₆ -] +eqs = [D(y₁) ~ -2.0 * r₁ + r₂ - r₃ - r₄ + D(y₂) ~ -0.5 * r₁ - r₄ - 0.5*r₅ + fin + D(y₃) ~ r₁ - r₂ + r₃ + D(y₄) ~ -r₂ + r₃ - 2.0 * r₄ + D(y₅) ~ r₂ - r₃ + r₅ + 0.0 ~ ks * y₁ * y₄ - y₆] ModelingToolkit.@mtkbuild sys = ModelingToolkit.ODESystem(eqs, t) tspan = (0.0, 180.0) mtkprob = ODEProblem(sys, [], tspan) -sol = solve(mtkprob, Rodas4(),abstol=1/10^14,reltol=1/10^14) +sol = solve(mtkprob, Rodas4(), abstol = 1/10^14, reltol = 1/10^14) -odaeprob = ODAEProblem(sys,[],tspan) -ode_ref_sol = solve(odaeprob,CVODE_BDF(),abstol=1/10^14,reltol=1/10^14); +odaeprob = ODAEProblem(sys, [], tspan) +ode_ref_sol = solve(odaeprob, CVODE_BDF(), abstol = 1/10^14, reltol = 1/10^14); -du = mtkprob.f(mtkprob.u0,mtkprob.p,0.0) +du = mtkprob.f(mtkprob.u0, mtkprob.p, 0.0) du0 = D.(unknowns(sys)) .=> du -daeprob = DAEProblem(sys,du0,[],tspan) -ref_sol = solve(daeprob,IDA(),abstol=1/10^14,reltol=1/10^14); +daeprob = DAEProblem(sys, du0, [], tspan) +ref_sol = solve(daeprob, IDA(), abstol = 1/10^14, reltol = 1/10^14); function akzo(du, u, p, t) y₁, y₂, y₃, y₄, y₅, y₆ = u @@ -72,35 +70,35 @@ function akzo(du, u, p, t) po2=0.9 hen=737 - r₁ = k₁ * (y₁^4.)*sqrt(abs(y₂)) - r₂ = k₂ * y₃ * y₄ - r₃ = k₂/kbig * y₁ * y₅ - r₄ = k₃*y₁*(y₄^2) - r₅ = k₄*(y₆^2)*sqrt(abs(y₂)) + r₁ = k₁ * (y₁^4.0) * sqrt(abs(y₂)) + r₂ = k₂ * y₃ * y₄ + r₃ = k₂/kbig * y₁ * y₅ + r₄ = k₃*y₁*(y₄^2) + r₅ = k₄*(y₆^2)*sqrt(abs(y₂)) fin = kla*(po2/hen-y₂) - du[1] = -2. * r₁ + r₂ - r₃ - r₄ + du[1] = -2.0 * r₁ + r₂ - r₃ - r₄ du[2] = -0.5 * r₁ - r₄ - 0.5*r₅ + fin du[3] = r₁ - r₂ + r₃ - du[4] = -r₂ + r₃ - 2. * r₄ + du[4] = -r₂ + r₃ - 2.0 * r₄ du[5] = r₂ - r₃ + r₅ du[6] = ks * y₁ * y₄ - y₆ nothing end -M = Matrix{Float64}(I, 6,6); M[6,6] = 0; +M = Matrix{Float64}(I, 6, 6); +M[6, 6] = 0; mmf = ODEFunction(akzo, mass_matrix = M) -mmprob = ODEProblem(mmf, [0.444,0.00123,0.0,0.007,1.0,115.83*0.444*0.007], tspan) +mmprob = ODEProblem(mmf, [0.444, 0.00123, 0.0, 0.007, 1.0, 115.83*0.444*0.007], tspan) mm_refsol = solve(mmprob, Rodas5(), reltol = 1e-12, abstol = 1e-12) -probs = [mtkprob,daeprob,odaeprob,mmprob] -refs = [ref_sol,ref_sol,ode_ref_sol,mm_refsol]; +probs = [mtkprob, daeprob, odaeprob, mmprob] +refs = [ref_sol, ref_sol, ode_ref_sol, mm_refsol]; ``` ```julia -plot(ref_sol, idxs = [y₁,y₂,y₃,y₄,y₅,y₆]) +plot(ref_sol, idxs = [y₁, y₂, y₃, y₄, y₅, y₆]) ``` - ```julia plot(mm_refsol) ``` @@ -111,18 +109,18 @@ plot(mm_refsol) abstols = 1.0 ./ 10.0 .^ (5:8) reltols = 1.0 ./ 10.0 .^ (1:4); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>rodas()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>rodas()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()) ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -130,17 +128,17 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (6:8) reltols = 1.0 ./ 10.0 .^ (2:4); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 3, :alg=>Rosenbrock23()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>CVODE_BDF()), - Dict(:prob_choice => 3, :alg=>TRBDF2()), - Dict(:prob_choice => 3, :alg=>KenCarp4()), - Dict(:prob_choice => 4, :alg=>Rodas4()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 3, :alg=>Rosenbrock23()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>CVODE_BDF()), + Dict(:prob_choice => 3, :alg=>TRBDF2()), + Dict(:prob_choice => 3, :alg=>KenCarp4()), + Dict(:prob_choice => 4, :alg=>Rodas4()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -148,13 +146,13 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (6:8) reltols = 1.0 ./ 10.0 .^ (3:5); setups = [Dict(:prob_choice => 3, :alg=>Rosenbrock23()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 2, :alg=>DASSL.dassl()), - Dict(:prob_choice => 2, :alg=>DASKR.daskr()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASSL.dassl()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -164,17 +162,17 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (5:8) reltols = 1.0 ./ 10.0 .^ (1:4); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>rodas()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>rodas()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -182,16 +180,16 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (6:8) reltols = 1.0 ./ 10.0 .^ (2:4); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 3, :alg=>Rosenbrock23()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>CVODE_BDF()), - Dict(:prob_choice => 3, :alg=>TRBDF2()), - Dict(:prob_choice => 3, :alg=>KenCarp4()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 3, :alg=>Rosenbrock23()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>CVODE_BDF()), + Dict(:prob_choice => 3, :alg=>TRBDF2()), + Dict(:prob_choice => 3, :alg=>KenCarp4()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -204,29 +202,29 @@ abstols = 1.0 ./ 10.0 .^ (7:12) reltols = 1.0 ./ 10.0 .^ (4:9) setups = [Dict(:prob_choice => 1, :alg=>Rodas5()), - Dict(:prob_choice => 3, :alg=>Rodas5()), - Dict(:prob_choice => 4, :alg=>Rodas5()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 4, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>rodas()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 2, :alg=>DASKR.daskr()), - ] - -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 3, :alg=>Rodas5()), + Dict(:prob_choice => 4, :alg=>Rodas5()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 4, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>rodas()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] + +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -234,5 +232,5 @@ plot(wp) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/DAE/LinearDAE.jmd b/benchmarks/DAE/LinearDAE.jmd new file mode 100644 index 000000000..6c405f2d4 --- /dev/null +++ b/benchmarks/DAE/LinearDAE.jmd @@ -0,0 +1,592 @@ +--- +title: Linear Differential-Algebraic Equation (DAE) Work-Precision Diagrams +author: Chris Rackauckas +--- + +# Linear DAE Benchmarks + +This benchmark suite tests linear Differential-Algebraic Equations (DAEs) of different index levels derived from the ARCH-COMP 2018 benchmarks and the [DAEV repository](https://github.com/verivital/daev). All systems are implemented in the standard linear DAE form: + +**E * dx/dt = A * x + B * u** +**y = C * x** + +## References + +The benchmark systems are sourced from: + + 1. **ARCH-COMP 2018**: Frehse, G., et al. (2018). "ARCH-COMP18 Category Report: Continuous and Hybrid Systems with Linear Continuous Dynamics." *ARCH@ CPSWeek*, pp. 23-52. [Paper PDF](http://ceur-ws.org/Vol-2124/paper_2_archcomp18.pdf) + + 2. **DAEV Repository**: Verivital Lab. "Differential-Algebraic Equation Verification (DAEV) Benchmarks." GitHub repository: [https://github.com/verivital/daev](https://github.com/verivital/daev) + +## Benchmark Systems + +The suite includes: + + - **Index-1 DAEs**: RLC Circuit + - **Index-2 DAEs**: Two Interconnected Rotating Masses, RL Network + - **Index-3 DAEs**: Cart Pendulum, Electric Generator, Damped Mass-Spring System + +Each DAE is defined using both ModelingToolkit symbolic form and static array mass matrix form with physically meaningful time-dependent input functions. + +```julia +using OrdinaryDiffEq, DiffEqDevTools, Sundials, ModelingToolkit, ODEInterfaceDiffEq, + Plots, DASSL, DASKR, StaticArrays +using LinearAlgebra, SparseArrays +using ModelingToolkit: t_nounits as t, D_nounits as D +const SA = StaticArrays.SA + +# Common tolerances for reference solutions +abstol_ref = 1e-12 +reltol_ref = 1e-12 +``` + +## Index-1 DAE: RLC Circuit + +**System**: E*dx/dt = A*x + B*u, where x = [i_L, v_C, i_R, i_C] + +```julia +# RLC Circuit Parameters +L_rlc, C_rlc, R_rlc = 1e-3, 1e-6, 1e3 + +# System matrices from DAEV repository +E_rlc = [L_rlc 0 0 0 + 0 0 1 0 + 0 0 0 0 + 0 0 0 0] + +A_rlc = [0 1 0 0 + 1/C_rlc 0 0 0 + -R_rlc 0 0 1 + 0 1 1 1] + +B_rlc = [0; 0; 0; -1] +C_rlc = [1 0 0 0; 0 0 1 0] + +# ModelingToolkit formulation using E*Dx = A*x + B*u +@variables i_L(t)=0.0 v_C(t)=0.0 i_R(t)=0.0 i_C(t)=0.0 + +# State vector x and its derivative Dx +x = [i_L, v_C, i_R, i_C] +Dx = D.(x) + +# Input function: constant voltage source +u(t) = 1.0 + +# E*Dx = A*x + B*u +rlc_eqs = E_rlc * Dx ~ A_rlc * x + B_rlc .* u(t) + +@mtkbuild rlc_sys = ODESystem(rlc_eqs, t) + +# Problems using constant voltage input +rlc_prob = ODEProblem(rlc_sys, [i_R => 0.0, v_C => 0.0], (0.0, 1e-3)) +rlc_static_prob = ODEProblem{false}(rlc_sys, SA[i_R => 0.0, v_C => 0.0], (0.0, 1e-3)) +``` + +## Index-2 DAE: Two Interconnected Rotating Masses + +**System**: E*dx/dt = A*x + B*u, where x = [θ1, θ2, ω1, ω2] + +```julia +# Two Masses Parameters +J1_masses, J2_masses = 1.0, 1.0 + +# System matrices from DAEV repository +E_masses = [J1_masses 0 0 0 + 0 J2_masses 0 0 + 0 0 0 0 + 0 0 0 0] + +A_masses = [0 0 1 0 + 0 0 0 1 + 0 0 -1 -1 + -1 1 0 0] + +B_masses = [1 0; 0 1; 0 0; 0 0] +C_masses = [1 0 0 0; 0 0 1 0] + +# ModelingToolkit formulation using E*Dx = A*x + B*u +@variables θ1(t)=0.0 θ2(t)=0.0 ω1(t)=0.0 ω2(t)=0.0 + +# State vector x and its derivative Dx +x = [θ1, θ2, ω1, ω2] +Dx = D.(x) + +# Input functions: torque on first mass, sine wave on second +u1(t) = 1.0 # Constant torque on first mass +u2(t) = 0.5*sin(2π*t) # Sinusoidal torque on second mass +u(t) = [u1(t), u2(t)] + +# E*Dx = A*x + B*u +masses_eqs = E_masses * Dx ~ A_masses * x + B_masses * u(t) + +@mtkbuild masses_sys = ODESystem(masses_eqs, t) + +# Problems using torque inputs +masses_prob = ODEProblem(masses_sys, [], (0.0, 1.0)) +masses_static_prob = ODEProblem{false}(masses_sys, SA[], (0.0, 1.0)) +``` + +## Index-2 DAE: RL Network + +**System**: E*dx/dt = A*x + B*u, where x = [i1, i2, v_L] + +```julia +# RL Network Parameters +R_rl, L_rl = 1.0, 1.0 + +# System matrices from DAEV repository +E_rl = [0 0 0 + 0 0 0 + 0 0 L_rl] + +A_rl = [-R_rl R_rl 0 + R_rl -R_rl -1 + 0 1 0] + +B_rl = [1; 0; 0] +C_rl = [1 0 0] + +# ModelingToolkit formulation using E*Dx = A*x + B*u +@variables i1(t)=0.0 i2(t)=0.0 v_L(t)=0.0 + +# State vector x and its derivative Dx +x = [i1, i2, v_L] +Dx = D.(x) + +# Input function: step current source +u(t) = 1.0 + +# E*Dx = A*x + B*u +rl_eqs = E_rl * Dx ~ A_rl * x + B_rl .* u(t) + +@mtkbuild rl_sys = ODESystem(rl_eqs, t) + +# Problems using current source input +rl_prob = ODEProblem(rl_sys, [v_L => 1.0], (0.0, 1.0)) +rl_static_prob = ODEProblem{false}(rl_sys, SA[v_L => 1.0], (0.0, 1.0)) +``` + +## Index-3 DAE: Cart Pendulum + +**System**: E*dx/dt = A*x + B*u, where x = [x, y, φ, dx, dy, dφ, λ] + +```julia +# Cart Pendulum Parameters +m1_cart, m2_cart, L_cart, g_cart = 1.0, 1.0, 1.0, 9.81 + +# System matrices (linearized around equilibrium) +E_cart = [1.0 0 0 0 0 0 0 + 0 1.0 0 0 0 0 0 + 0 0 1.0 0 0 0 0 + 0 0 0 m1_cart 0 0 0 + 0 0 0 0 m2_cart 0 0 + 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0] + +A_cart = [0 0 0 1 0 0 0 + 0 0 0 0 1 0 0 + 0 0 0 0 0 1 0 + 0 0 0 0 0 0 1 + 0 0 0 0 0 0 1 + 0 0 -g_cart/L_cart 0 0 0 0 + 1 0 -L_cart 0 0 0 0] + +B_cart = [0; 0; 0; 1; 0; 0; 0] +C_cart = [1 0 0 0 0 0 0; 0 0 1 0 0 0 0] + +# ModelingToolkit formulation using E*Dx = A*x + B*u +@variables x_cart(t)=0.0 y_cart(t)=0.0 φ_cart(t)=0.1 +@variables dx_cart(t)=0.0 dy_cart(t)=0.0 dφ_cart(t)=0.0 λ_cart(t)=0.0 + +# State vector x and its derivative Dx +x = [x_cart, y_cart, φ_cart, dx_cart, dy_cart, dφ_cart, λ_cart] +Dx = D.(x) + +# Input function: step force input to stabilize the cart +u(t) = 1.0 * exp(-t) # Decaying force input + +# E*Dx = A*x + B*u +cart_eqs = E_cart * Dx ~ A_cart * x + B_cart .* u(t) + +@mtkbuild cart_sys = ODESystem(cart_eqs, t) + +# Problems using force input +cart_prob = ODEProblem(cart_sys, [dy_cart => 0.0, y_cart => 0.0], (0.0, 1.0)) +cart_static_prob = ODEProblem{false}(cart_sys, SA[dy_cart => 0.0, y_cart => 0.0], ( + 0.0, 1.0)) +``` + +## Index-3 DAE: Electric Generator + +**System**: E*dx/dt = A*x + B*u, where x = [ω, i1, i2, i3, φ1, φ2, φ3, v1, v2] + +```julia +# Electric Generator Parameters +J_gen, L_gen, R1_gen, R2_gen, k_gen = 1.0, 1.0, 1.0, 1.0, 1.0 + +# System matrices (simplified 4x4 version) +E_gen = [J_gen 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0] + +A_gen = [0 0 0 0 + 0 0 0 1 + 0 0 0 -R2_gen + 0 -k_gen 1 0] + +B_gen = [1; 0; 0; 0] +C_gen = [1 0 0 0; 0 0 0 1] + +# ModelingToolkit formulation using E*Dx = A*x + B*u +@variables ω_gen(t)=1.0 i_gen(t)=0.0 v1_gen(t)=0.0 v2_gen(t)=0.0 + +# State vector x and its derivative Dx +x = [ω_gen, i_gen, v1_gen, v2_gen] +Dx = D.(x) + +# Input function: variable torque input +u(t) = 1.0 + 0.5*cos(2π*t) # Oscillating torque + +# E*Dx = A*x + B*u +gen_eqs = E_gen * Dx ~ A_gen * x + B_gen .* u(t) + +@mtkbuild gen_sys = ODESystem(gen_eqs, t) + +# Problems using torque input +gen_prob = ODEProblem(gen_sys, [ω_gen => 1.0], (0.0, 1.0)) +gen_static_prob = ODEProblem{false}(gen_sys, SA[ω_gen => 1.0], (0.0, 1.0)) +``` + +## Index-3 DAE: Damped Mass-Spring System + +**System**: E*dx/dt = A*x + B*u, where x = [x1, x2, x3, v1, v2, v3, λ] + +```julia +# Mass-Spring Parameters (3 masses) +m_spring, k_spring, d_spring = 100.0, 2.0, 5.0 + +# System matrices +E_spring = [m_spring 0 0 0 0 0 0 + 0 m_spring 0 0 0 0 0 + 0 0 m_spring 0 0 0 0 + 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0] + +A_spring = [0 0 0 1 0 0 0 + 0 0 0 0 1 0 0 + 0 0 0 0 0 1 0 + -k_spring k_spring 0 -d_spring d_spring 0 1 + k_spring -2*k_spring k_spring d_spring -2*d_spring d_spring 0 + 0 k_spring -k_spring 0 d_spring -d_spring 1 + 1 0 -1 0 0 0 0] + +B_spring = [0; 0; 0; 1; 0; 0; 0] +C_spring = [1 0 0 0 0 0 0; 0 0 1 0 0 0 0] + +# Simplified 5x5 system matrices (2 masses + constraint) +E_spring_5 = [1.0 0 0 0 0 + 0 1.0 0 0 0 + 0 0 m_spring 0 0 + 0 0 0 m_spring 0 + 0 0 0 0 0] + +A_spring_5 = [0 0 1 0 0 + 0 0 0 1 0 + -k_spring 0 -d_spring 0 1 + k_spring -k_spring d_spring -d_spring -1 + 1 -1 0 0 0] + +B_spring_5 = [0; 0; 1; 0; 0] +C_spring_5 = [1 0 0 0 0; 0 1 0 0 0] + +# ModelingToolkit formulation using E*Dx = A*x + B*u +@variables x1_spring(t)=0.0 x2_spring(t)=0.0 v1_spring(t)=0.0 v2_spring(t)=0.0 λ_spring(t)=0.0 + +# State vector x and its derivative Dx +x = [x1_spring, x2_spring, v1_spring, v2_spring, λ_spring] +Dx = D.(x) + +# Input function: impulse force followed by decay +u(t) = ifelse((t < 0.1), 10.0, 0.1*exp(-5*t)) # Initial impulse then decay + +# E*Dx = A*x + B*u +spring_eqs = E_spring_5 * Dx ~ A_spring_5 * x + B_spring_5 .* u(t) + +@mtkbuild spring_sys = ODESystem(spring_eqs, t) + +# Problems using force input +spring_prob = ODEProblem(spring_sys, [λ_spring => 0.0, v1_spring => 1.0], (0.0, 20.0)) +spring_static_prob = ODEProblem{false}(spring_sys, SA[λ_spring => 0.0, v1_spring => 1.0], ( + 0.0, 20.0)) +``` + +## Generate Reference Solutions + +```julia +# Generate reference solutions for all systems using robust methods +rlc_ref = solve(rlc_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) +rlc_static_ref = solve(rlc_static_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) + +masses_ref = solve(masses_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) +masses_static_ref = solve(masses_static_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) + +rl_ref = solve(rl_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) +rl_static_ref = solve(rl_static_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) + +cart_ref = solve(cart_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) +cart_static_ref = solve(cart_static_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) + +gen_ref = solve(gen_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) +gen_static_ref = solve(gen_static_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) + +spring_ref = solve(spring_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) +spring_static_ref = solve(spring_static_prob, Rodas5P(), abstol = abstol_ref, reltol = reltol_ref) + +# Problem and reference solution arrays +all_probs = [ + # Index-1: RLC Circuit + [rlc_prob, rlc_static_prob], + # Index-2: Two Masses and RL Network + [masses_prob, masses_static_prob], + [rl_prob, rl_static_prob], + # Index-3: Cart, Generator, Spring + [cart_prob, cart_static_prob], + [gen_prob, gen_static_prob], + [spring_prob, spring_static_prob] +] + +all_refs = [ + [rlc_ref, rlc_static_ref], + [masses_ref, masses_static_ref], + [rl_ref, rl_static_ref], + [cart_ref, cart_static_ref], + [gen_ref, gen_static_ref], + [spring_ref, spring_static_ref] +] + +system_names = ["RLC Circuit (Index-1)", "Two Masses (Index-2)", "RL Network (Index-2)", + "Cart Pendulum (Index-3)", "Electric Generator (Index-3)", "Mass-Spring (Index-3)"] +``` + +## Visualize Solutions + +```julia +# Plot solutions for each system +p1 = plot(rlc_ref, title = "RLC Circuit", legend = :topright) +p2 = plot(masses_ref, title = "Two Masses", legend = :topright) +p3 = plot(rl_ref, title = "RL Network", legend = :topright) +plot(p1, p2, p3, layout = (1, 3), size = (1200, 400)) +``` + +```julia +p4 = plot(cart_ref, title = "Cart Pendulum", legend = :topright) +p5 = plot(gen_ref, title = "Electric Generator", legend = :topright) +p6 = plot(spring_ref, title = "Mass-Spring", legend = :topright) +plot(p4, p5, p6, layout = (1, 3), size = (1200, 400)) +``` + +## Work-Precision Benchmarks + +### Index-1 DAE: RLC Circuit + +```julia +abstols = 1.0 ./ 10.0 .^ (5:8) +reltols = 1.0 ./ 10.0 .^ (1:4) + +# RLC Circuit Work-Precision +setups_rlc = [ + Dict(:prob_choice => 1, :alg=>Rosenbrock23()), + Dict(:prob_choice => 1, :alg=>Rodas5P()), + Dict(:prob_choice => 1, :alg=>CVODE_BDF()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 2, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>Rodas5P()) +] + +wp_rlc = WorkPrecisionSet(all_probs[1], abstols, reltols, setups_rlc; + save_everystep = false, appxsol = all_refs[1], maxiters = Int(1e5), numruns = 10) +plot(wp_rlc, title = "RLC Circuit (Index-1) Work-Precision") +``` + +### Index-2 DAE: Two Interconnected Masses + +```julia +setups_masses = [ + #Dict(:prob_choice => 2, :alg=>Rosenbrock23()), + Dict(:prob_choice => 1, :alg=>Rodas5P()), + #Dict(:prob_choice => 1, :alg=>CVODE_BDF()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 2, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>Rodas5P()) +] + +wp_masses = WorkPrecisionSet(all_probs[2], abstols, reltols, setups_masses; + save_everystep = false, appxsol = all_refs[2], maxiters = Int(1e5), numruns = 10) +plot(wp_masses, title = "Two Masses (Index-2) Work-Precision") +``` + +### Index-2 DAE: RL Network + +```julia +#= +setups_rl = [ + Dict(:prob_choice => 1, :alg=>Rosenbrock23()), + Dict(:prob_choice => 1, :alg=>Rodas5P()), + #Dict(:prob_choice => 1, :alg=>CVODE_BDF()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 2, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>Rodas5P()), +] + +wp_rl = WorkPrecisionSet(all_probs[3], abstols, reltols, setups_rl; + save_everystep=false, appxsol=all_refs[3], maxiters=Int(1e5), numruns=10) +plot(wp_rl, title="RL Network (Index-2) Work-Precision") +=# +``` + +### Index-3 DAE: Cart Pendulum + +```julia +setups_cart = [ + Dict(:prob_choice => 1, :alg=>Rosenbrock23()), + Dict(:prob_choice => 1, :alg=>Rodas5P()), + #Dict(:prob_choice => 1, :alg=>CVODE_BDF()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 2, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>Rodas5P()) +] + +wp_cart = WorkPrecisionSet(all_probs[4], abstols, reltols, setups_cart; + save_everystep = false, appxsol = all_refs[4], maxiters = Int(1e5), numruns = 10) +plot(wp_cart, title = "Cart Pendulum (Index-3) Work-Precision") +``` + +### Index-3 DAE: Electric Generator + +```julia +setups_gen = [ + Dict(:prob_choice => 1, :alg=>Rosenbrock23()), + Dict(:prob_choice => 1, :alg=>Rodas5P()), + Dict(:prob_choice => 1, :alg=>CVODE_BDF()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 2, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>Rodas5P()) +] + +wp_gen = WorkPrecisionSet(all_probs[5], abstols, reltols, setups_gen; + save_everystep = false, appxsol = all_refs[5], maxiters = Int(1e5), numruns = 10) +plot(wp_gen, title = "Electric Generator (Index-3) Work-Precision") +``` + +### Index-3 DAE: Damped Mass-Spring System + +```julia +setups_spring = [ + Dict(:prob_choice => 1, :alg=>Rosenbrock23()), + Dict(:prob_choice => 1, :alg=>Rodas5P()), + #Dict(:prob_choice => 1, :alg=>CVODE_BDF()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 2, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>Rodas5P()) +] + +wp_spring = WorkPrecisionSet(all_probs[6], abstols, reltols, setups_spring; + save_everystep = false, appxsol = all_refs[6], maxiters = Int(1e5), numruns = 10) +plot(wp_spring, title = "Mass-Spring (Index-3) Work-Precision") +``` + +## Low Tolerances Analysis + +```julia +abstols_low = 1.0 ./ 10.0 .^ (7:12) +reltols_low = 1.0 ./ 10.0 .^ (4:9) + +all_setups = [ + Dict(:prob_choice => 1, :alg=>Rosenbrock23()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>Rodas5P()), + #Dict(:prob_choice => 1, :alg=>CVODE_BDF()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 2, :alg=>Rodas5P()) +] + +# Generate work-precision plots for all systems at low tolerances +for (i, (probs, refs, name)) in enumerate(zip(all_probs, all_refs, system_names)) + wp = WorkPrecisionSet(probs, abstols_low, reltols_low, all_setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) + p = plot(wp, title = "$name - Low Tolerances") + display(p) +end +``` + +## High Tolerances Analysis + +This measures performance when just needing a reasonable answer quickly. + +```julia +abstols_high = 1.0 ./ 10.0 .^ (3:6) +reltols_high = 1.0 ./ 10.0 .^ (1:4) + +# High tolerance setups - focus on speed +high_setups = [ + Dict(:prob_choice => 1, :alg=>Rosenbrock23()), + Dict(:prob_choice => 1, :alg=>Rodas5P()), + #Dict(:prob_choice => 1, :alg=>CVODE_BDF()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 2, :alg=>Rodas5P()) +] + +for (i, (probs, refs, name)) in enumerate(zip(all_probs, all_refs, system_names)) + wp = WorkPrecisionSet(probs, abstols_high, reltols_high, high_setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) + p = plot(wp, title = "$name - High Tolerances") + display(p) +end +``` + +## Summary Comparison + +```julia +# Create summary comparison of all DAE types +plot_array = [] +for (i, (probs, refs, name)) in enumerate(zip(all_probs, all_refs, system_names)) + wp = WorkPrecisionSet(probs, abstols, reltols, all_setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) + p = plot(wp, title = name, legend = false, titlefont = font(10)) + push!(plot_array, p) +end + +plot(plot_array..., layout = (2, 3), size = (1500, 800)) +``` + +## Timeseries Error Analysis + +```julia +# Analyze L2 timeseries errors +abstols_ts = 1.0 ./ 10.0 .^ (5:8) +reltols_ts = 1.0 ./ 10.0 .^ (2:5) + +for (i, (probs, refs, name)) in enumerate(zip(all_probs, all_refs, system_names)) + wp = WorkPrecisionSet(probs, abstols_ts, reltols_ts, all_setups; + error_estimate = :l2, save_everystep = false, appxsol = refs, + maxiters = Int(1e5), numruns = 10) + p = plot(wp, title = "$name - L2 Timeseries Error") + display(p) +end +``` + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/DAE/Manifest.toml b/benchmarks/DAE/Manifest.toml index 4992c6862..b46811371 100644 --- a/benchmarks/DAE/Manifest.toml +++ b/benchmarks/DAE/Manifest.toml @@ -1,17 +1,18 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.4" +julia_version = "1.10.10" manifest_format = "2.0" -project_hash = "afa21b39a2dee2ce43040871314d41c05747e464" +project_hash = "41f4ae13915c6f109b901896e1518b3bd9d6a95a" [[deps.ADTypes]] -git-tree-sha1 = "878aee357e230c375cc531952933889cbf9e9314" +git-tree-sha1 = "be7ae030256b8ef14a441726c4c37766b90b93a3" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "1.6.0" -weakdeps = ["ChainRulesCore", "EnzymeCore"] +version = "1.15.0" +weakdeps = ["ChainRulesCore", "ConstructionBase", "EnzymeCore"] [deps.ADTypes.extensions] ADTypesChainRulesCoreExt = "ChainRulesCore" + ADTypesConstructionBaseExt = "ConstructionBase" ADTypesEnzymeCoreExt = "EnzymeCore" [[deps.AbstractTrees]] @@ -20,34 +21,38 @@ uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" version = "0.4.5" [[deps.Accessors]] -deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown", "Test"] -git-tree-sha1 = "c0d491ef0b135fd7d63cbc6404286bc633329425" +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" -version = "0.1.36" +version = "0.1.42" [deps.Accessors.extensions] - AccessorsAxisKeysExt = "AxisKeys" - AccessorsIntervalSetsExt = "IntervalSets" - AccessorsStaticArraysExt = "StaticArrays" - AccessorsStructArraysExt = "StructArrays" - AccessorsUnitfulExt = "Unitful" + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" [deps.Accessors.weakdeps] AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - Requires = "ae029012-a4dd-5104-9daa-d747884805df" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "6a55b747d1812e699320963ffde36f1ebdda4099" +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.0.4" -weakdeps = ["StaticArrays"] +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" AdaptStaticArraysExt = "StaticArrays" [[deps.AliasTables]] @@ -67,19 +72,21 @@ uuid = "ec485272-7323-5ecc-a04f-4719b315124d" version = "0.4.0" [[deps.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "5c9b74c973181571deb6442d41e5c902e6b9f38e" +deps = ["Adapt", "LinearAlgebra"] +git-tree-sha1 = "9606d7832795cbef89e06a550475be300364a8aa" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.12.0" +version = "7.19.0" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" ArrayInterfaceCUDAExt = "CUDA" ArrayInterfaceCUDSSExt = "CUDSS" + ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" ArrayInterfaceChainRulesExt = "ChainRules" ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" ArrayInterfaceReverseDiffExt = "ReverseDiff" + ArrayInterfaceSparseArraysExt = "SparseArrays" ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" ArrayInterfaceTrackerExt = "Tracker" @@ -89,16 +96,18 @@ version = "7.12.0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" [[deps.ArrayLayouts]] deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "ce2ca959f932f5dad70697dd93133d1167cf1e4e" +git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.10.2" +version = "1.11.1" weakdeps = ["SparseArrays"] [deps.ArrayLayouts.extensions] @@ -111,9 +120,9 @@ uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[deps.Bijections]] -git-tree-sha1 = "95f5c7e2d177b7ba1a240b0518038b975d72a8c0" +git-tree-sha1 = "a2d308fcd4c2fb90e943cf9cd2fbfa9c32b69733" uuid = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04" -version = "0.1.7" +version = "0.2.2" [[deps.BitFlags]] git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" @@ -126,11 +135,36 @@ git-tree-sha1 = "f21cfd4950cb9f0587d5067e69405ad2acd27b87" uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" version = "0.1.6" +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "a8c0f363186263d75e97a41878d10dd842797561" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "1.6.3" + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" + + [deps.BlockArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + +[[deps.BracketingNonlinearSolve]] +deps = ["CommonSolve", "ConcreteStructs", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "a9014924595b7a2c1dd14aac516e38fa10ada656" +uuid = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e" +version = "1.3.0" +weakdeps = ["ChainRulesCore", "ForwardDiff"] + + [deps.BracketingNonlinearSolve.extensions] + BracketingNonlinearSolveChainRulesCoreExt = ["ChainRulesCore", "ForwardDiff"] + BracketingNonlinearSolveForwardDiffExt = "ForwardDiff" + [[deps.Bzip2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1b96ea4a01afe0ea4090c5c8039690672dd13f2e" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.8+1" +version = "1.0.9+0" [[deps.CEnum]] git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" @@ -143,29 +177,17 @@ git-tree-sha1 = "5a97e67919535d6841172016c9530fd69494e5ec" uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" version = "0.2.6" -[[deps.CSTParser]] -deps = ["Tokenize"] -git-tree-sha1 = "0157e592151e39fa570645e2b2debcdfb8a0f112" -uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f" -version = "3.4.3" - [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "a2f1c8c668c8e3cb4cca4e57a8efdb09067bb3fd" +git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.0+2" - -[[deps.Calculus]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" -uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" -version = "0.5.1" +version = "1.18.5+0" [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "71acdbf594aab5bbb2cec89b208c41b4c411e49f" +git-tree-sha1 = "06ee8d1aa558d2833aa799f6f0b31b30cada405f" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.24.0" +version = "1.25.2" weakdeps = ["SparseArrays"] [deps.ChainRulesCore.extensions] @@ -179,27 +201,33 @@ version = "0.1.13" [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "b8fe8546d52ca154ac556809e10c75e6e7430ac8" +git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.5" +version = "0.7.8" [[deps.ColorSchemes]] deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] -git-tree-sha1 = "4b270d6465eb21ae89b732182c20dc165f8bf9f2" +git-tree-sha1 = "a656525c8b46aa6a1c76891552ed5381bb32ae7b" uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -version = "3.25.0" +version = "3.30.0" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "b10d0b65641d57b8b4d5e234446582de5047050d" +git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.11.5" +version = "0.12.1" + + [deps.ColorTypes.extensions] + StyledStringsExt = "StyledStrings" + + [deps.ColorTypes.weakdeps] + StyledStrings = "f489334b-da3d-4c2e-b8f0-e476e12c162b" [[deps.ColorVectorSpace]] deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] -git-tree-sha1 = "a1f44953f2382ebb937d60dafbe2deea4bd23249" +git-tree-sha1 = "8b3b6f87ce8f65a2b4f857528fd8d70086cd72b1" uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" -version = "0.10.0" +version = "0.11.0" weakdeps = ["SpecialFunctions"] [deps.ColorVectorSpace.extensions] @@ -207,20 +235,20 @@ weakdeps = ["SpecialFunctions"] [[deps.Colors]] deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "362a287c3aa50601b0bc359053d5c2468f0e7ce0" +git-tree-sha1 = "37ea44092930b1811e666c3bc38065d7d87fcc74" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.12.11" +version = "0.13.1" [[deps.Combinatorics]] -git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +git-tree-sha1 = "8010b6bb3388abe68d95743dcbea77650bb2eddf" uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -version = "1.0.2" +version = "1.0.3" [[deps.CommonMark]] -deps = ["Crayons", "JSON", "PrecompileTools", "URIs"] -git-tree-sha1 = "532c4185d3c9037c0237546d817858b23cf9e071" +deps = ["PrecompileTools"] +git-tree-sha1 = "351d6f4eaf273b753001b2de4dffb8279b100769" uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" -version = "0.8.12" +version = "0.9.1" [[deps.CommonSolve]] git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" @@ -228,10 +256,10 @@ uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" version = "0.2.4" [[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" +version = "0.3.1" [[deps.CommonWorldInvalidations]] git-tree-sha1 = "ae52d1c52048455e85a387fbee9be553ec2b68d0" @@ -240,9 +268,9 @@ version = "1.0.0" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" +git-tree-sha1 = "3a3dfb30697e96a440e4149c8c51bf32f818c0f3" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.15.0" +version = "4.17.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -274,9 +302,9 @@ version = "0.2.3" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] -git-tree-sha1 = "ea32b83ca4fefa1768dc84e504cc0a94fb1ab8d1" +git-tree-sha1 = "d9d26935a0bcffc87d2613ce14c527c99fc543fd" uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.4.2" +version = "2.5.0" [[deps.Conda]] deps = ["Downloads", "JSON", "VersionParsing"] @@ -285,14 +313,14 @@ uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" version = "1.10.2" [[deps.ConstructionBase]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "260fd2400ed2dab602a7c15cf10c1933c59930a2" +git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.5" -weakdeps = ["IntervalSets", "StaticArrays"] +version = "1.6.0" +weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] [deps.ConstructionBase.extensions] ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" ConstructionBaseStaticArraysExt = "StaticArrays" [[deps.Contour]] @@ -336,9 +364,9 @@ version = "1.16.0" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82" +git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.20" +version = "0.18.22" [[deps.DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -349,6 +377,12 @@ version = "1.0.0" deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +[[deps.Dbus_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "473e9afc9cf30814eb67ffa5f2db7df82c3ad9fd" +uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" +version = "1.16.2+0" + [[deps.DelimitedFiles]] deps = ["Mmap"] git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" @@ -356,21 +390,25 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" version = "1.9.1" [[deps.DiffEqBase]] -deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces"] -git-tree-sha1 = "d1e8a4642e28b0945bde6e2e1ac569b9e0abd728" +deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "e263203658fe1ad956c0e343c419e8d54bdbb2fc" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.151.5" +version = "6.177.1" [deps.DiffEqBase.extensions] DiffEqBaseCUDAExt = "CUDA" DiffEqBaseChainRulesCoreExt = "ChainRulesCore" DiffEqBaseDistributionsExt = "Distributions" DiffEqBaseEnzymeExt = ["ChainRulesCore", "Enzyme"] + DiffEqBaseForwardDiffExt = ["ForwardDiff"] + DiffEqBaseGTPSAExt = "GTPSA" DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" DiffEqBaseMPIExt = "MPI" DiffEqBaseMeasurementsExt = "Measurements" DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseMooncakeExt = "Mooncake" DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseSparseArraysExt = "SparseArrays" DiffEqBaseTrackerExt = "Tracker" DiffEqBaseUnitfulExt = "Unitful" @@ -379,32 +417,35 @@ version = "6.151.5" ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.DiffEqCallbacks]] -deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "Functors", "LinearAlgebra", "Markdown", "NonlinearSolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "c959cfd2657d16beada157a74d52269e8556500e" +deps = ["ConcreteStructs", "DataStructures", "DiffEqBase", "DifferentiationInterface", "Functors", "LinearAlgebra", "Markdown", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "80a782f3e65d4900dcf5f2cb71f5e19d9459c04a" uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" -version = "3.6.2" -weakdeps = ["OrdinaryDiffEq", "Sundials"] +version = "4.8.0" [[deps.DiffEqDevTools]] deps = ["DiffEqBase", "DiffEqNoiseProcess", "Distributed", "LinearAlgebra", "Logging", "NLsolve", "RecipesBase", "RecursiveArrayTools", "RootedTrees", "SciMLBase", "Statistics", "StructArrays"] -git-tree-sha1 = "1ef06439e495f5f8a51bbb08547e273bb63cbbbe" +git-tree-sha1 = "53aa030c02c786270542debbb577b53f6383796b" uuid = "f3b72e0c-5b89-59e1-b016-84e28bfd966d" -version = "2.44.4" +version = "2.48.0" [[deps.DiffEqNoiseProcess]] -deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "Requires", "ResettableStacks", "SciMLBase", "StaticArraysCore", "Statistics"] -git-tree-sha1 = "ed0158e758723b4d429afbbb5d98c5afd3458dc1" +deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "ResettableStacks", "SciMLBase", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "516d553f5deee7c55b2945b5edf05b6542837887" uuid = "77a26b50-5914-5dd7-bc55-306e6241c503" -version = "5.22.0" +version = "5.24.1" [deps.DiffEqNoiseProcess.extensions] DiffEqNoiseProcessReverseDiffExt = "ReverseDiff" @@ -425,46 +466,71 @@ uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" version = "1.15.1" [[deps.DifferentiationInterface]] -deps = ["ADTypes", "Compat", "DocStringExtensions", "FillArrays", "LinearAlgebra", "PackageExtensionCompat", "SparseArrays", "SparseMatrixColorings"] -git-tree-sha1 = "c81579b549a00edf31582d318fec06523e0b607a" +deps = ["ADTypes", "LinearAlgebra"] +git-tree-sha1 = "c8d85ecfcbaef899308706bebdd8b00107f3fb43" uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.5.9" +version = "0.6.54" [deps.DifferentiationInterface.extensions] DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" DifferentiationInterfaceDiffractorExt = "Diffractor" - DifferentiationInterfaceEnzymeExt = "Enzyme" + DifferentiationInterfaceEnzymeExt = ["EnzymeCore", "Enzyme"] DifferentiationInterfaceFastDifferentiationExt = "FastDifferentiation" DifferentiationInterfaceFiniteDiffExt = "FiniteDiff" DifferentiationInterfaceFiniteDifferencesExt = "FiniteDifferences" - DifferentiationInterfaceForwardDiffExt = "ForwardDiff" - DifferentiationInterfacePolyesterForwardDiffExt = "PolyesterForwardDiff" - DifferentiationInterfaceReverseDiffExt = "ReverseDiff" + DifferentiationInterfaceForwardDiffExt = ["ForwardDiff", "DiffResults"] + DifferentiationInterfaceGPUArraysCoreExt = "GPUArraysCore" + DifferentiationInterfaceGTPSAExt = "GTPSA" + DifferentiationInterfaceMooncakeExt = "Mooncake" + DifferentiationInterfacePolyesterForwardDiffExt = ["PolyesterForwardDiff", "ForwardDiff", "DiffResults"] + DifferentiationInterfaceReverseDiffExt = ["ReverseDiff", "DiffResults"] + DifferentiationInterfaceSparseArraysExt = "SparseArrays" + DifferentiationInterfaceSparseConnectivityTracerExt = "SparseConnectivityTracer" + DifferentiationInterfaceSparseMatrixColoringsExt = "SparseMatrixColorings" + DifferentiationInterfaceStaticArraysExt = "StaticArrays" DifferentiationInterfaceSymbolicsExt = "Symbolics" - DifferentiationInterfaceTapirExt = "Tapir" DifferentiationInterfaceTrackerExt = "Tracker" DifferentiationInterfaceZygoteExt = ["Zygote", "ForwardDiff"] [deps.DifferentiationInterface.weakdeps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" Diffractor = "9f5e2b26-1114-432f-b630-d3fe2085c51c" Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" FastDifferentiation = "eb9bf01b-bf85-4b60-bf87-ee5de06c00be" FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" + SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" - Tapir = "07d77754-e150-4737-8c94-cd238a1fb45b" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" +[[deps.DispatchDoctor]] +deps = ["MacroTools", "Preferences"] +git-tree-sha1 = "fc34127e78323c49984e1a146d577d0f890dd2b4" +uuid = "8d63f2c5-f18a-4cf2-ba9d-b3f60fc568c8" +version = "0.4.26" +weakdeps = ["ChainRulesCore", "EnzymeCore"] + + [deps.DispatchDoctor.extensions] + DispatchDoctorChainRulesCoreExt = "ChainRulesCore" + DispatchDoctorEnzymeCoreExt = "EnzymeCore" + [[deps.Distances]] deps = ["LinearAlgebra", "Statistics", "StatsAPI"] -git-tree-sha1 = "66c4c81f259586e8f002eacebc177e1fb06363b0" +git-tree-sha1 = "c7e3a542b999843086e2f29dac96a618c105be1d" uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -version = "0.10.11" +version = "0.10.12" weakdeps = ["ChainRulesCore", "SparseArrays"] [deps.Distances.extensions] @@ -477,9 +543,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "9c405847cc7ecda2dc921ccf18b47ca150d7317e" +git-tree-sha1 = "3e6d038b77f22791b8e3472b7c633acea1ecac06" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.109" +version = "0.25.120" [deps.Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" @@ -492,16 +558,15 @@ version = "0.25.109" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.3" +version = "0.9.5" [[deps.DomainSets]] deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "Random", "StaticArrays"] -git-tree-sha1 = "490392af2c7d63183bfa2c8aaa6ab981c5ba7561" +git-tree-sha1 = "a7e9f13f33652c533d49868a534bfb2050d1365f" uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" -version = "0.7.14" +version = "0.7.15" [deps.DomainSets.extensions] DomainSetsMakieExt = "Makie" @@ -514,23 +579,17 @@ deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.6.0" -[[deps.DualNumbers]] -deps = ["Calculus", "NaNMath", "SpecialFunctions"] -git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" -uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" -version = "0.6.8" - [[deps.DynamicPolynomials]] -deps = ["Future", "LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Pkg", "Reexport", "Test"] -git-tree-sha1 = "30a1848c4f4fc35d1d4bbbd125650f6a11b5bc6c" +deps = ["Future", "LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Reexport", "Test"] +git-tree-sha1 = "98c4bb95af37e5d980129261fdd6dab0392c6607" uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07" -version = "0.5.7" +version = "0.6.2" [[deps.DynamicQuantities]] -deps = ["Compat", "PackageExtensionCompat", "Tricks"] -git-tree-sha1 = "412b25c7d99ec6b06967d315c7b29bb8e484f092" +deps = ["DispatchDoctor", "PrecompileTools", "TestItems", "Tricks"] +git-tree-sha1 = "44ec2bcde862031866a9f43ee477eaa1ddb0cccc" uuid = "06fc5a27-2a28-4c7c-a15d-362465fb6821" -version = "0.13.2" +version = "1.8.0" [deps.DynamicQuantities.extensions] DynamicQuantitiesLinearAlgebraExt = "LinearAlgebra" @@ -545,14 +604,14 @@ version = "0.13.2" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.EnumX]] -git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" +git-tree-sha1 = "bddad79635af6aec424f53ed8aad5d7555dc6f00" uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" -version = "1.0.4" +version = "1.0.5" [[deps.EnzymeCore]] -git-tree-sha1 = "d445df66dd8761a4c27df950db89c6a3a0629fe7" +git-tree-sha1 = "8272a687bca7b5c601c0c24fc0c71bff10aafdfd" uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" -version = "0.7.7" +version = "0.8.12" weakdeps = ["Adapt"] [deps.EnzymeCore.extensions] @@ -560,38 +619,47 @@ weakdeps = ["Adapt"] [[deps.EpollShim_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8e9441ee83492030ace98f9789a654a6d0b1f643" +git-tree-sha1 = "8a4be429317c42cfae6a7fc03c31bad1970c310d" uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" -version = "0.0.20230411+0" +version = "0.0.20230411+1" [[deps.ExceptionUnwrapping]] deps = ["Test"] -git-tree-sha1 = "dcb08a0d93ec0b1cdc4af184b26b591e9695423a" +git-tree-sha1 = "d36f682e590a83d63d1c7dbd287573764682d12a" uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" -version = "0.1.10" +version = "0.1.11" [[deps.Expat_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1c6317308b9dc757616f0b5cb379db10494443a7" +git-tree-sha1 = "d55dffd9ae73ff72f1c0482454dcf2ec6c6c4a63" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.6.2+0" +version = "2.6.5+0" [[deps.ExponentialUtilities]] deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "PrecompileTools", "Printf", "SparseArrays", "libblastrampoline_jll"] -git-tree-sha1 = "8e18940a5ba7f4ddb41fe2b79b6acaac50880a86" +git-tree-sha1 = "cae251c76f353e32d32d76fae2fea655eab652af" uuid = "d4d017d3-3776-5f7e-afef-a10c40355c18" -version = "1.26.1" +version = "1.27.0" +weakdeps = ["StaticArrays"] + + [deps.ExponentialUtilities.extensions] + ExponentialUtilitiesStaticArraysExt = "StaticArrays" [[deps.ExprTools]] git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" version = "0.1.10" +[[deps.ExproniconLite]] +git-tree-sha1 = "c13f0b150373771b0fdc1713c97860f8df12e6c2" +uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" +version = "0.10.14" + [[deps.FFMPEG]] deps = ["FFMPEG_jll"] -git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +git-tree-sha1 = "53ebe7511fa11d33bec688a9178fac4e49eeee00" uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" -version = "0.4.1" +version = "0.4.2" [[deps.FFMPEG_jll]] deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] @@ -601,29 +669,52 @@ version = "4.4.4+1" [[deps.FastBroadcast]] deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] -git-tree-sha1 = "bd19de6fe8a3b18888f35e79832f97544684caa7" +git-tree-sha1 = "ab1b34570bcdf272899062e1a56285a53ecaae08" uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" -version = "0.3.4" +version = "0.3.5" [[deps.FastClosures]] git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" version = "0.3.2" -[[deps.FastLapackInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "cbf5edddb61a43669710cbc2241bc08b36d9e660" -uuid = "29a986be-02c6-4525-aec4-84b980013641" -version = "2.0.4" +[[deps.FastGaussQuadrature]] +deps = ["LinearAlgebra", "SpecialFunctions", "StaticArrays"] +git-tree-sha1 = "fd923962364b645f3719855c88f7074413a6ad92" +uuid = "442a2c76-b920-505d-bb47-c5924d526838" +version = "1.0.2" + +[[deps.FastPower]] +git-tree-sha1 = "5f7afd4b1a3969dc34d692da2ed856047325b06e" +uuid = "a4df4552-cc26-4903-aec0-212e50a0e84b" +version = "1.1.3" + + [deps.FastPower.extensions] + FastPowerEnzymeExt = "Enzyme" + FastPowerForwardDiffExt = "ForwardDiff" + FastPowerMeasurementsExt = "Measurements" + FastPowerMonteCarloMeasurementsExt = "MonteCarloMeasurements" + FastPowerMooncakeExt = "Mooncake" + FastPowerReverseDiffExt = "ReverseDiff" + FastPowerTrackerExt = "Tracker" + + [deps.FastPower.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FillArrays]] deps = ["LinearAlgebra"] -git-tree-sha1 = "0653c0a2396a6da5bc4766c43041ef5fd3efbe57" +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.11.0" +version = "1.13.0" weakdeps = ["PDMats", "SparseArrays", "Statistics"] [deps.FillArrays.extensions] @@ -632,24 +723,26 @@ weakdeps = ["PDMats", "SparseArrays", "Statistics"] FillArraysStatisticsExt = "Statistics" [[deps.FindFirstFunctions]] -git-tree-sha1 = "e90fef90f7d75e6a5b435b0fd65609759f99717a" +git-tree-sha1 = "670e1d9ceaa4a3161d32fe2d2fb2177f8d78b330" uuid = "64ca27bc-2ba2-4a57-88aa-44e436879224" -version = "1.2.0" +version = "1.4.1" [[deps.FiniteDiff]] -deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] -git-tree-sha1 = "2de436b72c3422940cbe1367611d137008af7ec3" +deps = ["ArrayInterface", "LinearAlgebra", "Setfield"] +git-tree-sha1 = "f089ab1f834470c525562030c8cfde4025d5e915" uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.23.1" +version = "2.27.0" [deps.FiniteDiff.extensions] FiniteDiffBandedMatricesExt = "BandedMatrices" FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" + FiniteDiffSparseArraysExt = "SparseArrays" FiniteDiffStaticArraysExt = "StaticArrays" [deps.FiniteDiff.weakdeps] BandedMatrices = "aae01518-5342-5314-be14-df237901396f" BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [[deps.FixedPointNumbers]] @@ -660,9 +753,9 @@ version = "0.8.5" [[deps.Fontconfig_jll]] deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] -git-tree-sha1 = "db16beca600632c95fc8aca29890d83788dd8b23" +git-tree-sha1 = "301b5d5d731a0654825f1f2e906990f7141a106b" uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" -version = "2.13.96+0" +version = "2.16.0+0" [[deps.Format]] git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" @@ -671,9 +764,9 @@ version = "1.3.7" [[deps.ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" +git-tree-sha1 = "a2df1b776752e3f344e5116c06d75a10436ab853" uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.36" +version = "0.10.38" weakdeps = ["StaticArrays"] [deps.ForwardDiff.extensions] @@ -681,15 +774,15 @@ weakdeps = ["StaticArrays"] [[deps.FreeType2_jll]] deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "5c1d8ae0efc6c2e7b1fc502cbe25def8f661b7bc" +git-tree-sha1 = "2c5512e11c791d1baed2049c5652441b28fc6a31" uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" -version = "2.13.2+0" +version = "2.13.4+0" [[deps.FriBidi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1ed150b39aebcc805c26b93a8d0122c940f64ce2" +git-tree-sha1 = "7a214fdac5ed5f59a22c2d9a885a16da1c74bbc7" uuid = "559328eb-81f9-559d-9380-de523a88c83c" -version = "1.0.14+0" +version = "1.0.17+0" [[deps.FunctionWrappers]] git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" @@ -703,68 +796,68 @@ uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" version = "0.1.3" [[deps.Functors]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "8a66c07630d6428eaab3506a0eabfcf4a9edea05" +deps = ["Compat", "ConstructionBase", "LinearAlgebra", "Random"] +git-tree-sha1 = "60a0339f28a233601cb74468032b5c302d5067de" uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" -version = "0.4.11" +version = "0.5.2" [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" [[deps.GLFW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] -git-tree-sha1 = "3f74912a156096bd8fdbef211eff66ab446e7297" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] +git-tree-sha1 = "fcb0584ff34e25155876418979d4c8971243bb89" uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -version = "3.4.0+0" +version = "3.4.0+2" [[deps.GPUArraysCore]] deps = ["Adapt"] -git-tree-sha1 = "ec632f177c0d990e64d955ccc1b8c04c485a0950" +git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.1.6" +version = "0.2.0" [[deps.GR]] -deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] -git-tree-sha1 = "3e527447a45901ea392fe12120783ad6ec222803" +deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] +git-tree-sha1 = "1828eb7275491981fa5f1752a5e126e8f26f8741" uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -version = "0.73.6" +version = "0.73.17" [[deps.GR_jll]] deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "182c478a179b267dd7a741b6f8f4c3e0803795d6" +git-tree-sha1 = "27299071cc29e409488ada41ec7643e0ab19091f" uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" -version = "0.73.6+0" +version = "0.73.17+0" [[deps.GenericSchur]] deps = ["LinearAlgebra", "Printf"] -git-tree-sha1 = "af49a0851f8113fcfae2ef5027c6d49d0acec39b" +git-tree-sha1 = "f88e0ba1f6b42121a7c1dfe93a9687d8e164c91b" uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" -version = "0.5.4" +version = "0.5.5" -[[deps.Gettext_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" -uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" -version = "0.21.0+0" +[[deps.GettextRuntime_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll"] +git-tree-sha1 = "45288942190db7c5f760f59c04495064eedf9340" +uuid = "b0724c58-0f36-5564-988d-3bb0596ebc4a" +version = "0.22.4+0" [[deps.Git]] -deps = ["Git_jll"] -git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e" +deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"] +git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c" uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" -version = "1.3.1" +version = "1.4.0" [[deps.Git_jll]] deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "d18fb8a1f3609361ebda9bf029b60fd0f120c809" +git-tree-sha1 = "b981ed24de5855f20fce5b8cb767c179f93e4268" uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" -version = "2.44.0+2" +version = "2.50.0+0" [[deps.Glib_jll]] -deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "7c82e6a6cd34e9d935e9aa4051b66c6ff3af59ba" +deps = ["Artifacts", "GettextRuntime_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "35fbd0cefb04a516104b8e183ce0df11b70a3f1a" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.80.2+0" +version = "2.84.3+0" [[deps.Glob]] git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" @@ -772,16 +865,16 @@ uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" version = "1.3.1" [[deps.Graphite2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8a6dbda1fd736d60cc477d99f2e7a042acfa46e8" uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" -version = "1.3.14+0" +version = "1.3.15+0" [[deps.Graphs]] -deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "ebd18c326fa6cee1efb7da9a3b45cf69da2ed4d9" +deps = ["ArnoldiMethod", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] +git-tree-sha1 = "c5abfa0ae0aaee162a3fbb053c13ecda39be545b" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.11.2" +version = "1.13.0" [[deps.Grisu]] git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" @@ -789,16 +882,16 @@ uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" version = "1.0.2" [[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "d1d712be3164d61d1fb98e7ce9bcbc6cc06b45ed" +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "ed5e9c58612c4e081aecdb6e1a479e18462e041e" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.8" +version = "1.10.17" [[deps.HarfBuzz_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] -git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] +git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813" uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" -version = "2.8.1+1" +version = "8.5.1+0" [[deps.Highlights]] deps = ["DocStringExtensions", "InteractiveUtils", "REPL"] @@ -806,23 +899,17 @@ git-tree-sha1 = "9e13b8d8b1367d9692a90ea4711b4278e4755c32" uuid = "eafb193a-b7ab-5a9e-9068-77385905fa72" version = "0.5.3" -[[deps.HostCPUFeatures]] -deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "8e070b599339d622e9a081d17230d74a5c473293" -uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.17" - [[deps.HypergeometricFunctions]] -deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "f218fe3736ddf977e0e772bc9a586b2383da2685" +deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] +git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.23" +version = "0.3.28" [[deps.IJulia]] -deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Libdl", "Logging", "Markdown", "MbedTLS", "Pkg", "Printf", "REPL", "Random", "SoftGlobalScope", "Test", "UUIDs", "ZMQ"] -git-tree-sha1 = "1702f79fa30f56b68d5b2fd6fb3a9a14ff6f9130" +deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Logging", "Markdown", "MbedTLS", "Pkg", "Printf", "REPL", "Random", "SoftGlobalScope", "UUIDs", "ZMQ"] +git-tree-sha1 = "9e60d328aa8060368d6dadd24b644d0ebaf0c1cb" uuid = "7073ff75-c697-5162-941a-fcdaad2a7d2a" -version = "1.25.0" +version = "1.29.0" [[deps.IfElse]] git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" @@ -834,20 +921,25 @@ git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" version = "0.1.5" +[[deps.IntegerMathUtils]] +git-tree-sha1 = "4c1acff2dc6b6967e7e750633c50bc3b8d83e617" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.3" + [[deps.IntelOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "14eb2b542e748570b56446f4c50fbfb2306ebc45" +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "0f14a5456bdc6b9731a5682f439a672750a09e48" uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2024.2.0+0" +version = "2025.0.4+0" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.IntervalSets]] -git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" +git-tree-sha1 = "5fbb102dcb8b1a858111ae81d56682376130517d" uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.10" +version = "0.7.11" weakdeps = ["Random", "RecipesBase", "Statistics"] [deps.IntervalSets.extensions] @@ -856,19 +948,19 @@ weakdeps = ["Random", "RecipesBase", "Statistics"] IntervalSetsStatisticsExt = "Statistics" [[deps.InverseFunctions]] -deps = ["Test"] -git-tree-sha1 = "18c59411ece4838b18cd7f537e56cf5e41ce5bfd" +git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.15" -weakdeps = ["Dates"] +version = "0.1.17" +weakdeps = ["Dates", "Test"] [deps.InverseFunctions.extensions] - DatesExt = "Dates" + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" [[deps.IrrationalConstants]] -git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.2" +version = "0.2.4" [[deps.IteratorInterfaceExtensions]] git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" @@ -876,16 +968,16 @@ uuid = "82899510-4779-5014-852e-03e436cf321d" version = "1.0.0" [[deps.JLFzf]] -deps = ["Pipe", "REPL", "Random", "fzf_jll"] -git-tree-sha1 = "a53ebe394b71470c7f97c2e7e170d51df21b17af" +deps = ["REPL", "Random", "fzf_jll"] +git-tree-sha1 = "82f7acdc599b65e0f8ccd270ffa1467c21cb647b" uuid = "1019f520-868f-41f5-a6de-eb00f4b6a39c" -version = "0.1.7" +version = "0.1.11" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" +version = "1.7.0" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] @@ -893,93 +985,88 @@ git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" version = "0.21.4" +[[deps.Jieko]] +deps = ["ExproniconLite"] +git-tree-sha1 = "2f05ed29618da60c06a87e9c033982d4f71d0b6c" +uuid = "ae98c720-c025-4a4a-838c-29b094483192" +version = "0.2.1" + [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c84a835e1a09b289ffcd2271bf2a337bbdda6637" +git-tree-sha1 = "eac1206917768cb54957c65a615460d87b455fc1" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.0.3+0" +version = "3.1.1+0" [[deps.JuliaFormatter]] -deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "Pkg", "PrecompileTools", "Tokenize"] -git-tree-sha1 = "b101a476705594c2a8ba106d731497058874bcf4" +deps = ["CommonMark", "Glob", "JuliaSyntax", "PrecompileTools", "TOML"] +git-tree-sha1 = "56b382cd34b1a80f63211a0b009461915915bf9e" uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" -version = "1.0.57" +version = "2.1.2" + +[[deps.JuliaSyntax]] +git-tree-sha1 = "937da4713526b96ac9a178e2035019d3b78ead4a" +uuid = "70703baa-626e-46a2-a12c-08ffd08c73b4" +version = "0.4.10" [[deps.JumpProcesses]] -deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "StaticArrays", "SymbolicIndexingInterface", "UnPack"] -git-tree-sha1 = "ed08d89318be7d625613f3c435d1f6678fba4850" +deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "SymbolicIndexingInterface", "UnPack"] +git-tree-sha1 = "f8da88993c914357031daf0023f18748ff473924" uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" -version = "9.11.1" +version = "9.16.1" weakdeps = ["FastBroadcast"] - [deps.JumpProcesses.extensions] - JumpProcessFastBroadcastExt = "FastBroadcast" - -[[deps.KLU]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] -git-tree-sha1 = "07649c499349dad9f08dde4243a4c597064663e9" -uuid = "ef3ab10e-7fda-4108-b977-705223b18434" -version = "0.6.0" - [[deps.Krylov]] deps = ["LinearAlgebra", "Printf", "SparseArrays"] -git-tree-sha1 = "267dad6b4b7b5d529c76d40ff48d33f7e94cb834" +git-tree-sha1 = "b94257a1a8737099ca40bc7271a8b374033473ed" uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" -version = "0.9.6" +version = "0.10.1" [[deps.LAME_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "170b660facf5df5de098d866564877e119141cbd" +git-tree-sha1 = "059aabebaa7c82ccb853dd4a0ee9d17796f7e1bc" uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" -version = "3.100.2+0" +version = "3.100.3+0" [[deps.LERC_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "aaafe88dccbd957a8d82f7d05be9b69172e0cee3" uuid = "88015f11-f218-50d7-93a8-a6af411a945d" -version = "3.0.0+1" +version = "4.0.1+0" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d986ce2d884d49126836ea94ed5bfb0f12679713" +git-tree-sha1 = "eb62a3deb62fc6d8822c0c4bef73e4412419c5d8" uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "15.0.7+0" +version = "18.1.8+0" [[deps.LZO_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "70c5da094887fd2cae843b8db33920bac4b6f07d" +git-tree-sha1 = "1c602b1127f4751facb671441ca72715cc95938a" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.2+0" +version = "2.10.3+0" [[deps.LaTeXStrings]] -git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.1" - -[[deps.LabelledArrays]] -deps = ["ArrayInterface", "ChainRulesCore", "ForwardDiff", "LinearAlgebra", "MacroTools", "PreallocationTools", "RecursiveArrayTools", "StaticArrays"] -git-tree-sha1 = "e459fda6b68ea8684b3fcd513d2fd1e5130c4402" -uuid = "2ee39098-c373-598a-b85f-a56591580800" -version = "1.16.0" - -[[deps.LambertW]] -git-tree-sha1 = "c5ffc834de5d61d00d2b0e18c96267cffc21f648" -uuid = "984bce1d-4616-540c-a9ee-88d1112d94c9" -version = "0.4.6" +version = "1.4.0" [[deps.Latexify]] deps = ["Format", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "5b0d630f3020b82c0775a51d05895852f8506f50" +git-tree-sha1 = "4f34eaabe49ecb3fb0d58d6015e32fd31a733199" uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.4" +version = "0.16.8" [deps.Latexify.extensions] DataFramesExt = "DataFrames" + SparseArraysExt = "SparseArrays" SymEngineExt = "SymEngine" + TectonicExt = "tectonic_jll" [deps.Latexify.weakdeps] DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" + tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" [[deps.LayoutPointers]] deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] @@ -989,9 +1076,9 @@ version = "0.1.17" [[deps.LazyArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"] -git-tree-sha1 = "b8ea0abe6cc872996e87356951d286d25d485aba" +git-tree-sha1 = "866ce84b15e54d758c11946aacd4e5df0e60b7a3" uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02" -version = "2.1.9" +version = "2.6.1" [deps.LazyArrays.extensions] LazyArraysBandedMatricesExt = "BandedMatrices" @@ -1037,105 +1124,110 @@ version = "1.11.0+1" uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" [[deps.Libffi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" -version = "3.2.2+1" - -[[deps.Libgcrypt_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] -git-tree-sha1 = "9fd170c4bbfd8b935fdc5f8b7aa33532c991a673" -uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.8.11+0" +version = "3.4.7+0" [[deps.Libglvnd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] -git-tree-sha1 = "6f73d1dd803986947b2c750138528a999a6c7733" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "d36c21b9e7c172a44a10484125024495e2625ac0" uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" -version = "1.6.0+0" - -[[deps.Libgpg_error_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fbb1f2bef882392312feb1ede3615ddc1e9b99ed" -uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.49.0+0" +version = "1.7.1+1" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +git-tree-sha1 = "be484f5c92fad0bd8acfef35fe017900b0b73809" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.17.0+0" +version = "1.18.0+0" [[deps.Libmount_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "0c4f9c4f1a50d8f35048fa0532dabbadf702f81e" +git-tree-sha1 = "a31572773ac1b745e0343fe5e2c8ddda7a37e997" uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -version = "2.40.1+0" +version = "2.41.0+0" [[deps.Libtiff_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "2da088d113af58221c52828a80378e16be7d037a" +git-tree-sha1 = "4ab7581296671007fc33f07a721631b8855f4b1d" uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.5.1+1" +version = "4.7.1+0" [[deps.Libuuid_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "5ee6203157c120d79034c748a2acba45b82b8807" +git-tree-sha1 = "321ccef73a96ba828cd51f2ab5b9f917fa73945a" uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -version = "2.40.1+0" +version = "2.41.0+0" + +[[deps.LineSearch]] +deps = ["ADTypes", "CommonSolve", "ConcreteStructs", "FastClosures", "LinearAlgebra", "MaybeInplace", "SciMLBase", "SciMLJacobianOperators", "StaticArraysCore"] +git-tree-sha1 = "97d502765cc5cf3a722120f50da03c2474efce04" +uuid = "87fe0de2-c867-4266-b59a-2f0a94fc965b" +version = "0.1.4" +weakdeps = ["LineSearches"] + + [deps.LineSearch.extensions] + LineSearchLineSearchesExt = "LineSearches" [[deps.LineSearches]] deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] -git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" +git-tree-sha1 = "4adee99b7262ad2a1a4bbbc59d993d24e55ea96f" uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" -version = "7.2.0" +version = "7.4.0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LinearSolve]] -deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "StaticArraysCore", "UnPack"] -git-tree-sha1 = "b2e2dba60642e07c062eb3143770d7e234316772" +deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "StaticArraysCore", "UnPack"] +git-tree-sha1 = "062c11f1d84ffc80d00fddaa515f7e37e8e9f9d5" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "2.30.2" +version = "3.18.2" [deps.LinearSolve.extensions] LinearSolveBandedMatricesExt = "BandedMatrices" LinearSolveBlockDiagonalsExt = "BlockDiagonals" LinearSolveCUDAExt = "CUDA" LinearSolveCUDSSExt = "CUDSS" - LinearSolveEnzymeExt = ["Enzyme", "EnzymeCore"] - LinearSolveFastAlmostBandedMatricesExt = ["FastAlmostBandedMatrices"] + LinearSolveEnzymeExt = "EnzymeCore" + LinearSolveFastAlmostBandedMatricesExt = "FastAlmostBandedMatrices" + LinearSolveFastLapackInterfaceExt = "FastLapackInterface" + LinearSolveForwardDiffExt = "ForwardDiff" LinearSolveHYPREExt = "HYPRE" LinearSolveIterativeSolversExt = "IterativeSolvers" LinearSolveKernelAbstractionsExt = "KernelAbstractions" LinearSolveKrylovKitExt = "KrylovKit" LinearSolveMetalExt = "Metal" - LinearSolvePardisoExt = "Pardiso" - LinearSolveRecursiveArrayToolsExt = "RecursiveArrayTools" + LinearSolvePardisoExt = ["Pardiso", "SparseArrays"] + LinearSolveRecursiveFactorizationExt = "RecursiveFactorization" + LinearSolveSparseArraysExt = "SparseArrays" + LinearSolveSparspakExt = ["SparseArrays", "Sparspak"] [deps.LinearSolve.weakdeps] BandedMatrices = "aae01518-5342-5314-be14-df237901396f" BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" FastAlmostBandedMatrices = "9d29842c-ecb8-4973-b1e9-a27b1157504e" + FastLapackInterface = "29a986be-02c6-4525-aec4-84b980013641" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" Metal = "dde4c033-4e86-420c-a63e-0dd931031962" Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" - RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" + RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac" [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "a2d09619db4e765091ee5c6ffe8872849de0feea" +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.28" +version = "0.3.29" [deps.LogExpFunctions.extensions] LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" @@ -1152,26 +1244,15 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] -git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +git-tree-sha1 = "f02b56007b064fbfddb4c9cd60161b6dd0f40df3" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.3" - -[[deps.LoopVectorization]] -deps = ["ArrayInterface", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] -git-tree-sha1 = "8084c25a250e00ae427a379a5b607e7aed96a2dd" -uuid = "bdcacae8-1622-11e9-2a5c-532679323890" -version = "0.12.171" -weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] - - [deps.LoopVectorization.extensions] - ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] - SpecialFunctionsExt = "SpecialFunctions" +version = "1.1.0" [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] -git-tree-sha1 = "f046ccd0c6db2832a9f639e2c669c6fe867e5f4f" +git-tree-sha1 = "5de60bc6cb3899cd318d80d627560fae2e2d99ae" uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2024.2.0+0" +version = "2025.0.1+1" [[deps.MLStyle]] git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" @@ -1179,10 +1260,9 @@ uuid = "d8e11817-5142-5d16-987a-aa16d5891078" version = "0.4.17" [[deps.MacroTools]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df" +git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.13" +version = "0.5.16" [[deps.ManualMemory]] git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" @@ -1194,10 +1274,14 @@ deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" [[deps.MaybeInplace]] -deps = ["ArrayInterface", "LinearAlgebra", "MacroTools", "SparseArrays"] -git-tree-sha1 = "1b9e613f2ca3b6cdcbfe36381e17ca2b66d4b3a1" +deps = ["ArrayInterface", "LinearAlgebra", "MacroTools"] +git-tree-sha1 = "54e2fdc38130c05b42be423e90da3bade29b74bd" uuid = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb" -version = "0.1.3" +version = "0.1.4" +weakdeps = ["SparseArrays"] + + [deps.MaybeInplace.extensions] + MaybeInplaceSparseArraysExt = "SparseArrays" [[deps.MbedTLS]] deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] @@ -1225,18 +1309,32 @@ version = "1.2.0" uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.ModelingToolkit]] -deps = ["AbstractTrees", "ArrayInterface", "Combinatorics", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffRules", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "DynamicQuantities", "ExprTools", "FindFirstFunctions", "ForwardDiff", "FunctionWrappersWrappers", "Graphs", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "LabelledArrays", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "NaNMath", "NonlinearSolve", "OrderedCollections", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] -git-tree-sha1 = "ca53d85a54e5d54e0c7458d784af8fe5078064ce" +deps = ["ADTypes", "AbstractTrees", "ArrayInterface", "BlockArrays", "ChainRulesCore", "Combinatorics", "CommonSolve", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffEqNoiseProcess", "DiffRules", "DifferentiationInterface", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "DynamicQuantities", "EnumX", "ExprTools", "FindFirstFunctions", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "Graphs", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "Moshi", "NaNMath", "NonlinearSolve", "OffsetArrays", "OrderedCollections", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SCCNonlinearSolve", "SciMLBase", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] +git-tree-sha1 = "c846aeb43d6e9207f5f51d8e1ae7c6620dfa741f" uuid = "961ee093-0014-501f-94e3-6117800e7a78" -version = "9.24.0" +version = "9.82.0" [deps.ModelingToolkit.extensions] MTKBifurcationKitExt = "BifurcationKit" + MTKCasADiDynamicOptExt = "CasADi" MTKDeepDiffsExt = "DeepDiffs" + MTKFMIExt = "FMI" + MTKInfiniteOptExt = "InfiniteOpt" + MTKLabelledArraysExt = "LabelledArrays" [deps.ModelingToolkit.weakdeps] BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665" + CasADi = "c49709b8-5c63-11e9-2fb2-69db5844192f" DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6" + FMI = "14a09403-18e3-468f-ad8a-74f8dda2d9ac" + InfiniteOpt = "20393b10-9daf-11e9-18c9-8db751c92c57" + LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" + +[[deps.Moshi]] +deps = ["ExproniconLite", "Jieko"] +git-tree-sha1 = "53f817d3e84537d84545e0ad749e483412dd6b2a" +uuid = "2e0e35c7-a2e4-4343-998d-7ef72827ed2d" +version = "0.3.7" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" @@ -1249,27 +1347,27 @@ version = "0.2.4" [[deps.MultivariatePolynomials]] deps = ["ChainRulesCore", "DataStructures", "LinearAlgebra", "MutableArithmetics"] -git-tree-sha1 = "5c1d1d9361e1417e5a065e1f84dc3686cbdaea21" +git-tree-sha1 = "fade91fe9bee7b142d332fc6ab3f0deea29f637b" uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" -version = "0.5.6" +version = "0.5.9" [[deps.Mustache]] deps = ["Printf", "Tables"] -git-tree-sha1 = "a7cefa21a2ff993bff0456bf7521f46fc077ddf1" +git-tree-sha1 = "3cbd5dda543bc59f2e482607ccf84b633724fc32" uuid = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70" -version = "1.0.19" +version = "1.0.21" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] -git-tree-sha1 = "898c56fbf8bf71afb0c02146ef26f3a454e88873" +git-tree-sha1 = "491bdcdc943fcbc4c005900d7463c9f216aabf4c" uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" -version = "1.4.5" +version = "1.6.4" [[deps.NLSolversBase]] -deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] -git-tree-sha1 = "a0b464d183da839699f4c79e7606d9d186ec172c" +deps = ["ADTypes", "DifferentiationInterface", "Distributed", "FiniteDiff", "ForwardDiff"] +git-tree-sha1 = "25a6638571a902ecfb1ae2a18fc1575f86b1d4df" uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" -version = "7.8.3" +version = "7.10.0" [[deps.NLsolve]] deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] @@ -1279,45 +1377,95 @@ version = "4.5.1" [[deps.NaNMath]] deps = ["OpenLibm_jll"] -git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.0.2" +version = "1.1.3" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.NonlinearSolve]] -deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "LazyArrays", "LineSearches", "LinearAlgebra", "LinearSolve", "MaybeInplace", "PrecompileTools", "Preferences", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseDiffTools", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] -git-tree-sha1 = "3adb1e5945b5a6b1eaee754077f25ccc402edd7f" +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseMatrixColorings", "StaticArraysCore", "SymbolicIndexingInterface"] +git-tree-sha1 = "aeb6fb02e63b4d4f90337ed90ce54ceb4c0efe77" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "3.13.1" +version = "4.9.0" [deps.NonlinearSolve.extensions] - NonlinearSolveBandedMatricesExt = "BandedMatrices" NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" NonlinearSolveFixedPointAccelerationExt = "FixedPointAcceleration" NonlinearSolveLeastSquaresOptimExt = "LeastSquaresOptim" NonlinearSolveMINPACKExt = "MINPACK" NonlinearSolveNLSolversExt = "NLSolvers" - NonlinearSolveNLsolveExt = "NLsolve" + NonlinearSolveNLsolveExt = ["NLsolve", "LineSearches"] + NonlinearSolvePETScExt = ["PETSc", "MPI"] NonlinearSolveSIAMFANLEquationsExt = "SIAMFANLEquations" NonlinearSolveSpeedMappingExt = "SpeedMapping" - NonlinearSolveSymbolicsExt = "Symbolics" - NonlinearSolveZygoteExt = "Zygote" + NonlinearSolveSundialsExt = "Sundials" [deps.NonlinearSolve.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" FastLevenbergMarquardt = "7a0df574-e128-4d35-8cbd-3d84502bf7ce" FixedPointAcceleration = "817d07cb-a79a-5c30-9a31-890123675176" LeastSquaresOptim = "0fc2ff8b-aaa3-5acd-a817-1944a5e08891" + LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" NLSolvers = "337daf1e-9722-11e9-073e-8b9effe078ba" NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" + PETSc = "ace2c81b-2b5f-4b1e-a30d-d662738edfe0" SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4" SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412" - Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" + +[[deps.NonlinearSolveBase]] +deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "Compat", "ConcreteStructs", "DifferentiationInterface", "EnzymeCore", "FastClosures", "LinearAlgebra", "Markdown", "MaybeInplace", "Preferences", "Printf", "RecursiveArrayTools", "SciMLBase", "SciMLJacobianOperators", "SciMLOperators", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] +git-tree-sha1 = "404d71dd057759f4d590191a643113485c4a482a" +uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" +version = "1.12.0" + + [deps.NonlinearSolveBase.extensions] + NonlinearSolveBaseBandedMatricesExt = "BandedMatrices" + NonlinearSolveBaseDiffEqBaseExt = "DiffEqBase" + NonlinearSolveBaseForwardDiffExt = "ForwardDiff" + NonlinearSolveBaseLineSearchExt = "LineSearch" + NonlinearSolveBaseLinearSolveExt = "LinearSolve" + NonlinearSolveBaseSparseArraysExt = "SparseArrays" + NonlinearSolveBaseSparseMatrixColoringsExt = "SparseMatrixColorings" + + [deps.NonlinearSolveBase.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + LineSearch = "87fe0de2-c867-4266-b59a-2f0a94fc965b" + LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" + +[[deps.NonlinearSolveFirstOrder]] +deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLJacobianOperators", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "9c8cd0a986518ba317af263549b48e34ac8f776d" +uuid = "5959db7a-ea39-4486-b5fe-2dd0bf03d60d" +version = "1.5.0" + +[[deps.NonlinearSolveQuasiNewton]] +deps = ["ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLOperators", "StaticArraysCore"] +git-tree-sha1 = "e3888bdbab6e0bfadbc3164ef4595e40e7b7e954" +uuid = "9a2c21bd-3a47-402d-9113-8faf9a0ee114" +version = "1.6.0" +weakdeps = ["ForwardDiff"] + + [deps.NonlinearSolveQuasiNewton.extensions] + NonlinearSolveQuasiNewtonForwardDiffExt = "ForwardDiff" + +[[deps.NonlinearSolveSpectralMethods]] +deps = ["CommonSolve", "ConcreteStructs", "DiffEqBase", "LineSearch", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "3398222199e4b9ca0b5840907fb509f28f1a2fdc" +uuid = "26075421-4e9a-44e1-8bd1-420ed7ad02b2" +version = "1.2.0" +weakdeps = ["ForwardDiff"] + + [deps.NonlinearSolveSpectralMethods.extensions] + NonlinearSolveSpectralMethodsForwardDiffExt = "ForwardDiff" [[deps.ODEInterface]] deps = ["Dates", "Libdl", "LinearAlgebra", "Markdown", "ODEInterface_jll", "Unicode"] @@ -1327,9 +1475,9 @@ version = "0.5.0" [[deps.ODEInterfaceDiffEq]] deps = ["Compat", "DataStructures", "DiffEqBase", "FunctionWrappers", "LinearAlgebra", "ODEInterface", "Reexport", "SciMLBase"] -git-tree-sha1 = "a4816454042d72e4bae37d13e592591381356a17" +git-tree-sha1 = "598df5118c036a8ac8a53c5d158921eba5fc0d32" uuid = "09606e27-ecf5-54fc-bb29-004bd9f985bf" -version = "3.13.3" +version = "3.13.4" [[deps.ODEInterface_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -1338,19 +1486,19 @@ uuid = "c771fb93-2439-5ece-a3b3-58fecce82101" version = "0.0.1+0" [[deps.OffsetArrays]] -git-tree-sha1 = "1a27764e945a152f7ca7efa04de513d473e9542e" +git-tree-sha1 = "117432e406b5c023f665fa73dc26e79ec3630151" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.14.1" +version = "1.17.0" weakdeps = ["Adapt"] [deps.OffsetArrays.extensions] OffsetArraysAdaptExt = "Adapt" [[deps.Ogg_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b6aa4566bb7ae78498a5e68943863fa8b5231b59" uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" -version = "1.3.5+1" +version = "1.3.6+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] @@ -1360,31 +1508,37 @@ version = "0.3.23+4" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" +version = "0.8.5+0" + +[[deps.OpenSSH_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"] +git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800" +uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b" +version = "10.0.1+0" [[deps.OpenSSL]] deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "38cb508d080d21dc1128f7fb04f20387ed4c0af4" +git-tree-sha1 = "f1a7e086c677df53e064e0fdd2c9d0b0833e3f6e" uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.4.3" +version = "1.5.0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a028ee3cb5641cccc4c24e90c36b0a4f7707bdf5" +git-tree-sha1 = "87510f7292a2b21aeff97912b0898f9553cc5c2c" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.0.14+0" +version = "3.5.1+0" [[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.5+0" +version = "0.5.6+0" [[deps.Optim]] -deps = ["Compat", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] -git-tree-sha1 = "d9b79c4eed437421ac4285148fcadf42e0700e89" +deps = ["Compat", "EnumX", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] +git-tree-sha1 = "61942645c38dd2b5b78e2082c9b51ab315315d10" uuid = "429524aa-4258-5aef-a3af-852621145aeb" -version = "1.9.4" +version = "1.13.2" [deps.Optim.extensions] OptimMOIExt = "MathOptInterface" @@ -1393,21 +1547,209 @@ version = "1.9.4" MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" [[deps.Opus_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c392fc5dd032381919e3b22dd32d6443760ce7ea" uuid = "91d4177d-7536-5919-b921-800302f37372" -version = "1.3.2+0" +version = "1.5.2+0" [[deps.OrderedCollections]] -git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" +git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.3" +version = "1.8.1" [[deps.OrdinaryDiffEq]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FillArrays", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "IfElse", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "MacroTools", "MuladdMacro", "NonlinearSolve", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "Static", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "6ef13f8b23af28ee2d98226653d8382ab79287ea" +deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FillArrays", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "MacroTools", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqDefault", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqExplicitRK", "OrdinaryDiffEqExponentialRK", "OrdinaryDiffEqExtrapolation", "OrdinaryDiffEqFIRK", "OrdinaryDiffEqFeagin", "OrdinaryDiffEqFunctionMap", "OrdinaryDiffEqHighOrderRK", "OrdinaryDiffEqIMEXMultistep", "OrdinaryDiffEqLinear", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqNordsieck", "OrdinaryDiffEqPDIRK", "OrdinaryDiffEqPRK", "OrdinaryDiffEqQPRK", "OrdinaryDiffEqRKN", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqSSPRK", "OrdinaryDiffEqStabilizedIRK", "OrdinaryDiffEqStabilizedRK", "OrdinaryDiffEqSymplecticRK", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "Static", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] +git-tree-sha1 = "1c2b2df870944e0dc01454fd87479847c55fa26c" uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.85.0" +version = "6.98.0" + +[[deps.OrdinaryDiffEqAdamsBashforthMoulton]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqLowOrderRK", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "82f78099ecf4e0fa53545811318520d87e7fe0b8" +uuid = "89bda076-bce5-4f1c-845f-551c83cdda9a" +version = "1.2.0" + +[[deps.OrdinaryDiffEqBDF]] +deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqSDIRK", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "StaticArrays", "TruncatedStacktraces"] +git-tree-sha1 = "9124a686af119063bb4d3a8f87044a8f312fcad9" +uuid = "6ad6398a-0878-4a85-9266-38940aa047c8" +version = "1.6.0" + +[[deps.OrdinaryDiffEqCore]] +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "FastBroadcast", "FastClosures", "FastPower", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleUnPack", "Static", "StaticArrayInterface", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "1bd20b621e8dee5f2d170ae31631bf573ab77eec" +uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" +version = "1.26.2" + + [deps.OrdinaryDiffEqCore.extensions] + OrdinaryDiffEqCoreEnzymeCoreExt = "EnzymeCore" + OrdinaryDiffEqCoreMooncakeExt = "Mooncake" + + [deps.OrdinaryDiffEqCore.weakdeps] + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + +[[deps.OrdinaryDiffEqDefault]] +deps = ["ADTypes", "DiffEqBase", "EnumX", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "PrecompileTools", "Preferences", "Reexport"] +git-tree-sha1 = "7e2f4ec76ebac709401064fd2cf73ad993d1e694" +uuid = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" +version = "1.5.0" + +[[deps.OrdinaryDiffEqDifferentiation]] +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqCore", "SciMLBase", "SciMLOperators", "SparseArrays", "SparseMatrixColorings", "StaticArrayInterface", "StaticArrays"] +git-tree-sha1 = "efecf0c4cc44e16251b0e718f08b0876b2a82b80" +uuid = "4302a76b-040a-498a-8c04-15b101fed76b" +version = "1.10.0" + +[[deps.OrdinaryDiffEqExplicitRK]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "TruncatedStacktraces"] +git-tree-sha1 = "4dbce3f9e6974567082ce5176e21aab0224a69e9" +uuid = "9286f039-9fbf-40e8-bf65-aa933bdc4db0" +version = "1.1.0" + +[[deps.OrdinaryDiffEqExponentialRK]] +deps = ["ADTypes", "DiffEqBase", "ExponentialUtilities", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqVerner", "RecursiveArrayTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "8d2ab84d7fabdfde995e5f567361f238069497f5" +uuid = "e0540318-69ee-4070-8777-9e2de6de23de" +version = "1.4.0" + +[[deps.OrdinaryDiffEqExtrapolation]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "FastPower", "LinearSolve", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "Polyester", "RecursiveArrayTools", "Reexport"] +git-tree-sha1 = "80a636aac325c546b04e3bf20f0c80eaa0173dd4" +uuid = "becaefa8-8ca2-5cf9-886d-c06f3d2bd2c4" +version = "1.5.0" + +[[deps.OrdinaryDiffEqFIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "FastGaussQuadrature", "FastPower", "LinearAlgebra", "LinearSolve", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Polyester", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "0da8ec3491821262a3d2828e6370e76b51a770a3" +uuid = "5960d6e9-dd7a-4743-88e7-cf307b64f125" +version = "1.12.0" + +[[deps.OrdinaryDiffEqFeagin]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "a7cc74d3433db98e59dc3d58bc28174c6c290adf" +uuid = "101fe9f7-ebb6-4678-b671-3a81e7194747" +version = "1.1.0" + +[[deps.OrdinaryDiffEqFunctionMap]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static"] +git-tree-sha1 = "925a91583d1ab84f1f0fea121be1abf1179c5926" +uuid = "d3585ca7-f5d3-4ba6-8057-292ed1abd90f" +version = "1.1.1" + +[[deps.OrdinaryDiffEqHighOrderRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "103e017ff186ac39d731904045781c9bacfca2b0" +uuid = "d28bc4f8-55e1-4f49-af69-84c1a99f0f58" +version = "1.1.0" + +[[deps.OrdinaryDiffEqIMEXMultistep]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Reexport"] +git-tree-sha1 = "095bab73a3ff185e9ef971fc42ecc93c7824e589" +uuid = "9f002381-b378-40b7-97a6-27a27c83f129" +version = "1.3.0" + +[[deps.OrdinaryDiffEqLinear]] +deps = ["DiffEqBase", "ExponentialUtilities", "LinearAlgebra", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "940cef72ec8799d869ff1ba3dcf47cf7758e51cf" +uuid = "521117fe-8c41-49f8-b3b6-30780b3f0fb5" +version = "1.3.0" + +[[deps.OrdinaryDiffEqLowOrderRK]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static"] +git-tree-sha1 = "d4bb32e09d6b68ce2eb45fb81001eab46f60717a" +uuid = "1344f307-1e59-4825-a18e-ace9aa3fa4c6" +version = "1.2.0" + +[[deps.OrdinaryDiffEqLowStorageRK]] +deps = ["Adapt", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "StaticArrays"] +git-tree-sha1 = "52ec7081e65291fa5c19749312df0818db2fa1bc" +uuid = "b0944070-b475-4768-8dec-fb6eb410534d" +version = "1.3.0" + +[[deps.OrdinaryDiffEqNonlinearSolve]] +deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "FastClosures", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "PreallocationTools", "RecursiveArrayTools", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "StaticArrays"] +git-tree-sha1 = "ffdb0f5207b0e30f8b1edf99b3b9546d9c48ccaf" +uuid = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" +version = "1.10.0" + +[[deps.OrdinaryDiffEqNordsieck]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqTsit5", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "ef44754f10e0dfb9bb55ded382afed44cd94ab57" +uuid = "c9986a66-5c92-4813-8696-a7ec84c806c8" +version = "1.1.0" + +[[deps.OrdinaryDiffEqPDIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Polyester", "Reexport", "StaticArrays"] +git-tree-sha1 = "ab9897e4bc8e3cf8e15f1cf61dbdd15d6a2341d7" +uuid = "5dd0a6cf-3d4b-4314-aa06-06d4e299bc89" +version = "1.3.1" + +[[deps.OrdinaryDiffEqPRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "Reexport"] +git-tree-sha1 = "da525d277962a1b76102c79f30cb0c31e13fe5b9" +uuid = "5b33eab2-c0f1-4480-b2c3-94bc1e80bda1" +version = "1.1.0" + +[[deps.OrdinaryDiffEqQPRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "332f9d17d0229218f66a73492162267359ba85e9" +uuid = "04162be5-8125-4266-98ed-640baecc6514" +version = "1.1.0" + +[[deps.OrdinaryDiffEqRKN]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport"] +git-tree-sha1 = "41c09d9c20877546490f907d8dffdd52690dd65f" +uuid = "af6ede74-add8-4cfd-b1df-9a4dbb109d7a" +version = "1.1.0" + +[[deps.OrdinaryDiffEqRosenbrock]] +deps = ["ADTypes", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "1ce0096d920e95773220e818f29bf4b37ea2bb78" +uuid = "43230ef6-c299-4910-a778-202eb28ce4ce" +version = "1.11.0" + +[[deps.OrdinaryDiffEqSDIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "RecursiveArrayTools", "Reexport", "SciMLBase", "TruncatedStacktraces"] +git-tree-sha1 = "b3a7e3a2f355d837c823b435630f035aef446b45" +uuid = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" +version = "1.3.0" + +[[deps.OrdinaryDiffEqSSPRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "StaticArrays"] +git-tree-sha1 = "651756c030df7a1d49ad484288937f8c398e8a08" +uuid = "669c94d9-1f4b-4b64-b377-1aa079aa2388" +version = "1.3.0" + +[[deps.OrdinaryDiffEqStabilizedIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "RecursiveArrayTools", "Reexport", "StaticArrays"] +git-tree-sha1 = "111c23b68ad644b47e38242af920d5805c7bedb1" +uuid = "e3e12d00-db14-5390-b879-ac3dd2ef6296" +version = "1.3.0" + +[[deps.OrdinaryDiffEqStabilizedRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "StaticArrays"] +git-tree-sha1 = "1b0d894c880e25f7d0b022d7257638cf8ce5b311" +uuid = "358294b1-0aab-51c3-aafe-ad5ab194a2ad" +version = "1.1.0" + +[[deps.OrdinaryDiffEqSymplecticRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport"] +git-tree-sha1 = "a13d59a2d6cfb6a3332a7782638ca6e1cb6ca688" +uuid = "fa646aed-7ef9-47eb-84c4-9443fc8cbfa8" +version = "1.3.0" + +[[deps.OrdinaryDiffEqTsit5]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "TruncatedStacktraces"] +git-tree-sha1 = "96552f7d4619fabab4038a29ed37dd55e9eb513a" +uuid = "b1df2697-797e-41e3-8120-5422d3b24e4a" +version = "1.1.0" + +[[deps.OrdinaryDiffEqVerner]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "TruncatedStacktraces"] +git-tree-sha1 = "08f2d3be30874b6e2e937a06b501fb9811f7d8bd" +uuid = "79d7bb75-1356-48c1-b8c0-6832512096c2" +version = "1.2.0" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] @@ -1416,15 +1758,15 @@ version = "10.42.0+1" [[deps.PDMats]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "949347156c25054de2db3b166c52ac4728cbad65" +git-tree-sha1 = "f07c06228a1c670ae4c87d1276b92c7c597fdda0" uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.31" +version = "0.11.35" -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] +[[deps.Pango_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "275a9a6d85dc86c24d03d1837a0010226a96f540" +uuid = "36c8627f-9965-5494-a995-c6b170f724f3" +version = "1.56.3+0" [[deps.Parameters]] deps = ["OrderedCollections", "UnPack"] @@ -1434,20 +1776,15 @@ version = "0.12.3" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" +git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.1" - -[[deps.Pipe]] -git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" -uuid = "b98c9c47-44ae-5843-9183-064241ee97a0" -version = "1.3.0" +version = "2.8.3" [[deps.Pixman_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] -git-tree-sha1 = "35621f10a7531bc8fa58f74610b1bfb70a3cfc6b" +git-tree-sha1 = "db76b1ecd5e9715f3d043cec13b2ec93ce015d53" uuid = "30392449-352a-5448-841d-b1acce4e97dc" -version = "0.43.4+0" +version = "0.44.2+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] @@ -1456,21 +1793,21 @@ version = "1.10.0" [[deps.PlotThemes]] deps = ["PlotUtils", "Statistics"] -git-tree-sha1 = "6e55c6841ce3411ccb3457ee52fc48cb698d6fb0" +git-tree-sha1 = "41031ef3a1be6f5bbbf3e8073f210556daeae5ca" uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" -version = "3.2.0" +version = "3.3.0" [[deps.PlotUtils]] -deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "Statistics"] -git-tree-sha1 = "7b1a9df27f072ac4c9c7cbe5efb198489258d1f5" +deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "StableRNGs", "Statistics"] +git-tree-sha1 = "3ca9a356cd2e113c420f2c13bea19f8d3fb1cb18" uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" -version = "1.4.1" +version = "1.4.3" [[deps.Plots]] deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "082f0c4b70c202c37784ce4bfbc33c9f437685bf" +git-tree-sha1 = "55818b50883d7141bd98cdf5fc2f4ced96ee075f" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.40.5" +version = "1.40.16" [deps.Plots.extensions] FileIOExt = "FileIO" @@ -1493,10 +1830,10 @@ uuid = "e409e4f3-bfea-5376-8464-e040bb5c01ab" version = "0.4.4" [[deps.Polyester]] -deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] -git-tree-sha1 = "9ff799e8fb8ed6717710feee3be3bc20645daa97" +deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] +git-tree-sha1 = "6f7cd22a802094d239824c57d94c8e2d0f7cfc7d" uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" -version = "0.7.15" +version = "0.7.18" [[deps.PolyesterWeave]] deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] @@ -1512,15 +1849,17 @@ version = "0.2.4" [[deps.PreallocationTools]] deps = ["Adapt", "ArrayInterface", "ForwardDiff"] -git-tree-sha1 = "406c29a7f46706d379a3bce45671b4e3a39ddfbc" +git-tree-sha1 = "6d98eace73d82e47f5b16c393de198836d9f790a" uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -version = "0.4.22" +version = "0.4.27" [deps.PreallocationTools.extensions] PreallocationToolsReverseDiffExt = "ReverseDiff" + PreallocationToolsSparseConnectivityTracerExt = "SparseConnectivityTracer" [deps.PreallocationTools.weakdeps] ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" [[deps.PrecompileTools]] deps = ["Preferences"] @@ -1534,26 +1873,62 @@ git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" uuid = "21216c6a-2e73-6563-6e65-726566657250" version = "1.4.3" +[[deps.PrettyTables]] +deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] +git-tree-sha1 = "1101cd475833706e4d0e7b122218257178f48f34" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "2.4.0" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.7" + [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" [[deps.PtrArrays]] -git-tree-sha1 = "f011fbb92c4d401059b2212c05c0601b70f8b759" +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" -version = "1.2.0" +version = "1.3.0" [[deps.Qt6Base_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] -git-tree-sha1 = "492601870742dcd38f233b23c3ec629628c1d724" +git-tree-sha1 = "eb38d376097f47316fe089fc62cb7c6d85383a52" uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" -version = "6.7.1+1" +version = "6.8.2+1" + +[[deps.Qt6Declarative_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6ShaderTools_jll"] +git-tree-sha1 = "da7adf145cce0d44e892626e647f9dcbe9cb3e10" +uuid = "629bc702-f1f5-5709-abd5-49b8460ea067" +version = "6.8.2+1" + +[[deps.Qt6ShaderTools_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll"] +git-tree-sha1 = "9eca9fc3fe515d619ce004c83c31ffd3f85c7ccf" +uuid = "ce943373-25bb-56aa-8eca-768745ed7b5a" +version = "6.8.2+1" + +[[deps.Qt6Wayland_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6Declarative_jll"] +git-tree-sha1 = "e1d5e16d0f65762396f9ca4644a5f4ddab8d452b" +uuid = "e99dba38-086e-5de3-a5b1-6e4c66e897c3" +version = "6.8.2+1" [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "9b23c31e76e333e6fb4c1595ae6afa74966a729e" +git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.9.4" +version = "2.11.2" + + [deps.QuadGK.extensions] + QuadGKEnzymeExt = "Enzyme" + + [deps.QuadGK.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] @@ -1565,15 +1940,15 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.Random123]] deps = ["Random", "RandomNumbers"] -git-tree-sha1 = "4743b43e5a9c4a2ede372de7061eed81795b12e7" +git-tree-sha1 = "dbe5fd0b334694e905cb9fda73cd8554333c46e2" uuid = "74087812-796a-5b5d-8853-05524746bad3" -version = "1.7.0" +version = "1.7.1" [[deps.RandomNumbers]] -deps = ["Random", "Requires"] -git-tree-sha1 = "043da614cc7e95c703498a491e2c21f58a2b8111" +deps = ["Random"] +git-tree-sha1 = "c6ec94d2aaba1ab2ff983052cf6a606ca5985902" uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" -version = "1.5.3" +version = "1.6.0" [[deps.RecipesBase]] deps = ["PrecompileTools"] @@ -1588,35 +1963,35 @@ uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" version = "0.6.12" [[deps.RecursiveArrayTools]] -deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "SparseArrays", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "b450d967a770fb13d0e26358f58375e20361cf9c" +deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "efc718978d97745c58e69c5115a35c51a080e45e" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "3.26.0" +version = "3.34.1" [deps.RecursiveArrayTools.extensions] RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" RecursiveArrayToolsForwardDiffExt = "ForwardDiff" + RecursiveArrayToolsKernelAbstractionsExt = "KernelAbstractions" RecursiveArrayToolsMeasurementsExt = "Measurements" RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" RecursiveArrayToolsReverseDiffExt = ["ReverseDiff", "Zygote"] + RecursiveArrayToolsSparseArraysExt = ["SparseArrays"] + RecursiveArrayToolsStructArraysExt = "StructArrays" RecursiveArrayToolsTrackerExt = "Tracker" RecursiveArrayToolsZygoteExt = "Zygote" [deps.RecursiveArrayTools.weakdeps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" -[[deps.RecursiveFactorization]] -deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "PrecompileTools", "StrideArraysCore", "TriangularSolve"] -git-tree-sha1 = "6db1a75507051bc18bfa131fbc7c3f169cc4b2f6" -uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" -version = "0.2.23" - [[deps.Reexport]] git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" uuid = "189a3867-3050-52da-a836-e630ba90ab69" @@ -1630,9 +2005,9 @@ version = "1.0.1" [[deps.Requires]] deps = ["UUIDs"] -git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.0" +version = "1.3.1" [[deps.ResettableStacks]] deps = ["StaticArrays"] @@ -1642,21 +2017,21 @@ version = "1.1.1" [[deps.Rmath]] deps = ["Random", "Rmath_jll"] -git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" +git-tree-sha1 = "852bd0f55565a9e973fcfee83a84413270224dc4" uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -version = "0.7.1" +version = "0.8.0" [[deps.Rmath_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d483cd324ce5cf5d61b77930f0bbd6cb61927d21" +git-tree-sha1 = "58cdd8fb2201a6267e1db87ff148dd6c1dbd8ad8" uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.4.2+0" +version = "0.5.1+0" [[deps.RootedTrees]] deps = ["LaTeXStrings", "Latexify", "LinearAlgebra", "Preferences", "RecipesBase", "Requires"] -git-tree-sha1 = "8c3a85a84e7e7ff33a9555c80179188d39bfad5a" +git-tree-sha1 = "c0c464d3063e46e4128d21fd677ca575ace44fdc" uuid = "47965b36-3f3e-11e9-0dcf-4570dfd42a8c" -version = "2.23.0" +version = "2.23.1" weakdeps = ["Plots"] [deps.RootedTrees.extensions] @@ -1664,9 +2039,15 @@ weakdeps = ["Plots"] [[deps.RuntimeGeneratedFunctions]] deps = ["ExprTools", "SHA", "Serialization"] -git-tree-sha1 = "04c968137612c4a5629fa531334bb81ad5680f00" +git-tree-sha1 = "86a8a8b783481e1ea6b9c91dd949cb32191f8ab4" uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" -version = "0.5.13" +version = "0.5.15" + +[[deps.SCCNonlinearSolve]] +deps = ["CommonSolve", "PrecompileTools", "Reexport", "SciMLBase", "SymbolicIndexingInterface"] +git-tree-sha1 = "80d305585f80e7a3a93816495a7825b3a0bd699f" +uuid = "9dfe8606-65a1-4bb3-9748-cb89d1561431" +version = "1.3.1" [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" @@ -1677,30 +2058,26 @@ git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" uuid = "94e857df-77ce-4151-89e5-788b33177be4" version = "0.1.0" -[[deps.SLEEFPirates]] -deps = ["IfElse", "Static", "VectorizationBase"] -git-tree-sha1 = "456f610ca2fbd1c14f5fcf31c6bfadc55e7d66e0" -uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" -version = "0.6.43" - [[deps.SciMLBase]] -deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "281e82f2ae2b73262fed9e7a518711eb7feb7e59" +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] +git-tree-sha1 = "31587e20cdea9fba3a689033313e658dfc9aae78" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.42.0" +version = "2.102.1" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" + SciMLBaseMLStyleExt = "MLStyle" SciMLBaseMakieExt = "Makie" SciMLBasePartialFunctionsExt = "PartialFunctions" SciMLBasePyCallExt = "PyCall" SciMLBasePythonCallExt = "PythonCall" SciMLBaseRCallExt = "RCall" - SciMLBaseZygoteExt = "Zygote" + SciMLBaseZygoteExt = ["Zygote", "ChainRulesCore"] [deps.SciMLBase.weakdeps] ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078" Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" @@ -1714,32 +2091,43 @@ git-tree-sha1 = "f4076dd5a103010d48bb6c4e50c5526f6622fa96" uuid = "31c91b34-3c75-11e9-0341-95557aab0344" version = "0.1.3" +[[deps.SciMLJacobianOperators]] +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DifferentiationInterface", "FastClosures", "LinearAlgebra", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "7da1216346ad79499d08d7e2a3dbf297dc80c829" +uuid = "19f34311-ddf3-4b8b-af20-060888a46c0e" +version = "0.1.6" + [[deps.SciMLOperators]] -deps = ["ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools", "Setfield", "SparseArrays", "StaticArraysCore"] -git-tree-sha1 = "10499f619ef6e890f3f4a38914481cc868689cd5" +deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools"] +git-tree-sha1 = "3249fe77f322fe539e935ecb388c8290cd38a3fc" uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "0.3.8" +version = "1.3.1" +weakdeps = ["SparseArrays", "StaticArraysCore"] + + [deps.SciMLOperators.extensions] + SciMLOperatorsSparseArraysExt = "SparseArrays" + SciMLOperatorsStaticArraysCoreExt = "StaticArraysCore" [[deps.SciMLStructures]] deps = ["ArrayInterface"] -git-tree-sha1 = "cfdd1200d150df1d3c055cc72ee6850742e982d7" +git-tree-sha1 = "566c4ed301ccb2a44cbd5a27da5f885e0ed1d5df" uuid = "53ae85a6-f571-4167-b2af-e1d143709226" -version = "1.4.1" +version = "1.7.0" [[deps.Scratch]] deps = ["Dates"] -git-tree-sha1 = "3bac05bc7e74a75fd9cba4295cde4045d9fe2386" +git-tree-sha1 = "9b81b8393e50b7d4e6d0a9f14e192294d3b7c109" uuid = "6c6a2e73-6563-6170-7368-637461726353" -version = "1.2.1" +version = "1.3.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" [[deps.Setfield]] deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] -git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" +git-tree-sha1 = "c5391c6ace3bc430ca630251d02ea9687169ca68" uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" -version = "1.1.1" +version = "1.1.2" [[deps.SharedArrays]] deps = ["Distributed", "Mmap", "Random", "Serialization"] @@ -1752,27 +2140,27 @@ uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" version = "1.0.3" [[deps.SimpleBufferStream]] -git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +git-tree-sha1 = "f305871d2f381d21527c770d4788c06c097c9bc1" uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" -version = "1.1.0" +version = "1.2.0" [[deps.SimpleNonlinearSolve]] -deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "DiffResults", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "MaybeInplace", "PrecompileTools", "Reexport", "SciMLBase", "Setfield", "StaticArraysCore"] -git-tree-sha1 = "58b144f34e44252b2de0acb5a9dbbb7ea5cd75d7" +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "7aaa5fe4617271b64fce0466d187f2a72edbd81a" uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" -version = "1.10.1" +version = "2.5.0" [deps.SimpleNonlinearSolve.extensions] SimpleNonlinearSolveChainRulesCoreExt = "ChainRulesCore" + SimpleNonlinearSolveDiffEqBaseExt = "DiffEqBase" SimpleNonlinearSolveReverseDiffExt = "ReverseDiff" SimpleNonlinearSolveTrackerExt = "Tracker" - SimpleNonlinearSolveZygoteExt = "Zygote" [deps.SimpleNonlinearSolve.weakdeps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] @@ -1805,59 +2193,49 @@ deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" version = "1.10.0" -[[deps.SparseDiffTools]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "UnPack", "VertexSafeGraphs"] -git-tree-sha1 = "469f51f8c4741ce944be2c0b65423b518b1405b0" -uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" -version = "2.19.0" - - [deps.SparseDiffTools.extensions] - SparseDiffToolsEnzymeExt = "Enzyme" - SparseDiffToolsPolyesterExt = "Polyester" - SparseDiffToolsPolyesterForwardDiffExt = "PolyesterForwardDiff" - SparseDiffToolsSymbolicsExt = "Symbolics" - SparseDiffToolsZygoteExt = "Zygote" - - [deps.SparseDiffTools.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" - PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" - Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - [[deps.SparseMatrixColorings]] -deps = ["ADTypes", "Compat", "DocStringExtensions", "LinearAlgebra", "Random", "SparseArrays"] -git-tree-sha1 = "bf25f53d0859b6e314532dca5e87dae8273e8ade" +deps = ["ADTypes", "DocStringExtensions", "LinearAlgebra", "PrecompileTools", "Random", "SparseArrays"] +git-tree-sha1 = "9de43e0b9b976f1019bf7a879a686c4514520078" uuid = "0a514795-09f3-496d-8182-132a7b665d35" -version = "0.3.4" +version = "0.4.21" -[[deps.Sparspak]] -deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] -git-tree-sha1 = "342cf4b449c299d8d1ceaf00b7a49f4fbc7940e7" -uuid = "e56a9233-b9d6-4f03-8d0f-1825330902ac" -version = "0.3.9" + [deps.SparseMatrixColorings.extensions] + SparseMatrixColoringsCUDAExt = "CUDA" + SparseMatrixColoringsCliqueTreesExt = "CliqueTrees" + SparseMatrixColoringsColorsExt = "Colors" + + [deps.SparseMatrixColorings.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "2f5d4697f21388cbe1ff299430dd169ef97d7e14" +git-tree-sha1 = "41852b8679f78c8d8961eeadc8f62cef861a52e3" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.4.0" +version = "2.5.1" weakdeps = ["ChainRulesCore"] [deps.SpecialFunctions.extensions] SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" +[[deps.StableRNGs]] +deps = ["Random"] +git-tree-sha1 = "95af145932c2ed859b63329952ce8d633719f091" +uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" +version = "1.0.3" + [[deps.Static]] deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools"] -git-tree-sha1 = "87d51a3ee9a4b0d2fe054bdd3fc2436258db2603" +git-tree-sha1 = "f737d444cb0ad07e61b3c1bef8eb91203c321eff" uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "1.1.1" +version = "1.2.0" [[deps.StaticArrayInterface]] -deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Requires", "SparseArrays", "Static", "SuiteSparse"] -git-tree-sha1 = "8963e5a083c837531298fc41599182a759a87a6d" +deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Static"] +git-tree-sha1 = "96381d50f1ce85f2663584c8e886a6ca97e60554" uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" -version = "1.5.1" +version = "1.8.0" weakdeps = ["OffsetArrays", "StaticArrays"] [deps.StaticArrayInterface.extensions] @@ -1866,9 +2244,9 @@ weakdeps = ["OffsetArrays", "StaticArrays"] [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "eeafab08ae20c62c44c8399ccb9354a04b80db50" +git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.7" +version = "1.9.13" weakdeps = ["ChainRulesCore", "Statistics"] [deps.StaticArrays.extensions] @@ -1887,21 +2265,21 @@ version = "1.10.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] -git-tree-sha1 = "1ff449ad350c9c4cbc756624d6f8a8c3ef56d3ed" +git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.7.0" +version = "1.7.1" [[deps.StatsBase]] -deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "5cf7606d6cef84b543b483848d4ae08ad9832b21" +deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "b81c5035922cc89c2d9523afc6c54be512411466" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.3" +version = "0.34.5" [[deps.StatsFuns]] deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "cef0472124fab0695b58ca35a77c6fb942fdab8a" +git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.3.1" +version = "1.5.0" weakdeps = ["ChainRulesCore", "InverseFunctions"] [deps.StatsFuns.extensions] @@ -1920,19 +2298,33 @@ git-tree-sha1 = "b765e46ba27ecf6b44faf70df40c57aa3a547dcb" uuid = "69024149-9ee7-55f6-a4c4-859efe599b68" version = "0.3.7" +[[deps.StringManipulation]] +deps = ["PrecompileTools"] +git-tree-sha1 = "725421ae8e530ec29bcbdddbe91ff8053421d023" +uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" +version = "0.4.1" + [[deps.StructArrays]] deps = ["ConstructionBase", "DataAPI", "Tables"] -git-tree-sha1 = "f4dc295e983502292c4c3f951dbb4e985e35b3be" +git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -version = "0.6.18" -weakdeps = ["Adapt", "GPUArraysCore", "SparseArrays", "StaticArrays"] +version = "0.7.1" [deps.StructArrays.extensions] StructArraysAdaptExt = "Adapt" - StructArraysGPUArraysCoreExt = "GPUArraysCore" + StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] + StructArraysLinearAlgebraExt = "LinearAlgebra" StructArraysSparseArraysExt = "SparseArrays" StructArraysStaticArraysExt = "StaticArrays" + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + [[deps.SuiteSparse]] deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" @@ -1944,9 +2336,9 @@ version = "7.2.1+1" [[deps.Sundials]] deps = ["CEnum", "DataStructures", "DiffEqBase", "Libdl", "LinearAlgebra", "Logging", "PrecompileTools", "Reexport", "SciMLBase", "SparseArrays", "Sundials_jll"] -git-tree-sha1 = "e15f5a73f0d14b9079b807a9d1dac13e4302e997" +git-tree-sha1 = "7c7a7ee705724b3c80d5451ac49779db36c6f758" uuid = "c3572dad-4567-51f8-b174-8c6c989267f4" -version = "4.24.0" +version = "4.28.0" [[deps.Sundials_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "SuiteSparse_jll", "libblastrampoline_jll"] @@ -1955,38 +2347,50 @@ uuid = "fb77eaff-e24c-56d4-86b1-d163f2edb164" version = "5.2.2+0" [[deps.SymbolicIndexingInterface]] -deps = ["Accessors", "ArrayInterface", "RuntimeGeneratedFunctions", "StaticArraysCore"] -git-tree-sha1 = "9c490ee01823dc443da25bf9225827e3cdd2d7e9" +deps = ["Accessors", "ArrayInterface", "PrettyTables", "RuntimeGeneratedFunctions", "StaticArraysCore"] +git-tree-sha1 = "658f6d01bfe68d6bf47915bf5d868228138c7d71" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.26" +version = "0.3.41" [[deps.SymbolicLimits]] deps = ["SymbolicUtils"] -git-tree-sha1 = "fb099adbd7504f1e68b4512828e9d94197a8b889" +git-tree-sha1 = "fabf4650afe966a2ba646cabd924c3fd43577fc3" uuid = "19f23fe9-fdab-4a78-91af-e7b7767979c3" -version = "0.2.1" +version = "0.2.2" [[deps.SymbolicUtils]] -deps = ["AbstractTrees", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "IfElse", "LabelledArrays", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "TermInterface", "TimerOutputs", "Unityper"] -git-tree-sha1 = "9345b7b8a2923abaf6089d9f7306bb712fecb840" +deps = ["AbstractTrees", "ArrayInterface", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "ExproniconLite", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "TaskLocalValues", "TermInterface", "TimerOutputs", "Unityper", "WeakValueDicts"] +git-tree-sha1 = "fa63e8f55e99aee528951ba26544403b09645979" uuid = "d1185830-fcd6-423d-90d6-eec64667417b" -version = "2.1.2" +version = "3.29.0" + + [deps.SymbolicUtils.extensions] + SymbolicUtilsLabelledArraysExt = "LabelledArrays" + SymbolicUtilsReverseDiffExt = "ReverseDiff" + + [deps.SymbolicUtils.weakdeps] + LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" [[deps.Symbolics]] -deps = ["ADTypes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "ForwardDiff", "IfElse", "LaTeXStrings", "LambertW", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "PrecompileTools", "RecipesBase", "Reexport", "Requires", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] -git-tree-sha1 = "8539a734b448ca27707709c62420b1bf115ed7d9" +deps = ["ADTypes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "LaTeXStrings", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "OffsetArrays", "PrecompileTools", "Primes", "RecipesBase", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] +git-tree-sha1 = "df665535546bb07078ee42e0972527b5d6bd3f69" uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" -version = "5.33.0" +version = "6.43.0" [deps.Symbolics.extensions] + SymbolicsForwardDiffExt = "ForwardDiff" SymbolicsGroebnerExt = "Groebner" - SymbolicsLuxCoreExt = "LuxCore" - SymbolicsPreallocationToolsExt = "PreallocationTools" + SymbolicsLuxExt = "Lux" + SymbolicsNemoExt = "Nemo" + SymbolicsPreallocationToolsExt = ["PreallocationTools", "ForwardDiff"] SymbolicsSymPyExt = "SymPy" [deps.Symbolics.weakdeps] + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Groebner = "0b43b601-686d-58a3-8a1c-6623616c7cd4" - LuxCore = "bb33d45b-7691-41d6-9220-0943567d0623" + Lux = "b2108857-7c20-44ae-9111-449ecde12c47" + Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a" PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46" SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" @@ -2003,15 +2407,20 @@ version = "1.0.1" [[deps.Tables]] deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +git-tree-sha1 = "f2c1efbc8f3a609aadf318094f8fc5204bdaf344" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.12.0" +version = "1.12.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" version = "1.10.0" +[[deps.TaskLocalValues]] +git-tree-sha1 = "67e469338d9ce74fc578f7db1736a74d93a49eb8" +uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" +version = "0.1.3" + [[deps.TensorCore]] deps = ["LinearAlgebra"] git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" @@ -2019,50 +2428,46 @@ uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" version = "0.1.1" [[deps.TermInterface]] -git-tree-sha1 = "6f0cee95e74d1f6891ba6b35b8b219fd3d11b567" +git-tree-sha1 = "d673e0aca9e46a2f63720201f55cc7b3e7169b16" uuid = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c" -version = "0.4.1" +version = "2.0.0" [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +[[deps.TestItems]] +git-tree-sha1 = "42fd9023fef18b9b78c8343a4e2f3813ffbcefcb" +uuid = "1c621080-faea-4a02-84b6-bbd5e436b8fe" +version = "1.0.0" + [[deps.ThreadingUtilities]] deps = ["ManualMemory"] -git-tree-sha1 = "eda08f7e9818eb53661b3deb74e3159460dfbc27" +git-tree-sha1 = "d969183d3d244b6c33796b5ed01ab97328f2db85" uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" -version = "0.5.2" +version = "0.5.5" [[deps.TimerOutputs]] deps = ["ExprTools", "Printf"] -git-tree-sha1 = "5a13ae8a41237cff5ecf34f73eb1b8f42fff6531" +git-tree-sha1 = "3748bd928e68c7c346b52125cf41fff0de6937d0" uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -version = "0.5.24" - -[[deps.Tokenize]] -git-tree-sha1 = "468b4685af4abe0e9fd4d7bf495a6554a6276e75" -uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624" version = "0.5.29" -[[deps.TranscodingStreams]] -git-tree-sha1 = "60df3f8126263c0d6b357b9a1017bb94f53e3582" -uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.11.0" -weakdeps = ["Random", "Test"] + [deps.TimerOutputs.extensions] + FlameGraphsExt = "FlameGraphs" - [deps.TranscodingStreams.extensions] - TestExt = ["Test", "Random"] + [deps.TimerOutputs.weakdeps] + FlameGraphs = "08572546-2f56-4bcf-ba4e-bab62c3a3f89" -[[deps.TriangularSolve]] -deps = ["CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "LoopVectorization", "Polyester", "Static", "VectorizationBase"] -git-tree-sha1 = "be986ad9dac14888ba338c2554dcfec6939e1393" -uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" -version = "0.2.1" +[[deps.TranscodingStreams]] +git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.11.3" [[deps.Tricks]] -git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" +git-tree-sha1 = "6cae795a5a9313bbb4f60683f7263318fc7d1505" uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.8" +version = "0.1.10" [[deps.TruncatedStacktraces]] deps = ["InteractiveUtils", "MacroTools", "Preferences"] @@ -2071,9 +2476,9 @@ uuid = "781d530d-4396-4725-bb49-402e4bee1e77" version = "1.4.0" [[deps.URIs]] -git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" +git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.5.1" +version = "1.6.1" [[deps.UUIDs]] deps = ["Random", "SHA"] @@ -2095,20 +2500,22 @@ version = "0.4.1" [[deps.Unitful]] deps = ["Dates", "LinearAlgebra", "Random"] -git-tree-sha1 = "dd260903fdabea27d9b6021689b3cd5401a57748" +git-tree-sha1 = "d2282232f8a4d71f79e85dc4dd45e5b12a6297fb" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.20.0" -weakdeps = ["ConstructionBase", "InverseFunctions"] +version = "1.23.1" +weakdeps = ["ConstructionBase", "ForwardDiff", "InverseFunctions", "Printf"] [deps.Unitful.extensions] ConstructionBaseUnitfulExt = "ConstructionBase" + ForwardDiffExt = "ForwardDiff" InverseFunctionsUnitfulExt = "InverseFunctions" + PrintfExt = "Printf" [[deps.UnitfulLatexify]] deps = ["LaTeXStrings", "Latexify", "Unitful"] -git-tree-sha1 = "975c354fcd5f7e1ddcc1f1a23e6e091d99e99bc8" +git-tree-sha1 = "af305cc62419f9bd61b6644d19170a4d258c7967" uuid = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" -version = "1.6.4" +version = "1.7.0" [[deps.Unityper]] deps = ["ConstructionBase"] @@ -2121,23 +2528,11 @@ git-tree-sha1 = "ca0969166a028236229f63514992fc073799bb78" uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" version = "0.2.0" -[[deps.VectorizationBase]] -deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "e7f5b81c65eb858bed630fe006837b935518aca5" -uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" -version = "0.21.70" - [[deps.VersionParsing]] git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" version = "1.3.0" -[[deps.VertexSafeGraphs]] -deps = ["Graphs"] -git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" -uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" -version = "0.2.0" - [[deps.Vulkan_Loader_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] git-tree-sha1 = "2f0486047a07670caad3a81a075d2e518acc5c59" @@ -2145,16 +2540,15 @@ uuid = "a44049a8-05dd-5a78-86c9-5fde0876e88c" version = "1.3.243+0" [[deps.Wayland_jll]] -deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "7558e29847e99bc3f04d6569e82d0f5c54460703" +deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "XML2_jll"] +git-tree-sha1 = "9300077d83c9eccfcac6a18b442d857d7e4f1684" uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -version = "1.21.0+1" +version = "1.23.1+2" -[[deps.Wayland_protocols_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "93f43ab61b16ddfb2fd3bb13b3ce241cafb0e6c9" -uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" -version = "1.31.0+0" +[[deps.WeakValueDicts]] +git-tree-sha1 = "98528c2610a5479f091d470967a25becfd83edd0" +uuid = "897b6980-f191-5a31-bcb0-bf3c4585e0c1" +version = "0.1.0" [[deps.Weave]] deps = ["Base64", "Dates", "Highlights", "JSON", "Markdown", "Mustache", "Pkg", "Printf", "REPL", "RelocatableFolders", "Requires", "Serialization", "YAML"] @@ -2164,183 +2558,171 @@ version = "0.10.12" [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "d9717ce3518dc68a99e6b96300813760d887a01d" +git-tree-sha1 = "b8b243e47228b4a3877f1dd6aee0c5d56db7fcf4" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.13.1+0" - -[[deps.XSLT_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "a54ee957f4c86b526460a720dbc882fa5edcbefc" -uuid = "aed1982a-8fda-507f-9586-7b0439959a61" -version = "1.1.41+0" +version = "2.13.6+1" [[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "ac88fb95ae6447c8dda6a5503f3bafd496ae8632" +git-tree-sha1 = "fee71455b0aaa3440dfdd54a9a36ccef829be7d4" uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -version = "5.4.6+0" +version = "5.8.1+0" [[deps.Xorg_libICE_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "326b4fea307b0b39892b3e85fa451692eda8d46c" +git-tree-sha1 = "a3ea76ee3f4facd7a64684f9af25310825ee3668" uuid = "f67eecfb-183a-506d-b269-f58e52b52d7c" -version = "1.1.1+0" +version = "1.1.2+0" [[deps.Xorg_libSM_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libICE_jll"] -git-tree-sha1 = "3796722887072218eabafb494a13c963209754ce" +git-tree-sha1 = "9c7ad99c629a44f81e7799eb05ec2746abb5d588" uuid = "c834827a-8449-5923-a945-d239c165b7dd" -version = "1.2.4+0" +version = "1.2.6+0" [[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] -git-tree-sha1 = "afead5aba5aa507ad5a3bf01f58f82c8d1403495" +git-tree-sha1 = "b5899b25d17bf1889d25906fb9deed5da0c15b3b" uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" -version = "1.8.6+0" +version = "1.8.12+0" [[deps.Xorg_libXau_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6035850dcc70518ca32f012e46015b9beeda49d8" +git-tree-sha1 = "aa1261ebbac3ccc8d16558ae6799524c450ed16b" uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" -version = "1.0.11+0" +version = "1.0.13+0" [[deps.Xorg_libXcursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "6c74ca84bbabc18c4547014765d194ff0b4dc9da" uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" -version = "1.2.0+4" +version = "1.2.4+0" [[deps.Xorg_libXdmcp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "34d526d318358a859d7de23da945578e8e8727b7" +git-tree-sha1 = "52858d64353db33a56e13c341d7bf44cd0d7b309" uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" -version = "1.1.4+0" +version = "1.1.6+0" [[deps.Xorg_libXext_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "d2d1a5c49fae4ba39983f63de6afcbea47194e85" +git-tree-sha1 = "a4c0ee07ad36bf8bbce1c3bb52d21fb1e0b987fb" uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" -version = "1.3.6+0" +version = "1.3.7+0" [[deps.Xorg_libXfixes_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "9caba99d38404b285db8801d5c45ef4f4f425a6d" uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" -version = "5.0.3+4" +version = "6.0.1+0" [[deps.Xorg_libXi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] -git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "a376af5c7ae60d29825164db40787f15c80c7c54" uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" -version = "1.7.10+4" +version = "1.8.3+0" [[deps.Xorg_libXinerama_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] -git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll"] +git-tree-sha1 = "a5bc75478d323358a90dc36766f3c99ba7feb024" uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" -version = "1.1.4+4" +version = "1.1.6+0" [[deps.Xorg_libXrandr_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "aff463c82a773cb86061bce8d53a0d976854923e" uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" -version = "1.5.2+4" +version = "1.5.5+0" [[deps.Xorg_libXrender_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "47e45cd78224c53109495b3e324df0c37bb61fbe" +git-tree-sha1 = "7ed9347888fac59a618302ee38216dd0379c480d" uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" -version = "0.9.11+0" - -[[deps.Xorg_libpthread_stubs_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8fdda4c692503d44d04a0603d9ac0982054635f9" -uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" -version = "0.1.1+0" +version = "0.9.12+0" [[deps.Xorg_libxcb_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] -git-tree-sha1 = "bcd466676fef0878338c61e655629fa7bbc69d8e" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXau_jll", "Xorg_libXdmcp_jll"] +git-tree-sha1 = "bfcaf7ec088eaba362093393fe11aa141fa15422" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.17.0+0" +version = "1.17.1+0" [[deps.Xorg_libxkbfile_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "730eeca102434283c50ccf7d1ecdadf521a765a4" +git-tree-sha1 = "e3150c7400c41e207012b41659591f083f3ef795" uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" -version = "1.1.2+0" +version = "1.1.3+0" [[deps.Xorg_xcb_util_cursor_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_jll", "Xorg_xcb_util_renderutil_jll"] -git-tree-sha1 = "04341cb870f29dcd5e39055f895c39d016e18ccd" +git-tree-sha1 = "c5bf2dad6a03dfef57ea0a170a1fe493601603f2" uuid = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" -version = "0.1.4+0" +version = "0.1.5+0" [[deps.Xorg_xcb_util_image_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "f4fc02e384b74418679983a97385644b67e1263b" uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] -git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll"] +git-tree-sha1 = "68da27247e7d8d8dafd1fcf0c3654ad6506f5f97" uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_keysyms_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "44ec54b0e2acd408b0fb361e1e9244c60c9c3dd4" uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_renderutil_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "5b0263b6d080716a02544c55fdff2c8d7f9a16a0" uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" -version = "0.3.9+1" +version = "0.3.10+0" [[deps.Xorg_xcb_util_wm_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "f233c83cad1fa0e70b7771e0e21b061a116f2763" uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" -version = "0.4.1+1" +version = "0.4.2+0" [[deps.Xorg_xkbcomp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] -git-tree-sha1 = "330f955bc41bb8f5270a369c473fc4a5a4e4d3cb" +git-tree-sha1 = "801a858fc9fb90c11ffddee1801bb06a738bda9b" uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" -version = "1.4.6+0" +version = "1.4.7+0" [[deps.Xorg_xkeyboard_config_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] -git-tree-sha1 = "691634e5453ad362044e2ad653e79f3ee3bb98c3" +git-tree-sha1 = "00af7ebdc563c9217ecc67776d1bbf037dbcebf4" uuid = "33bec58e-1273-512f-9401-5d533626f822" -version = "2.39.0+0" +version = "2.44.0+0" [[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e92a1a012a10506618f10b7047e478403a046c77" +git-tree-sha1 = "a63799ff68005991f9d9491b6e95bd3478d783cb" uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" -version = "1.5.0+0" +version = "1.6.0+0" [[deps.YAML]] deps = ["Base64", "Dates", "Printf", "StringEncodings"] -git-tree-sha1 = "80c3218f29cbc47111ac87e7be5e69cc05c6dd36" +git-tree-sha1 = "2f58ac39f64b41fb812340347525be3b590cce3b" uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" -version = "0.4.11" +version = "0.4.14" [[deps.ZMQ]] deps = ["FileWatching", "PrecompileTools", "Sockets", "ZeroMQ_jll"] -git-tree-sha1 = "ad6944a6b3dfd8e95920e48355d3baf510319262" +git-tree-sha1 = "2d060e1f014c07561817bf6f3c0eb66b309e04bd" uuid = "c2297ded-f4af-51ae-bb23-16f91089e4e1" -version = "1.2.6" +version = "1.4.1" [[deps.ZeroMQ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "libsodium_jll"] -git-tree-sha1 = "42f97fb27394378591666ab0e9cee369e6d0e1f9" +git-tree-sha1 = "766d90db2817565b667c1cc9cc420d668f2e8dba" uuid = "8f1865be-045e-5c20-9c9f-bfbfb0764568" -version = "4.3.5+0" +version = "4.3.6+0" [[deps.Zlib_jll]] deps = ["Libdl"] @@ -2349,86 +2731,86 @@ version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e678132f07ddb5bfa46857f0d7620fb9be675d3b" +git-tree-sha1 = "446b23e73536f84e8037f5dce465e92275f6a308" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.6+0" +version = "1.5.7+1" [[deps.eudev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "gperf_jll"] -git-tree-sha1 = "431b678a28ebb559d224c0b6b6d01afce87c51ba" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c3b0e6196d50eab0c5ed34021aaa0bb463489510" uuid = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" -version = "3.2.9+0" +version = "3.2.14+0" [[deps.fzf_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a68c9655fbe6dfcab3d972808f1aafec151ce3f8" +git-tree-sha1 = "b6a34e0e0960190ac2a4363a1bd003504772d631" uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" -version = "0.43.0+0" - -[[deps.gperf_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "3516a5630f741c9eecb3720b1ec9d8edc3ecc033" -uuid = "1a1c6b14-54f6-533d-8383-74cd7377aa70" -version = "3.1.1+0" +version = "0.61.1+0" [[deps.libaom_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "1827acba325fdcdf1d2647fc8d5301dd9ba43a9d" +git-tree-sha1 = "522c1df09d05a71785765d19c9524661234738e9" uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" -version = "3.9.0+0" +version = "3.11.0+0" [[deps.libass_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "e17c115d55c5fbb7e52ebedb427a0dca79d4484e" uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" -version = "0.15.1+0" +version = "0.15.2+0" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.11.0+0" + +[[deps.libdecor_jll]] +deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] +git-tree-sha1 = "9bf7903af251d2050b467f76bdbe57ce541f7f4f" +uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" +version = "0.2.2+0" [[deps.libevdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "141fe65dc3efabb0b1d5ba74e91f6ad26f84cc22" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "56d643b57b188d30cccc25e331d416d3d358e557" uuid = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" -version = "1.11.0+0" +version = "1.13.4+0" [[deps.libfdk_aac_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "646634dd19587a56ee2f1199563ec056c5f228df" uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" -version = "2.0.2+0" +version = "2.0.4+0" [[deps.libinput_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "eudev_jll", "libevdev_jll", "mtdev_jll"] -git-tree-sha1 = "ad50e5b90f222cfe78aa3d5183a20a12de1322ce" +deps = ["Artifacts", "JLLWrappers", "Libdl", "eudev_jll", "libevdev_jll", "mtdev_jll"] +git-tree-sha1 = "91d05d7f4a9f67205bd6cf395e488009fe85b499" uuid = "36db933b-70db-51c0-b978-0f229ee0e533" -version = "1.18.0+0" +version = "1.28.1+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "d7015d2e18a5fd9a4f47de711837e980519781a4" +git-tree-sha1 = "07b6a107d926093898e82b3b1db657ebe33134ec" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.43+1" +version = "1.6.50+0" [[deps.libsodium_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "848ab3d00fe39d6fbc2a8641048f8f272af1c51e" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "011b0a7331b41c25524b64dc42afc9683ee89026" uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8" -version = "1.0.20+0" +version = "1.0.21+0" [[deps.libvorbis_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] -git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll"] +git-tree-sha1 = "11e1772e7f3cc987e9d3de991dd4f6b2602663a5" uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" -version = "1.3.7+1" +version = "1.3.8+0" [[deps.mtdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "814e154bdb7be91d78b6802843f76b6ece642f11" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b4d631fd51f2e9cdd93724ae25b2efc198b059b1" uuid = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" -version = "1.1.6+0" +version = "1.1.7+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] @@ -2437,9 +2819,9 @@ version = "1.52.0+1" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "7d0ea0f4895ef2f5cb83645fa689e52cb55cf493" +git-tree-sha1 = "d5a767a3bb77135a99e433afe0eb14cd7f6914c3" uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" -version = "2021.12.0+0" +version = "2022.0.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] @@ -2459,7 +2841,7 @@ uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" version = "3.5.0+0" [[deps.xkbcommon_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] -git-tree-sha1 = "9c304562909ab2bab0262639bd4f444d7bc2be37" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "fbf139bce07a534df0e699dbb5f5cc9346f95cc1" uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" -version = "1.4.1+1" +version = "1.9.2+0" diff --git a/benchmarks/DAE/NANDGateProblem.jmd b/benchmarks/DAE/NANDGateProblem.jmd new file mode 100644 index 000000000..652936893 --- /dev/null +++ b/benchmarks/DAE/NANDGateProblem.jmd @@ -0,0 +1,419 @@ +--- +title: NAND Gate Differential-Algebraic Equation (DAE) Work-Precision Diagrams +author: Jayant Pranjal +--- + +```julia +using OrdinaryDiffEq, DiffEqDevTools, ModelingToolkit, ODEInterfaceDiffEq, + Plots, Sundials, DASSL, DASKR +using LinearAlgebra +using ModelingToolkit: t_nounits as t, D_nounits as D +``` + +## Problem Parameters + +```julia +const RGS = 4.0 +const RGD = 4.0 +const RBS = 10.0 +const RBD = 10.0 +const CGS = 6e-5 +const CGD = 6e-5 +const CBD = 2.4e-5 +const CBS = 2.4e-5 +const C9 = 5e-5 +const DELTA = 0.02 +const CURIS = 1e-14 +const VTH = 25.85 +const VDD = 5.0 +const VBB = -2.5 +const VT0_DEPL = -2.43 +const CGAMMA_DEPL = 0.2 +const PHI_DEPL = 1.28 +const BETA_DEPL = 5.35e-4 +const VT0_ENH = 0.2 +const CGAMMA_ENH = 0.035 +const PHI_ENH = 1.01 +const BETA_ENH = 1.748e-3 +``` + +## Input Signal Functions + +```julia +function pulse(t, t_start, v_low, t_rise, v_high, t_high, t_fall, t_period) + t_mod = mod(t, t_period) + + if t_mod < t_start + return v_low + elseif t_mod < t_start + t_rise + return v_low + (v_high - v_low) * (t_mod - t_start) / t_rise + elseif t_mod < t_start + t_rise + t_high + return v_high + elseif t_mod < t_start + t_rise + t_high + t_fall + return v_high - (v_high - v_low) * (t_mod - t_start - t_rise - t_high) / t_fall + else + return v_low + end +end + +V1(t) = pulse(t, 0.0, 0.0, 5.0, 5.0, 5.0, 5.0, 20.0) +V2(t) = pulse(t, 0.0, 0.0, 15.0, 5.0, 15.0, 5.0, 40.0) + +function V1_derivative(t) + t_mod = mod(t, 20.0) + if 0.0 < t_mod < 5.0 + return 1.0 + elseif 10.0 < t_mod < 15.0 + return -1.0 + else + return 0.0 + end +end +function V2_derivative(t) + t_mod = mod(t, 40.0) + if 0.0 < t_mod < 15.0 + return 1.0/15.0 + elseif 20.0 < t_mod < 35.0 + return -1.0/15.0 + else + return 0.0 + end +end +``` + +## MOSFET Model Functions + +```julia +function gdsp(ned, vds, vgs, vbs) + if ned == 1 + vt0, cgamma, phi, beta = VT0_DEPL, CGAMMA_DEPL, PHI_DEPL, BETA_DEPL + else + vt0, cgamma, phi, beta = VT0_ENH, CGAMMA_ENH, PHI_ENH, BETA_ENH + end + phi_vbs = max(phi - vbs, 1e-12) + phi_safe = max(phi, 1e-12) + vte = vt0 + cgamma * (sqrt(phi_vbs) - sqrt(phi_safe)) + if vgs - vte <= 0.0 + return 0.0 + elseif 0.0 < vgs - vte <= vds + return -beta * (vgs - vte)^2 * (1.0 + DELTA * vds) + elseif 0.0 < vds < vgs - vte + return -beta * vds * (2.0 * (vgs - vte) - vds) * (1.0 + DELTA * vds) + else + return 0.0 + end +end + +function gdsm(ned, vds, vgd, vbd) + if ned == 1 + vt0, cgamma, phi, beta = VT0_DEPL, CGAMMA_DEPL, PHI_DEPL, BETA_DEPL + else + vt0, cgamma, phi, beta = VT0_ENH, CGAMMA_ENH, PHI_ENH, BETA_ENH + end + phi_vbd = max(phi - vbd, 1e-12) + phi_safe = max(phi, 1e-12) + vte = vt0 + cgamma * (sqrt(phi_vbd) - sqrt(phi_safe)) + if vgd - vte <= 0.0 + return 0.0 + elseif 0.0 < vgd - vte <= -vds + return beta * (vgd - vte)^2 * (1.0 - DELTA * vds) + elseif 0.0 < -vds < vgd - vte + return -beta * vds * (2.0 * (vgd - vte) + vds) * (1.0 - DELTA * vds) + else + return 0.0 + end +end + +function ids(ned, vds, vgs, vbs, vgd, vbd) + if vds > 0.0 + return gdsp(ned, vds, vgs, vbs) + elseif vds == 0.0 + return 0.0 + else + return gdsm(ned, vds, vgd, vbd) + end +end + +function ibs(vbs) + if vbs <= 0.0 + return -CURIS * (exp(vbs / VTH) - 1.0) + else + return 0.0 + end +end + +function ibd(vbd) + if vbd <= 0.0 + return -CURIS * (exp(vbd / VTH) - 1.0) + else + return 0.0 + end +end +``` + +## DAE System Definition + +```julia +function nand_rhs!(f, y, p, t) + v1 = V1(t) + v2 = V2(t) + v1d = V1_derivative(t) + v2d = V2_derivative(t) + + y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12, y13, y14 = y + + f[1] = -(y1 - y5) / RGS - ids(1, y2 - y1, y5 - y1, y3 - y5, y5 - y2, y4 - VDD) + f[2] = -(y2 - VDD) / RGD + ids(1, y2 - y1, y5 - y1, y3 - y5, y5 - y2, y4 - VDD) + f[3] = -(y3 - VBB) / RBS + ibs(y3 - y5) + f[4] = -(y4 - VBB) / RBD + ibd(y4 - VDD) + f[5] = -(y5 - y1) / RGS - ibs(y3 - y5) - (y5 - y7) / RGD - ibd(y9 - y5) + + f[6] = CGS * v1d - (y6 - y10) / RGS - ids(2, y7 - y6, v1 - y6, y8 - y10, v1 - y7, y9 - y5) + f[7] = CGD * v1d - (y7 - y5) / RGD + ids(2, y7 - y6, v1 - y6, y8 - y10, v1 - y7, y9 - y5) + f[8] = -(y8 - VBB) / RBS + ibs(y8 - y10) + f[9] = -(y9 - VBB) / RBD + ibd(y9 - y5) + f[10] = -(y10 - y6) / RGS - ibs(y8 - y10) - (y10 - y12) / RGD - ibd(y14 - y10) + + f[11] = CGS * v2d - y11 / RGS - ids(2, y12 - y11, v2 - y11, y13, v2 - y12, y14 - y10) + f[12] = CGD * v2d - (y12 - y10) / RGD + ids(2, y12 - y11, v2 - y11, y13, v2 - y12, y14 - y10) + f[13] = -(y13 - VBB) / RBS + ibs(y13) + f[14] = -(y14 - VBB) / RBD + ibd(y14 - y10) + + return nothing +end + +# Mass matrix (singular is fine!) +dirMassMatrix = [ + CGS 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 CGD 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 CBS 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 CBD 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 CGS 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 CGD 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 CBS 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 CBD 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 CGS 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 CGD 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 CBS 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 CBD +] + +# Initial conditions +y0 = [5.0, 5.0, VBB, VBB, 5.0, 3.62385, 5.0, VBB, VBB, 3.62385, 0.0, 3.62385, VBB, VBB] +tspan = (0.0, 80.0) + +# Mass matrix problem (original approach) +mmf = ODEFunction(nand_rhs!, mass_matrix=dirMassMatrix) +mmprob = ODEProblem(mmf, y0, tspan) + +# DAEProblem version using direct DAE formulation +function nand_dae!(out, du, u, p, t) + v1 = V1(t) + v2 = V2(t) + v1d = V1_derivative(t) + v2d = V2_derivative(t) + + y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12, y13, y14 = u + dy1, dy2, dy3, dy4, dy5, dy6, dy7, dy8, dy9, dy10, dy11, dy12, dy13, dy14 = du + + # Differential equations: M*dy/dt - f = 0 + # Convert from mass matrix form: M*dy/dt = f => M*dy/dt - f = 0 + out[1] = CGS * dy1 - (-(y1 - y5) / RGS - ids(1, y2 - y1, y5 - y1, y3 - y5, y5 - y2, y4 - VDD)) + out[2] = CGD * dy2 - (-(y2 - VDD) / RGD + ids(1, y2 - y1, y5 - y1, y3 - y5, y5 - y2, y4 - VDD)) + out[3] = CBS * dy3 - (-(y3 - VBB) / RBS + ibs(y3 - y5)) + out[4] = CBD * dy4 - (-(y4 - VBB) / RBD + ibd(y4 - VDD)) + + # Algebraic equations: g(y) = 0 + out[5] = -(y5 - y1) / RGS - ibs(y3 - y5) - (y5 - y7) / RGD - ibd(y9 - y5) + + out[6] = CGS * dy6 - (CGS * v1d - (y6 - y10) / RGS - ids(2, y7 - y6, v1 - y6, y8 - y10, v1 - y7, y9 - y5)) + out[7] = CGD * dy7 - (CGD * v1d - (y7 - y5) / RGD + ids(2, y7 - y6, v1 - y6, y8 - y10, v1 - y7, y9 - y5)) + out[8] = CBS * dy8 - (-(y8 - VBB) / RBS + ibs(y8 - y10)) + out[9] = CBD * dy9 - (-(y9 - VBB) / RBD + ibd(y9 - y5)) + + # Algebraic equation: g(y) = 0 + out[10] = -(y10 - y6) / RGS - ibs(y8 - y10) - (y10 - y12) / RGD - ibd(y14 - y10) + + out[11] = CGS * dy11 - (CGS * v2d - y11 / RGS - ids(2, y12 - y11, v2 - y11, y13, v2 - y12, y14 - y10)) + out[12] = CGD * dy12 - (CGD * v2d - (y12 - y10) / RGD + ids(2, y12 - y11, v2 - y11, y13, v2 - y12, y14 - y10)) + out[13] = CBS * dy13 - (-(y13 - VBB) / RBS + ibs(y13)) + out[14] = CBD * dy14 - (-(y14 - VBB) / RBD + ibd(y14 - y10)) + + return nothing +end + +# Create DAE problem with automatic initialization +# Let IDA determine consistent initial derivatives automatically +du0_dae = zeros(14) +daeprob = DAEProblem(nand_dae!, du0_dae, y0, tspan) + +# Generate reference solutions +ref_sol = solve(mmprob, Rodas5P(), abstol=1e-12, reltol=1e-12, tstops=0.0:5.0:80.0) +dae_ref_sol = solve(daeprob, DASKR.daskr(), abstol=1e-10, reltol=1e-10) + +probs = [mmprob, daeprob] +refs = [ref_sol, dae_ref_sol] +``` + +## Generate Reference Solution and Plot + +```julia +plot(ref_sol, title="NAND Gate Circuit - Node Potentials (Mass Matrix)", + xlabel="Time", ylabel="Voltage (V)", legend=:outertopright) +``` + +```julia +plot(dae_ref_sol, title="NAND Gate Circuit - Node Potentials (DAE)", + xlabel="Time", ylabel="Voltage (V)", legend=:outertopright) +``` + +## Omissions + +Some solvers are omitted due to performance or stability issues at certain tolerances. + +## Work-Precision Benchmarks + +### High Tolerances + +```julia +abstols = 1.0 ./ 10.0 .^ (5:8) +reltols = 1.0 ./ 10.0 .^ (1:4) + +setups = [ + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] + +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep=false, appxsol=refs, + maxiters=Int(1e5), numruns=10, + tstops=0.0:5.0:80.0) +plot(wp, title="NAND Gate DAE - Work-Precision (High Tolerances)") +``` + +```julia +abstols = 1.0 ./ 10.0 .^ (6:8) +reltols = 1.0 ./ 10.0 .^ (2:4) + +setups = [ + Dict(:prob_choice => 1, :alg=>Rosenbrock23()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>Rodas5P()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] + +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep=false, appxsol=refs, + maxiters=Int(1e5), numruns=10, + tstops=0.0:5.0:80.0) +plot(wp, title="NAND Gate DAE - Work-Precision (Medium Tolerances)") +``` + +### Timeseries Errors + +```julia +abstols = 1.0 ./ 10.0 .^ (5:8) +reltols = 1.0 ./ 10.0 .^ (1:4) + +setups = [ + Dict(:prob_choice => 1, :alg=>Rosenbrock23()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>IDA()) +] + +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate=:l2, + save_everystep=false, appxsol=refs, + maxiters=Int(1e5), numruns=10, + tstops=0.0:5.0:80.0) +plot(wp, title="NAND Gate DAE - Timeseries Errors (High Tolerances)") +``` + +```julia +abstols = 1.0 ./ 10.0 .^ (6:8) +reltols = 1.0 ./ 10.0 .^ (2:4) + +setups = [ + Dict(:prob_choice => 1, :alg=>Rosenbrock23()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>Rodas5P()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] + +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate=:l2, + save_everystep=false, appxsol=refs, + maxiters=Int(1e5), numruns=10, + tstops=0.0:5.0:80.0) +plot(wp, title="NAND Gate DAE - Timeseries Errors (Medium Tolerances)") +``` + +### Low Tolerances (High Accuracy) + +This measures performance when high accuracy is needed. + +```julia +abstols = 1.0 ./ 10.0 .^ (7:12) +reltols = 1.0 ./ 10.0 .^ (4:9) + +setups = [ + Dict(:prob_choice => 1, :alg=>Rodas5P()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] + +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep=false, appxsol=refs, + maxiters=Int(1e5), numruns=10, + tstops=0.0:5.0:80.0) +plot(wp, title="NAND Gate DAE - Work-Precision (Low Tolerances)") +``` + +```julia +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate=:l2, + save_everystep=false, appxsol=refs, + maxiters=Int(1e5), numruns=10, + tstops=0.0:5.0:80.0) +plot(wp, title="NAND Gate DAE - Timeseries Errors (Low Tolerances)") +``` + +## Analysis of Key Nodes + +```julia +# Original 14-variable system: y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12, y13, y14 +key_nodes = [1, 5, 6, 10, 11, 12] # Representative nodes from different parts of the circuit +node_names = ["Node 1", "Node 5", "Node 6", "Node 10", "Node 11", "Node 12"] + +p_nodes = plot() +for (i, node) in enumerate(key_nodes) + plot!(ref_sol.t, [u[node] for u in ref_sol.u], + label=node_names[i], linewidth=2) +end +plot!(p_nodes, title="NAND Gate - Key Node Potentials", + xlabel="Time (s)", ylabel="Voltage (V)", legend=:outertopright) +``` + +### Conclusion + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/DAE/OregoDAE.jmd b/benchmarks/DAE/OregoDAE.jmd index 9d3cea7b8..1c98ad3e6 100644 --- a/benchmarks/DAE/OregoDAE.jmd +++ b/benchmarks/DAE/OregoDAE.jmd @@ -12,23 +12,22 @@ using ModelingToolkit: t_nounits as t, D_nounits as D @variables y1(t)=1.0 y2(t)=2.0 y3(t)=3.0 @parameters p1=77.27 p2=8.375e-6 p3=0.161 -eqs = [ - D(y1) ~ p1*(y2+y1*(1-p2*y1-y2)) - D(y2) ~ (y3-(1+y1)*y2)/p1 - D(y3) ~ p3*(y1-y3) -] +eqs = [D(y1) ~ p1*(y2+y1*(1-p2*y1-y2)) + D(y2) ~ (y3-(1+y1)*y2)/p1 + D(y3) ~ p3*(y1-y3)] @mtkbuild sys = ODESystem(eqs, t) -mtkprob = ODEProblem(sys,[],(0.0,30.0)) -daeprob = DAEProblem(sys,[D(y1)=>77.26935286375, - D(y2)=>-0.012941633234114146, - D(y3)=>-0.322],[],(0.0,30.0)) -odaeprob = ODAEProblem(sys,[],(0.0,30.0)) - -ref_sol = solve(daeprob,IDA(),abstol=1/10^14,reltol=1/10^14); -ode_ref_sol = solve(odaeprob,CVODE_BDF(),abstol=1/10^14,reltol=1/10^14); - -probs = [mtkprob,daeprob,odaeprob] -refs = [ref_sol,ref_sol,ode_ref_sol]; +mtkprob = ODEProblem(sys, [], (0.0, 30.0)) +daeprob = DAEProblem( + sys, [D(y1)=>77.26935286375, + D(y2)=>-0.012941633234114146, + D(y3)=>-0.322], [], (0.0, 30.0)) +odaeprob = ODAEProblem(sys, [], (0.0, 30.0)) + +ref_sol = solve(daeprob, IDA(), abstol = 1/10^14, reltol = 1/10^14); +ode_ref_sol = solve(odaeprob, CVODE_BDF(), abstol = 1/10^14, reltol = 1/10^14); + +probs = [mtkprob, daeprob, odaeprob] +refs = [ref_sol, ref_sol, ode_ref_sol]; ``` ```julia @@ -41,33 +40,33 @@ plot(ref_sol) abstols = 1.0 ./ 10.0 .^ (6:9) reltols = 1.0 ./ 10.0 .^ (2:5); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>rodas()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>rodas()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()) ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;print_names=true, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; print_names = true, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` ```julia setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 3, :alg=>Rosenbrock23()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>CVODE_BDF()), - Dict(:prob_choice => 3, :alg=>TRBDF2()), - Dict(:prob_choice => 3, :alg=>KenCarp4()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 3, :alg=>Rosenbrock23()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>CVODE_BDF()), + Dict(:prob_choice => 3, :alg=>TRBDF2()), + Dict(:prob_choice => 3, :alg=>KenCarp4()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -75,13 +74,13 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (6:8) reltols = 1.0 ./ 10.0 .^ (2:4); setups = [Dict(:prob_choice => 3, :alg=>Rosenbrock23()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 2, :alg=>DASSL.dassl()), - Dict(:prob_choice => 2, :alg=>DASKR.daskr()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASSL.dassl()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -91,18 +90,18 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (6:9) reltols = 1.0 ./ 10.0 .^ (2:5); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>rodas()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), - ] + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>rodas()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()) +] gr() -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -110,16 +109,16 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (6:9) reltols = 1.0 ./ 10.0 .^ (2:5); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 3, :alg=>Rosenbrock23()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>CVODE_BDF()), - Dict(:prob_choice => 3, :alg=>TRBDF2()), - Dict(:prob_choice => 3, :alg=>KenCarp4()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 3, :alg=>Rosenbrock23()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>CVODE_BDF()), + Dict(:prob_choice => 3, :alg=>TRBDF2()), + Dict(:prob_choice => 3, :alg=>KenCarp4()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -132,26 +131,26 @@ abstols = 1.0 ./ 10.0 .^ (7:12) reltols = 1.0 ./ 10.0 .^ (4:9) setups = [Dict(:prob_choice => 1, :alg=>Rodas5()), - Dict(:prob_choice => 3, :alg=>Rodas5()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>rodas()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), - ] + Dict(:prob_choice => 3, :alg=>Rodas5()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>rodas()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()) +] gr() -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -159,5 +158,5 @@ plot(wp) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/DAE/Project.toml b/benchmarks/DAE/Project.toml index 6455f2db8..cbf2f6737 100644 --- a/benchmarks/DAE/Project.toml +++ b/benchmarks/DAE/Project.toml @@ -7,6 +7,8 @@ ODEInterfaceDiffEq = "09606e27-ecf5-54fc-bb29-004bd9f985bf" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" SciMLBenchmarks = "31c91b34-3c75-11e9-0341-95557aab0344" +StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" +Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" [compat] @@ -18,5 +20,7 @@ ODEInterfaceDiffEq = "3.10" OrdinaryDiffEq = "6.19" Plots = "1" SciMLBenchmarks = "0.1" +StaticArrays = "1" +Statistics = "1" Sundials = "4.6" julia = "1.6" diff --git a/benchmarks/DAE/ROBERDAE.jmd b/benchmarks/DAE/ROBERDAE.jmd index 1248d34b9..71ab554c4 100644 --- a/benchmarks/DAE/ROBERDAE.jmd +++ b/benchmarks/DAE/ROBERDAE.jmd @@ -12,19 +12,17 @@ using ModelingToolkit: t_nounits as t, D_nounits as D @variables y₁(t)=1.0 y₂(t)=0.0 y₃(t)=0.0 @parameters k₁=0.04 k₂=3e7 k₃=1e4 -eqs = [ - D(y₁) ~ -k₁*y₁ + k₃*y₂*y₃ - D(y₂) ~ k₁*y₁ - k₃*y₂*y₃ - k₂*y₂^2 - 0 ~ y₁ + y₂ + y₃ - 1 -] -@mtkbuild sys = ODESystem(eqs,t) -mtkprob = ODEProblem(sys,[],(0.0,1e5)) -daeprob = DAEProblem(sys,[D(y₁)=>-0.04, - D(y₂)=>0.04],[],(0.0,1e5)) -odaeprob = ODAEProblem(sys,[],(0.0,1e5)) - -ref_sol = solve(daeprob,IDA(),abstol=1/10^14,reltol=1/10^14); -ode_ref_sol = solve(odaeprob,CVODE_BDF(),abstol=1/10^14,reltol=1/10^14); +eqs = [D(y₁) ~ -k₁*y₁ + k₃*y₂*y₃ + D(y₂) ~ k₁*y₁ - k₃*y₂*y₃ - k₂*y₂^2 + 0 ~ y₁ + y₂ + y₃ - 1] +@mtkbuild sys = ODESystem(eqs, t) +mtkprob = ODEProblem(sys, [], (0.0, 1e5)) +daeprob = DAEProblem(sys, [D(y₁)=>-0.04, + D(y₂)=>0.04], [], (0.0, 1e5)) +odaeprob = ODAEProblem(sys, [], (0.0, 1e5)) + +ref_sol = solve(daeprob, IDA(), abstol = 1/10^14, reltol = 1/10^14); +ode_ref_sol = solve(odaeprob, CVODE_BDF(), abstol = 1/10^14, reltol = 1/10^14); function rober(du, u, p, t) y₁, y₂, y₃ = u @@ -41,12 +39,12 @@ mmf = ODEFunction(rober, mass_matrix = M) mmprob = ODEProblem(mmf, [1.0, 0.0, 0.0], (0.0, 1e5), (0.04, 3e7, 1e4)) mm_refsol = solve(mmprob, Rodas5(), reltol = 1e-12, abstol = 1e-12) -probs = [mtkprob,daeprob,odaeprob, mmprob] -refs = [ref_sol,ref_sol,ode_ref_sol,mm_refsol]; +probs = [mtkprob, daeprob, odaeprob, mmprob] +refs = [ref_sol, ref_sol, ode_ref_sol, mm_refsol]; ``` ```julia -plot(ode_ref_sol, idxs = [y₁,y₂,y₃]) +plot(ode_ref_sol, idxs = [y₁, y₂, y₃]) ``` ## High Tolerances @@ -55,18 +53,18 @@ plot(ode_ref_sol, idxs = [y₁,y₂,y₃]) abstols = 1.0 ./ 10.0 .^ (5:8) reltols = 1.0 ./ 10.0 .^ (1:4); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>rodas()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>rodas()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()) ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -74,18 +72,18 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (6:8) reltols = 1.0 ./ 10.0 .^ (2:4); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 3, :alg=>Rosenbrock23()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>CVODE_BDF()), - Dict(:prob_choice => 3, :alg=>TRBDF2()), - Dict(:prob_choice => 3, :alg=>KenCarp4()), - Dict(:prob_choice => 4, :alg=>Rodas4()), - Dict(:prob_choice => 4, :alg=>Rodas5P()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 3, :alg=>Rosenbrock23()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>CVODE_BDF()), + Dict(:prob_choice => 3, :alg=>TRBDF2()), + Dict(:prob_choice => 3, :alg=>KenCarp4()), + Dict(:prob_choice => 4, :alg=>Rodas4()), + Dict(:prob_choice => 4, :alg=>Rodas5P()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -93,13 +91,13 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (6:8) reltols = 1.0 ./ 10.0 .^ (3:5); setups = [Dict(:prob_choice => 3, :alg=>Rosenbrock23()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 2, :alg=>DASSL.dassl()), - Dict(:prob_choice => 2, :alg=>DASKR.daskr()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASSL.dassl()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -109,17 +107,17 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (5:8) reltols = 1.0 ./ 10.0 .^ (1:4); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>rodas()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>rodas()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -127,16 +125,16 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (6:8) reltols = 1.0 ./ 10.0 .^ (2:4); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 3, :alg=>Rosenbrock23()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>CVODE_BDF()), - Dict(:prob_choice => 3, :alg=>TRBDF2()), - Dict(:prob_choice => 3, :alg=>KenCarp4()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 3, :alg=>Rosenbrock23()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>CVODE_BDF()), + Dict(:prob_choice => 3, :alg=>TRBDF2()), + Dict(:prob_choice => 3, :alg=>KenCarp4()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -149,29 +147,29 @@ abstols = 1.0 ./ 10.0 .^ (7:12) reltols = 1.0 ./ 10.0 .^ (4:9) setups = [Dict(:prob_choice => 1, :alg=>Rodas5()), - Dict(:prob_choice => 3, :alg=>Rodas5()), - Dict(:prob_choice => 4, :alg=>Rodas5()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 4, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>rodas()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 2, :alg=>DASKR.daskr()), - ] - -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 3, :alg=>Rodas5()), + Dict(:prob_choice => 4, :alg=>Rodas5()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 4, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>rodas()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] + +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -179,5 +177,5 @@ plot(wp) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/DAE/TransistorAmplifier.jmd b/benchmarks/DAE/TransistorAmplifier.jmd index 4e8990b69..1c63953e9 100644 --- a/benchmarks/DAE/TransistorAmplifier.jmd +++ b/benchmarks/DAE/TransistorAmplifier.jmd @@ -11,77 +11,74 @@ using ModelingToolkit: t_nounits as t, D_nounits as D using LinearAlgebra @parameters begin - Ub=6.0 - UF=0.026 - α=0.99 - β=1e-6 - R₀=1e3 - R₁=9e3 - R₂=9e3 - R₃=9e3 - R₄=9e3 - R₅=9e3 - R₆=9e3 - R₇=9e3 - R₈=9e3 - R₉=9e3 - C₁=1e-6 - C₂=2e-6 - C₃=3e-6 - C₄=4e-6 - C₅=5e-6 + Ub=6.0 + UF=0.026 + α=0.99 + β=1e-6 + R₀=1e3 + R₁=9e3 + R₂=9e3 + R₃=9e3 + R₄=9e3 + R₅=9e3 + R₆=9e3 + R₇=9e3 + R₈=9e3 + R₉=9e3 + C₁=1e-6 + C₂=2e-6 + C₃=3e-6 + C₄=4e-6 + C₅=5e-6 end @variables begin - y₁(t) = 0.0 - y₂(t) = 3.0 # Ub/(R₂/R₁ + 1) - y₃(t) = 3.0 - y₄(t) = 6.0 - y₅(t) = 3.0 # Ub/(R₆/R₅ + 1) - y₆(t) = 3.0 - y₇(t) = 6.0 - y₈(t) = 0.0 - tmp1(t) - tmp2(t) - tmp3(t) - tmp4(t) - tmp5(t) - tmp6(t) + y₁(t) = 0.0 + y₂(t) = 3.0 # Ub/(R₂/R₁ + 1) + y₃(t) = 3.0 + y₄(t) = 6.0 + y₅(t) = 3.0 # Ub/(R₆/R₅ + 1) + y₆(t) = 3.0 + y₇(t) = 6.0 + y₈(t) = 0.0 + tmp1(t) + tmp2(t) + tmp3(t) + tmp4(t) + tmp5(t) + tmp6(t) end Uₑ = 0.1sin(200π * t) g(x) = β * (exp(x / UF) - 1) -eqs = [ - tmp1 ~ (-Uₑ / R₀ + y₁ / R₀) / C₁ - tmp2 ~ (-Ub / R₂ + y₂ * (1 / R₁ + 1 / R₂) - (α - 1) * g(y₂ - y₃))/C₁ - D(y₂) - D(y₁) ~ tmp1 - D(y₁) - D(y₂) ~ tmp2 - -C₂ * D(y₃) ~ -g(y₂ - y₃) + y₃/R₃ - tmp5 ~ (-Ub / R₄ + y₄ / R₄ + α * g(y₂ - y₃))/C₃ - tmp6 ~ (-Ub / R₆ + y₅ * (1 / R₅ + 1 / R₆) - (α - 1) * g(y₅ - y₆))/C₃ - D(y₅) - D(y₄) ~ tmp5 - -D(y₅) + D(y₄) ~ tmp6 - -C₄ * D(y₆) ~ -g(y₅ - y₆) + y₆ / R₇ - tmp3 ~ (-Ub / R₈ + y₇ / R₈ + α * g(y₅ - y₆) )/C₅ - tmp4 ~ (y₈ / R₉) / C₅ - -D(y₇) + D(y₈) ~ tmp3 - D(y₇) - D(y₈) ~ tmp4 -] - -u0 = [y₁ => 0.0 - y₂ => 3.0 - y₃ => 3.0 - y₄ => 6.0 - y₅ => 3.0 - y₆ => 3.0 - y₇ => 6.0 - y₈ => 0.0 -] +eqs = [tmp1 ~ (-Uₑ / R₀ + y₁ / R₀) / C₁ + tmp2 ~ (-Ub / R₂ + y₂ * (1 / R₁ + 1 / R₂) - (α - 1) * g(y₂ - y₃))/C₁ + D(y₂) - D(y₁) ~ tmp1 + D(y₁) - D(y₂) ~ tmp2 + -C₂ * D(y₃) ~ -g(y₂ - y₃) + y₃/R₃ + tmp5 ~ (-Ub / R₄ + y₄ / R₄ + α * g(y₂ - y₃))/C₃ + tmp6 ~ (-Ub / R₆ + y₅ * (1 / R₅ + 1 / R₆) - (α - 1) * g(y₅ - y₆))/C₃ + D(y₅) - D(y₄) ~ tmp5 + -D(y₅) + D(y₄) ~ tmp6 + -C₄ * D(y₆) ~ -g(y₅ - y₆) + y₆ / R₇ + tmp3 ~ (-Ub / R₈ + y₇ / R₈ + α * g(y₅ - y₆))/C₅ + tmp4 ~ (y₈ / R₉) / C₅ + -D(y₇) + D(y₈) ~ tmp3 + D(y₇) - D(y₈) ~ tmp4] + +u0 = [y₁ => 0.0 + y₂ => 3.0 + y₃ => 3.0 + y₄ => 6.0 + y₅ => 3.0 + y₆ => 3.0 + y₇ => 6.0 + y₈ => 0.0] @mtkbuild sys = ODESystem(eqs, t) tspan = (0.0, 0.2) -mtkprob = ODEProblem(sys, u0, tspan) +mtkprob = ODEProblem(sys, u0, tspan) ref_sol = solve(mtkprob, Rodas5P(), abstol = 1e-10, reltol = 1e-10) du = mtkprob.f(mtkprob.u0, mtkprob.p, 0.0) @@ -124,30 +121,28 @@ function transamp(du, u, p, t) nothing end -dirMassMatrix = - Float64.(ModelingToolkit.unwrap.(substitute.( - [-C₁ C₁ 0 0 0 0 0 0 - C₁ -C₁ 0 0 0 0 0 0 - 0 0 -C₂ 0 0 0 0 0 - 0 0 0 -C₃ C₃ 0 0 0 - 0 0 0 C₃ -C₃ 0 0 0 - 0 0 0 0 0 -C₄ 0 0 - 0 0 0 0 0 0 -C₅ C₅ - 0 0 0 0 0 0 C₅ -C₅], - (parameters(sys) .=> ModelingToolkit.getdefault.(parameters(sys)),)))) +dirMassMatrix = Float64.(ModelingToolkit.unwrap.(substitute.( + [-C₁ C₁ 0 0 0 0 0 0 + C₁ -C₁ 0 0 0 0 0 0 + 0 0 -C₂ 0 0 0 0 0 + 0 0 0 -C₃ C₃ 0 0 0 + 0 0 0 C₃ -C₃ 0 0 0 + 0 0 0 0 0 -C₄ 0 0 + 0 0 0 0 0 0 -C₅ C₅ + 0 0 0 0 0 0 C₅ -C₅], + (parameters(sys) .=> ModelingToolkit.getdefault.(parameters(sys)),)))) mmf = ODEFunction(transamp, mass_matrix = dirMassMatrix) -mmprob = ODEProblem(mmf, [0.0,3.0,3.0,6.0,3.0,3.0,6.0,0.0], tspan) +mmprob = ODEProblem(mmf, [0.0, 3.0, 3.0, 6.0, 3.0, 3.0, 6.0, 0.0], tspan) mm_refsol = solve(mmprob, Rodas5(), reltol = 1e-12, abstol = 1e-12) -probs = [mtkprob,daeprob,mmprob] -refs = [ref_sol,ref_sol,mm_refsol]; +probs = [mtkprob, daeprob, mmprob] +refs = [ref_sol, ref_sol, mm_refsol]; ``` ```julia -plot(ref_sol, idxs = [y₁,y₂,y₃,y₄,y₅,y₆,y₇,y₈]) +plot(ref_sol, idxs = [y₁, y₂, y₃, y₄, y₅, y₆, y₇, y₈]) ``` - ```julia plot(mm_refsol) ``` @@ -163,16 +158,16 @@ plot(mm_refsol) abstols = 1.0 ./ 10.0 .^ (5:8) reltols = 1.0 ./ 10.0 .^ (1:4); setups = [Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()) ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -180,17 +175,17 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (6:8) reltols = 1.0 ./ 10.0 .^ (2:4); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 3, :alg=>Rodas5P()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>rodas()), - Dict(:prob_choice => 3, :alg=>FBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 2, :alg=>DASKR.daskr()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 3, :alg=>Rodas5P()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>rodas()), + Dict(:prob_choice => 3, :alg=>FBDF()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -200,16 +195,16 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (5:8) reltols = 1.0 ./ 10.0 .^ (1:4); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -217,17 +212,17 @@ plot(wp) abstols = 1.0 ./ 10.0 .^ (6:8) reltols = 1.0 ./ 10.0 .^ (2:4); setups = [Dict(:prob_choice => 1, :alg=>Rosenbrock23()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 3, :alg=>Rodas5P()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>rodas()), - Dict(:prob_choice => 3, :alg=>FBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 2, :alg=>DASKR.daskr()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 3, :alg=>Rodas5P()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>rodas()), + Dict(:prob_choice => 3, :alg=>FBDF()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -240,26 +235,26 @@ abstols = 1.0 ./ 10.0 .^ (7:12) reltols = 1.0 ./ 10.0 .^ (4:9) setups = [Dict(:prob_choice => 1, :alg=>Rodas5P()), - Dict(:prob_choice => 3, :alg=>Rodas5P()), - Dict(:prob_choice => 1, :alg=>Rodas4()), - Dict(:prob_choice => 3, :alg=>Rodas4()), - Dict(:prob_choice => 1, :alg=>FBDF()), - Dict(:prob_choice => 1, :alg=>QNDF()), - Dict(:prob_choice => 1, :alg=>radau()), - Dict(:prob_choice => 1, :alg=>RadauIIA5()), - Dict(:prob_choice => 2, :alg=>DFBDF()), - Dict(:prob_choice => 2, :alg=>IDA()), - Dict(:prob_choice => 2, :alg=>DASKR.daskr()), - ] + Dict(:prob_choice => 3, :alg=>Rodas5P()), + Dict(:prob_choice => 1, :alg=>Rodas4()), + Dict(:prob_choice => 3, :alg=>Rodas4()), + Dict(:prob_choice => 1, :alg=>FBDF()), + Dict(:prob_choice => 1, :alg=>QNDF()), + Dict(:prob_choice => 1, :alg=>radau()), + Dict(:prob_choice => 1, :alg=>RadauIIA5()), + Dict(:prob_choice => 2, :alg=>DFBDF()), + Dict(:prob_choice => 2, :alg=>IDA()), + Dict(:prob_choice => 2, :alg=>DASKR.daskr()) +] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;error_estimate = :l2, - save_everystep=false,appxsol=refs,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; error_estimate = :l2, + save_everystep = false, appxsol = refs, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -267,5 +262,5 @@ plot(wp) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/DynamicalODE/Henon-Heiles_energy_conservation_benchmark.jmd b/benchmarks/DynamicalODE/Henon-Heiles_energy_conservation_benchmark.jmd index 264084725..38873d62c 100644 --- a/benchmarks/DynamicalODE/Henon-Heiles_energy_conservation_benchmark.jmd +++ b/benchmarks/DynamicalODE/Henon-Heiles_energy_conservation_benchmark.jmd @@ -19,25 +19,25 @@ In order to separate these two, we will use `iip` for the in-place names and `oo using OrdinaryDiffEq, Plots, DiffEqCallbacks using SciMLBenchmarks using TaylorIntegration, LinearAlgebra, StaticArrays -gr(fmt=:png) -default(fmt=:png) +gr(fmt = :png) +default(fmt = :png) T(p) = 1//2 * norm(p)^2 -V(q) = 1//2 * (q[1]^2 + q[2]^2 + 2q[1]^2 * q[2]- 2//3 * q[2]^3) -H(p,q, params) = T(p) + V(q) +V(q) = 1//2 * (q[1]^2 + q[2]^2 + 2q[1]^2 * q[2]-2//3 * q[2]^3) +H(p, q, params) = T(p) + V(q) -function iip_dq(dq,p,q,params,t) +function iip_dq(dq, p, q, params, t) dq[1] = p[1] dq[2] = p[2] end -function iip_dp(dp,p,q,params,t) +function iip_dp(dp, p, q, params, t) dp[1] = -q[1] * (1 + 2q[2]) dp[2] = -q[2] - (q[1]^2 - q[2]^2) end -const iip_q0 = [0.1, 0.] -const iip_p0 = [0., 0.5] +const iip_q0 = [0.1, 0.0] +const iip_p0 = [0.0, 0.5] function oop_dq(p, q, params, t) p @@ -49,8 +49,8 @@ function oop_dp(p, q, params, t) @SVector [dp1, dp2] end -const oop_q0 = @SVector [0.1, 0.] -const oop_p0 = @SVector [0., 0.5] +const oop_q0 = @SVector [0.1, 0.0] +const oop_p0 = @SVector [0.0, 0.5] function hamilton(du, u, p, t) dq, q = @views u[3:4], du[3:4] @@ -76,7 +76,7 @@ function g_jacobian(J, u, p) J[2:4, :] .= 0 end -const cb = ManifoldProjection(g, manifold_jacobian=g_jacobian, nlopts=Dict(:ftol => 1e-13)) +const cb = ManifoldProjection(g, manifold_jacobian = g_jacobian, nlopts = Dict(:ftol => 1e-13)) const E = H(iip_p0, iip_q0, nothing) ``` @@ -84,46 +84,59 @@ const E = H(iip_p0, iip_q0, nothing) For the comparison we will use the following function ```julia -energy_err(sol) = map(i -> H([sol[1, i], sol[2, i]], [sol[3, i], sol[4, i]], nothing) - E, 1:length(sol.u)) -abs_energy_err(sol) = [abs.(H([sol[1, j], sol[2, j]], [sol[3, j], sol[4, j]], nothing) - E) for j=1:length(sol.u)] +function energy_err(sol) + map(i -> H([sol[1, i], sol[2, i]], [sol[3, i], sol[4, i]], nothing) - E, 1:length(sol.u)) +end +function abs_energy_err(sol) + [abs.(H([sol[1, j], sol[2, j]], [sol[3, j], sol[4, j]], nothing) - E) + for j in 1:length(sol.u)] +end -function compare(mode=:inplace, all=true, plt=nothing; tmax=1e2) +function compare(mode = :inplace, all = true, plt = nothing; tmax = 1e2) if mode == :inplace - prob = DynamicalODEProblem(iip_dp, iip_dq, iip_p0, iip_q0, (0., tmax)) + prob = DynamicalODEProblem(iip_dp, iip_dq, iip_p0, iip_q0, (0.0, tmax)) else - prob = DynamicalODEProblem(oop_dp, oop_dq, oop_p0, oop_q0, (0., tmax)) + prob = DynamicalODEProblem(oop_dp, oop_dq, oop_p0, oop_q0, (0.0, tmax)) end - prob_linear = ODEProblem(hamilton, vcat(iip_p0, iip_q0), (0., tmax)) + prob_linear = ODEProblem(hamilton, vcat(iip_p0, iip_q0), (0.0, tmax)) GC.gc() - (mode == :inplace && all) && @time sol1 = solve(prob, Vern9(), callback=cb, abstol=1e-14, reltol=1e-14) + (mode == :inplace && all) && + @time sol1 = solve(prob, Vern9(), callback = cb, abstol = 1e-14, reltol = 1e-14) GC.gc() - @time sol2 = solve(prob, KahanLi8(), dt=1e-2, maxiters=1e10) + @time sol2 = solve(prob, KahanLi8(), dt = 1e-2, maxiters = 1e10) GC.gc() - @time sol3 = solve(prob, SofSpa10(), dt=1e-2, maxiters=1e8) + @time sol3 = solve(prob, SofSpa10(), dt = 1e-2, maxiters = 1e8) GC.gc() - @time sol4 = solve(prob, Vern9(), abstol=1e-14, reltol=1e-14) + @time sol4 = solve(prob, Vern9(), abstol = 1e-14, reltol = 1e-14) GC.gc() - @time sol5 = solve(prob, DPRKN12(), abstol=1e-14, reltol=1e-14) + @time sol5 = solve(prob, DPRKN12(), abstol = 1e-14, reltol = 1e-14) GC.gc() - (mode == :inplace && all) && @time sol6 = solve(prob_linear, TaylorMethod(50), abstol=1e-20) + (mode == :inplace && all) && + @time sol6 = solve(prob_linear, TaylorMethod(50), abstol = 1e-20) - (mode == :inplace && all) && println("Vern9 + ManifoldProjection max energy error:\t" * "$(maximum(abs_energy_err(sol1)))\tin\t$(length(sol1.u))\tsteps.") + (mode == :inplace && all) && println("Vern9 + ManifoldProjection max energy error:\t" * + "$(maximum(abs_energy_err(sol1)))\tin\t$(length(sol1.u))\tsteps.") println("KahanLi8 max energy error:\t\t\t$(maximum(abs_energy_err(sol2)))\tin\t$(length(sol2.u))\tsteps.") println("SofSpa10 max energy error:\t\t\t$(maximum(abs_energy_err(sol3)))\tin\t$(length(sol3.u))\tsteps.") println("Vern9 max energy error:\t\t\t\t$(maximum(abs_energy_err(sol4)))\tin\t$(length(sol4.u))\tsteps.") println("DPRKN12 max energy error:\t\t\t$(maximum(abs_energy_err(sol5)))\tin\t$(length(sol5.u))\tsteps.") - (mode == :inplace && all) && println("TaylorMethod max energy error:\t\t\t$(maximum(abs_energy_err(sol6)))\tin\t$(length(sol6.u))\tsteps.") + (mode == :inplace && all) && + println("TaylorMethod max energy error:\t\t\t$(maximum(abs_energy_err(sol6)))\tin\t$(length(sol6.u))\tsteps.") if plt === nothing - plt = plot(xlabel="t", ylabel="Energy error") + plt = plot(xlabel = "t", ylabel = "Energy error") end - (mode == :inplace && all) && plot!(sol1.t, energy_err(sol1), label="Vern9 + ManifoldProjection") - plot!(sol2.t, energy_err(sol2), label="KahanLi8", ls=mode == :inplace ? :solid : :dash) - plot!(sol3.t, energy_err(sol3), label="SofSpa10", ls=mode == :inplace ? :solid : :dash) - plot!(sol4.t, energy_err(sol4), label="Vern9", ls=mode == :inplace ? :solid : :dash) - plot!(sol5.t, energy_err(sol5), label="DPRKN12", ls=mode == :inplace ? :solid : :dash) - (mode == :inplace && all) && plot!(sol6.t, energy_err(sol6), label="TaylorMethod") + (mode == :inplace && all) && + plot!(sol1.t, energy_err(sol1), label = "Vern9 + ManifoldProjection") + plot!(sol2.t, energy_err(sol2), label = "KahanLi8", ls = mode == :inplace ? :solid : + :dash) + plot!(sol3.t, energy_err(sol3), label = "SofSpa10", ls = mode == :inplace ? :solid : + :dash) + plot!(sol4.t, energy_err(sol4), label = "Vern9", ls = mode == :inplace ? :solid : :dash) + plot!(sol5.t, energy_err(sol5), label = "DPRKN12", ls = mode == :inplace ? :solid : + :dash) + (mode == :inplace && all) && plot!(sol6.t, energy_err(sol6), label = "TaylorMethod") return plt end @@ -136,25 +149,26 @@ The `plt` argument can be used to overlay the results over a previous plot and t the simulation time. Note: -1. The `Vern9` method is used with `ODEProblem` because of performance issues with `ArrayPartition` indexing which manifest for `DynamicalODEProblem`. -2. The `NLsolve` call used by `ManifoldProjection` was modified to use `ftol=1e-13` in order to obtain a very low energy error. + + 1. The `Vern9` method is used with `ODEProblem` because of performance issues with `ArrayPartition` indexing which manifest for `DynamicalODEProblem`. + 2. The `NLsolve` call used by `ManifoldProjection` was modified to use `ftol=1e-13` in order to obtain a very low energy error. Here are the results of the comparisons between the in place methods: ```julia -compare(tmax=1e2) +compare(tmax = 1e2) ``` ```julia -compare(tmax=1e3) +compare(tmax = 1e3) ``` ```julia -compare(tmax=1e4) +compare(tmax = 1e4) ``` ```julia -compare(tmax=5e4) +compare(tmax = 5e4) ``` We can see that as the simulation time increases, the energy error increases. For this particular example @@ -168,37 +182,37 @@ We will now compare the in place with the out of place versions. In the plots be a dashed line for the out of place versions. ```julia -function in_vs_out(;all=false, tmax=1e2) +function in_vs_out(; all = false, tmax = 1e2) println("In place versions:") - plt = compare(:inplace, all, tmax=tmax) + plt = compare(:inplace, all, tmax = tmax) println("\nOut of place versions:") - plt = compare(:oop, false, plt; tmax=tmax) + plt = compare(:oop, false, plt; tmax = tmax) end ``` First, here is a summary of all the available methods for `tmax = 1e3`: ```julia -in_vs_out(all=true, tmax=1e3) +in_vs_out(all = true, tmax = 1e3) ``` Now we will compare the in place and the out of place versions, but only for the integrators that are compatible with `StaticArrays` ```julia -in_vs_out(tmax=1e2) +in_vs_out(tmax = 1e2) ``` ```julia -in_vs_out(tmax=1e3) +in_vs_out(tmax = 1e3) ``` ```julia -in_vs_out(tmax=1e4) +in_vs_out(tmax = 1e4) ``` ```julia -in_vs_out(tmax=5e4) +in_vs_out(tmax = 5e4) ``` As we see from the above comparisons, the `StaticArray` versions are significantly faster and use less memory. @@ -210,5 +224,5 @@ The benchmarks were performed on a machine with ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` \ No newline at end of file +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/DynamicalODE/Quadrupole_boson_Hamiltonian_energy_conservation_benchmark.jmd b/benchmarks/DynamicalODE/Quadrupole_boson_Hamiltonian_energy_conservation_benchmark.jmd index c17d25b85..82c2b03ad 100644 --- a/benchmarks/DynamicalODE/Quadrupole_boson_Hamiltonian_energy_conservation_benchmark.jmd +++ b/benchmarks/DynamicalODE/Quadrupole_boson_Hamiltonian_energy_conservation_benchmark.jmd @@ -16,13 +16,16 @@ using TaylorIntegration using ParameterizedFunctions using StaticArrays gr() -default(fmt=:png) +default(fmt = :png) T(p) = A / 2 * norm(p)^2 -V(q) = A / 2 * (q[1]^2 + q[2]^2) + B / sqrt(2) * q[1] * (3 * q[2]^2 - q[1]^2) + D / 4 * (q[1]^2 + q[2]^2)^2 +function V(q) + A / 2 * (q[1]^2 + q[2]^2) + B / sqrt(2) * q[1] * (3 * q[2]^2 - q[1]^2) + + D / 4 * (q[1]^2 + q[2]^2)^2 +end H(p, q, params) = T(p) + V(q) -const A, B, D = 1., 0.55, 0.4 +const A, B, D = 1.0, 0.55, 0.4 function iip_dq(dq, p, q, params, t) dq[1] = A * p[1] @@ -35,8 +38,8 @@ function iip_dp(dp, p, q, params, t) end const iip_q0 = [4.919080920016389, 2.836942666663649] -const iip_p0 = [0., 0.] -const iip_u0 = vcat(iip_p0,iip_q0) +const iip_p0 = [0.0, 0.0] +const iip_u0 = vcat(iip_p0, iip_q0) function oop_dq(p, q, params, t) p @@ -49,20 +52,20 @@ function oop_dp(p, q, params, t) end const oop_q0 = @SVector [4.919080920016389, 2.836942666663649] -const oop_p0 = @SVector [0., 0.] -const oop_u0 = vcat(oop_p0,oop_q0) +const oop_p0 = @SVector [0.0, 0.0] +const oop_u0 = vcat(oop_p0, oop_q0) function hamilton(z, params, t) SVector( - -A * z[3] - 3 * B / sqrt(2) * (z[4]^2 - z[3]^2) - D * z[3] * (z[3]^2 + z[4]^2), - -z[4] * (A + 3 * sqrt(2) * B * z[3] + D * (z[3]^2 + z[4]^2)), - z[1], - z[2] + -A * z[3] - 3 * B / sqrt(2) * (z[4]^2 - z[3]^2) - D * z[3] * (z[3]^2 + z[4]^2), + -z[4] * (A + 3 * sqrt(2) * B * z[3] + D * (z[3]^2 + z[4]^2)), + z[1], + z[2] ) end function g(resid, u, p) - resid[1] = H([u[1],u[2]],[u[3],u[4]],nothing) - E + resid[1] = H([u[1], u[2]], [u[3], u[4]], nothing) - E resid[2:4] .= 0 end @@ -76,55 +79,67 @@ end const E = H(iip_p0, iip_q0, nothing) const resid_prototype = zeros(4) -const cb = ManifoldProjection(g, manifold_jacobian=g_jacobian, resid_prototype=resid_prototype, nlopts=Dict(:ftol=>1e-13)) +const cb = ManifoldProjection(g, manifold_jacobian = g_jacobian, + resid_prototype = resid_prototype, nlopts = Dict(:ftol=>1e-13)) ``` For the comparison we will use the following function ```julia -energy_err(sol) = map(i->H([sol[1,i], sol[2,i]], [sol[3,i], sol[4,i]],nothing)-E, 1:length(sol.u)) -abs_energy_err(sol) = [abs.(H([sol[1,j], sol[2,j]], [sol[3,j], sol[4,j]],nothing) - E) for j=1:length(sol.u)] +function energy_err(sol) + map(i->H([sol[1, i], sol[2, i]], [sol[3, i], sol[4, i]], nothing)-E, 1:length(sol.u)) +end +function abs_energy_err(sol) + [abs.(H([sol[1, j], sol[2, j]], [sol[3, j], sol[4, j]], nothing) - E) + for j in 1:length(sol.u)] +end -function compare(mode=:inplace, all=true, plt=nothing; tmax=1e2) +function compare(mode = :inplace, all = true, plt = nothing; tmax = 1e2) if mode == :inplace - prob = DynamicalODEProblem(iip_dp, iip_dq, iip_p0, iip_q0, (0., tmax)) + prob = DynamicalODEProblem(iip_dp, iip_dq, iip_p0, iip_q0, (0.0, tmax)) else - prob = DynamicalODEProblem(oop_dp, oop_dq, oop_p0, oop_q0, (0., tmax)) + prob = DynamicalODEProblem(oop_dp, oop_dq, oop_p0, oop_q0, (0.0, tmax)) end - prob_linear = ODEProblem(hamilton, vcat(iip_p0, iip_q0), (0., tmax)) + prob_linear = ODEProblem(hamilton, vcat(iip_p0, iip_q0), (0.0, tmax)) GC.gc() - (mode == :inplace && all) && @time sol1 = solve(prob, Vern9(), callback=cb, abstol=1e-14, reltol=1e-14) + (mode == :inplace && all) && + @time sol1 = solve(prob, Vern9(), callback = cb, abstol = 1e-14, reltol = 1e-14) GC.gc() - @time sol2 = solve(prob, KahanLi8(), dt=1e-2, maxiters=1e10) + @time sol2 = solve(prob, KahanLi8(), dt = 1e-2, maxiters = 1e10) GC.gc() - @time sol3 = solve(prob, SofSpa10(), dt=1e-2, maxiters=1e8) + @time sol3 = solve(prob, SofSpa10(), dt = 1e-2, maxiters = 1e8) GC.gc() - @time sol4 = solve(prob, Vern9(), abstol=1e-14, reltol=1e-14) + @time sol4 = solve(prob, Vern9(), abstol = 1e-14, reltol = 1e-14) GC.gc() - @time sol5 = solve(prob, DPRKN12(), abstol=1e-14, reltol=1e-14) + @time sol5 = solve(prob, DPRKN12(), abstol = 1e-14, reltol = 1e-14) GC.gc() - (mode == :inplace && all) && @time sol6 = solve(prob_linear, TaylorMethod(50), abstol=1e-20) + (mode == :inplace && all) && + @time sol6 = solve(prob_linear, TaylorMethod(50), abstol = 1e-20) - (mode == :inplace && all) && println("Vern9 + ManifoldProjection max energy error:\t"* - "$(maximum(abs_energy_err(sol1)))\tin\t$(length(sol1.u))\tsteps.") + (mode == :inplace && all) && println("Vern9 + ManifoldProjection max energy error:\t" * + "$(maximum(abs_energy_err(sol1)))\tin\t$(length(sol1.u))\tsteps.") println("KahanLi8 max energy error:\t\t\t$(maximum(abs_energy_err(sol2)))\tin\t$(length(sol2.u))\tsteps.") println("SofSpa10 max energy error:\t\t\t$(maximum(abs_energy_err(sol3)))\tin\t$(length(sol3.u))\tsteps.") println("Vern9 max energy error:\t\t\t\t$(maximum(abs_energy_err(sol4)))\tin\t$(length(sol4.u))\tsteps.") println("DPRKN12 max energy error:\t\t\t$(maximum(abs_energy_err(sol5)))\tin\t$(length(sol5.u))\tsteps.") - (mode == :inplace && all) && println("TaylorMethod max energy error:\t\t\t$(maximum(abs_energy_err(sol6)))"* - "\tin\t$(length(sol6.u))\tsteps.") + (mode == :inplace && all) && + println("TaylorMethod max energy error:\t\t\t$(maximum(abs_energy_err(sol6)))" * + "\tin\t$(length(sol6.u))\tsteps.") if plt == nothing - plt = plot(xlabel="t", ylabel="Energy error") + plt = plot(xlabel = "t", ylabel = "Energy error") end - (mode == :inplace && all) && plot!(sol1.t, energy_err(sol1), label="Vern9 + ManifoldProjection") - plot!(sol2.t, energy_err(sol2), label="KahanLi8", ls=mode==:inplace ? :solid : :dash) - plot!(sol3.t, energy_err(sol3), label="SofSpa10", ls=mode==:inplace ? :solid : :dash) - plot!(sol4.t, energy_err(sol4), label="Vern9", ls=mode==:inplace ? :solid : :dash) - plot!(sol5.t, energy_err(sol5), label="DPRKN12", ls=mode==:inplace ? :solid : :dash) - (mode == :inplace && all) && plot!(sol6.t, energy_err(sol6), label="TaylorMethod") + (mode == :inplace && all) && + plot!(sol1.t, energy_err(sol1), label = "Vern9 + ManifoldProjection") + plot!(sol2.t, energy_err(sol2), label = "KahanLi8", ls = mode==:inplace ? :solid : + :dash) + plot!(sol3.t, energy_err(sol3), label = "SofSpa10", ls = mode==:inplace ? :solid : + :dash) + plot!(sol4.t, energy_err(sol4), label = "Vern9", ls = mode==:inplace ? :solid : :dash) + plot!(sol5.t, energy_err(sol5), label = "DPRKN12", ls = mode==:inplace ? :solid : :dash) + (mode == :inplace && all) && plot!(sol6.t, energy_err(sol6), label = "TaylorMethod") return plt end @@ -135,25 +150,26 @@ and the out of place one. The `all` parameter is used to compare only the integr The `plt` argument can be used to overlay the results over a previous plot and the `tmax` keyword determines the simulation time. Note: -1. The `Vern9` method is used with `ODEProblem` because of performance issues with `ArrayPartition` indexing which manifest for `DynamicalODEProblem`. -2. The `NLsolve` call used by `ManifoldProjection` was modified to use `ftol=1e-13` in order to obtain a very low energy error. + + 1. The `Vern9` method is used with `ODEProblem` because of performance issues with `ArrayPartition` indexing which manifest for `DynamicalODEProblem`. + 2. The `NLsolve` call used by `ManifoldProjection` was modified to use `ftol=1e-13` in order to obtain a very low energy error. Here are the results of the comparisons between the in place methods: ```julia -compare(tmax=1e2) +compare(tmax = 1e2) ``` ```julia -compare(tmax=1e3) +compare(tmax = 1e3) ``` ```julia -compare(tmax=1e4) +compare(tmax = 1e4) ``` ```julia -compare(tmax=2e4) +compare(tmax = 2e4) ``` As we can see from the above plots, we can achieve a very low energy error for long time simulation by manifold projection and with very high order Taylor methods. In comparison with the Hénon-Heiles system we see that as the Hamiltonian got more complex, the energy error for the other integration methods increased significantly. @@ -161,36 +177,36 @@ As we can see from the above plots, we can achieve a very low energy error for l We will now compare the in place with the out of place versions. In the plots bellow we will use a dashed line for the out of place versions. ```julia -function in_vs_out(;all=false, tmax=1e2) +function in_vs_out(; all = false, tmax = 1e2) println("In place versions:") - plt = compare(:inplace, all, tmax=tmax) + plt = compare(:inplace, all, tmax = tmax) println("\nOut of place versions:") - plt = compare(:oop, false, plt; tmax=tmax) + plt = compare(:oop, false, plt; tmax = tmax) end ``` First, here is a summary of all the available methods for `tmax = 1e3`: ```julia -in_vs_out(all=true, tmax=1e3) +in_vs_out(all = true, tmax = 1e3) ``` Now we will compare the in place and the out of place versions, but only for the integrators that are compatible with `StaticArrays` ```julia -in_vs_out(tmax=1e2) +in_vs_out(tmax = 1e2) ``` ```julia -in_vs_out(tmax=1e3) +in_vs_out(tmax = 1e3) ``` ```julia -in_vs_out(tmax=1e4) +in_vs_out(tmax = 1e4) ``` ```julia -in_vs_out(tmax=2e4) +in_vs_out(tmax = 2e4) ``` As we see from the above comparisons, the `StaticArray` versions are significantly faster and use less memory. The speedup provided for the out of place version is more proeminent at larger values for `tmax`. @@ -199,5 +215,5 @@ In comparison with the Henon-Heiles case, we see that the symplectic methods are ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/DynamicalODE/single_pendulums.jmd b/benchmarks/DynamicalODE/single_pendulums.jmd index fe6302af9..c01923e7c 100644 --- a/benchmarks/DynamicalODE/single_pendulums.jmd +++ b/benchmarks/DynamicalODE/single_pendulums.jmd @@ -40,8 +40,10 @@ $$y(t) = \sin(q(t)/2) = k\,\mathrm{sn}(t,k), \quad y_{\max} = k.$$ # using OrdinaryDiffEq, Elliptic, Printf, DiffEqPhysics, Statistics -sol2q(sol) = [sol.u[i][j] for i in 1:length(sol.u), j in 1:length(sol.u[1])÷2] -sol2p(sol) = [sol.u[i][j] for i in 1:length(sol.u), j in length(sol.u[1])÷2+1:length(sol.u[1])] +sol2q(sol) = [sol.u[i][j] for i in 1:length(sol.u), j in 1:(length(sol.u[1]) ÷ 2)] +function sol2p(sol) + [sol.u[i][j] for i in 1:length(sol.u), j in (length(sol.u[1]) ÷ 2 + 1):length(sol.u[1])] +end sol2tqp(sol) = (sol.t, sol2q(sol), sol2p(sol)) # The exact solutions of single pendulums can be expressed by the Jacobian elliptic functions. @@ -55,7 +57,7 @@ using Plots # Define the color list colorlist = [ "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", - "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf", + "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf" ] cc(k) = colorlist[mod1(k, length(colorlist))] @@ -64,11 +66,12 @@ function plotsol(sol::ODESolution) local t, q, p t, q, p = sol2tqp(sol) local d = size(q)[2] - p1 = plot(title="Solution", xlabel="t", grid=:on) + p1 = plot(title = "Solution", xlabel = "t", grid = :on) for j in 1:d j_str = d > 1 ? "[$j]" : "" - plot!(p1, t, q[:, j], color=cc(2j-1), label="q$(j_str)", linewidth=1) - plot!(p1, t, p[:, j], color=cc(2j), label="p$(j_str)", linewidth=1, linestyle=:dash) + plot!(p1, t, q[:, j], color = cc(2j-1), label = "q$(j_str)", linewidth = 1) + plot!(p1, t, p[:, j], color = cc(2j), label = "p$(j_str)", + linewidth = 1, linestyle = :dash) end return p1 end @@ -78,10 +81,11 @@ function plotsol2(sol::ODESolution) local t, q, p t, q, p = sol2tqp(sol) local d = size(q)[2] - p2 = plot(title="Phase Space", xlabel="q", ylabel="p", grid=:on) + p2 = plot(title = "Phase Space", xlabel = "q", ylabel = "p", grid = :on) for j in 1:d j_str = d > 1 ? "[$j]" : "" - plot!(p2, q[:, j], p[:, j], color=cc(j), label="(q$(j_str), p$(j_str))", linewidth=1) + plot!(p2, q[:, j], p[:, j], color = cc(j), + label = "(q$(j_str), p$(j_str))", linewidth = 1) end return p2 end @@ -90,10 +94,11 @@ end function plotenergy(H, sol::ODESolution) local t, q, p t, q, p = sol2tqp(sol) - local energy = [H(q[i,:], p[i,:], nothing) for i in 1:size(q)[1]] - p3 = plot(t, energy, label="energy", color="red", linewidth=1, xlabel="t", title="Energy", grid=:on) + local energy = [H(q[i, :], p[i, :], nothing) for i in 1:size(q)[1]] + p3 = plot(t, energy, label = "energy", color = "red", linewidth = 1, + xlabel = "t", title = "Energy", grid = :on) stdenergy_str = @sprintf("%.3e", std(energy)) - title!("std(energy) = $stdenergy_str", fontsize=10) + title!("std(energy) = $stdenergy_str", fontsize = 10) return p3 end @@ -104,10 +109,11 @@ function plotcomparison(k, sol::ODESolution) local y = sin.(q / 2) local y_exact = k * sn.(t, k) # the exact solution - p4 = plot(t, y, label="numerical", linewidth=1, grid=:on, xlabel="t", ylabel="y = sin(q(t)/2)", title="Comparison") - plot!(p4, t, y_exact, label="exact", linewidth=1, linestyle=:dash) + p4 = plot(t, y, label = "numerical", linewidth = 1, grid = :on, + xlabel = "t", ylabel = "y = sin(q(t)/2)", title = "Comparison") + plot!(p4, t, y_exact, label = "exact", linewidth = 1, linestyle = :dash) error_str = @sprintf("%.3e", maximum(abs.(y - y_exact))) - title!("maximum(abs(numerical - exact)) = $error_str", fontsize=10) + title!("maximum(abs(numerical - exact)) = $error_str", fontsize = 10) return p4 end @@ -120,7 +126,7 @@ function plotsolenergy(H, integrator, Δt, sol::ODESolution) p3 = plotenergy(H, sol) suptitle = "===== $integrator_str, Δt = $Δt =====" - plot(p1, p2, p3, layout=(3, 1), title=suptitle) + plot(p1, p2, p3, layout = (3, 1), title = suptitle) end # Solve a single pendulum @@ -132,18 +138,18 @@ function singlependulum(k, integrator, Δt; t0 = 0.0, t1 = 100.0) integrator_str = replace("$integrator", r"^[^.]*\\." => "") @printf("%-25s", "$integrator_str:") - sol = solve(prob, integrator, dt=Δt) - @time sol = solve(prob, integrator, dt=Δt) + sol = solve(prob, integrator, dt = Δt) + @time sol = solve(prob, integrator, dt = Δt) sleep(0.1) - + p1 = plotsol(sol) p2 = plotsol2(sol) p3 = plotenergy(H, sol) p4 = plotcomparison(k, sol) suptitle = "===== $integrator_str, Δt = $Δt =====" - plot(p1, p2, p3, p4, layout=(2, 2), title=suptitle) + plot(p1, p2, p3, p4, layout = (2, 2), title = suptitle) end ``` @@ -162,26 +168,27 @@ function singlependulum(k, integrator, Δt; t0 = 0.0, t1 = 100.0) local integrator_str = replace("$integrator", r"^[^.]*\." => "") @printf("%-25s", "$integrator_str:") - sol = solve(prob, integrator, dt=Δt) - @time local sol = solve(prob, integrator, dt=Δt) + sol = solve(prob, integrator, dt = Δt) + @time local sol = solve(prob, integrator, dt = Δt) sleep(0.1) # Create plots using Plots.jl - p1 = plot(sol.t, map(x -> x[1], sol.u), label="Position", title="Position vs Time") - p2 = plot(sol.t, map(x -> x[2], sol.u), label="Momentum", title="Momentum vs Time") - p3 = plot(sol.t, map(p -> H(p[1], p[2], nothing), sol.u), label="Energy", title="Energy vs Time") - p4 = plot(sol.t, map(x -> x[1] - k, sol.u), label="Comparison", title="Comparison Plot") + p1 = plot(sol.t, map(x -> x[1], sol.u), label = "Position", title = "Position vs Time") + p2 = plot(sol.t, map(x -> x[2], sol.u), label = "Momentum", title = "Momentum vs Time") + p3 = plot(sol.t, map(p -> H(p[1], p[2], nothing), sol.u), label = "Energy", title = "Energy vs Time") + p4 = plot(sol.t, map(x -> x[1] - k, sol.u), label = "Comparison", title = "Comparison Plot") # Combine all plots in a layout layout = @layout [a b; c d] - plot(p1, p2, p3, p4, layout=layout, size=(1000, 800), title="===== $integrator_str, Δt = $Δt =====") + plot(p1, p2, p3, p4, layout = layout, size = (1000, 800), + title = "===== $integrator_str, Δt = $Δt =====") end k = rand() integrator = VelocityVerlet() Δt = 0.1 -singlependulum(k, integrator, Δt, t0=-20.0, t1=20.0) +singlependulum(k, integrator, Δt, t0 = -20.0, t1 = 20.0) ``` ```julia @@ -194,16 +201,17 @@ function plotsolenergy(H, integrator, Δt, sol::ODESolution) local integrator_str = replace("$integrator", r"^[^.]*\." => "") # Create plots using Plots.jl - p1 = plot(sol, label="Position", title="Position vs Time") - p2 = plot(sol, label="Momentum", title="Momentum vs Time") - p3 = plot(sol.t, map(p -> H(p[2], p[3], nothing), sol.u), label="Energy", title="Energy vs Time") + p1 = plot(sol, label = "Position", title = "Position vs Time") + p2 = plot(sol, label = "Momentum", title = "Momentum vs Time") + p3 = plot(sol.t, map(p -> H(p[2], p[3], nothing), sol.u), label = "Energy", title = "Energy vs Time") # Combine all plots in a layout layout = @layout [a b; c] - plot(p1, p2, p3, layout=layout, size=(1000, 800), title="===== $integrator_str, Δt = $Δt =====") + plot(p1, p2, p3, layout = layout, size = (1000, 800), + title = "===== $integrator_str, Δt = $Δt =====") end -H(q, p, param) = sum(p.^2 / 2 .- cos.(q) .+ 1) +H(q, p, param) = sum(p .^ 2 / 2 .- cos.(q) .+ 1) q0 = pi * rand(2) p0 = zeros(2) t0, t1 = -20.0, 20.0 @@ -211,8 +219,8 @@ prob = HamiltonianProblem(H, q0, p0, (t0, t1)) integrator = McAte4() Δt = 0.1 -sol = solve(prob, integrator, dt=Δt) -@time sol = solve(prob, integrator, dt=Δt) +sol = solve(prob, integrator, dt = Δt) +@time sol = solve(prob, integrator, dt = Δt) sleep(0.1) plotsolenergy(H, integrator, Δt, sol) @@ -238,7 +246,7 @@ SymplecticIntegrators = [ KahanLi6(), McAte8(), KahanLi8(), - SofSpa10(), + SofSpa10() ] k = 0.999 @@ -270,5 +278,5 @@ singlependulum(k, SymplecticEuler(), Δt) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) -``` \ No newline at end of file +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/GlobalOptimization/blackbox_global_optimizers.jmd b/benchmarks/GlobalOptimization/blackbox_global_optimizers.jmd index aa5356af7..de86fc0ef 100644 --- a/benchmarks/GlobalOptimization/blackbox_global_optimizers.jmd +++ b/benchmarks/GlobalOptimization/blackbox_global_optimizers.jmd @@ -18,11 +18,13 @@ import BlackBoxOptimizationBenchmarking.Chain const BBOB = BlackBoxOptimizationBenchmarking using OptimizationBBO, OptimizationOptimJL, OptimizationEvolutionary, OptimizationNLopt -using OptimizationMetaheuristics, OptimizationNOMAD, OptimizationPRIMA, OptimizationOptimisers +using OptimizationMetaheuristics, OptimizationNOMAD, OptimizationPRIMA, + OptimizationOptimisers ``` ```julia -chain = (t; isboxed=false) -> Chain( +chain = (t; + isboxed = false) -> Chain( BenchmarkSetup(t, isboxed = isboxed), BenchmarkSetup(NelderMead(), isboxed = false), 0.9 @@ -30,9 +32,10 @@ chain = (t; isboxed=false) -> Chain( test_functions = BBOB.list_functions() dimension = 3 -run_length = round.(Int, 10 .^ LinRange(1,5,30)) +run_length = round.(Int, 10 .^ LinRange(1, 5, 30)) -@memoize run_bench(algo) = BBOB.benchmark(setup[algo], test_functions, run_length, Ntrials=40, dimension = dimension) +@memoize run_bench(algo) = BBOB.benchmark( + setup[algo], test_functions, run_length, Ntrials = 40, dimension = dimension) ``` ```julia @@ -40,25 +43,25 @@ setup = Dict( "NelderMead" => NelderMead(), #Optim.BFGS(), #"NLopt.GN_MLSL_LDS" => chain(NLopt.GN_MLSL_LDS(), isboxed=true), # gives me errors - "NLopt.GN_CRS2_LM()" => chain(NLopt.GN_CRS2_LM(), isboxed=true), - "NLopt.GN_DIRECT()" => chain(NLopt.GN_DIRECT(), isboxed=true), - "NLopt.GN_ESCH()" => chain(NLopt.GN_ESCH(), isboxed=true), - "OptimizationEvolutionary.GA()" => chain(OptimizationEvolutionary.GA(), isboxed=true), - "OptimizationEvolutionary.DE()" => chain(OptimizationEvolutionary.DE(), isboxed=true), - "OptimizationEvolutionary.ES()" => chain(OptimizationEvolutionary.ES(), isboxed=true), - "Optim.SAMIN" => chain(SAMIN(verbosity=0), isboxed=true), - "BBO_adaptive_de_rand_1_bin" => chain(BBO_adaptive_de_rand_1_bin(), isboxed=true), - "BBO_adaptive_de_rand_1_bin_radiuslimited" => chain(BBO_adaptive_de_rand_1_bin_radiuslimited(), isboxed=true), # same as BBO_adaptive_de_rand_1_bin - "BBO_separable_nes" => chain(BBO_separable_nes(), isboxed=true), - "BBO_de_rand_2_bin" => chain(BBO_de_rand_2_bin(), isboxed=true), + "NLopt.GN_CRS2_LM()" => chain(NLopt.GN_CRS2_LM(), isboxed = true), + "NLopt.GN_DIRECT()" => chain(NLopt.GN_DIRECT(), isboxed = true), + "NLopt.GN_ESCH()" => chain(NLopt.GN_ESCH(), isboxed = true), + "OptimizationEvolutionary.GA()" => chain(OptimizationEvolutionary.GA(), isboxed = true), + "OptimizationEvolutionary.DE()" => chain(OptimizationEvolutionary.DE(), isboxed = true), + "OptimizationEvolutionary.ES()" => chain(OptimizationEvolutionary.ES(), isboxed = true), + "Optim.SAMIN" => chain(SAMIN(verbosity = 0), isboxed = true), + "BBO_adaptive_de_rand_1_bin" => chain(BBO_adaptive_de_rand_1_bin(), isboxed = true), + "BBO_adaptive_de_rand_1_bin_radiuslimited" => chain( + BBO_adaptive_de_rand_1_bin_radiuslimited(), isboxed = true), # same as BBO_adaptive_de_rand_1_bin + "BBO_separable_nes" => chain(BBO_separable_nes(), isboxed = true), + "BBO_de_rand_2_bin" => chain(BBO_de_rand_2_bin(), isboxed = true), #"BBO_xnes" => chain(BBO_xnes(), isboxed=true), # good but slow #"BBO_dxnes" => chain(BBO_dxnes(), isboxed=true), - "OptimizationMetaheuristics.ECA" => chain(OptimizationMetaheuristics.ECA(), isboxed=true), + "OptimizationMetaheuristics.ECA" => chain(OptimizationMetaheuristics.ECA(), isboxed = true), #"OptimizationMetaheuristics.CGSA" => () -> chain(OptimizationMetaheuristics.CGSA(), isboxed=true), #give me strange results - "OptimizationMetaheuristics.DE" => chain(OptimizationMetaheuristics.DE(), isboxed=true), - "Optimisers.AdamW" => chain(Optimisers.AdamW(), isboxed=false), - "Optimisers.RMSProp" => chain(Optimisers.RMSProp(), isboxed=false), - # "NOMADOpt" => chain(NOMADOpt()), too much printing + "OptimizationMetaheuristics.DE" => chain(OptimizationMetaheuristics.DE(), isboxed = true), + "Optimisers.AdamW" => chain(Optimisers.AdamW(), isboxed = false), + "Optimisers.RMSProp" => chain(Optimisers.RMSProp(), isboxed = false) # "NOMADOpt" => chain(NOMADOpt()), too much printing # "OptimizationPRIMA.UOBYQA()" => chain(OptimizationPRIMA.UOBYQA()), :StackOverflowError? # "OptimizationPRIMA.NEWUOA()" => OptimizationPRIMA.UOBYQA(), # @@ -69,8 +72,8 @@ setup = Dict( ```julia @time b = BBOB.benchmark( - chain(OptimizationMetaheuristics.CGSA(), isboxed=true), - test_functions[1:10], 100:500:10_000, Ntrials=10, dimension = 3 + chain(OptimizationMetaheuristics.CGSA(), isboxed = true), + test_functions[1:10], 100:500:10_000, Ntrials = 10, dimension = 3 ) plot(b) @@ -82,14 +85,15 @@ plot(b) Δf = 1e-6 f = test_functions[3] -single_setup = BenchmarkSetup(NLopt.GN_CRS2_LM(), isboxed=true) +single_setup = BenchmarkSetup(NLopt.GN_CRS2_LM(), isboxed = true) sol = [BBOB.solve_problem(single_setup, f, 3, 5_000) for in in 1:10] @info [sol.objective < Δf + f.f_opt for sol in sol] -p = plot(f, size = (600,600), zoom = 1.5) +p = plot(f, size = (600, 600), zoom = 1.5) for sol in sol - scatter!(sol.u[1:1], sol.u[2:2], label="", c="blue", marker = :xcross, markersize=5, markerstrokewidth=0) + scatter!(sol.u[1:1], sol.u[2:2], label = "", c = "blue", + marker = :xcross, markersize = 5, markerstrokewidth = 0) end p ``` @@ -99,7 +103,7 @@ p ```julia results = Array{BBOB.BenchmarkResults}(undef, length(setup)) -Threads.@threads for (i,algo) in collect(enumerate(keys(setup))) +Threads.@threads for (i, algo) in collect(enumerate(keys(setup))) results[i] = run_bench(algo) end @@ -108,11 +112,13 @@ results ```julia labels = collect(keys(setup)) -idx = sortperm([b.success_rate[end] for b in results], rev=true) +idx = sortperm([b.success_rate[end] for b in results], rev = true) -p = plot(xscale = :log10, legend = :outerright, size = (700,350), margin=10Plots.px, dpi=200) +p = plot(xscale = :log10, legend = :outerright, + size = (700, 350), margin = 10Plots.px, dpi = 200) for i in idx - plot!(results[i], label = labels[i], showribbon=false, lw=2.5, xlim = (1,1e5), x = :run_length) + plot!(results[i], label = labels[i], showribbon = false, + lw = 2.5, xlim = (1, 1e5), x = :run_length) end p ``` @@ -120,8 +126,8 @@ p ```julia success_rate_per_function = reduce(hcat, b.success_rate_per_function for b in results) -idx = sortperm(mean(success_rate_per_function, dims=1)[:], rev=false) -idxfunc = sortperm(mean(success_rate_per_function, dims=2)[:], rev=true) +idx = sortperm(mean(success_rate_per_function, dims = 1)[:], rev = false) +idxfunc = sortperm(mean(success_rate_per_function, dims = 2)[:], rev = true) idxfunc = 1:length(test_functions) p = heatmap( @@ -130,19 +136,20 @@ p = heatmap( xticks = :all, yticks = :all, xrotation = 45, - dpi = 200, + dpi = 200 ) ``` ```julia labels = collect(keys(setup)) -idx = sortperm([b.distance_to_minimizer[end] for b in results], rev=false) +idx = sortperm([b.distance_to_minimizer[end] for b in results], rev = false) -p = plot(xscale = :log10, legend = :outerright, size = (900,500), margin=10Plots.px, ylim = (0,5)) +p = plot(xscale = :log10, legend = :outerright, + size = (900, 500), margin = 10Plots.px, ylim = (0, 5)) for i in idx plot!( results[i].run_length, results[i].distance_to_minimizer, label = labels[i], - showribbon=false, lw=2, xlim = (1,1e5), + showribbon = false, lw = 2, xlim = (1, 1e5), xlabel = "Iterations", ylabel = "Mean distance to minimum" ) end @@ -156,7 +163,7 @@ runtimes = runtimes ./ runtimes[ref] bar( labels, runtimes, xrotation = :45, xticks = :all, ylabel = "Run time relative to NM", - yscale = :log10, yticks = [0.1,1,10,100], + yscale = :log10, yticks = [0.1, 1, 10, 100], legend = false, margin = 25Plots.px ) -``` \ No newline at end of file +``` diff --git a/benchmarks/HybridJumps/Project.toml b/benchmarks/HybridJumps/Project.toml index 6838c8426..7f50485aa 100644 --- a/benchmarks/HybridJumps/Project.toml +++ b/benchmarks/HybridJumps/Project.toml @@ -19,7 +19,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [compat] BenchmarkTools = "1.4" Catalyst = "15" -DataStructures = "0.18" +DataStructures = "0.18, 0.19" DiffEqCallbacks = "4" Distributions = "0.25" JumpProcesses = "9.9" diff --git a/benchmarks/HybridJumps/Synapse.jmd b/benchmarks/HybridJumps/Synapse.jmd index 66e21e280..7d2c111fa 100644 --- a/benchmarks/HybridJumps/Synapse.jmd +++ b/benchmarks/HybridJumps/Synapse.jmd @@ -7,7 +7,8 @@ weave_options: ```julia using PiecewiseDeterministicMarkovProcesses, JumpProcesses, OrdinaryDiffEq -using Catalyst, Parameters, LazySets, StaticArrays, Distributions, LinearAlgebra, SparseArrays, RecursiveArrayTools +using Catalyst, Parameters, LazySets, StaticArrays, Distributions, LinearAlgebra, + SparseArrays, RecursiveArrayTools using Plots using BenchmarkTools const PDMP = PiecewiseDeterministicMarkovProcesses @@ -58,7 +59,6 @@ end ### Postsynpatic parameters - ```julia # adapted from SynapseElife/src/ParamsSynapse.jl @with_kw struct SynapseParams{Tp} @@ -72,7 +72,7 @@ end [1.85, 11.327205882352938], [1.85, 23.25], [3.7650354609929075, 1.4], - [5.650675675675676, 29.5], + [5.650675675675676, 29.5] ]) # VPolygon([SVector(6.35,1.4),SVector(6.35,23.25),SVector(6.35,29.5),SVector(1.85,11.327205882352938),SVector(1.85,23.25),SVector(3.7650354609929075,1.4),SVector(5.650675675675676,29.5)]) "activation rates for thresholds." a_D::Float64 = 0.1 @@ -119,8 +119,9 @@ end "biophysical and GHK parameters." gas::Float64 = 8.314e-6 "biophysical and GHK parameters." - p_release::NTuple{4,Float64} = - (0.004225803293622208, 1708.4124496514878, 1.3499793762587964, 0.6540248201173222) + p_release::NTuple{4, + Float64} = ( + 0.004225803293622208, 1708.4124496514878, 1.3499793762587964, 0.6540248201173222) "backpropagation attenuation." trec::Float64 = 2000 "backpropagation attenuation." @@ -128,12 +129,12 @@ end "backpropagation attenuation." delta_decay::Float64 = 1.7279e-5 "backpropagation attenuation." - p_age_decay_bap::NTuple{3,Float64} = - (0.13525468256031167, 16.482800452454164, 5.564691354645679) + p_age_decay_bap::NTuple{ + 3, Float64} = (0.13525468256031167, 16.482800452454164, 5.564691354645679) "backpropagation attenuation." - delta_soma::Float64 = - 2.5e-5 * - (p_age_decay_bap[3] / (1 + exp(p_age_decay_bap[1] * (age - p_age_decay_bap[2])))) + delta_soma::Float64 = 2.5e-5 * + (p_age_decay_bap[3] / + (1 + exp(p_age_decay_bap[1] * (age - p_age_decay_bap[2])))) "backpropagation attenuation." delta_aux::Float64 = 2.304e-5 "backpropagation attenuation." @@ -141,11 +142,12 @@ end "backpropagation attenuation." soma_dist::Float64 = 200.0 "backpropagation attenuation." - p_dist::NTuple{4,Float64} = - (0.019719018173341547, 230.3206470553394, 1.4313810030893268, 0.10406540965358434) + p_dist::NTuple{4, + Float64} = ( + 0.019719018173341547, 230.3206470553394, 1.4313810030893268, 0.10406540965358434) "backpropagation attenuation." - ϕ_dist::Float64 = - (p_dist[4] + p_dist[3] / (1 + exp(p_dist[1] * (soma_dist - p_dist[2])))) + ϕ_dist::Float64 = (p_dist[4] + + p_dist[3] / (1 + exp(p_dist[1] * (soma_dist - p_dist[2])))) "backpropagation attenuation." I_clamp::Float64 = 0.0 "Na and K." @@ -157,16 +159,18 @@ end "Na and K." Erev_K::Float64 = -90.0 "NMDAr temperature modification." - p_nmda_frwd::NTuple{4,Float64} = - (-0.09991802053299291, -37.63132907014948, 1239.0673283348326, -1230.6805720050966) + p_nmda_frwd::NTuple{4, + Float64} = ( + -0.09991802053299291, -37.63132907014948, 1239.0673283348326, -1230.6805720050966) "NMDAr temperature modification." frwd_T_chng_NMDA::Float64 = ( p_nmda_frwd[4] + p_nmda_frwd[3] / (1 + exp(p_nmda_frwd[1] * (temp_rates - p_nmda_frwd[2]))) ) "NMDAr temperature modification." - p_nmda_bcwd::NTuple{4,Float64} = - (-0.10605060141396823, 98.99939433046647, 1621.6168608608068, 3.0368551011554143) + p_nmda_bcwd::NTuple{4, + Float64} = ( + -0.10605060141396823, 98.99939433046647, 1621.6168608608068, 3.0368551011554143) "NMDAr temperature modification." bcwd_T_chng_NMDA::Float64 = ( p_nmda_bcwd[4] + @@ -221,17 +225,19 @@ end "NMDAr kinetics (GluN2B type), ms-1." NMDA_N2B_s_a::Float64 = bcwd_T_chng_NMDA * 0.23 * 60.0 * 1e-3 "NMDA details." - p_nmda::NTuple{4,Float64} = - (0.004477162852447629, 2701.3929349701334, 58.38819453272428, 33.949463268365555) + p_nmda::NTuple{4, + Float64} = ( + 0.004477162852447629, 2701.3929349701334, 58.38819453272428, 33.949463268365555) "NMDA details." - gamma_nmda::Float64 = - (p_nmda[4] + p_nmda[3] / (1 + exp(p_nmda[1] * (Ca_ext - p_nmda[2])))) * 1e-3 + gamma_nmda::Float64 = (p_nmda[4] + + p_nmda[3] / (1 + exp(p_nmda[1] * (Ca_ext - p_nmda[2])))) * 1e-3 "NMDA details." - p_age::NTuple{4,Float64} = - (0.09993657672916968, 25.102347872464193, 0.9642137892004939, 0.5075183905839776) + p_age::NTuple{4, + Float64} = ( + 0.09993657672916968, 25.102347872464193, 0.9642137892004939, 0.5075183905839776) "ratio N2B/N2A." - r_NMDA_age::Float64 = - rand(Normal(0, 0.05)) + p_age[4] + p_age[3] / (1 + exp(p_age[1] * (age - p_age[2]))) # 0.5+1.6*exp(-age/16.66) + rand(Normal(0,.05)) + r_NMDA_age::Float64 = rand(Normal(0, 0.05)) + p_age[4] + + p_age[3] / (1 + exp(p_age[1] * (age - p_age[2]))) # 0.5+1.6*exp(-age/16.66) + rand(Normal(0,.05)) "ratio N2B/N2A." N_NMDA::Int64 = 15 "ratio N2B/N2A." @@ -243,17 +249,17 @@ end "other NMDAr parameters." Mg::Float64 = 1.0 "AMPAr temperature modification." - p_ampa_frwd::NTuple{3,Float64} = - (-0.4737773089201679, 31.7248285571622, 10.273135485873242) + p_ampa_frwd::NTuple{ + 3, Float64} = (-0.4737773089201679, 31.7248285571622, 10.273135485873242) "AMPAr temperature modification." - frwd_T_chng_AMPA::Float64 = - (p_ampa_frwd[3] / (1 + exp(p_ampa_frwd[1] * (temp_rates - p_ampa_frwd[2])))) # temp_rates*0.78-18.7 + frwd_T_chng_AMPA::Float64 = (p_ampa_frwd[3] / + (1 + exp(p_ampa_frwd[1] * (temp_rates - p_ampa_frwd[2])))) # temp_rates*0.78-18.7 "AMPAr temperature modification." - p_ampa_bcwd::NTuple{3,Float64} = - (-0.36705555170278986, 28.976662403966674, 5.134547217640794) + p_ampa_bcwd::NTuple{ + 3, Float64} = (-0.36705555170278986, 28.976662403966674, 5.134547217640794) "AMPAr temperature modification." - bcwd_T_chng_AMPA::Float64 = - (p_ampa_bcwd[3] / (1 + exp(p_ampa_bcwd[1] * (temp_rates - p_ampa_bcwd[2])))) # temp_rates*0.37-8.25 + bcwd_T_chng_AMPA::Float64 = (p_ampa_bcwd[3] / + (1 + exp(p_ampa_bcwd[1] * (temp_rates - p_ampa_bcwd[2])))) # temp_rates*0.37-8.25 "AMPAr kinetics, uM-1ms-1." AMPA_k1::Float64 = frwd_T_chng_AMPA * 1.6 * 1e7 * 1e-6 * 1e-3 "AMPAr kinetics, ms-1." @@ -289,8 +295,9 @@ end "GABAr." N_GABA::Int64 = 34 "GABAr." - p_Cl::NTuple{4,Float64} = - (0.09151696057098718, 0.6919298240788684, 243.5159017060495, -92.6496083089155) + p_Cl::NTuple{4, + Float64} = ( + 0.09151696057098718, 0.6919298240788684, 243.5159017060495, -92.6496083089155) "GABAr, Cl reversal potential." Erev_Cl::Float64 = (p_Cl[4] + p_Cl[3] / (1 + exp(p_Cl[1] * (age - p_Cl[2])))) "GABAr, Cl reversal potential." @@ -308,16 +315,18 @@ end "GABAr, Cl reversal potential." GABA_r_ro2::Float64 = 1e3 * 10.6e-3 "GABAr, Cl reversal potential." - p_GABA::NTuple{4,Float64} = - (0.19127068198185954, 32.16771140618756, -1.2798050197287802, 1.470692263981145) + p_GABA::NTuple{4, + Float64} = ( + 0.19127068198185954, 32.16771140618756, -1.2798050197287802, 1.470692263981145) "GABAr, Cl reversal potential." - GABA_r_c1::Float64 = - (p_GABA[4] + p_GABA[3] / (1 + exp(p_GABA[1] * (temp_rates - p_GABA[2])))) * - 1e3 * - 9.8e-3 + GABA_r_c1::Float64 = (p_GABA[4] + + p_GABA[3] / (1 + exp(p_GABA[1] * (temp_rates - p_GABA[2])))) * + 1e3 * + 9.8e-3 "GABAr, Cl reversal potential." - GABA_r_c2::Float64 = - (p_GABA[4] + p_GABA[3] / (1 + exp(p_GABA[1] * (temp_rates - p_GABA[2])))) * 400e-3 + GABA_r_c2::Float64 = (p_GABA[4] + + p_GABA[3] / (1 + exp(p_GABA[1] * (temp_rates - p_GABA[2])))) * + 400e-3 "passive electrical properties." E_leak::Float64 = -70.0 "passive electrical properties." @@ -389,15 +398,17 @@ end "SK channels [mellor2016annex], ms." SK_hill::Float64 = 6 "SK channels." - p_SK_bcwd::NTuple{4,Float64} = - (0.09391588258147192, 98.85165844770867, -147.61669527876904, 149.37767054612135) + p_SK_bcwd::NTuple{4, + Float64} = ( + 0.09391588258147192, 98.85165844770867, -147.61669527876904, 149.37767054612135) "SK channels." bcwd_SK::Float64 = ( p_SK_bcwd[4] + p_SK_bcwd[3] / (1 + exp(p_SK_bcwd[1] * (temp_rates - p_SK_bcwd[2]))) ) "SK channels." - p_SK_frwd::NTuple{4,Float64} = - (-0.334167923607112, 25.590920461511878, 2.2052151559841193, 0.005904170174699533) + p_SK_frwd::NTuple{4, + Float64} = ( + -0.334167923607112, 25.590920461511878, 2.2052151559841193, 0.005904170174699533) "SK channels." frwd_SK::Float64 = ( p_SK_frwd[4] + p_SK_frwd[3] / (1 + exp(p_SK_frwd[1] * (temp_rates - p_SK_frwd[2]))) @@ -457,12 +468,13 @@ end "Chang Pepke model - CaMKII reactions." koff_K2N::Float64 = 20e-3 "Chang Pepke model - autophosphorilation." - p_camkii_q10::NTuple{4,Float64} = - (0.5118207068695309, 45.47503600542303, -161.42634157226917, 162.1718925882677) + p_camkii_q10::NTuple{4, + Float64} = ( + 0.5118207068695309, 45.47503600542303, -161.42634157226917, 162.1718925882677) "Chang Pepke model - autophosphorilation." - q10::Float64 = - p_camkii_q10[4] + - p_camkii_q10[3] / (1 + exp(p_camkii_q10[1] * (temp_rates - p_camkii_q10[2]))) # change of temp to fit chang 35C + q10::Float64 = p_camkii_q10[4] + + p_camkii_q10[3] / + (1 + exp(p_camkii_q10[1] * (temp_rates - p_camkii_q10[2]))) # change of temp to fit chang 35C "Chang Pepke model - autophosphorilation." k1::Float64 = 12.6e-3 "Chang Pepke model - autophosphorilation." @@ -474,34 +486,36 @@ end "Chang Pepke model - autophosphorilation." k5::Float64 = 4 * q10 * 2 * 0.017e-3 # q10 * 2* 0.017e-3 "CaM-CaN reactions." - p_CaN_frwd::NTuple{4,Float64} = - (-0.29481489145354556, 29.999999999999968, 0.15940019940354327, 0.870299900298228) + p_CaN_frwd::NTuple{4, + Float64} = ( + -0.29481489145354556, 29.999999999999968, 0.15940019940354327, 0.870299900298228) "CaM-CaN reactions, 22C - 4.6e-2 [quintana2005]." - kcanf::Float64 = - ( - p_CaN_frwd[4] + - p_CaN_frwd[3] / (1 + exp(p_CaN_frwd[1] * (temp_rates - p_CaN_frwd[2]))) - ) * 1.75e-2 + kcanf::Float64 = ( + p_CaN_frwd[4] + + p_CaN_frwd[3] / (1 + exp(p_CaN_frwd[1] * (temp_rates - p_CaN_frwd[2]))) + ) * 1.75e-2 "CaM-CaN reactions." - p_CaN_bcwd::NTuple{4,Float64} = - (-0.6833299932488973, 26.277500129849113, 0.7114524682690591, 0.29037766196937326) + p_CaN_bcwd::NTuple{4, + Float64} = ( + -0.6833299932488973, 26.277500129849113, 0.7114524682690591, 0.29037766196937326) "CaM-CaN reactions, 22C - 1.2e-6 [quintana2005]." - kcanb::Float64 = - ( - p_CaN_bcwd[4] + - p_CaN_bcwd[3] / (1 + exp(p_CaN_bcwd[1] * (temp_rates - p_CaN_bcwd[2]))) - ) * 2e-5 + kcanb::Float64 = ( + p_CaN_bcwd[4] + + p_CaN_bcwd[3] / (1 + exp(p_CaN_bcwd[1] * (temp_rates - p_CaN_bcwd[2]))) + ) * 2e-5 "VGCCs." - p_frwd_VGCC::NTuple{4,Float64} = - (1.0485098341579628, 30.66869198447378, -0.3040010721391852, 2.5032059559264357) + p_frwd_VGCC::NTuple{4, + Float64} = ( + 1.0485098341579628, 30.66869198447378, -0.3040010721391852, 2.5032059559264357) "VGCCs." frwd_VGCC::Float64 = ( p_frwd_VGCC[4] + p_frwd_VGCC[3] / (1 + exp(p_frwd_VGCC[1] * (temp_rates - p_frwd_VGCC[2]))) ) "VGCCs." - p_bcwd_VGCC::NTuple{4,Float64} = - (-0.3302682317933842, 36.279019647221226, 3.2259761593440155, 0.7298285671937866) + p_bcwd_VGCC::NTuple{4, + Float64} = ( + -0.3302682317933842, 36.279019647221226, 3.2259761593440155, 0.7298285671937866) "VGCCs." bcwd_VGCC::Float64 = ( p_bcwd_VGCC[4] + @@ -667,36 +681,34 @@ end NMDA_matrix() = get_stoichmatrix(nmda_model_v2) # adapted from SynapseElife/src/JumpMatrices.jl -R_channel_matrix() = [ - [-1 1 0 0] # CaR m0h0 -> m1h0 - [1 -1 0 0] # CaR m1h0 -> m0h0 - [-1 0 1 0] # CaR m0h0 -> m0h1 - [1 0 -1 0] # CaR m0h1 -> m0h0 - [0 -1 0 1] # CaR m1h0 -> O - [0 1 0 -1] # CaR O -> m1h0 - [0 0 -1 1] # CaR m0h1 -> O - [0 0 1 -1] # CaR O -> m0h1 -] +function R_channel_matrix() + [[-1 1 0 0] # CaR m0h0 -> m1h0 + [1 -1 0 0] # CaR m1h0 -> m0h0 + [-1 0 1 0] # CaR m0h0 -> m0h1 + [1 0 -1 0] # CaR m0h1 -> m0h0 + [0 -1 0 1] # CaR m1h0 -> O + [0 1 0 -1] # CaR O -> m1h0 + [0 0 -1 1] # CaR m0h1 -> O + [0 0 1 -1]] +end # adapted from SynapseElife/src/JumpMatrices.jl -T_channel_matrix() = [ - [-1 1 0 0] # CaT m0h0 -> m1h0 - [1 -1 0 0] # CaT m1h0 -> m0h0 - [-1 0 1 0] # CaT m0h0 -> m0h1 - [1 0 -1 0] # CaT m0h1 -> m0h0 - [0 -1 0 1] # CaT m1h0 -> O - [0 1 0 -1] # CaT O -> m1h0 - [0 0 -1 1] # CaT m0h1 -> O - [0 0 1 -1] # CaT O -> m0h -] +function T_channel_matrix() + [[-1 1 0 0] # CaT m0h0 -> m1h0 + [1 -1 0 0] # CaT m1h0 -> m0h0 + [-1 0 1 0] # CaT m0h0 -> m0h1 + [1 0 -1 0] # CaT m0h1 -> m0h0 + [0 -1 0 1] # CaT m1h0 -> O + [0 1 0 -1] # CaT O -> m1h0 + [0 0 -1 1] # CaT m0h1 -> O + [0 0 1 -1]] +end # adapted from SynapseElife/src/JumpMatrices.jl -L_channel_matrix() = [ - [-1 1 0] # CaL C -> O1 - [1 -1 0] # CaL O1 -> C - [-1 0 1] # CaL C -> O2 - [1 0 -1] # CaL O2 -> C -] +L_channel_matrix() = [[-1 1 0] # CaL C -> O1 + [1 -1 0] # CaL O1 -> C + [-1 0 1] # CaL C -> O2 + [1 0 -1]] # adapted from SynapseElife/src/JumpMatrices.jl const plasticity = @reaction_network begin @@ -749,7 +761,7 @@ const p_synapse = SynapseParams(t_end = 1000.0); const glu = 0.0; const events_sorted_times = [500.0]; const is_pre_or_post_event = [true]; -const events_bap = events_sorted_times[is_pre_or_post_event.==false]; +const events_bap = events_sorted_times[is_pre_or_post_event .== false]; const bap_by_epsp = Float64[]; const nu = buildTransitionMatrix(); ``` @@ -762,122 +774,116 @@ function initial_conditions_continuous_temp(param_synapse) @unpack_SynapseParams param_synapse if temp_rates <= 25 return vec( - [ - -70.10245699808998 - -70.02736715107497 - -70.01992573979436 - 1.0 - 5.251484030952095 - 0.17942311304488254 - 0.0 - 18.422417385628144 - 0.061182835845181506 - 0.007491230194287401 - 2.5601235159798556e-5 - 18.60768149870139 - 1.3923185018623478 - 47.943467158481965 - 0.33484901412981444 - 0.00873078540237604 - 0.26160543666353603 - 0.006945031752908706 - 5.28369636945184 - 4.008117080305045 - 0.11294478061086997 - 0.09967594670655765 - 4.656494469862573 - 7.283473926518337 - 0.0 - 0.0 - 0.0 - 0.0 - 0.012283139643655655 - 0.9999998289470913 - 0.00010811866849049202 - 0.09878906052566663 - 1.0 - 1.0 - ], + [-70.10245699808998 + -70.02736715107497 + -70.01992573979436 + 1.0 + 5.251484030952095 + 0.17942311304488254 + 0.0 + 18.422417385628144 + 0.061182835845181506 + 0.007491230194287401 + 2.5601235159798556e-5 + 18.60768149870139 + 1.3923185018623478 + 47.943467158481965 + 0.33484901412981444 + 0.00873078540237604 + 0.26160543666353603 + 0.006945031752908706 + 5.28369636945184 + 4.008117080305045 + 0.11294478061086997 + 0.09967594670655765 + 4.656494469862573 + 7.283473926518337 + 0.0 + 0.0 + 0.0 + 0.0 + 0.012283139643655655 + 0.9999998289470913 + 0.00010811866849049202 + 0.09878906052566663 + 1.0 + 1.0], ) end if 25 < temp_rates <= 30.0 return vec( - [ - -70.0140727673961 - -70.00177103943689 - -70.00007589726667 - 1.0 - 3.48177628683147 - 0.11706193391209137 - 0.0 - 19.902059159951726 - 0.04813075789246737 - 0.0033156783870759324 - 1.3058864642411135e-5 - 19.473469645955362 - 0.5265303542539336 - 49.658388018645105 - 0.39979810740476907 - 0.005987535794514187 - 0.22114161049072126 - 0.003443459770906218 - 5.486877056572574 - 3.2429635679748126 - 0.0967411298498974 - 0.06299852278885718 - 4.315666798657558 - 6.505994192089851 - 0.0 - 0.0 - 0.0 - 0.0 - 0.0123167984282587 - 0.9999998268859568 - 0.00010833059621284 - 0.016112012029112062 - 1.0 - 1.0 - ], + [-70.0140727673961 + -70.00177103943689 + -70.00007589726667 + 1.0 + 3.48177628683147 + 0.11706193391209137 + 0.0 + 19.902059159951726 + 0.04813075789246737 + 0.0033156783870759324 + 1.3058864642411135e-5 + 19.473469645955362 + 0.5265303542539336 + 49.658388018645105 + 0.39979810740476907 + 0.005987535794514187 + 0.22114161049072126 + 0.003443459770906218 + 5.486877056572574 + 3.2429635679748126 + 0.0967411298498974 + 0.06299852278885718 + 4.315666798657558 + 6.505994192089851 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0123167984282587 + 0.9999998268859568 + 0.00010833059621284 + 0.016112012029112062 + 1.0 + 1.0], ) end if temp_rates > 30 return vec( - [ - -70.02953996060384 - -70.00364683510847 - -70.0013995913228 - 1.0 - 3.3989773357494646 - 0.11430174346528181 - 0.0 - 25.14694054430742 - 0.048232611580821316 - 0.004340152415081933 - 6.8123069384392556e-6 - 19.865575695641734 - 0.13442430463415694 - 62.32357049746406 - 0.8459878113145832 - 0.009234347120412881 - 0.3607751119415231 - 0.003937688645035126 - 2.3440067259757305 - 1.0593952833042108 - 0.02913354160885602 - 0.013585064852268125 - 1.6677561415335218 - 1.3426177862569586 - 0.0 - 0.0 - 0.0 - 0.0 - 0.012314741437834478 - 0.999999826986425 - 0.00010831999489540837 - 0.03393795777123425 - 1.0 - 1.0 - ], + [-70.02953996060384 + -70.00364683510847 + -70.0013995913228 + 1.0 + 3.3989773357494646 + 0.11430174346528181 + 0.0 + 25.14694054430742 + 0.048232611580821316 + 0.004340152415081933 + 6.8123069384392556e-6 + 19.865575695641734 + 0.13442430463415694 + 62.32357049746406 + 0.8459878113145832 + 0.009234347120412881 + 0.3607751119415231 + 0.003937688645035126 + 2.3440067259757305 + 1.0593952833042108 + 0.02913354160885602 + 0.013585064852268125 + 1.6677561415335218 + 1.3426177862569586 + 0.0 + 0.0 + 0.0 + 0.0 + 0.012314741437834478 + 0.999999826986425 + 0.00010831999489540837 + 0.03393795777123425 + 1.0 + 1.0], ) end end @@ -936,8 +942,8 @@ function initial_conditions_discrete(param_synapse) 0, 0, 0, - 0, - ]) + 0 + ]) end ``` @@ -1079,7 +1085,6 @@ function F_synapse(dxc, xc, xd, p_synapse::SynapseParams, t, events_bap, bap_by_ ∂h = alpha_h(Vsoma) * (1 - h) - beta_h(Vsoma) * h I_Na = gamma_Na * (m^3) * h * (Erev_Na - Vsoma) - # K channel n_inf = 1 / (1 + alpha_n(Vsoma)) n_tau = max(50 * beta_n(Vsoma) / (1 + alpha_n(Vsoma)), 2.0) @@ -1091,9 +1096,8 @@ function F_synapse(dxc, xc, xd, p_synapse::SynapseParams, t, events_bap, bap_by_ Inmda = (Erev_nmda - Vsp) * NMDA # current nmda # AMPA - Iampa = - (Erev_ampa - Vsp) * - (gamma_ampa1 * n1_ampa + gamma_ampa2 * n2_ampa + gamma_ampa3 * n3_ampa) # current ampa + Iampa = (Erev_ampa - Vsp) * + (gamma_ampa1 * n1_ampa + gamma_ampa2 * n2_ampa + gamma_ampa3 * n3_ampa) # current ampa # GABA Igaba = (n_gaba1 + n_gaba2) * (Erev_Cl - Vdend) * gamma_GABA @@ -1111,8 +1115,8 @@ function F_synapse(dxc, xc, xd, p_synapse::SynapseParams, t, events_bap, bap_by_ # Backpropgation # Post input - for experimentally induced BaPs and those induced by EPSPs - I_BaP = - inputBaP(t, bap_by_epsp, injbap, I_clamp) + inputBaP(t, events_bap, injbap, I_clamp) + I_BaP = inputBaP(t, bap_by_epsp, injbap, I_clamp) + + inputBaP(t, events_bap, injbap, I_clamp) # Bap decay/attenuation - two component for adaptation in the Bap ∂λ = (1 - λ) / trec - delta_decay * (1 / λ_aux) * λ * I_BaP ∂λ_aux = (1 - λ_aux) / trec - delta_aux * λ_aux * I_BaP @@ -1123,34 +1127,30 @@ function F_synapse(dxc, xc, xd, p_synapse::SynapseParams, t, events_bap, bap_by_ # Voltage # Spine - ∂Vsp = - ( - Isk + - Inmda + - Iampa + - Icat + - Icar + - Ical + - g_neck * (Vdend - Vsp) + - g_leak * (E_leak - Vsp) - ) / (Csp) + ∂Vsp = ( + Isk + + Inmda + + Iampa + + Icat + + Icar + + Ical + + g_neck * (Vdend - Vsp) + + g_leak * (E_leak - Vsp) + ) / (Csp) # Dendrite - ∂Vdend = - ( - g_neck * (Vsp - Vdend) + - Igaba + - g_leakdend * (E_leak - Vdend) + - gadapt * (Vsoma - Vdend) - ) / Cdend + ∂Vdend = ( + g_neck * (Vsp - Vdend) + + Igaba + + g_leakdend * (E_leak - Vdend) + + gadapt * (Vsoma - Vdend) + ) / Cdend # Soma - ∂Vsoma = - ( - (I_BaP + I_Na) * λ_age + - I_K + - g_leaksoma * (E_leak - Vsoma) + - gadapt * (Vdend - Vsoma) - ) / Csoma - + ∂Vsoma = ( + (I_BaP + I_Na) * λ_age + + I_K + + g_leaksoma * (E_leak - Vsoma) + + gadapt * (Vdend - Vsoma) + ) / Csoma # Buffer and dye (spine only - no neck diffusion) ∂ImbufCa = Imbuf_k_on * (Imbuf_con - ImbufCa) * Ca - Imbuf_k_off * ImbufCa @@ -1168,62 +1168,57 @@ function F_synapse(dxc, xc, xd, p_synapse::SynapseParams, t, events_bap, bap_by_ kb_K2N = rates_adapt(koff_K1N, koff_K2N, koff_K1N, kon_K2N, Ca) F = CaMKII / mKCaM_con - ∂CaM0 = - k2 * PCaM0 + - kb_2C * CaM2C + - kb_2N * CaM2N + - kb_CaM0 * KCaM0 + - -(1 // 2) * kf_2C * (Ca^2) * CaM0 - (1 // 2) * kf_2N * (Ca^2) * CaM0 + - -kf_CaM0 * CaM0 * mKCaM - - ∂CaM2C = - kb_2N * CaM4 + kb_CaM2C * KCaM2C + k2 * PCaM2C + +(1 // 2) * kf_2C * (Ca^2) * CaM0 - - kb_2C * CaM2C - (1 // 2) * kf_2N * (Ca^2) * CaM2C + -kf_CaM2C * CaM2C * mKCaM - - ∂CaM2N = - kb_2C * CaM4 + kb_CaM2N * KCaM2N + k2 * PCaM2N + +(1 // 2) * kf_2N * (Ca^2) * CaM0 - - kb_2N * CaM2N - (1 // 2) * kf_2C * (Ca^2) * CaM2N + -kf_CaM2N * CaM2N * mKCaM - - ∂CaM4 = - k2 * PCaM4 + - kcanb * CaN4 + - kb_CaM4 * KCaM4 + - +(1 // 2) * kf_2N * (Ca^2) * CaM2C + - (1 // 2) * kf_2C * (Ca^2) * CaM2N - kb_2C * CaM4 + -kb_2N * CaM4 - - kcanf * CaM4 * mCaN - kf_CaM4 * CaM4 * mKCaM + ∂CaM0 = k2 * PCaM0 + + kb_2C * CaM2C + + kb_2N * CaM2N + + kb_CaM0 * KCaM0 + + -(1 // 2) * kf_2C * (Ca^2) * CaM0 - (1 // 2) * kf_2N * (Ca^2) * CaM0 + + -kf_CaM0 * CaM0 * mKCaM + + ∂CaM2C = kb_2N * CaM4 + kb_CaM2C * KCaM2C + k2 * PCaM2C + + +(1 // 2) * kf_2C * (Ca^2) * CaM0 - + kb_2C * CaM2C - (1 // 2) * kf_2N * (Ca^2) * CaM2C + -kf_CaM2C * CaM2C * mKCaM + + ∂CaM2N = kb_2C * CaM4 + kb_CaM2N * KCaM2N + k2 * PCaM2N + + +(1 // 2) * kf_2N * (Ca^2) * CaM0 - + kb_2N * CaM2N - (1 // 2) * kf_2C * (Ca^2) * CaM2N + -kf_CaM2N * CaM2N * mKCaM + + ∂CaM4 = k2 * PCaM4 + + kcanb * CaN4 + + kb_CaM4 * KCaM4 + + +(1 // 2) * kf_2N * (Ca^2) * CaM2C + + (1 // 2) * kf_2C * (Ca^2) * CaM2N - kb_2C * CaM4 + -kb_2N * CaM4 - + kcanf * CaM4 * mCaN - kf_CaM4 * CaM4 * mKCaM ∂mCaN = kcanb * CaN4 - kcanf * CaM4 * mCaN ∂CaN4 = kcanf * CaM4 * mCaN - kcanb * CaN4 - ∂mKCaM = - kb_CaM0 * KCaM0 + - k3 * P + - kb_CaM2C * KCaM2C + - kb_CaM2N * KCaM2N + - +kb_CaM4 * KCaM4 - kf_CaM0 * CaM0 * mKCaM - kf_CaM2C * CaM2C * mKCaM + - -kf_CaM2N * CaM2N * mKCaM - kf_CaM4 * CaM4 * mKCaM - - ∂KCaM0 = - kb_K2C * KCaM2C + kb_K2N * KCaM2N + kf_CaM0 * CaM0 * mKCaM + -kb_CaM0 * KCaM0 - - (1 // 2) * kf_K2C * (Ca^2) * KCaM0 - F * k1 * KCaM0 + - -(1 // 2) * kf_K2N * (Ca^2) * KCaM0 - - ∂KCaM2N = - kb_K2C * KCaM4 + kf_CaM2N * CaM2N * mKCaM + +(1 // 2) * kf_K2N * (Ca^2) * KCaM0 - - kb_CaM2N * KCaM2N - kb_K2N * KCaM2N + -(1 // 2) * kf_K2C * (Ca^2) * KCaM2N - - F * k1 * KCaM2N - - ∂KCaM2C = - kb_K2N * KCaM4 + kf_CaM2C * CaM2C * mKCaM + +(1 // 2) * kf_K2C * (Ca^2) * KCaM0 - - kb_CaM2C * KCaM2C - kb_K2C * KCaM2C + -F * k1 * KCaM2C - - (1 // 2) * kf_K2N * (Ca^2) * KCaM2C - - ∂KCaM4 = - kf_CaM4 * CaM4 * mKCaM + - (1 // 2) * kf_K2C * (Ca^2) * KCaM2N + - +(1 // 2) * kf_K2N * (Ca^2) * KCaM2C - kb_CaM4 * KCaM4 - kb_K2C * KCaM4 + - -kb_K2N * KCaM4 - F * k1 * KCaM4 + ∂mKCaM = kb_CaM0 * KCaM0 + + k3 * P + + kb_CaM2C * KCaM2C + + kb_CaM2N * KCaM2N + + +kb_CaM4 * KCaM4 - kf_CaM0 * CaM0 * mKCaM - kf_CaM2C * CaM2C * mKCaM + + -kf_CaM2N * CaM2N * mKCaM - kf_CaM4 * CaM4 * mKCaM + + ∂KCaM0 = kb_K2C * KCaM2C + kb_K2N * KCaM2N + kf_CaM0 * CaM0 * mKCaM + -kb_CaM0 * KCaM0 - + (1 // 2) * kf_K2C * (Ca^2) * KCaM0 - F * k1 * KCaM0 + + -(1 // 2) * kf_K2N * (Ca^2) * KCaM0 + + ∂KCaM2N = kb_K2C * KCaM4 + kf_CaM2N * CaM2N * mKCaM + + +(1 // 2) * kf_K2N * (Ca^2) * KCaM0 - + kb_CaM2N * KCaM2N - kb_K2N * KCaM2N + -(1 // 2) * kf_K2C * (Ca^2) * KCaM2N - + F * k1 * KCaM2N + + ∂KCaM2C = kb_K2N * KCaM4 + kf_CaM2C * CaM2C * mKCaM + + +(1 // 2) * kf_K2C * (Ca^2) * KCaM0 - + kb_CaM2C * KCaM2C - kb_K2C * KCaM2C + -F * k1 * KCaM2C - + (1 // 2) * kf_K2N * (Ca^2) * KCaM2C + + ∂KCaM4 = kf_CaM4 * CaM4 * mKCaM + + (1 // 2) * kf_K2C * (Ca^2) * KCaM2N + + +(1 // 2) * kf_K2N * (Ca^2) * KCaM2C - kb_CaM4 * KCaM4 - kb_K2C * KCaM4 + + -kb_K2N * KCaM4 - F * k1 * KCaM4 ∂PCaM0 = F * k1 * KCaM0 - k2 * PCaM0 @@ -1238,23 +1233,22 @@ function F_synapse(dxc, xc, xd, p_synapse::SynapseParams, t, events_bap, bap_by_ ∂P2 = k4 * P - k5 * P2 # Postsynaptic Ca - ∂Ca = - (Ca_infty - Ca) / tau_ca + - +(Ica_nmda + Icar + Ical + Icat) / (2 * faraday * A_sp) + - +(max(Ca_infty, Ca / 3) - Ca) / tau_diff + - -∂ImbufCa + - -∂Dye + - +2kb_2C * CaM2C + - 2kb_2C * CaM4 + - 2kb_2N * CaM2N + - 2kb_2N * CaM4 + - +2kb_K2C * KCaM2C + - 2kb_K2N * KCaM2N + - 2kb_K2C * KCaM4 + - 2kb_K2N * KCaM4 + - -kf_2C * (Ca^2) * CaM0 - kf_2N * (Ca^2) * CaM0 - kf_2N * (Ca^2) * CaM2C + - -kf_2C * (Ca^2) * CaM2N - kf_K2C * (Ca^2) * KCaM0 - kf_K2C * (Ca^2) * KCaM2N + - -kf_K2N * (Ca^2) * KCaM0 - kf_K2N * (Ca^2) * KCaM2C + ∂Ca = (Ca_infty - Ca) / tau_ca + + +(Ica_nmda + Icar + Ical + Icat) / (2 * faraday * A_sp) + + +(max(Ca_infty, Ca / 3) - Ca) / tau_diff + + -∂ImbufCa + + -∂Dye + + +2kb_2C * CaM2C + + 2kb_2C * CaM4 + + 2kb_2N * CaM2N + + 2kb_2N * CaM4 + + +2kb_K2C * KCaM2C + + 2kb_K2N * KCaM2N + + 2kb_K2C * KCaM4 + + 2kb_K2N * KCaM4 + + -kf_2C * (Ca^2) * CaM0 - kf_2N * (Ca^2) * CaM0 - kf_2N * (Ca^2) * CaM2C + + -kf_2C * (Ca^2) * CaM2N - kf_K2C * (Ca^2) * KCaM0 - kf_K2C * (Ca^2) * KCaM2N + + -kf_K2N * (Ca^2) * KCaM0 - kf_K2N * (Ca^2) * KCaM2C # dxc update dxc[1] = ∂Vsp @@ -1294,7 +1288,7 @@ function F_synapse(dxc, xc, xd, p_synapse::SynapseParams, t, events_bap, bap_by_ end ``` -### Discrete jumps. +### Discrete jumps. For the PDMP package we need to define the rates in which the jumps occur. @@ -1358,7 +1352,6 @@ The rate function. ```julia # adapted from SynapseElife/src/SynapseModel.jl function R_synapse(rate, xc, xd, p_synapse::SynapseParams, t, sum_rate, glu = 0) - @unpack_SynapseParams p_synapse # Voltage @@ -1527,21 +1520,20 @@ Alternatively, for the JumpProcesses packages we need to define the jumps. First Macro to help with defining the Synapse problem for the JumpProcesses package, used in the `J_synapse` function body. # Arguments -- i : Jump index -- p_synapse : Synapse parameters -- rate_ex : Rate as Julia expression -- urate_ex : Rate upper bound as a Julia expression -- rateinterval_ex : Rate interval as a Julia expression + + - i : Jump index + - p_synapse : Synapse parameters + - rate_ex : Rate as Julia expression + - urate_ex : Rate upper bound as a Julia expression + - rateinterval_ex : Rate interval as a Julia expression """ macro j_jump(i, p_synapse, nu, rate_ex, urate_ex = nothing, rateinterval_ex = nothing) - assignments = Expr[] alpha_beta_regex = r"(alpha|beta)_(m_r|h_r|m_t|h_t|l|1_l|2_l)" alpha_beta_matches = Set([m.match for m in eachmatch(alpha_beta_regex, "$rate_ex")]) if length(alpha_beta_matches) > 0 - for m in ("alpha_1_l", "alpha_2_l", "beta_l") if m in alpha_beta_matches throw(DomainError(m, "this variable does not exist in the model.")) @@ -1571,7 +1563,6 @@ macro j_jump(i, p_synapse, nu, rate_ex, urate_ex = nothing, rateinterval_ex = no "beta_2_l" in alpha_beta_matches push!(assignments, :((alpha_l, beta_1_l, beta_2_l) = rates_l(Vsp))) end - end if occursin("D_rate", "$rate_ex") @@ -1597,7 +1588,7 @@ macro j_jump(i, p_synapse, nu, rate_ex, urate_ex = nothing, rateinterval_ex = no integrator.p.xd[j] += a end end - end, + end ) if !isnothing(urate_ex) @@ -1622,14 +1613,13 @@ macro j_jump(i, p_synapse, nu, rate_ex, urate_ex = nothing, rateinterval_ex = no else push!( ex, - :(VariableRateJump(rate, affect!; urate = urate, rateinterval = rateinterval)), + :(VariableRateJump(rate, affect!; urate = urate, rateinterval = rateinterval)) ) end quote $(ex...) end - end ``` @@ -1739,181 +1729,141 @@ function J_synapse(p_synapse::SynapseParams, nu) @j_jump(96, p_synapse, nu, GABA_r_ro1 * p.xd[47]), # 96 @j_jump(97, p_synapse, nu, GABA_r_c1 * p.xd[49]), # 97 @j_jump(98, p_synapse, nu, GABA_r_ro2 * p.xd[48]), # 98 - @j_jump(99, p_synapse, nu, GABA_r_c2 * p.xd[50]), # 99 + @j_jump(99, p_synapse, nu, GABA_r_c2 * p.xd[50]) # 99 ], variable_jumps = [ # R-type VGCC - @j_jump( - 56, + @j_jump(56, p_synapse, nu, p.xd[25] * alpha_m_r * frwd_VGCC, p.xd[25] * max_m_r * frwd_VGCC, - typemax(Float64) - ), # 56 - @j_jump( - 57, + typemax(Float64)), # 56 + @j_jump(57, p_synapse, nu, p.xd[26] * beta_m_r * bcwd_VGCC, p.xd[26] * max_m_r * frwd_VGCC, - typemax(Float64) - ), # 57 - @j_jump( - 58, + typemax(Float64)), # 57 + @j_jump(58, p_synapse, nu, p.xd[25] * alpha_h_r * frwd_VGCC, p.xd[25] * max_h_r * frwd_VGCC, - typemax(Float64) - ), # 58 - @j_jump( - 59, + typemax(Float64)), # 58 + @j_jump(59, p_synapse, nu, p.xd[27] * beta_h_r * bcwd_VGCC, p.xd[27] * max_h_r * bcwd_VGCC, - typemax(Float64) - ), # 59 - @j_jump( - 60, + typemax(Float64)), # 59 + @j_jump(60, p_synapse, nu, p.xd[26] * alpha_h_r * frwd_VGCC, p.xd[26] * max_h_r * frwd_VGCC, - typemax(Float64) - ), # 60 - @j_jump( - 61, + typemax(Float64)), # 60 + @j_jump(61, p_synapse, nu, p.xd[28] * beta_h_r * bcwd_VGCC, p.xd[28] * max_h_r * bcwd_VGCC, - typemax(Float64) - ), # 61 - @j_jump( - 62, + typemax(Float64)), # 61 + @j_jump(62, p_synapse, nu, p.xd[27] * alpha_m_r * frwd_VGCC, p.xd[27] * max_m_r * frwd_VGCC, - typemax(Float64) - ), # 62 - @j_jump( - 63, + typemax(Float64)), # 62 + @j_jump(63, p_synapse, nu, p.xd[28] * beta_m_r * bcwd_VGCC, p.xd[28] * max_m_r * bcwd_VGCC, - typemax(Float64) - ), # 63 + typemax(Float64)), # 63 # T-type VGCC - @j_jump( - 64, + @j_jump(64, p_synapse, nu, p.xd[29] * alpha_m_t * frwd_VGCC, p.xd[29] * max_m_t * frwd_VGCC, - typemax(Float64) - ), # 64 - @j_jump( - 65, + typemax(Float64)), # 64 + @j_jump(65, p_synapse, nu, p.xd[30] * beta_m_t * bcwd_VGCC, p.xd[30] * max_m_t * bcwd_VGCC, - typemax(Float64) - ), # 65 this one can have a high rate - @j_jump( - 66, + typemax(Float64)), # 65 this one can have a high rate + @j_jump(66, p_synapse, nu, p.xd[29] * alpha_h_t * frwd_VGCC, p.xd[29] * max_h_t * frwd_VGCC, - typemax(Float64) - ), # 66 - @j_jump( - 67, + typemax(Float64)), # 66 + @j_jump(67, p_synapse, nu, p.xd[31] * beta_h_t * bcwd_VGCC, p.xd[31] * max_h_t * bcwd_VGCC, - typemax(Float64) - ), # 67 - @j_jump( - 68, + typemax(Float64)), # 67 + @j_jump(68, p_synapse, nu, p.xd[30] * alpha_h_t * frwd_VGCC, p.xd[30] * max_h_t * frwd_VGCC, - typemax(Float64) - ), # 68 - @j_jump( - 69, + typemax(Float64)), # 68 + @j_jump(69, p_synapse, nu, p.xd[32] * beta_h_t * bcwd_VGCC, p.xd[32] * max_h_t * bcwd_VGCC, - typemax(Float64) - ), # 69 - @j_jump( - 70, + typemax(Float64)), # 69 + @j_jump(70, p_synapse, nu, p.xd[31] * alpha_m_t * frwd_VGCC, p.xd[31] * max_m_t * frwd_VGCC, - typemax(Float64) - ), # 70 - @j_jump( - 71, + typemax(Float64)), # 70 + @j_jump(71, p_synapse, nu, p.xd[32] * beta_m_t * bcwd_VGCC, p.xd[32] * max_m_t * bcwd_VGCC, - typemax(Float64) - ), # 71, this one can have a high rate + typemax(Float64)), # 71, this one can have a high rate # L-type VGCC - @j_jump( - 72, + @j_jump(72, p_synapse, nu, p.xd[33] * alpha_l * frwd_VGCC, p.xd[33] * max_alpha_l * frwd_VGCC, - typemax(Float64) - ), # 72 - @j_jump( - 73, + typemax(Float64)), # 72 + @j_jump(73, p_synapse, nu, p.xd[34] * beta_1_l * bcwd_VGCC, p.xd[34] * max_beta_1_l * bcwd_VGCC, - typemax(Float64) - ), # 73 - @j_jump( - 74, + typemax(Float64)), # 73 + @j_jump(74, p_synapse, nu, p.xd[33] * alpha_l * frwd_VGCC, p.xd[33] * max_alpha_l * frwd_VGCC, - typemax(Float64) - ), # 74 - @j_jump( - 75, + typemax(Float64)), # 74 + @j_jump(75, p_synapse, nu, p.xd[35] * beta_2_l * bcwd_VGCC, p.xd[35] * max_beta_2_l * bcwd_VGCC, - typemax(Float64) - ), # 75 + typemax(Float64)), # 75 # LTD/LTP @j_jump(76, p_synapse, nu, p.xd[36] * D_rate, 1, typemax(Float64)), # 76 @j_jump(77, p_synapse, nu, p.xd[37] * P_rate, 1, typemax(Float64)), # 77 @j_jump(78, p_synapse, nu, p.xd[36] * P_rate, 1, typemax(Float64)), # 78 - @j_jump(79, p_synapse, nu, p.xd[38] * D_rate, 1, typemax(Float64)), # 79 - ], + @j_jump(79, p_synapse, nu, p.xd[38] * D_rate, 1, typemax(Float64)) # 79 + ] ) return jumps @@ -1944,21 +1894,21 @@ First, we define the problem for the `PDMP` package. ```julia function SynapseProblem( - xc, - xd, - t1, - t2, - events_bap, - bap_by_epsp, - glu, - p_synapse, - nu, - algo::T, - agg = nothing; - saveat = [], - save_everystep = isempty(saveat), - kwargs..., -) where {T<:CHV} + xc, + xd, + t1, + t2, + events_bap, + bap_by_epsp, + glu, + p_synapse, + nu, + algo::T, + agg = nothing; + saveat = [], + save_everystep = isempty(saveat), + kwargs... +) where {T <: CHV} problem = PDMP.PDMPProblem( (dxc, xc, xd, p, t) -> F_synapse(dxc, xc, xd, p, t, events_bap, bap_by_epsp), (rate, xc, xd, p, t, sum_rate) -> R_synapse(rate, xc, xd, p, t, sum_rate, glu), @@ -1967,7 +1917,7 @@ function SynapseProblem( xd, p_synapse, (t1, t2); - Ncache = 12, # this option is for AD in PreallocationTools + Ncache = 12 # this option is for AD in PreallocationTools ) sol = solve(problem, algo; kwargs...) return sol @@ -2026,7 +1976,7 @@ function (affect!::SavingAffect)(integrator, force_save = false) affect!.saved_values.saveval, affect!.saveiter, affect!.save_func(integrator.u, integrator.t, integrator), - Val{false}, + Val{false} ) end u_modified!(integrator, false) @@ -2045,8 +1995,7 @@ end # adapted from DiffEqCallbacks.jl/src/saving.jl function SavingCallback(save_func, saved_values::SavedValues; save_modified = true) - saveat_internal = - DataStructures.BinaryHeap{eltype(saved_values.t)}(DataStructures.FasterForward()) + saveat_internal = DataStructures.BinaryHeap{eltype(saved_values.t)}(DataStructures.FasterForward()) affect! = SavingAffect( save_func, saved_values, @@ -2055,7 +2004,7 @@ function SavingCallback(save_func, saved_values::SavedValues; save_modified = tr false, false, false, - 0, + 0 ) # only save when save_modified is true; SavingCallback from DiffEqCallbacks # saves every step regardless of save_modified @@ -2076,7 +2025,7 @@ function SavingCallback(save_func, saved_values::SavedValues; save_modified = tr condition, affect!; initialize = saving_initialize!, - save_positions = (false, false), + save_positions = (false, false) ) end ``` @@ -2086,8 +2035,8 @@ Next, we define our problem wrapper that uses our custom saving callback. ```julia function buildRxDependencyGraph(nu) numrxs, _ = size(nu) - dep_graph = [Vector{Int}() for n = 1:(numrxs-1)] - for rx = 1:numrxs + dep_graph = [Vector{Int}() for n in 1:(numrxs - 1)] + for rx in 1:numrxs if rx == 55 # no need to track the Poisson process continue end @@ -2117,42 +2066,42 @@ function buildRxDependencyGraph(nu) end function SynapseProblem( - xc, - xd, - t1, - t2, - events_bap, - bap_by_epsp, - glu, - p_synapse, - nu, - algo, - agg; - jumps = nothing, - save_positions = (false, true), - saveat = [], - save_everystep = isempty(saveat), - kwargs..., + xc, + xd, + t1, + t2, + events_bap, + bap_by_epsp, + glu, + p_synapse, + nu, + algo, + agg; + jumps = nothing, + save_positions = (false, true), + saveat = [], + save_everystep = isempty(saveat), + kwargs... ) p = ( xd0 = copy(xd), xd = copy(xd), Glu = p_synapse.glu_amp * glu, - p_synapse = p_synapse, + p_synapse = p_synapse ) oprob = ODEProblem( - (dxc, xc, p, t) -> - F_synapse(dxc, xc, p.xd, p.p_synapse, t, events_bap, bap_by_epsp), + (dxc, xc, p, + t) -> F_synapse(dxc, xc, p.xd, p.p_synapse, t, events_bap, bap_by_epsp), xc, (t1, t2), - p, + p ) xdsol = SavedValues(typeof(t1), typeof(xd)) dep_graph = buildRxDependencyGraph(nu) callback = SavingCallback( (u, t, integrator) -> copy(integrator.p.xd), xdsol; - save_modified = typeof(save_positions) <: Bool ? save_positions : save_positions[2], + save_modified = typeof(save_positions) <: Bool ? save_positions : save_positions[2] ) jprob = JumpProblem( oprob, @@ -2162,7 +2111,7 @@ function SynapseProblem( save_positions, saveat, save_everystep, - callback, + callback ) sol = (xcsol = solve(jprob, algo; saveat, save_everystep, kwargs...), xdsol = xdsol) return sol @@ -2176,25 +2125,25 @@ We define functions to run the evolution of the whole synapse. The evolution inc ```julia # adapted from SynapseElife/src/SynapseModel.jl function evolveSynapse( - xc0::Vector{T}, - xd0, - p_synapse::SynapseParams, - events_sorted_times, - is_pre_or_post_event, - bap_by_epsp, - is_glu_released, - nu, - algos, - agg = nothing; - progress = false, - abstol = 1e-8, - reltol = 1e-7, - save_positions = (false, true), - saveat = [], - kwargs..., + xc0::Vector{T}, + xd0, + p_synapse::SynapseParams, + events_sorted_times, + is_pre_or_post_event, + bap_by_epsp, + is_glu_released, + nu, + algos, + agg = nothing; + progress = false, + abstol = 1e-8, + reltol = 1e-7, + save_positions = (false, true), + saveat = [], + kwargs... ) where {T} - - tt, XC, XD = evolveSynapse_noformat( + tt, XC, + XD = evolveSynapse_noformat( xc0, xd0, p_synapse, @@ -2210,7 +2159,7 @@ function evolveSynapse( reltol, save_positions, saveat, - kwargs..., + kwargs... ) out = formatSynapseResult(tt, XC, XD) @@ -2218,25 +2167,24 @@ end # adapted from SynapseElife/src/SynapseModel.jl function evolveSynapse_noformat( - xc0::Vector{T}, - xd0, - p_synapse::SynapseParams, - events_sorted_times, - is_pre_or_post_event, - bap_by_epsp, - is_glu_released, - nu, - algos, - agg = nothing; - progress = false, - abstol = 1e-8, - reltol = 1e-7, - save_positions = (false, true), - saveat = [], - kwargs..., + xc0::Vector{T}, + xd0, + p_synapse::SynapseParams, + events_sorted_times, + is_pre_or_post_event, + bap_by_epsp, + is_glu_released, + nu, + algos, + agg = nothing; + progress = false, + abstol = 1e-8, + reltol = 1e-7, + save_positions = (false, true), + saveat = [], + kwargs... ) where {T} - - if save_positions isa Tuple{Bool,Bool} + if save_positions isa Tuple{Bool, Bool} save_positionsON = save_positions save_positionsOFF = save_positions else @@ -2258,51 +2206,56 @@ function evolveSynapse_noformat( tt = [0.0] # vector of times # we collect which external events correspond to BaPs - events_bap = events_sorted_times[is_pre_or_post_event.==false] + events_bap = events_sorted_times[is_pre_or_post_event .== false] # function to simulate the synapse when Glutamate is ON - SimGluON = - (xc, xd, t1, t2, glu) -> SynapseProblem( - xc, - xd, - t1, - t2, - events_bap, - bap_by_epsp, - glu, - p_synapse, - nu, - algos[1], - agg; - jumps, - reltol, - abstol, - saveat, - save_positions = save_positionsON, - kwargs..., - ) + SimGluON = (xc, + xd, + t1, + t2, + glu) -> SynapseProblem( + xc, + xd, + t1, + t2, + events_bap, + bap_by_epsp, + glu, + p_synapse, + nu, + algos[1], + agg; + jumps, + reltol, + abstol, + saveat, + save_positions = save_positionsON, + kwargs... + ) # function to simulate the synapse when Glutamate is OFF - SimGluOFF = - (xc, xd, t1, t2) -> SynapseProblem( - xc, - xd, - t1, - t2, - events_bap, - bap_by_epsp, - zero(T), - p_synapse, - nu, - algos[2], - agg; - jumps, - reltol, - abstol, - saveat, - save_positions = save_positionsOFF, - kwargs..., - ) + SimGluOFF = (xc, + xd, + t1, + t2) -> SynapseProblem( + xc, + xd, + t1, + t2, + events_bap, + bap_by_epsp, + zero(T), + p_synapse, + nu, + algos[2], + agg; + jumps, + reltol, + abstol, + saveat, + save_positions = save_positionsOFF, + kwargs... + ) # random variable for Glutamate concentration gluDist = Gamma(1 / p_synapse.glu_cv^2, p_synapse.glu_cv^2) @@ -2325,7 +2278,7 @@ function evolveSynapse_noformat( XD[:, end], eve, eve + p_synapse.glu_width, - ifelse(is_glu_released[eveindex], gluamp, zero(T)), + ifelse(is_glu_released[eveindex], gluamp, zero(T)) ) formatSimResult!(res, XC, XD, tt) end @@ -2398,9 +2351,9 @@ function formatSynapseResult(tt, XC, XD) :n, :SK, :λ_age, - :λ_aux, + :λ_aux ) - values = (XC[i, :] for i = 1:length(namesC)) + values = (XC[i, :] for i in 1:length(namesC)) return (t = tt, XD = XD, XC = XC, zip(namesC, values)...) end ``` @@ -2416,14 +2369,14 @@ const algorithms = ( label = "PDMP", agg = nothing, solver = (CHV(solver), CHV(solver)), - saveat = [], + saveat = [] ), ( label = "Coevolve", agg = Coevolve(), solver = (solver, solver), - saveat = 1 / p_synapse.sampling_rate, - ), + saveat = 1 / p_synapse.sampling_rate + ) ); ``` @@ -2448,8 +2401,8 @@ for algo in algorithms algo.agg; save_positions = (false, true), saveat = algo.saveat, - save_everystep = false, - ), + save_everystep = false + ) ) end ``` @@ -2480,8 +2433,7 @@ bs = Vector{BenchmarkTools.Trial}() for algo in algorithms push!( bs, - @benchmark( - evolveSynapse( + @benchmark(evolveSynapse( xc0, xd0, p_synapse, @@ -2494,30 +2446,31 @@ for algo in algorithms $(algo).agg; save_positions = (false, true), saveat = $(algo).saveat, - save_everystep = false, + save_everystep = false ), - samples = 50, - evals = 1, - seconds = 500, - ) + samples=50, + evals=1, + seconds=500,) ) end ``` ```julia labels = [a.label for a in algorithms] -medtimes = [text(string(round(median(b).time/1e9, digits=3),"s"), :center, 12) for b in bs] +medtimes = [text(string(round(median(b).time/1e9, digits = 3), "s"), :center, 12) + for b in bs] relmedtimes = [median(b).time for b in bs] relmedtimes ./= relmedtimes[1] -bar(labels, relmedtimes, markeralpha=0, series_annotation=medtimes, fmt=fmt) +bar(labels, relmedtimes, markeralpha = 0, series_annotation = medtimes, fmt = fmt) title!("evolveSynapse (Median time)") ``` ```julia -medmem = [text(string(round(median(b).memory/1e6, digits=3),"Mb"), :center, 12) for b in bs] +medmem = [text(string(round(median(b).memory/1e6, digits = 3), "Mb"), :center, 12) + for b in bs] relmedmem = Float64[median(b).memory for b in bs] relmedmem ./= relmedmem[1] -bar(labels, relmedmem, markeralpha=0, series_annotation=medmem, fmt=fmt) +bar(labels, relmedmem, markeralpha = 0, series_annotation = medmem, fmt = fmt) title!("evolveSynapse (Median memory)") ``` diff --git a/benchmarks/IntervalNonlinearProblem/Project.toml b/benchmarks/IntervalNonlinearProblem/Project.toml index dced33692..70d6d864c 100644 --- a/benchmarks/IntervalNonlinearProblem/Project.toml +++ b/benchmarks/IntervalNonlinearProblem/Project.toml @@ -1,12 +1,17 @@ [deps] BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" +Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" SciMLBenchmarks = "31c91b34-3c75-11e9-0341-95557aab0344" +SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7" +Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [compat] BenchmarkTools = "1" -NonlinearSolve = "1, 2, 3, 4" +NonlinearSolve = "4" Roots = "2" SciMLBenchmarks = "0.1" +SimpleNonlinearSolve = "2" +Statistics = "1" diff --git a/benchmarks/IntervalNonlinearProblem/simpleintervalrootfind.jmd b/benchmarks/IntervalNonlinearProblem/simpleintervalrootfind.jmd index 9e743d92a..63788849b 100644 --- a/benchmarks/IntervalNonlinearProblem/simpleintervalrootfind.jmd +++ b/benchmarks/IntervalNonlinearProblem/simpleintervalrootfind.jmd @@ -3,7 +3,7 @@ title: Simple Interval Rootfinding (NonlinearSolve.jl vs Roots.jl vs MATLAB) author: Chris Rackauckas --- -This example comes from +This example comes from [MATLAB's documentation showing improved rootfinding performance](https://twitter.com/walkingrandomly/status/1544615360833507329), and thus can be assumed to be considered optimized from MATLAB's perspective. MATLAB's results are: @@ -22,7 +22,7 @@ out = zeros(N); myfun(x, lv) = x * sin(x) - lv function froots(out, levels, u0) for i in 1:N - out[i] = find_zero(myfun, u0, levels[i]) + out[i] = solve(ZeroProblem(myfun, u0), levels[i]) end end @@ -34,22 +34,28 @@ using NonlinearSolve, BenchmarkTools function f(out, levels, u0) for i in 1:N - out[i] = solve(IntervalNonlinearProblem{false}(IntervalNonlinearFunction{false}(myfun), - u0, levels[i]), ITP()).u + out[i] = solve( + IntervalNonlinearProblem{false}(IntervalNonlinearFunction{false}(myfun), + u0, levels[i]), + ITP()).u end end function f2(out, levels, u0) for i in 1:N - out[i] = solve(IntervalNonlinearProblem{false}(IntervalNonlinearFunction{false}(myfun), - u0, levels[i]), NonlinearSolve.Bisection()).u + out[i] = solve( + IntervalNonlinearProblem{false}(IntervalNonlinearFunction{false}(myfun), + u0, levels[i]), + NonlinearSolve.Bisection()).u end end function f3(out, levels, u0) for i in 1:N - out[i] = solve(NonlinearProblem{false}(NonlinearFunction{false}(myfun), - u0, levels[i]), SimpleNewtonRaphson()).u + out[i] = solve( + NonlinearProblem{false}(NonlinearFunction{false}(myfun), + u0, levels[i]), + SimpleNewtonRaphson()).u end end @@ -62,5 +68,5 @@ MATLAB 2022a reportedly achieves 1.66s. Try this code yourself: we receive ~0.05 ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/IntervalNonlinearProblem/suite.jmd b/benchmarks/IntervalNonlinearProblem/suite.jmd index 2209331b1..2b620285b 100644 --- a/benchmarks/IntervalNonlinearProblem/suite.jmd +++ b/benchmarks/IntervalNonlinearProblem/suite.jmd @@ -1,11 +1,11 @@ --- -title: NonlinearSolve.jl suite of interval root-finding algorithms +title: Interval root-finding test suite author: Fabian Gittins --- In this benchmark, we will examine how the interval root-finding algorithms -provided in `NonlinearSolve.jl` fare against one another for a selection of -examples. +provided in `NonlinearSolve.jl` and `SimpleNonlinearSolve.jl` fare against one another for a selection of +challenging test functions from the literature. ## `Roots.jl` baseline @@ -86,7 +86,7 @@ and loop through the methods, ```julia for alg in (Alefeld, NonlinearSolve.Bisection, Brent, Falsi, - ITP, Muller, Ridder) + ITP, Muller, Ridder) println("Benchmark of $alg:") @btime h!($out, $ps, $uspan, $(alg())) println("Mean absolute error: $(mean(abs.(f.(out, ps))))\n") @@ -142,7 +142,7 @@ function j!(out, uspan, alg) end for alg in (Alefeld, NonlinearSolve.Bisection, Brent, Falsi, - ITP, Muller, Ridder) + ITP, Muller, Ridder) println("Benchmark of $alg:") @btime j!($out, $uspan, $(alg())) println("Mean absolute error: $(mean(abs.(g.(out))))\n") @@ -155,6 +155,367 @@ than others. This is entirely to be expected as some of the algorithms, like `Bisection`, bracket the root and thus will reliably converge to high accuracy. Others, like `Muller`, are not bracketing methods, but can be extremely fast. +## Extended Test Suite with Challenging Functions + +Now we'll test the algorithms on a comprehensive suite of challenging test functions +commonly used in the interval rootfinding literature. These functions exhibit various +difficulties such as multiple roots, nearly flat regions, discontinuities, and +extreme sensitivity. + +```julia +using Statistics + +# Define challenging test functions +test_functions = [ + # Function 1: Polynomial with multiple roots + (name = "Wilkinson-like polynomial", + f = (u, p) -> (u - 1) * (u - 2) * (u - 3) * (u - 4) * (u - 5) - p, + interval = (0.5, 5.5), + p = 0.05), + + # Function 2: Trigonometric with multiple roots + (name = "sin(x) - 0.5x", + f = (u, p) -> sin(u) - 0.5*u - p, + interval = (-10.0, 10.0), + p = 0.3), + + # Function 3: Exponential function (sensitive near zero) + (name = "exp(x) - 1 - x - x²/2", + f = (u, p) -> exp(u) - 1 - u - u^2/2 - p, + interval = (-2.0, 2.0), + p = 0.005), + + # Function 4: Rational function with pole + (name = "1/(x-0.5) - 2", + f = (u, p) -> 1/(u - 0.5) - 2 - p, + interval = (0.6, 2.0), + p = 0.05), + + # Function 5: Logarithmic function + (name = "log(x) - x + 2", + f = (u, p) -> log(u) - u + 2 - p, + interval = (0.1, 3.0), + p = 0.05), + + # Function 6: High oscillation function + (name = "sin(20x) + 0.1x", + f = (u, p) -> sin(20*u) + 0.1*u - p, + interval = (-5.0, 5.0), + p = 0.1), + + # Function 7: Function with very flat region + (name = "x³ - 2x² + x", + f = (u, p) -> u^3 - 2*u^2 + u - p, + interval = (-1.0, 2.0), + p = 0.025), + + # Function 8: Bessel-like function + (name = "x·sin(1/x) - 0.1", + f = (u, p) -> u * sin(1/u) - 0.1 - p, + interval = (0.01, 1.0), + p = 0.01) +] + +# Add SimpleNonlinearSolve algorithms +using SimpleNonlinearSolve + +# Combined algorithm list from both packages +all_algorithms = [ + (name = "Alefeld (BNS)", alg = () -> Alefeld(), package = "BracketingNonlinearSolve"), + (name = "Bisection (BNS)", alg = () -> NonlinearSolve.Bisection(), + package = "BracketingNonlinearSolve"), + (name = "Brent (BNS)", alg = () -> Brent(), package = "BracketingNonlinearSolve"), + (name = "Falsi (BNS)", alg = () -> Falsi(), package = "BracketingNonlinearSolve"), + (name = "ITP (BNS)", alg = () -> ITP(), package = "BracketingNonlinearSolve"), + (name = "Ridder (BNS)", alg = () -> Ridder(), package = "BracketingNonlinearSolve"), + (name = "Bisection (SNS)", alg = () -> SimpleNonlinearSolve.Bisection(), + package = "SimpleNonlinearSolve"), + (name = "Brent (SNS)", alg = () -> SimpleNonlinearSolve.Brent(), + package = "SimpleNonlinearSolve"), + (name = "Falsi (SNS)", alg = () -> SimpleNonlinearSolve.Falsi(), + package = "SimpleNonlinearSolve"), + (name = "Ridders (SNS)", alg = () -> SimpleNonlinearSolve.Ridders(), + package = "SimpleNonlinearSolve") +] + +# Benchmark function for testing all algorithms on a given function +function benchmark_function(test_func, N_samples = 10000) + println("\\n=== Testing: $(test_func.name) ===") + println("Interval: $(test_func.interval)") + println("Parameter: $(test_func.p)") + + results = [] + + # Test Roots.jl baseline + try + # Cache the function for Roots.jl + roots_func = u -> test_func.f(u, test_func.p) + + # Warmup run to exclude compilation time + find_zero(roots_func, test_func.interval) + + # Actual timing + time_roots = @elapsed begin + for i in 1:N_samples + root = find_zero(roots_func, test_func.interval) + end + end + + # Calculate error using one solve + final_root = find_zero(roots_func, test_func.interval) + error_roots = abs(test_func.f(final_root, test_func.p)) + + println("Roots.jl: $(round(time_roots*1000, digits=2)) ms, Error: $(round(error_roots, sigdigits=3))") + push!(results, ( + name = "Roots.jl", time = time_roots, error = error_roots, success = true)) + catch e + println("Roots.jl: FAILED - $e") + push!(results, (name = "Roots.jl", time = Inf, error = Inf, success = false)) + end + + # Test all algorithms + for alg_info in all_algorithms + try + # Warmup run to exclude compilation time + prob_warmup = IntervalNonlinearProblem{false}( + IntervalNonlinearFunction{false}(test_func.f), + test_func.interval, test_func.p) + solve(prob_warmup, alg_info.alg()) + + # Actual timing + time_taken = @elapsed begin + for i in 1:N_samples + prob = IntervalNonlinearProblem{false}( + IntervalNonlinearFunction{false}(test_func.f), + test_func.interval, test_func.p) + sol = solve(prob, alg_info.alg()) + end + end + + # Calculate error using one solve + prob_final = IntervalNonlinearProblem{false}( + IntervalNonlinearFunction{false}(test_func.f), + test_func.interval, test_func.p) + sol_final = solve(prob_final, alg_info.alg()) + error_val = abs(test_func.f(sol_final.u, test_func.p)) + + println("$(alg_info.name): $(round(time_taken*1000, digits=2)) ms, Error: $(round(error_val, sigdigits=3))") + push!(results, ( + name = alg_info.name, time = time_taken, error = error_val, success = true)) + catch e + println("$(alg_info.name): FAILED - $e") + push!(results, (name = alg_info.name, time = Inf, error = Inf, success = false)) + end + end + + return results +end + +# Run benchmarks on all test functions +all_results = [] +for test_func in test_functions + results = benchmark_function(test_func, 10000) # Increased N since we're using fixed parameters + push!(all_results, (func_name = test_func.name, results = results)) +end +``` + +## Performance Summary + +Let's create a summary table of the results: + +```julia +using Printf + +function print_summary_table(all_results) + println("\\n" * "="^80) + println("COMPREHENSIVE BENCHMARK SUMMARY") + println("="^80) + + # Get all algorithm names + alg_names = unique([r.name for func_results in all_results + for r in func_results.results]) + + # Print header + @printf "%-25s" "Function" + for alg in alg_names + @printf "%-15s" alg[1:min(14, length(alg))] + end + println() + println("-"^(25 + 15*length(alg_names))) + + # Print results for each function + for func_result in all_results + @printf "%-25s" func_result.func_name[1:min(24, length(func_result.func_name))] + + for alg in alg_names + # Find result for this algorithm + alg_result = findfirst(r -> r.name == alg, func_result.results) + if alg_result !== nothing + result = func_result.results[alg_result] + if result.success && result.time < 1.0 # Reasonable time limit + @printf "%-15s" "$(round(result.time*1000, digits=1))ms" + else + @printf "%-15s" "FAIL" + end + else + @printf "%-15s" "N/A" + end + end + println() + end + + println("\\n" * "="^80) + println("Notes:") + println("- Times shown in milliseconds for 10000 function evaluations") + println("- BNS = BracketingNonlinearSolve.jl, SNS = SimpleNonlinearSolve.jl") + println("- FAIL indicates algorithm failed or took excessive time") + println("- Compilation time excluded via warmup runs") + println("="^80) +end + +print_summary_table(all_results) +``` + +## Accuracy Analysis + +Now let's examine the accuracy of each method: + +```julia +function print_accuracy_table(all_results) + println("\\n" * "="^80) + println("ACCURACY ANALYSIS (Absolute Error)") + println("="^80) + + alg_names = unique([r.name for func_results in all_results + for r in func_results.results]) + + # Print header + @printf "%-25s" "Function" + for alg in alg_names + @printf "%-15s" alg[1:min(14, length(alg))] + end + println() + println("-"^(25 + 15*length(alg_names))) + + # Print results for each function + for func_result in all_results + @printf "%-25s" func_result.func_name[1:min(24, length(func_result.func_name))] + + for alg in alg_names + alg_result = findfirst(r -> r.name == alg, func_result.results) + if alg_result !== nothing + result = func_result.results[alg_result] + if result.success && result.error < 1e10 + @printf "%-15s" "$(round(result.error, sigdigits=2))" + else + @printf "%-15s" "FAIL" + end + else + @printf "%-15s" "N/A" + end + end + println() + end + + println("="^80) +end + +print_accuracy_table(all_results) +``` + +## Algorithm Rankings + +Finally, let's rank the algorithms by overall performance: + +```julia +function rank_algorithms(all_results) + println("\\n" * "="^60) + println("ALGORITHM RANKINGS") + println("="^60) + + # Calculate scores for each algorithm + alg_scores = Dict() + + for func_result in all_results + for result in func_result.results + if !haskey(alg_scores, result.name) + alg_scores[result.name] = Dict(:time_score => 0.0, :accuracy_score => 0.0, :success_count => 0) + end + + if result.success + alg_scores[result.name][:success_count] += 1 + # Lower time is better (inverse score) + alg_scores[result.name][:time_score] += result.time < 1.0 ? + 1.0 / result.time : 0.0 + # Lower error is better (inverse score) + alg_scores[result.name][:accuracy_score] += result.error < 1e10 ? + 1.0 / (result.error + 1e-15) : + 0.0 + end + end + end + + # Normalize and combine scores + total_functions = length(all_results) + algorithm_rankings = [] + + for (alg, scores) in alg_scores + success_rate = scores[:success_count] / total_functions + avg_speed_score = scores[:time_score] / total_functions + avg_accuracy_score = scores[:accuracy_score] / total_functions + + # Combined score (weighted: 40% success rate, 30% speed, 30% accuracy) + combined_score = 0.4 * success_rate + 0.3 * (avg_speed_score / 1000) + + 0.3 * (avg_accuracy_score / 1e12) + + push!(algorithm_rankings, + ( + name = alg, + success_rate = success_rate, + speed_score = avg_speed_score, + accuracy_score = avg_accuracy_score, + combined_score = combined_score + )) + end + + # Sort by combined score + sort!(algorithm_rankings, by = x -> x.combined_score, rev = true) + + println("Rank | Algorithm | Success Rate | Combined Score") + println("-"^60) + for (i, alg) in enumerate(algorithm_rankings) + @printf "%-4d | %-18s | %-11.1f%% | %-12.3f\\n" i alg.name[1:min(18, length(alg.name))] (alg.success_rate*100) alg.combined_score + end + + println("="^60) + println("Note: Combined score weights success rate (40%), speed (30%), and accuracy (30%)") +end + +rank_algorithms(all_results) +``` + +## Conclusion + +This extended benchmark suite demonstrates the performance and accuracy characteristics of interval rootfinding algorithms across a diverse set of challenging test functions. The test functions include: + + 1. **Polynomial functions** with multiple roots + 2. **Trigonometric functions** with oscillatory behavior + 3. **Exponential functions** with high sensitivity + 4. **Rational functions** with singularities + 5. **Logarithmic functions** with domain restrictions + 6. **Highly oscillatory functions** testing robustness + 7. **Functions with flat regions** challenging convergence + 8. **Bessel-like functions** with complex behavior + +The benchmark compares algorithms from both `BracketingNonlinearSolve.jl` and `SimpleNonlinearSolve.jl`, providing insights into: + + - **Robustness**: Which algorithms handle challenging functions + - **Speed**: Computational efficiency across different problem types + - **Accuracy**: Precision of the found roots + - **Reliability**: Success rates across diverse test cases + +This comprehensive evaluation helps users choose the most appropriate interval rootfinding algorithm for their specific applications. + ```julia, echo = false using SciMLBenchmarks SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) diff --git a/benchmarks/Jumps/Diffusion_CTRW.jmd b/benchmarks/Jumps/Diffusion_CTRW.jmd index 0c09cd639..3116c0402 100644 --- a/benchmarks/Jumps/Diffusion_CTRW.jmd +++ b/benchmarks/Jumps/Diffusion_CTRW.jmd @@ -10,6 +10,7 @@ using Catalyst, JumpProcesses, JumpProblemLibrary, Plots, Statistics, DataFrames ``` # Model and example solutions + Here we implement a 1D continuous time random walk approximation of diffusion for $N$ lattice sites on $\left[0,1\right]$, with reflecting boundary conditions at $x=0$ and $x=1$. Note that our goal is to benchmark the non-spatial @@ -20,20 +21,21 @@ spatial SSAs too here. N = 256 h = 1 / N u0 = 10 * ones(Int64, N) -tf = .01 -methods = (Direct(), FRM(), SortingDirect(), NRM(), DirectCR(), RSSA(), RSSACR(), Coevolve(), RDirect()) -shortlabels = [string(leg)[15:end-2] for leg in methods] +tf = 0.01 +methods = (Direct(), FRM(), SortingDirect(), NRM(), DirectCR(), + RSSA(), RSSACR(), Coevolve(), RDirect()) +shortlabels = [string(leg)[15:(end - 2)] for leg in methods] jprob = JumpProblemLibrary.prob_jump_diffnetwork rn = jprob.network(N) prob = DiscreteProblem(rn, u0, (0.0, tf), [1 / (h*h)]) -ploth = plot(reuse=false) -for (i,method) in enumerate(methods) +ploth = plot(reuse = false) +for (i, method) in enumerate(methods) println("Benchmarking method: ", method) - jump_prob = JumpProblem(rn, prob, method, save_positions=(false, false)) - sol = solve(jump_prob, SSAStepper(); saveat=tf/1000.) - plot!(ploth, sol.t, sol[Int(N//2),:], label=shortlabels[i]) + jump_prob = JumpProblem(rn, prob, method, save_positions = (false, false)) + sol = solve(jump_prob, SSAStepper(); saveat = tf/1000.0) + plot!(ploth, sol.t, sol[Int(N//2), :], label = shortlabels[i]) end -plot!(ploth, title="Population at middle lattice site", xlabel="time") +plot!(ploth, title = "Population at middle lattice site", xlabel = "time") ``` # Benchmarking performance of the methods @@ -51,7 +53,7 @@ end nsims = 50 benchmarks = Vector{Vector{Float64}}() for method in methods - jump_prob = JumpProblem(rn, prob, method, save_positions=(false, false)) + jump_prob = JumpProblem(rn, prob, method, save_positions = (false, false)) stepper = SSAStepper() t = Vector{Float64}(undef, nsims) run_benchmark!(t, jump_prob, stepper) @@ -60,29 +62,31 @@ end ``` ```julia -medtimes = Vector{Float64}(undef,length(methods)) -stdtimes = Vector{Float64}(undef,length(methods)) -avgtimes = Vector{Float64}(undef,length(methods)) +medtimes = Vector{Float64}(undef, length(methods)) +stdtimes = Vector{Float64}(undef, length(methods)) +avgtimes = Vector{Float64}(undef, length(methods)) for i in 1:length(methods) medtimes[i] = median(benchmarks[i]) avgtimes[i] = mean(benchmarks[i]) stdtimes[i] = std(benchmarks[i]) end -df = DataFrame(names=shortlabels, medtimes=medtimes, relmedtimes=(medtimes/medtimes[1]), - avgtimes=avgtimes, std=stdtimes, cv=stdtimes./avgtimes) +df = DataFrame( + names = shortlabels, medtimes = medtimes, relmedtimes = (medtimes/medtimes[1]), + avgtimes = avgtimes, std = stdtimes, cv = stdtimes ./ avgtimes) ``` # Plotting + ```julia -sa = [string(round(mt,digits=4),"s") for mt in df.medtimes] -bar(df.names, df.relmedtimes, legend=:false) -scatter!(df.names, .05 .+ df.relmedtimes, markeralpha=0, series_annotations=sa) +sa = [string(round(mt, digits = 4), "s") for mt in df.medtimes] +bar(df.names, df.relmedtimes, legend = :false) +scatter!(df.names, 0.05 .+ df.relmedtimes, markeralpha = 0, series_annotations = sa) ylabel!("median relative to Direct") title!("256 Site 1D Diffusion CTRW") ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/Jumps/EGFR_Benchmark.jmd b/benchmarks/Jumps/EGFR_Benchmark.jmd index d2abe5c3a..8bad212a0 100644 --- a/benchmarks/Jumps/EGFR_Benchmark.jmd +++ b/benchmarks/Jumps/EGFR_Benchmark.jmd @@ -4,7 +4,8 @@ author: --- ```julia -using JumpProcesses, Plots, StableRNGs, BenchmarkTools, ReactionNetworkImporters, StatsPlots, Catalyst +using JumpProcesses, Plots, StableRNGs, BenchmarkTools, ReactionNetworkImporters, + StatsPlots, Catalyst ``` We will benchmark the aggregators of JumpProcesses on a epidermal growth factor receptor signaling network (356 species, 3749 reactions).[^1] @@ -12,53 +13,57 @@ We will benchmark the aggregators of JumpProcesses on a epidermal growth factor Let's first look at how the model equilibriates to make sure we get consistent results for all the methods. Let's plot the dimer concentration as a function of time using each of the different stochastic simulation algorithms. ```julia -tf = 12. +tf = 12.0 rng = StableRNG(53124) algs = [NRM(), CCNRM(), DirectCR(), RSSACR()] egfr_net = loadrxnetwork(BNGNetwork(), joinpath(@__DIR__, "Data/egfr_net.net")); -dprob = DiscreteProblem(complete(egfr_net.rn), egfr_net.u0, (0., tf), egfr_net.p) -dprob = remake(dprob,u0=Int64.(dprob.u0)) +dprob = DiscreteProblem(complete(egfr_net.rn), egfr_net.u0, (0.0, tf), egfr_net.p) +dprob = remake(dprob, u0 = Int64.(dprob.u0)) -plt = plot(title="Dimer concentrations") +plt = plot(title = "Dimer concentrations") for alg in algs jprob = JumpProblem(complete(egfr_net.rn), dprob, alg) sol = solve(jprob, SSAStepper(), saveat = tf/200) - plot!(plt, sol, idxs = :Dimers, label="$alg") + plot!(plt, sol, idxs = :Dimers, label = "$alg") end plot!(plt) ``` + These results seem pretty reasonable - it seems like we're getting the same dimer concentration curve for each method. - # Model Benchmark -We define a function to benchmark the model and then plot the results in a benchmark. The goal is to see how the SSAs perform relative to each other. + +We define a function to benchmark the model and then plot the results in a benchmark. The goal is to see how the SSAs perform relative to each other. ```julia function benchmark_and_bar_plot(model, end_time, algs) times = Vector{Float64}() - alg_names = ["$s"[15:end-2] for s in algs] + alg_names = ["$s"[15:(end - 2)] for s in algs] benchmarks = Vector{BenchmarkTools.Trial}(undef, length(algs)) for (i, alg) in enumerate(algs) alg_name = alg_names[i] println("Benchmarking $alg_name") - dprob = DiscreteProblem(complete(model.rn), model.u0, (0., end_time), model.p) - dprob = remake(dprob,u0 = Int64.(dprob.u0)) - jprob = JumpProblem(complete(model.rn), dprob, alg; rng, save_positions = (false, false)) + dprob = DiscreteProblem(complete(model.rn), model.u0, (0.0, end_time), model.p) + dprob = remake(dprob, u0 = Int64.(dprob.u0)) + jprob = JumpProblem( + complete(model.rn), dprob, alg; rng, save_positions = (false, false)) - b = @benchmarkable solve($jprob; saveat = $end_time) samples = 5 seconds = 7200 + b = @benchmarkable solve($jprob; saveat = $end_time) samples=5 seconds=7200 bm = run(b) push!(times, median(bm).time/1e9) end - bar(alg_names, times, xlabel = "Algorithm", ylabel = "Average Time (s)", title = "SSA Runtime for EGFR network", legend = false) + bar(alg_names, times, xlabel = "Algorithm", ylabel = "Average Time (s)", + title = "SSA Runtime for EGFR network", legend = false) end ``` -Now we benchmark the EGFR network on the four algorithms and plot the results. +Now we benchmark the EGFR network on the four algorithms and plot the results. + ```julia -tf = 12. +tf = 12.0 rng = StableRNG(53124) algs = [NRM(), CCNRM(), DirectCR(), RSSACR()] @@ -67,10 +72,9 @@ plt ``` ### References + [^1]: Blinov ML, Faeder JR, Goldstein B, Hlavacek WS. A network model of early events in epidermal growth factor receptor signaling that accounts for combinatorial complexity. [^2]: Loman TE, Ma Y, Ilin V, et al. Catalyst: Fast and flexible modeling of reaction networks. - - ```julia, echo = false using SciMLBenchmarks SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) diff --git a/benchmarks/Jumps/Mendes_multistate_example.jmd b/benchmarks/Jumps/Mendes_multistate_example.jmd index 7ee5ac7da..99797edea 100644 --- a/benchmarks/Jumps/Mendes_multistate_example.jmd +++ b/benchmarks/Jumps/Mendes_multistate_example.jmd @@ -13,49 +13,52 @@ fmt = :png ``` Our model is + ```julia jprob = JumpProblemLibrary.prob_jump_multistate -rn = jprob.network +rn = jprob.network reactions(rn) ``` # Plot solutions by each method + ```julia -methods = (Direct(), FRM(), SortingDirect(), NRM(), DirectCR(), RSSA(), RSSACR(), Coevolve(), RDirect()) -shortlabels = [string(leg)[15:end-2] for leg in methods] -tf = 10.0 * jprob.tstop -prob = DiscreteProblem(rn, jprob.u0, (0.0, tf), jprob.rates) +methods = (Direct(), FRM(), SortingDirect(), NRM(), DirectCR(), + RSSA(), RSSACR(), Coevolve(), RDirect()) +shortlabels = [string(leg)[15:(end - 2)] for leg in methods] +tf = 10.0 * jprob.tstop +prob = DiscreteProblem(rn, jprob.u0, (0.0, tf), jprob.rates) varlegs = ["A_P" "A_bound_P" "A_unbound_P" "RLA_P"] @variables t S7(t) S8(t) S9(t) varsyms = [ - [S7,S8,S9], + [S7, S8, S9], [S9], - [S7,S8], + [S7, S8], [S7] ] varidxs = [] for vars in varsyms - push!(varidxs, [findfirst(isequal(sym),unknowns(rn)) for sym in vars]) + push!(varidxs, [findfirst(isequal(sym), unknowns(rn)) for sym in vars]) end ``` ```julia p = [] -for (i,method) in enumerate(methods) - jump_prob = JumpProblem(rn, prob, method, save_positions=(false, false)) - sol = solve(jump_prob, SSAStepper(), saveat=tf/1000.) +for (i, method) in enumerate(methods) + jump_prob = JumpProblem(rn, prob, method, save_positions = (false, false)) + sol = solve(jump_prob, SSAStepper(), saveat = tf/1000.0) solv = zeros(1001, 4) - for (i,varidx) in enumerate(varidxs) - solv[:,i] = sum(sol[varidx,:], dims=1) + for (i, varidx) in enumerate(varidxs) + solv[:, i] = sum(sol[varidx, :], dims = 1) end if i < length(methods) - push!(p, plot(sol.t, solv, title=shortlabels[i], legend=false, format=fmt)) + push!(p, plot(sol.t, solv, title = shortlabels[i], legend = false, format = fmt)) else - push!(p, plot(sol.t, solv, title=shortlabels[i], legend=false, format=fmt)) + push!(p, plot(sol.t, solv, title = shortlabels[i], legend = false, format = fmt)) end end -push!(p, plot((1:4)', framestyle = :none, legend=:inside, labels=varlegs)) -plot(p..., layout=(6,2), format=fmt) +push!(p, plot((1:4)', framestyle = :none, legend = :inside, labels = varlegs)) +plot(p..., layout = (6, 2), format = fmt) ``` # Benchmarking performance of the methods @@ -73,7 +76,7 @@ end nsims = 100 benchmarks = Vector{Vector{Float64}}() for method in methods - jump_prob = JumpProblem(rn, prob, method, save_positions=(false, false)) + jump_prob = JumpProblem(rn, prob, method, save_positions = (false, false)) stepper = SSAStepper() time = Vector{Float64}(undef, nsims) run_benchmark!(time, jump_prob, stepper) @@ -82,9 +85,9 @@ end ``` ```julia -medtimes = Vector{Float64}(undef,length(methods)) -stdtimes = Vector{Float64}(undef,length(methods)) -avgtimes = Vector{Float64}(undef,length(methods)) +medtimes = Vector{Float64}(undef, length(methods)) +stdtimes = Vector{Float64}(undef, length(methods)) +avgtimes = Vector{Float64}(undef, length(methods)) for i in 1:length(methods) medtimes[i] = median(benchmarks[i]) avgtimes[i] = mean(benchmarks[i]) @@ -92,17 +95,19 @@ for i in 1:length(methods) end using DataFrames -df = DataFrame(names=shortlabels, medtimes=medtimes, relmedtimes=(medtimes/medtimes[1]), - avgtimes=avgtimes, std=stdtimes, cv=stdtimes./avgtimes) +df = DataFrame( + names = shortlabels, medtimes = medtimes, relmedtimes = (medtimes/medtimes[1]), + avgtimes = avgtimes, std = stdtimes, cv = stdtimes ./ avgtimes) -sa = [text(string(round(mt,digits=3),"s"),:center,12) for mt in df.medtimes] -bar(df.names,df.relmedtimes,legend=:false, fmt=fmt) -scatter!(df.names, .05 .+ df.relmedtimes, markeralpha=0, series_annotations=sa, fmt=fmt) +sa = [text(string(round(mt, digits = 3), "s"), :center, 12) for mt in df.medtimes] +bar(df.names, df.relmedtimes, legend = :false, fmt = fmt) +scatter!( + df.names, 0.05 .+ df.relmedtimes, markeralpha = 0, series_annotations = sa, fmt = fmt) ylabel!("median relative to Direct") title!("Multistate Model") ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/Jumps/MultivariateHawkes.jmd b/benchmarks/Jumps/MultivariateHawkes.jmd index ecf52e137..92a859200 100644 --- a/benchmarks/Jumps/MultivariateHawkes.jmd +++ b/benchmarks/Jumps/MultivariateHawkes.jmd @@ -15,12 +15,15 @@ width_px, height_px = default(:size); # Model and example solutions Let a graph with ``V`` nodes, then the multivariate Hawkes process is characterized by ``V`` point processes such that the conditional intensity rate of node ``i`` connected to a set of nodes ``E_i`` in the graph is given by: + ```math \lambda_i^\ast (t) = \lambda + \sum_{j \in E_i} \sum_{t_{n_j} < t} \alpha \exp \left[-\beta (t - t_{n_j}) \right] ``` + This process is known as self-exciting, because the occurrence of an event ``j`` at ``t_{n_j}`` will increase the conditional intensity of all the processes connected to it by ``\alpha``. The excited intensity then decreases at a rate proportional to ``\beta``. The conditional intensity of this process has a recursive formulation which can significantly speed the simulation. The recursive formulation for the univariate case is derived in Laub et al. [2]. We derive the compound case here. Let ``t_{N_i} = \max \{ t_{n_j} < t \mid j \in E_i \}`` and + ```math \begin{split} \phi_i^\ast (t) @@ -29,7 +32,9 @@ The conditional intensity of this process has a recursive formulation which can &= \exp \left[ -\beta (t - t_{N_i}) \right] \left( \alpha + \phi^\ast (t_{N_i}) \right) \end{split} ``` + Then the conditional intensity can be re-written in terms of ``\phi_i^\ast (t_{N_i})`` + ```math \lambda_i^\ast (t) = \lambda + \phi_i^\ast (t) = \lambda + \exp \left[ -\beta (t - t_{N_i}) \right] \left( \alpha + \phi_i^\ast (t_{N_i}) \right) ``` @@ -38,7 +43,6 @@ In Julia, we define a factory for the conditional intensity ``\lambda_i`` which ```julia function hawkes_rate(i::Int, g; use_recursion = false) - @inline @inbounds function rate_recursion(u, p, t) λ, α, β, h, urate, ϕ = p urate[i] = λ + exp(-β*(t - h[i]))*ϕ[i] @@ -66,7 +70,6 @@ function hawkes_rate(i::Int, g; use_recursion = false) else return rate_brute end - end ``` @@ -79,11 +82,11 @@ function hawkes_jump(i::Int, g; use_recursion = false) @inbounds rateinterval(u, p, t) = p[5][i] == p[1] ? typemax(t) : 2 / p[5][i] @inbounds lrate(u, p, t) = p[1] @inbounds function affect_recursion!(integrator) - λ, α, β, h, _, ϕ = integrator.p + λ, α, β, h, _, ϕ = integrator.p for j in g[i] - ϕ[j] *= exp(-β*(integrator.t - h[j])) - ϕ[j] += α - h[j] = integrator.t + ϕ[j] *= exp(-β*(integrator.t - h[j])) + ϕ[j] += α + h[j] = integrator.t end integrator.u[i] += 1 end @@ -96,18 +99,17 @@ function hawkes_jump(i::Int, g; use_recursion = false) use_recursion ? affect_recursion! : affect_brute!; lrate, urate, - rateinterval, + rateinterval ) end function hawkes_jump(u, g; use_recursion = false) - return [hawkes_jump(i, g; use_recursion) for i = 1:length(u)] + return [hawkes_jump(i, g; use_recursion) for i in 1:length(u)] end ``` We can then create a factory for Multivariate Hawkes `JumpProblem`s. We can define two types of `JumpProblem`s depending on the aggregator. The `Direct()` aggregator expects an `ODEProblem` since it cannot handle the `SSAStepper` with `VariableRateJump`s. - ```julia function f!(du, u, p, t) du .= 0 @@ -115,13 +117,13 @@ function f!(du, u, p, t) end function hawkes_problem( - p, - agg; - u = [0.0], - tspan = (0.0, 50.0), - save_positions = (false, true), - g = [[1]], - use_recursion = false, + p, + agg; + u = [0.0], + tspan = (0.0, 50.0), + save_positions = (false, true), + g = [[1]], + use_recursion = false ) oprob = ODEProblem(f!, u, tspan, p) jumps = hawkes_jump(u, g; use_recursion) @@ -134,18 +136,18 @@ The `Coevolve()` aggregator knows how to handle the `SSAStepper`, so it accepts ```julia function hawkes_problem( - p, - agg::Coevolve; - u = [0.0], - tspan = (0.0, 50.0), - save_positions = (false, true), - g = [[1]], - use_recursion = false, + p, + agg::Coevolve; + u = [0.0], + tspan = (0.0, 50.0), + save_positions = (false, true), + g = [[1]], + use_recursion = false ) dprob = DiscreteProblem(u, tspan, p) jumps = hawkes_jump(u, g; use_recursion) - jprob = - JumpProblem(dprob, agg, jumps...; dep_graph = g, save_positions = save_positions) + jprob = JumpProblem( + dprob, agg, jumps...; dep_graph = g, save_positions = save_positions) return jprob end ``` @@ -155,46 +157,49 @@ Lets solve the problems defined so far. We sample a random graph sampled from th ```julia V = 10 G = erdos_renyi(V, 0.2, seed = 9103) -g = [neighbors(G, i) for i = 1:nv(G)] +g = [neighbors(G, i) for i in 1:nv(G)] ``` We fix the Hawkes parameters at ``\lambda = 0.5 , \alpha = 0.1 , \beta = 2.0`` which ensures the process does not explode. ```julia tspan = (0.0, 50.0) -u = [0.0 for i = 1:nv(G)] +u = [0.0 for i in 1:nv(G)] p = (0.5, 0.1, 2.0) ``` Now, we instantiate the problems, find their solutions and plot the results. - ```julia algorithms = Tuple{Any, Any, Bool, String}[ - (Direct(), Tsit5(), false, "Direct (brute-force)"), - (Coevolve(), SSAStepper(), false, "Coevolve (brute-force)"), - (Direct(), Tsit5(), true, "Direct (recursive)"), - (Coevolve(), SSAStepper(), true, "Coevolve (recursive)"), +( + Direct(), Tsit5(), false, "Direct (brute-force)"), +( + Coevolve(), SSAStepper(), false, "Coevolve (brute-force)"), +( + Direct(), Tsit5(), true, "Direct (recursive)"), +( + Coevolve(), SSAStepper(), true, "Coevolve (recursive)") ] let fig = [] - for (i, (algo, stepper, use_recursion, label)) in enumerate(algorithms) - @info label - if use_recursion - h = zeros(eltype(tspan), nv(G)) - urate = zeros(eltype(tspan), nv(G)) - ϕ = zeros(eltype(tspan), nv(G)) - _p = (p[1], p[2], p[3], h, ϕ, urate) - else - h = [eltype(tspan)[] for _ = 1:nv(G)] - urate = zeros(eltype(tspan), nv(G)) - _p = (p[1], p[2], p[3], h, urate) + for (i, (algo, stepper, use_recursion, label)) in enumerate(algorithms) + @info label + if use_recursion + h = zeros(eltype(tspan), nv(G)) + urate = zeros(eltype(tspan), nv(G)) + ϕ = zeros(eltype(tspan), nv(G)) + _p = (p[1], p[2], p[3], h, ϕ, urate) + else + h = [eltype(tspan)[] for _ in 1:nv(G)] + urate = zeros(eltype(tspan), nv(G)) + _p = (p[1], p[2], p[3], h, urate) + end + jump_prob = hawkes_problem(_p, algo; u, tspan, g, use_recursion) + sol = solve(jump_prob, stepper) + push!(fig, plot(sol.t, sol[1:V, :]', title = label, legend = false, format = fmt)) end - jump_prob = hawkes_problem(_p, algo; u, tspan, g, use_recursion) - sol = solve(jump_prob, stepper) - push!(fig, plot(sol.t, sol[1:V, :]', title=label, legend=false, format=fmt)) - end - fig = plot(fig..., layout=(2,2), format=fmt, size=(width_px, 2*height_px/2)) + fig = plot(fig..., layout = (2, 2), format = fmt, size = (width_px, 2*height_px/2)) end ``` @@ -208,48 +213,48 @@ The simple version only requires the conditional intensity. Like above, we defin ```julia function hawkes_rate_simple_recursion(rate, xc, xd, p, t, issum::Bool) - λ, _, β, h, ϕ, g = p - for i in 1:length(g) - rate[i] = λ + exp(-β * (t - h[i])) * ϕ[i] - end - if issum - return sum(rate) - end - return 0.0 + λ, _, β, h, ϕ, g = p + for i in 1:length(g) + rate[i] = λ + exp(-β * (t - h[i])) * ϕ[i] + end + if issum + return sum(rate) + end + return 0.0 end function hawkes_rate_simple_brute(rate, xc, xd, p, t, issum::Bool) - λ, α, β, h, g = p - for i in 1:length(g) - x = zero(typeof(t)) - for j in g[i] - for _t in reverse(h[j]) - ϕij = α * exp(-β * (t - _t)) - if ϕij ≈ 0 - break + λ, α, β, h, g = p + for i in 1:length(g) + x = zero(typeof(t)) + for j in g[i] + for _t in reverse(h[j]) + ϕij = α * exp(-β * (t - _t)) + if ϕij ≈ 0 + break + end + x += ϕij end - x += ϕij end + rate[i] = λ + x + end + if issum + return sum(rate) end - rate[i] = λ + x - end - if issum - return sum(rate) - end - return 0.0 + return 0.0 end function hawkes_affect_simple_recursion!(xc, xd, p, t, i::Int64) - _, α, β, h, ϕ, g = p - for j in g[i] - ϕ[j] *= exp(-β * (t - h[j])) - ϕ[j] += α - h[j] = t - end + _, α, β, h, ϕ, g = p + for j in g[i] + ϕ[j] *= exp(-β * (t - h[j])) + ϕ[j] += α + h[j] = t + end end function hawkes_affect_simple_brute!(xc, xd, p, t, i::Int64) - push!(p[4][i], t) + push!(p[4][i], t) end ``` @@ -272,21 +277,21 @@ const PDMP = PiecewiseDeterministicMarkovProcesses struct PDMPCHVSimple end function hawkes_problem(p, - agg::PDMPCHVSimple; - u = [0.0], - tspan = (0.0, 50.0), - save_positions = (false, true), - g = [[1]], - use_recursion = true) + agg::PDMPCHVSimple; + u = [0.0], + tspan = (0.0, 50.0), + save_positions = (false, true), + g = [[1]], + use_recursion = true) xd0 = Array{Int}(u) xc0 = copy(u) nu = one(eltype(xd0)) * I(length(xd0)) if use_recursion - jprob = PDMPProblem(hawkes_drate_simple, hawkes_rate_simple_recursion, - hawkes_affect_simple_recursion!, nu, xc0, xd0, p, tspan) + jprob = PDMPProblem(hawkes_drate_simple, hawkes_rate_simple_recursion, + hawkes_affect_simple_recursion!, nu, xc0, xd0, p, tspan) else - jprob = PDMPProblem(hawkes_drate_simple, hawkes_rate_simple_brute, - hawkes_affect_simple_brute!, nu, xc0, xd0, p, tspan) + jprob = PDMPProblem(hawkes_drate_simple, hawkes_rate_simple_brute, + hawkes_affect_simple_brute!, nu, xc0, xd0, p, tspan) end return jprob end @@ -296,6 +301,7 @@ push!(algorithms, (PDMPCHVSimple(), CHV(Tsit5()), true, "PDMPCHVSimple (recursiv ``` The full version requires that we describe how the conditional intensity changes with time which we derive below: + ```math \begin{split} \frac{d \lambda_i^\ast (t)}{d t} @@ -307,7 +313,7 @@ The full version requires that we describe how the conditional intensity changes ```julia function hawkes_drate_full(dxc, xc, xd, p, t) λ, α, β, _, _, g = p - for i = 1:length(g) + for i in 1:length(g) dxc[i] = -β * (xc[i] - λ) end end @@ -339,18 +345,19 @@ Finally, we create a factory for the Multivariate Hawkes `PDMPCHVFull` problem. struct PDMPCHVFull end function hawkes_problem( - p, - agg::PDMPCHVFull; - u = [0.0], - tspan = (0.0, 50.0), - save_positions = (false, true), - g = [[1]], - use_recursion = true, + p, + agg::PDMPCHVFull; + u = [0.0], + tspan = (0.0, 50.0), + save_positions = (false, true), + g = [[1]], + use_recursion = true ) xd0 = Array{Int}(u) - xc0 = [p[1] for i = 1:length(u)] + xc0 = [p[1] for i in 1:length(u)] nu = one(eltype(xd0)) * I(length(xd0)) - jprob = PDMPProblem(hawkes_drate_full, hawkes_rate_full, hawkes_affect_full!, nu, xc0, xd0, p, tspan) + jprob = PDMPProblem( + hawkes_drate_full, hawkes_rate_full, hawkes_affect_full!, nu, xc0, xd0, p, tspan) return jprob end @@ -366,48 +373,48 @@ const REBUILD_PYCALL::Bool = tryparse(Bool, get(ENV, "SCIMLBENCHMARK_REBUILD_PYC struct PyTick end if BENCHMARK_PYTHON - if REBUILD_PYCALL - using Pkg, Conda - - # PyCall only works with Conda.ROOTENV - # tick requires python=3.8 - Conda.add("python=3.8", Conda.ROOTENV) - Conda.add("numpy", Conda.ROOTENV) - Conda.pip_interop(true, Conda.ROOTENV) - Conda.pip("install", "tick", Conda.ROOTENV) + if REBUILD_PYCALL + using Pkg, Conda + + # PyCall only works with Conda.ROOTENV + # tick requires python=3.8 + Conda.add("python=3.8", Conda.ROOTENV) + Conda.add("numpy", Conda.ROOTENV) + Conda.pip_interop(true, Conda.ROOTENV) + Conda.pip("install", "tick", Conda.ROOTENV) + + # rebuild PyCall to ensure it links to the python provided by Conda.jl + ENV["PYTHON"] = "" + Pkg.build("PyCall") + end - # rebuild PyCall to ensure it links to the python provided by Conda.jl ENV["PYTHON"] = "" - Pkg.build("PyCall") - end - - ENV["PYTHON"] = "" - using PyCall - @info "PyCall" PyCall.libpython PyCall.pyversion PyCall.conda - - function hawkes_problem( - p, - agg::PyTick; - u = [0.0], - tspan = (0.0, 50.0), - save_positions = (false, true), - g = [[1]], - use_recursion = true, - ) - λ, α, β = p - SimuHawkesSumExpKernels = pyimport("tick.hawkes")[:SimuHawkesSumExpKernels] - jprob = SimuHawkesSumExpKernels( - baseline = fill(λ, length(u)), - adjacency = [i in j ? α / β : 0.0 for j in g, i = 1:length(u), u = 1:1], - decays = [β], - end_time = tspan[2], - verbose = false, - force_simulation = true, - ) - return jprob - end - - push!(algorithms, (PyTick(), nothing, true, "PyTick")); + using PyCall + @info "PyCall" PyCall.libpython PyCall.pyversion PyCall.conda + + function hawkes_problem( + p, + agg::PyTick; + u = [0.0], + tspan = (0.0, 50.0), + save_positions = (false, true), + g = [[1]], + use_recursion = true + ) + λ, α, β = p + SimuHawkesSumExpKernels = pyimport("tick.hawkes")[:SimuHawkesSumExpKernels] + jprob = SimuHawkesSumExpKernels( + baseline = fill(λ, length(u)), + adjacency = [i in j ? α / β : 0.0 for j in g, i in 1:length(u), u in 1:1], + decays = [β], + end_time = tspan[2], + verbose = false, + force_simulation = true + ) + return jprob + end + + push!(algorithms, (PyTick(), nothing, true, "PyTick")); end ``` @@ -415,36 +422,38 @@ Now, we instantiate the problems, find their solutions and plot the results. ```julia let fig = [] - for (i, (algo, stepper, use_recursion, label)) in enumerate(algorithms[5:end]) - @info label - if algo isa PyTick - _p = (p[1], p[2], p[3]) - jump_prob = hawkes_problem(_p, algo; u, tspan, g, use_recursion) - jump_prob.reset() - jump_prob.simulate() - t = tspan[1]:0.1:tspan[2] - N = [[sum(jumps .< _t) for _t in t] for jumps in jump_prob.timestamps] - push!(fig, plot(t, N, title=label, legend=false, format=fmt)) - elseif algo isa PDMPCHVSimple - if use_recursion - h = zeros(eltype(tspan), nv(G)) - ϕ = zeros(eltype(tspan), nv(G)) - _p = (p[1], p[2], p[3], h, ϕ, g) - else - h = [eltype(tspan)[] for _ in 1:nv(G)] - _p = (p[1], p[2], p[3], h, g) + for (i, (algo, stepper, use_recursion, label)) in enumerate(algorithms[5:end]) + @info label + if algo isa PyTick + _p = (p[1], p[2], p[3]) + jump_prob = hawkes_problem(_p, algo; u, tspan, g, use_recursion) + jump_prob.reset() + jump_prob.simulate() + t = tspan[1]:0.1:tspan[2] + N = [[sum(jumps .< _t) for _t in t] for jumps in jump_prob.timestamps] + push!(fig, plot(t, N, title = label, legend = false, format = fmt)) + elseif algo isa PDMPCHVSimple + if use_recursion + h = zeros(eltype(tspan), nv(G)) + ϕ = zeros(eltype(tspan), nv(G)) + _p = (p[1], p[2], p[3], h, ϕ, g) + else + h = [eltype(tspan)[] for _ in 1:nv(G)] + _p = (p[1], p[2], p[3], h, g) + end + jump_prob = hawkes_problem(_p, algo; u, tspan, g, use_recursion) + sol = solve(jump_prob, stepper) + push!(fig, plot( + sol.time, sol.xd[1:V, :]', title = label, legend = false, format = fmt)) + elseif algo isa PDMPCHVFull + _p = (p[1], p[2], p[3], nothing, nothing, g) + jump_prob = hawkes_problem(_p, algo; u, tspan, g, use_recursion) + sol = solve(jump_prob, stepper) + push!(fig, plot( + sol.time, sol.xd[1:V, :]', title = label, legend = false, format = fmt)) end - jump_prob = hawkes_problem(_p, algo; u, tspan, g, use_recursion) - sol = solve(jump_prob, stepper) - push!(fig, plot(sol.time, sol.xd[1:V, :]', title=label, legend=false, format=fmt)) - elseif algo isa PDMPCHVFull - _p = (p[1], p[2], p[3], nothing, nothing, g) - jump_prob = hawkes_problem(_p, algo; u, tspan, g, use_recursion) - sol = solve(jump_prob, stepper) - push!(fig, plot(sol.time, sol.xd[1:V, :]', title=label, legend=false, format=fmt)) end - end - fig = plot(fig..., layout=(2,2), format=fmt, size=(width_px, 2*height_px/2)) + fig = plot(fig..., layout = (2, 2), format = fmt, size = (width_px, 2*height_px/2)) end ``` @@ -453,6 +462,7 @@ end We check that the algorithms produce correct simulation by inspecting their QQ-plots. Point process theory says that transforming the simulated points using the compensator should produce points whose inter-arrival duration is distributed according to the exponential distribution (see Section 7.4 [1]). The compensator of any point process is the integral of the conditional intensity ``\Lambda_i^\ast(t) = \int_0^t \lambda_i^\ast(u) du``. The compensator for the Multivariate Hawkes process is defined below. + ```math \Lambda_i^\ast(t) = \lambda t + \frac{\alpha}{\beta} \sum_{j \in E_i} \sum_{t_{n_j} < t} ( 1 - \exp \left[-\beta (t - t_{n_j}) \right]) ``` @@ -476,7 +486,7 @@ function hawkes_Λ(i::Int, g, p) end function hawkes_Λ(g, p) - return [hawkes_Λ(i, g, p) for i = 1:length(g)] + return [hawkes_Λ(i, g, p) for i in 1:length(g)] end Λ = hawkes_Λ(g, p) @@ -499,15 +509,15 @@ function histories(u, t) _u = permutedims(reduce(hcat, u)) k = size(_u)[2] # computes a mask that show when total counts change - mask = cat(fill(0.0, 1, k), _u[2:end, :] .- _u[1:end-1, :], dims = 1) .≈ 1 + mask = cat(fill(0.0, 1, k), _u[2:end, :] .- _u[1:(end - 1), :], dims = 1) .≈ 1 h = Vector{typeof(t)}(undef, k) - @inbounds for i = 1:k + @inbounds for i in 1:k h[i] = t[mask[:, i]] end return h end -function histories(sol::S) where {S<:ODESolution} +function histories(sol::S) where {S <: ODESolution} # get u and permute the dimensions to get a matrix n x k with n obsevations and k processes. if sol.u[1] isa ExtendedJumpArray u = map((u) -> u.u, sol.u) @@ -517,7 +527,7 @@ function histories(sol::S) where {S<:ODESolution} return histories(u, sol.t) end -function histories(sol::S) where {S<:PDMP.PDMPResult} +function histories(sol::S) where {S <: PDMP.PDMPResult} return histories(sol.xd.u, sol.time) end @@ -547,10 +557,10 @@ function qq(hs, Λ, quant = 0.01:0.01:0.99) _hs = apply_Λ(hs, Λ) T = typeof(hs[1][1][1]) Δs = Vector{Vector{T}}(undef, length(hs[1])) - for k = 1:length(Δs) + for k in 1:length(Δs) _Δs = Vector{Vector{T}}(undef, length(hs)) - for i = 1:length(_Δs) - _Δs[i] = _hs[i][k][2:end] .- _hs[i][k][1:end-1] + for i in 1:length(_Δs) + _Δs[i] = _hs[i][k][2:end] .- _hs[i][k][1:(end - 1)] end Δs[k] = reduce(vcat, _Δs) end @@ -570,41 +580,41 @@ The compensator `Λ` can either be an homogeneous compensator function that equally applies to all the processes in `hs`. Alternatively, it accepts a vector of compensator that applies to each process. """ -function apply_Λ(hs::V, Λ) where {V<:Vector{<:Number}} +function apply_Λ(hs::V, Λ) where {V <: Vector{<:Number}} _hs = similar(hs) - @inbounds for n = 1:length(hs) + @inbounds for n in 1:length(hs) _hs[n] = Λ(hs[n], hs) end return _hs end -function apply_Λ(k::Int, hs::V, Λ::A) where {V<:Vector{<:Vector{<:Number}},A<:Array} +function apply_Λ(k::Int, hs::V, Λ::A) where {V <: Vector{<:Vector{<:Number}}, A <: Array} @inbounds hsk = hs[k] @inbounds Λk = Λ[k] _hs = similar(hsk) - @inbounds for n = 1:length(hsk) + @inbounds for n in 1:length(hsk) _hs[n] = Λk(hsk[n], hs) end return _hs end -function apply_Λ(hs::V, Λ) where {V<:Vector{<:Vector{<:Number}}} +function apply_Λ(hs::V, Λ) where {V <: Vector{<:Vector{<:Number}}} _hs = similar(hs) - @inbounds for k = 1:length(_hs) + @inbounds for k in 1:length(_hs) _hs[k] = apply_Λ(hs[k], Λ) end return _hs end -function apply_Λ(hs::V, Λ::A) where {V<:Vector{<:Vector{<:Number}},A<:Array} +function apply_Λ(hs::V, Λ::A) where {V <: Vector{<:Vector{<:Number}}, A <: Array} _hs = similar(hs) - @inbounds for k = 1:length(_hs) + @inbounds for k in 1:length(_hs) _hs[k] = apply_Λ(k, hs, Λ) end return _hs end -function apply_Λ(hs::V, Λ) where {V<:Vector{<:Vector{<:Vector{<:Number}}}} +function apply_Λ(hs::V, Λ) where {V <: Vector{<:Vector{<:Vector{<:Number}}}} return map((_hs) -> apply_Λ(_hs, Λ), hs) end ``` @@ -635,7 +645,7 @@ We can construct QQ-plots with a Plot recipe as following. markerstrokealpha --> 0 markersize --> 1.5 size --> (400, 500) - label --> permutedims(["quantiles $i" for i = 1:length(empirical_quant)]) + label --> permutedims(["quantiles $i" for i in 1:length(empirical_quant)]) expected_quant, empirical_quant end end @@ -667,14 +677,14 @@ let fig = [] urate = zeros(eltype(tspan), nv(G)) _p = (p[1], p[2], p[3], h, urate, ϕ) else - h = [eltype(tspan)[] for _ = 1:nv(G)] + h = [eltype(tspan)[] for _ in 1:nv(G)] urate = zeros(eltype(tspan), nv(G)) _p = (p[1], p[2], p[3], h, urate) end end jump_prob = hawkes_problem(_p, algo; u, tspan, g, use_recursion) runs = Vector{Vector{Vector{Number}}}(undef, 250) - for n = 1:length(runs) + for n in 1:length(runs) if algo isa PyTick jump_prob.reset() jump_prob.simulate() @@ -685,7 +695,9 @@ let fig = [] h .= 0 ϕ .= 0 else - for _h in h empty!(_h) end + for _h in h + empty!(_h) + end end if ~(algo isa PDMPCHVSimple) urate .= 0 @@ -695,9 +707,10 @@ let fig = [] end end qqs = qq(runs, Λ) - push!(fig, qqplot(qqs..., legend = false, aspect_ratio = :equal, title=label, fmt=fmt)) + push!(fig, qqplot( + qqs..., legend = false, aspect_ratio = :equal, title = label, fmt = fmt)) end - fig = plot(fig..., layout = (4, 2), fmt=fmt, size=(width_px, 4*height_px/2)) + fig = plot(fig..., layout = (4, 2), fmt = fmt, size = (width_px, 4*height_px/2)) end ``` @@ -707,7 +720,7 @@ In this Section we benchmark all the algorithms introduced in the first Section. We generate networks in the range from ``1`` to ``95`` nodes and simulate the Multivariate Hawkes process ``25`` units of time. - and simulate models in the range from ``1`` to ``95`` nodes for ``25`` units of time. We fix the Hawkes parameters at ``\lambda = 0.5 , \alpha = 0.1 , \beta = 5.0`` which ensures the process does not explode. We simulate ``50`` trajectories with a limit of ten seconds to complete execution for each configuration. +and simulate models in the range from ``1`` to ``95`` nodes for ``25`` units of time. We fix the Hawkes parameters at ``\lambda = 0.5 , \alpha = 0.1 , \beta = 5.0`` which ensures the process does not explode. We simulate ``50`` trajectories with a limit of ten seconds to complete execution for each configuration. ```julia tspan = (0.0, 25.0) @@ -723,18 +736,18 @@ for (algo, stepper, use_recursion, label) in algorithms push!(bs, Vector{BenchmarkTools.Trial}()) _bs = bs[end] for (i, G) in enumerate(Gs) - local g = [neighbors(G, i) for i = 1:nv(G)] - local u = [0.0 for i = 1:nv(G)] + local g = [neighbors(G, i) for i in 1:nv(G)] + local u = [0.0 for i in 1:nv(G)] if algo isa PyTick _p = (p[1], p[2], p[3]) elseif algo isa PDMPCHVSimple if use_recursion - global h = zeros(eltype(tspan), nv(G)) - global ϕ = zeros(eltype(tspan), nv(G)) - _p = (p[1], p[2], p[3], h, ϕ, g) + global h = zeros(eltype(tspan), nv(G)) + global ϕ = zeros(eltype(tspan), nv(G)) + _p = (p[1], p[2], p[3], h, ϕ, g) else - global h = [eltype(tspan)[] for _ in 1:nv(G)] - _p = (p[1], p[2], p[3], h, g) + global h = [eltype(tspan)[] for _ in 1:nv(G)] + _p = (p[1], p[2], p[3], h, g) end elseif algo isa PDMPCHVFull _p = (p[1], p[2], p[3], nothing, nothing, g) @@ -745,7 +758,7 @@ for (algo, stepper, use_recursion, label) in algorithms global ϕ = zeros(eltype(tspan), nv(G)) _p = (p[1], p[2], p[3], h, urate, ϕ) else - global h = [eltype(tspan)[] for _ = 1:nv(G)] + global h = [eltype(tspan)[] for _ in 1:nv(G)] global urate = zeros(eltype(tspan), nv(G)) _p = (p[1], p[2], p[3], h, urate) end @@ -753,53 +766,45 @@ for (algo, stepper, use_recursion, label) in algorithms global jump_prob = hawkes_problem(_p, algo; u, tspan, g, use_recursion) trial = try if algo isa PyTick - @benchmark( - jump_prob.simulate(), - setup = (jump_prob.reset()), - samples = 50, - evals = 1, - seconds = 10, - ) + @benchmark(jump_prob.simulate(), + setup=(jump_prob.reset()), + samples=50, + evals=1, + seconds=10,) else if algo isa PDMPCHVFull - @benchmark( - solve(jump_prob, _stepper), - setup = (), - samples = 50, - evals = 1, - seconds = 10, - ) + @benchmark(solve(jump_prob, _stepper), + setup=(), + samples=50, + evals=1, + seconds=10,) elseif algo isa PDMPCHVSimple if use_recursion @benchmark(solve(jump_prob, _stepper), - setup=(h .= 0; ϕ .= 0), - samples=50, - evals=1, - seconds=10,) + setup=(h .= 0; ϕ .= 0), + samples=50, + evals=1, + seconds=10,) else @benchmark(solve(jump_prob, _stepper), - setup=([empty!(_h) for _h in h]), - samples=50, - evals=1, - seconds=10,) + setup=([empty!(_h) for _h in h]), + samples=50, + evals=1, + seconds=10,) end else if use_recursion - @benchmark( - solve(jump_prob, _stepper), - setup = (h .= 0; urate .= 0; ϕ .= 0), - samples = 50, - evals = 1, - seconds = 10, - ) + @benchmark(solve(jump_prob, _stepper), + setup=(h .= 0; urate .= 0; ϕ .= 0), + samples=50, + evals=1, + seconds=10,) else - @benchmark( - solve(jump_prob, _stepper), - setup = ([empty!(_h) for _h in h]; urate .= 0), - samples = 50, - evals = 1, - seconds = 10, - ) + @benchmark(solve(jump_prob, _stepper), + setup=([empty!(_h) for _h in h]; urate .= 0), + samples=50, + evals=1, + seconds=10,) end end end @@ -810,9 +815,9 @@ for (algo, stepper, use_recursion, label) in algorithms end push!(_bs, trial) if (nv(G) == 1 || nv(G) % 10 == 0) - median_time = - length(trial) > 0 ? "$(BenchmarkTools.prettytime(median(trial.times)))" : - "nan" + median_time = length(trial) > 0 ? + "$(BenchmarkTools.prettytime(median(trial.times)))" : + "nan" println("algo=$(label), V = $(nv(G)), length = $(length(trial.times)), median time = $median_time") end end @@ -824,8 +829,8 @@ let fig = plot( yscale = :log10, xlabel = "V", ylabel = "Time (ns)", - legend_position = :outertopright, -) + legend_position = :outertopright + ) for (i, (algo, stepper, use_recursion, label)) in enumerate(algorithms) _bs, _Vs = [], [] for (j, b) in enumerate(bs[i]) @@ -834,7 +839,7 @@ let fig = plot( push!(_Vs, Vs[j]) end end - plot!(_Vs, _bs, label=label) + plot!(_Vs, _bs, label = label) end title!("Simulations, 50 samples: nodes × time") end diff --git a/benchmarks/Jumps/NegFeedback_GeneExpr.jmd b/benchmarks/Jumps/NegFeedback_GeneExpr.jmd index a318057e8..c66f91787 100644 --- a/benchmarks/Jumps/NegFeedback_GeneExpr.jmd +++ b/benchmarks/Jumps/NegFeedback_GeneExpr.jmd @@ -12,6 +12,7 @@ fmt = :png ``` Our model is + ```julia rn = prob_jump_dnarepressor.network reactions(rn) @@ -20,17 +21,18 @@ reactions(rn) # Plot solutions by each method ```julia -methods = (Direct(), FRM(), SortingDirect(), NRM(), DirectCR(), RSSA(), RSSACR(), Coevolve(), RDirect()) -shortlabels = [string(leg)[15:end-2] for leg in methods] -prob = prob_jump_dnarepressor.discrete_prob -tf = prob_jump_dnarepressor.tstop -ploth = plot(reuse=false) -for (i,method) in enumerate(methods) - jump_prob = JumpProblem(rn, prob, method, save_positions=(false, false)) - sol = solve(jump_prob, SSAStepper(), saveat=tf/1000.) - plot!(ploth,sol.t, sol[3,:], label=shortlabels[i], format=fmt) +methods = (Direct(), FRM(), SortingDirect(), NRM(), DirectCR(), + RSSA(), RSSACR(), Coevolve(), RDirect()) +shortlabels = [string(leg)[15:(end - 2)] for leg in methods] +prob = prob_jump_dnarepressor.discrete_prob +tf = prob_jump_dnarepressor.tstop +ploth = plot(reuse = false) +for (i, method) in enumerate(methods) + jump_prob = JumpProblem(rn, prob, method, save_positions = (false, false)) + sol = solve(jump_prob, SSAStepper(), saveat = tf/1000.0) + plot!(ploth, sol.t, sol[3, :], label = shortlabels[i], format = fmt) end -plot(ploth, title="Protein level", xlabel="time", format=fmt) +plot(ploth, title = "Protein level", xlabel = "time", format = fmt) ``` # Benchmarking performance of the methods @@ -48,9 +50,9 @@ end nsims = 2000 benchmarks = Vector{Vector{Float64}}() for method in methods - jump_prob = JumpProblem(rn, prob, method, save_positions=(false, false)) + jump_prob = JumpProblem(rn, prob, method, save_positions = (false, false)) stepper = SSAStepper() - t = Vector{Float64}(undef,nsims) + t = Vector{Float64}(undef, nsims) run_benchmark!(t, jump_prob, stepper) push!(benchmarks, t) end @@ -70,16 +72,18 @@ println(medtimes/medtimes[1]) ```julia using DataFrames -df = DataFrame(names=shortlabels, medtimes=medtimes, relmedtimes=(medtimes/medtimes[1]), - avgtimes=avgtimes, std=stdtimes, cv=stdtimes./avgtimes) -sa = [text(string(round(mt,sigdigits=2),"s"),:center,10) for mt in df.medtimes] -bar(df.names,df.relmedtimes,legend=:false, fmt=fmt) -scatter!(df.names, .05 .+ df.relmedtimes, markeralpha=0, series_annotations=sa, fmt=fmt) +df = DataFrame( + names = shortlabels, medtimes = medtimes, relmedtimes = (medtimes/medtimes[1]), + avgtimes = avgtimes, std = stdtimes, cv = stdtimes ./ avgtimes) +sa = [text(string(round(mt, sigdigits = 2), "s"), :center, 10) for mt in df.medtimes] +bar(df.names, df.relmedtimes, legend = :false, fmt = fmt) +scatter!( + df.names, 0.05 .+ df.relmedtimes, markeralpha = 0, series_annotations = sa, fmt = fmt) ylabel!("median relative to Direct") title!("Negative Feedback Gene Expression Model") ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/Jumps/NegFeedback_GeneExpr_Marchetti.jmd b/benchmarks/Jumps/NegFeedback_GeneExpr_Marchetti.jmd index fb8fb7f56..4e4380779 100644 --- a/benchmarks/Jumps/NegFeedback_GeneExpr_Marchetti.jmd +++ b/benchmarks/Jumps/NegFeedback_GeneExpr_Marchetti.jmd @@ -11,6 +11,7 @@ fmt = :png ``` # Model and example solutions + Here we implement the gene expression model from appendix A.6 of Marchetti, Priami and Thanh, *Simulation Algorithms for Comptuational Systems Biology*, Springer (2017). @@ -25,26 +26,27 @@ reactions(rn) ``` ```julia -u0f = [1000., 0., 0., 0., 0.] -odeprob = ODEProblem(rn, u0f, (0.,tf), rnpar) +u0f = [1000.0, 0.0, 0.0, 0.0, 0.0] +odeprob = ODEProblem(rn, u0f, (0.0, tf), rnpar) solution = solve(odeprob, Tsit5()) -plot(solution, format=fmt) +plot(solution, format = fmt) ``` ```julia -tf = 4000. -methods = (Direct(), FRM(), SortingDirect(), NRM(), DirectCR(), RSSA(), RSSACR(), Coevolve(), RDirect()) -shortlabels = [string(leg)[15:end-2] for leg in methods] +tf = 4000.0 +methods = (Direct(), FRM(), SortingDirect(), NRM(), DirectCR(), + RSSA(), RSSACR(), Coevolve(), RDirect()) +shortlabels = [string(leg)[15:(end - 2)] for leg in methods] prob = prob = DiscreteProblem(rn, u0, (0.0, tf), rnpar) -ploth = plot(reuse=false) +ploth = plot(reuse = false) p = [] -for (i,method) in enumerate(methods) - jump_prob = JumpProblem(rn, prob, method, save_positions=(false, false)) - sol = solve(jump_prob, SSAStepper(), saveat=tf/1000.) - plot!(ploth, sol.t, sol[3,:], label=shortlabels[i], format=fmt) - push!(p, plot(sol, title=shortlabels[i], format=fmt)) +for (i, method) in enumerate(methods) + jump_prob = JumpProblem(rn, prob, method, save_positions = (false, false)) + sol = solve(jump_prob, SSAStepper(), saveat = tf/1000.0) + plot!(ploth, sol.t, sol[3, :], label = shortlabels[i], format = fmt) + push!(p, plot(sol, title = shortlabels[i], format = fmt)) end -plot(ploth, title="Protein level", xlabel="time", format=fmt) +plot(ploth, title = "Protein level", xlabel = "time", format = fmt) ``` ```julia @@ -66,7 +68,7 @@ end nsims = 200 benchmarks = Vector{Vector{Float64}}() for method in methods - jump_prob = JumpProblem(rn, prob, method, save_positions=(false, false)) + jump_prob = JumpProblem(rn, prob, method, save_positions = (false, false)) stepper = SSAStepper() t = Vector{Float64}(undef, nsims) run_benchmark!(t, jump_prob, stepper) @@ -85,16 +87,18 @@ for i in 1:length(methods) end using DataFrames -df = DataFrame(names=shortlabels, medtimes=medtimes, relmedtimes=(medtimes/medtimes[1]), - avgtimes=avgtimes, std=stdtimes, cv=stdtimes./avgtimes) -sa = [text(string(round(mt,digits=3),"s"),:center,12) for mt in df.medtimes] -bar(df.names,df.relmedtimes,legend=:false, fmt=fmt) -scatter!(df.names, .05 .+ df.relmedtimes, markeralpha=0, series_annotations=sa, fmt=fmt) +df = DataFrame( + names = shortlabels, medtimes = medtimes, relmedtimes = (medtimes/medtimes[1]), + avgtimes = avgtimes, std = stdtimes, cv = stdtimes ./ avgtimes) +sa = [text(string(round(mt, digits = 3), "s"), :center, 12) for mt in df.medtimes] +bar(df.names, df.relmedtimes, legend = :false, fmt = fmt) +scatter!( + df.names, 0.05 .+ df.relmedtimes, markeralpha = 0, series_annotations = sa, fmt = fmt) ylabel!("median relative to Direct") title!("Marchetti Gene Expression Model") ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/Jumps/Spatial_Signaling_Sanft.jmd b/benchmarks/Jumps/Spatial_Signaling_Sanft.jmd index 0337193e8..f495c44e4 100644 --- a/benchmarks/Jumps/Spatial_Signaling_Sanft.jmd +++ b/benchmarks/Jumps/Spatial_Signaling_Sanft.jmd @@ -10,6 +10,7 @@ using Catalyst, JumpProcesses, BenchmarkTools, Plots, Random ``` # Model description and setup + Here we implement the model from [^1] (8 species and 12 reactions) for different mesh sizes, and benchmark the performance of JumpProcesses.jl's spatial stochastic simulation alorithms (SSAs). Below, the value `N` will denote the @@ -18,28 +19,32 @@ reaction volume. In [^1] this value ranges from 20 to 60. We first define some helper functions to convert concentration units into number units, as needed for spatial SSAs. + ```julia invmicromolar_to_cubicmicrometer(invconcen) = invconcen / (6.02214076e2) micromolar_to_invcubicmicrometer(concen) = (6.02214076e2) * concen ``` Next we create a well-mixed model with the desired chemistry + ```julia rn = @reaction_network begin @parameters k₁ ka kd k₄ k₁, EA --> EA + A k₁, EB --> EB + B - (ka,kd), EA + B <--> EAB - (ka,kd), EAB + B <--> EAB₂ - (ka,kd), EB + A <--> EBA - (ka,kd), EBA + A <--> EBA₂ + (ka, kd), EA + B <--> EAB + (ka, kd), EAB + B <--> EAB₂ + (ka, kd), EB + A <--> EBA + (ka, kd), EBA + A <--> EBA₂ k₄, A --> ∅ k₄, B --> ∅ end ``` + Let's next make a function to calculate the spatial transport rates, mesh/graph that will represent our domain, and initial condition. We use a cubic lattice of size `N` by `N` by `N` with reflecting boundary conditions + ```julia # domain_len is the physical length of each side of the cubic domain # units should be in μm (6.0 or 12.0 in Sanft) @@ -78,8 +83,10 @@ function transport_model(rn, N; domain_len = 6.0, D = 1.0, rng = Random.default_ grid, hopping_constants, h, u0 end ``` + Finally, let's make a function to setup the well-mixed model from the reaction model in a cube of side length `h`: + ```julia function wellmixed_model(rn, u0, end_time, h) kaval = invmicromolar_to_cubicmicrometer(46.2) / h^3 @@ -88,42 +95,46 @@ function wellmixed_model(rn, u0, end_time, h) # well-mixed initial condition corresponding to the spatial initial condition u0wm = sum(u0, dims = 2) dprobwm = DiscreteProblem(rn, u0wm, (0.0, end_time)) - jprobwm = JumpProblem(rn, dprobwm, Direct(), save_positions = (false,false)) + jprobwm = JumpProblem(rn, dprobwm, Direct(), save_positions = (false, false)) majumps = jprobwm.massaction_jump majumps, dprobwm, jprobwm, u0wm end ``` # Model Solution + Let's look at one example to check our model seems reasonable. We'll plot the total number of molecules in the system to verify we get around 28,000 molecules, as reported in Sanft [^1], when using a domain length of 6 μm. + ```julia end_time = 3.0 grid, hopping_constants, h, u0 = transport_model(rn, 60) majumps, dprobwm, jprobwm, u0wm = wellmixed_model(rn, u0, end_time, 6.0) sol = solve(jprobwm, SSAStepper(); saveat = end_time/200) Ntot = [sum(u) for u in sol.u] -plt = plot(sol.t, Ntot, label="Well-mixed", ylabel="Total Number of Molecules", - xlabel="time") +plt = plot(sol.t, Ntot, label = "Well-mixed", ylabel = "Total Number of Molecules", + xlabel = "time") # spatial model majumps, dprobwm, jprobwm, u0wm = wellmixed_model(rn, u0, end_time, h) dprob = DiscreteProblem(u0, (0.0, end_time), copy(dprobwm.p)) jprob = JumpProblem(dprob, DirectCRDirect(), majumps; hopping_constants, - spatial_system = grid, save_positions = (false, false)) + spatial_system = grid, save_positions = (false, false)) spatial_sol = solve(jprob, SSAStepper(); saveat = end_time/200) Ntot = [sum(vec(u)) for u in spatial_sol.u] -plot!(plt, spatial_sol.t, Ntot, label="Spatial", - title="Steady-state number of molecules is $(Ntot[end])") +plot!(plt, spatial_sol.t, Ntot, label = "Spatial", + title = "Steady-state number of molecules is $(Ntot[end])") ``` # Benchmarking performance of the methods + We can now run the solvers and record the performance with `BenchmarkTools`. Let's first create a `DiscreteCallback` to terminate simulations once we reach `10^8` events: + ```julia -@Base.kwdef mutable struct EventCallback +Base.@kwdef mutable struct EventCallback n::Int = 0 end @@ -138,7 +149,9 @@ function (ecb::EventCallback)(integ) nothing end ``` + We next create a function to run and return our benchmarking results. + ```julia function benchmark_and_save!(bench_dict, end_times, Nv, algs, domain_len) @assert length(end_times) == length(Nv) @@ -148,7 +161,7 @@ function benchmark_and_save!(bench_dict, end_times, Nv, algs, domain_len) cb = DiscreteCallback(ecb, ecb) for (end_time, N) in zip(end_times, Nv) - names = ["$s"[1:end-2] for s in algs] + names = ["$s"[1:(end - 2)] for s in algs] grid, hopping_constants, h, u0 = transport_model(rn, N; domain_len) @@ -168,15 +181,17 @@ function benchmark_and_save!(bench_dict, end_times, Nv, algs, domain_len) for (i, alg) in enumerate(algs) name = names[i] println("benchmarking $name") - jp = JumpProblem(dprob, alg, majumps, hopping_constants=hopping_constants, - spatial_system = grid, save_positions=(false,false)) - b = @benchmarkable solve($jp, SSAStepper(); saveat = $(dprob.tspan[2]), callback) setup = (callback = deepcopy($cb)) samples = 10 seconds = 3600 + jp = JumpProblem(dprob, alg, majumps, hopping_constants = hopping_constants, + spatial_system = grid, save_positions = (false, false)) + b = @benchmarkable solve($jp, SSAStepper(); saveat = $(dprob.tspan[2]), callback) setup=(callback=deepcopy($cb)) samples=10 seconds=3600 bench_dict[name, N] = run(b) end end end ``` + Finally, let's make a function to plot the benchmarking data. + ```julia function fetch_and_plot(bench_dict, domain_len) names = unique([key[1] for key in keys(bench_dict)]) @@ -186,7 +201,7 @@ function fetch_and_plot(bench_dict, domain_len) plt2 = plot() medtimes = [Float64[] for i in 1:length(names)] - for (i,name) in enumerate(names) + for (i, name) in enumerate(names) for N in Nv try push!(medtimes[i], median(bench_dict[name, N]).time/1e9) @@ -196,19 +211,21 @@ function fetch_and_plot(bench_dict, domain_len) end len = length(medtimes[i]) plot!(plt1, Nv[1:len], medtimes[i], marker = :hex, label = name, lw = 2) - plot!(plt2, (Nv.^3)[1:len], medtimes[i], marker = :hex, label = name, lw = 2) + plot!(plt2, (Nv .^ 3)[1:len], medtimes[i], marker = :hex, label = name, lw = 2) end plot!(plt1, xlabel = "number of sites per edge", ylabel = "median time in seconds", - xticks = Nv, legend = :bottomright) + xticks = Nv, legend = :bottomright) plot!(plt2, xlabel = "total number of sites", ylabel = "median time in seconds", - xticks = (Nv.^3, string.(Nv.^3)), legend = :bottomright) - plot(plt1, plt2; size = (1200,800), legendtitle = "SSAs", - plot_title="3D RDME, domain length = $domain_len", left_margin=5Plots.mm) + xticks = (Nv .^ 3, string.(Nv .^ 3)), legend = :bottomright) + plot(plt1, plt2; size = (1200, 800), legendtitle = "SSAs", + plot_title = "3D RDME, domain length = $domain_len", left_margin = 5Plots.mm) end ``` + We are now ready to run the benchmarks and plot the results. We start with a domain length of `12` μm, analogous to Fig. 6 in [^1]: + ```julia bench_dict = Dict{Tuple{String, Int}, BenchmarkTools.Trial}() algs = [NSM(), DirectCRDirect()] @@ -217,22 +234,26 @@ end_times = 20000.0 * ones(length(Nv)) domain_len = 12.0 benchmark_and_save!(bench_dict, end_times, Nv, algs, domain_len) ``` + ```julia plt=fetch_and_plot(bench_dict, domain_len) ``` + We next consider a domain of length `6` μm, analogous to Fig. 7 in [^1]. + ```julia bench_dict = Dict{Tuple{String, Int}, BenchmarkTools.Trial}() domain_len = 6.0 benchmark_and_save!(bench_dict, end_times, Nv, algs, domain_len) ``` + ```julia plt=fetch_and_plot(bench_dict, domain_len) ``` # References -[^1]: Sanft, Kevin R and Othmer, Hans G. *Constant-complexity stochastic simulation algorithm with optimal binning*. J. Chem. Phys., 143(7), 11 pp. (2015). +[^1]: Sanft, Kevin R and Othmer, Hans G. *Constant-complexity stochastic simulation algorithm with optimal binning*. J. Chem. Phys., 143(7), 11 pp. (2015). ```julia, echo = false using SciMLBenchmarks SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) diff --git a/benchmarks/LinearSolve/LUFactorization.jmd b/benchmarks/LinearSolve/LUFactorization.jmd index 4c29a2fd7..d85dcca8a 100644 --- a/benchmarks/LinearSolve/LUFactorization.jmd +++ b/benchmarks/LinearSolve/LUFactorization.jmd @@ -24,7 +24,8 @@ function luflop(m, n = m; innerflop = 2) end end -algs = [LUFactorization(), GenericLUFactorization(), RFLUFactorization(), MKLLUFactorization(), FastLUFactorization(), SimpleLUFactorization()] +algs = [LUFactorization(), GenericLUFactorization(), RFLUFactorization(), + MKLLUFactorization(), FastLUFactorization(), SimpleLUFactorization()] res = [Float64[] for i in 1:length(algs)] ns = 4:8:500 @@ -34,10 +35,11 @@ for i in 1:length(ns) rng = MersenneTwister(123) global A = rand(rng, n, n) global b = rand(rng, n) - global u0= rand(rng, n) - + global u0 = rand(rng, n) + for j in 1:length(algs) - bt = @belapsed solve(prob, $(algs[j])).u setup=(prob = LinearProblem(copy(A), copy(b); u0 = copy(u0), alias_A=true, alias_b=true)) + bt = @belapsed solve(prob, $(algs[j])).u setup=(prob = LinearProblem( + copy(A), copy(b); u0 = copy(u0), alias_A = true, alias_b = true)) push!(res[j], luflop(n) / bt / 1e9) end end @@ -47,7 +49,9 @@ __parameterless_type(T) = Base.typename(T).wrapper parameterless_type(x) = __parameterless_type(typeof(x)) parameterless_type(::Type{T}) where {T} = __parameterless_type(T) -p = plot(ns, res[1]; ylabel = "GFLOPs", xlabel = "N", title = "GFLOPs for NxN LU Factorization", label = string(Symbol(parameterless_type(algs[1]))), legend=:outertopright) +p = plot( + ns, res[1]; ylabel = "GFLOPs", xlabel = "N", title = "GFLOPs for NxN LU Factorization", + label = string(Symbol(parameterless_type(algs[1]))), legend = :outertopright) for i in 2:length(res) plot!(p, ns, res[i]; label = string(Symbol(parameterless_type(algs[i])))) end @@ -58,5 +62,5 @@ p ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/LinearSolve/MatrixDepot.jmd b/benchmarks/LinearSolve/MatrixDepot.jmd index 9f8de473f..b850e5d5e 100644 --- a/benchmarks/LinearSolve/MatrixDepot.jmd +++ b/benchmarks/LinearSolve/MatrixDepot.jmd @@ -19,7 +19,7 @@ algs = [ UMFPACKFactorization(), KLUFactorization(), MKLPardisoFactorize(), - SparspakFactorization(), + SparspakFactorization() ] algnames = ["UMFPACK", "KLU", "Pardiso", "Sparspak"] algnames_transpose = reshape(algnames, 1, length(algnames)) @@ -73,33 +73,33 @@ for z in 1:length(allmatrices_md.content[1].rows) A = mdopen(currMTX).A A = convert(SparseMatrixCSC, A) n = size(A, 1) - + mtx_copy = copy(A) @info "$n × $n" n > 100 && error("Skipping too large matrices") - + ## COMPUTING SPACED OUT SPARSITY rows, cols = size(mtx_copy) new_rows = div(rows, 2) new_cols = div(cols, 2) - condensed = zeros(Int, new_rows, new_cols) + condensed = zeros(Int, new_rows, new_cols) while size(mtx_copy, 1) > 32 || size(mtx_copy, 2) > 32 - rows, cols = size(mtx_copy) new_rows = div(rows, 2) new_cols = div(cols, 2) condensed = sparse(zeros(Int, new_rows, new_cols)) - for r in 1:2:rows-1 - for c in 1:2:cols-1 - block = mtx_copy[r:min(r+1, rows), c:min(c+1, cols)] - condensed[div(r-1, 2) + 1, div(c-1, 2) + 1] = (length(nonzeros(block)) >= 2) ? 1 : 0 + for r in 1:2:(rows - 1) + for c in 1:2:(cols - 1) + block = mtx_copy[r:min(r + 1, rows), c:min(c + 1, cols)] + condensed[div(r - 1, 2) + 1, div(c - 1, 2) + 1] = (length(nonzeros(block)) >= + 2) ? 1 : 0 end - end - mtx_copy = condensed + end + mtx_copy = condensed end - + ## COMPUTING FACTORIZATION TIME b = rand(rng, n) u0 = rand(rng, n) @@ -110,7 +110,7 @@ for z in 1:length(allmatrices_md.content[1].rows) u0 = copy($u0), alias_A = true, alias_b = true)) - times[z,j] = bt + times[z, j] = bt end bandedness_five[z] = compute_bandedness(A, 5) @@ -152,12 +152,12 @@ bandedness_ten = replace(bandedness_ten, 0 => 1e-10) bandedness_twenty = bandedness_twenty[.!isnan.(bandedness_twenty)] bandedness_twenty = replace(bandedness_twenty, 0 => 1e-10) matrix_size = matrix_size[.!isnan.(matrix_size)] -nanrows = any(isnan, times; dims=2) +nanrows = any(isnan, times; dims = 2) times = times[.!vec(nanrows), :] ``` ```julia -meantimes = vec(mean(times, dims=1)) +meantimes = vec(mean(times, dims = 1)) p = bar(algnames, meantimes; ylabel = "Time/s", yscale = :log10, @@ -213,6 +213,7 @@ p = scatter(bandedness_five, times; fmt = :png, legend = :outertopright) ``` + ```julia p = scatter(bandedness_ten, times; ylabel = "Time/s", @@ -224,6 +225,7 @@ p = scatter(bandedness_ten, times; fmt = :png, legend = :outertopright) ``` + ```julia p = scatter(bandedness_twenty, times; ylabel = "Time/s", @@ -240,5 +242,5 @@ p = scatter(bandedness_twenty, times; ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/LinearSolve/SparsePDE.jmd b/benchmarks/LinearSolve/SparsePDE.jmd index 10524f81e..86d467b43 100644 --- a/benchmarks/LinearSolve/SparsePDE.jmd +++ b/benchmarks/LinearSolve/SparsePDE.jmd @@ -42,7 +42,7 @@ algs = [ UMFPACKFactorization(), KLUFactorization(), MKLPardisoFactorize(), - SparspakFactorization(), + SparspakFactorization() ] cols = [:red, :blue, :green, :magenta, :turqoise] # one color per alg @@ -112,5 +112,5 @@ run_and_plot(3) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/MethodOfLinesPDE/MOL_fdm.jmd b/benchmarks/MethodOfLinesPDE/MOL_fdm.jmd index 794c49203..5412cc320 100644 --- a/benchmarks/MethodOfLinesPDE/MOL_fdm.jmd +++ b/benchmarks/MethodOfLinesPDE/MOL_fdm.jmd @@ -7,7 +7,8 @@ This benchmark is for the MethodOfLines package, which is an automatic PDE discr It is concerned with comparing the performance of various discretization methods for the Burgers equation. ```julia -using MethodOfLines, DomainSets, OrdinaryDiffEq, ModelingToolkit, DiffEqDevTools, LinearAlgebra, +using MethodOfLines, DomainSets, OrdinaryDiffEq, ModelingToolkit, DiffEqDevTools, + LinearAlgebra, LinearSolve, Plots, RecursiveFactorization ``` @@ -45,22 +46,22 @@ bcs2 = [u(0, x) ~ x, domains = [t ∈ Interval(t_min, t_max), x ∈ Interval(x_min, x_max)] -@named pdesys1 = PDESystem(eq, bcs1, domains, [t, x], [u(t, x)], analytic=analytic) -@named pdesys2 = PDESystem(eq, bcs2, domains, [t, x], [u(t, x)], analytic=analytic) +@named pdesys1 = PDESystem(eq, bcs1, domains, [t, x], [u(t, x)], analytic = analytic) +@named pdesys2 = PDESystem(eq, bcs2, domains, [t, x], [u(t, x)], analytic = analytic) ``` Here is a uniform discretization with the Upwind scheme: ```julia -discupwind1 = MOLFiniteDifference([x => N], t, advection_scheme=UpwindScheme()) -discupwind2 = MOLFiniteDifference([x => N-1], t, advection_scheme=UpwindScheme(), grid_align=edge_align) +discupwind1 = MOLFiniteDifference([x => N], t, advection_scheme = UpwindScheme()) +discupwind2 = MOLFiniteDifference([x => N-1], t, advection_scheme = UpwindScheme(), grid_align = edge_align) ``` Here is a uniform discretization with the WENO scheme: ```julia -discweno1 = MOLFiniteDifference([x => N], t, advection_scheme=WENOScheme()) -discweno2 = MOLFiniteDifference([x => N-1], t, advection_scheme=WENOScheme(), grid_align=edge_align) +discweno1 = MOLFiniteDifference([x => N], t, advection_scheme = WENOScheme()) +discweno2 = MOLFiniteDifference([x => N-1], t, advection_scheme = WENOScheme(), grid_align = edge_align) ``` Here is a non-uniform discretization with the Upwind scheme, using tanh (nonuniform WENO is not implemented yet): @@ -70,21 +71,21 @@ Here is a non-uniform discretization with the Upwind scheme, using tanh (nonunif gridnu1 = chebyspace(domains[2], N) gridnu2 = chebyspace(domains[2], N-1) -discnu1 = MOLFiniteDifference([x => gridnu1], t, advection_scheme=UpwindScheme()) -discnu2 = MOLFiniteDifference([x => gridnu2], t, advection_scheme=UpwindScheme(), grid_align=edge_align) +discnu1 = MOLFiniteDifference([x => gridnu1], t, advection_scheme = UpwindScheme()) +discnu2 = MOLFiniteDifference([x => gridnu2], t, advection_scheme = UpwindScheme(), grid_align = edge_align) ``` Here are the problems for pdesys1: ```julia -probupwind1 = discretize(pdesys1, discupwind1; analytic=pdesys1.analytic_func) -probupwind2 = discretize(pdesys1, discupwind2; analytic=pdesys1.analytic_func) +probupwind1 = discretize(pdesys1, discupwind1; analytic = pdesys1.analytic_func) +probupwind2 = discretize(pdesys1, discupwind2; analytic = pdesys1.analytic_func) -probweno1 = discretize(pdesys1, discweno1; analytic=pdesys1.analytic_func) -probweno2 = discretize(pdesys1, discweno2; analytic=pdesys1.analytic_func) +probweno1 = discretize(pdesys1, discweno1; analytic = pdesys1.analytic_func) +probweno2 = discretize(pdesys1, discweno2; analytic = pdesys1.analytic_func) -probnu1 = discretize(pdesys1, discnu1; analytic=pdesys1.analytic_func) -probnu2 = discretize(pdesys1, discnu2; analytic=pdesys1.analytic_func) +probnu1 = discretize(pdesys1, discnu1; analytic = pdesys1.analytic_func) +probnu2 = discretize(pdesys1, discnu2; analytic = pdesys1.analytic_func) probs1 = [probupwind1, probupwind2, probnu1, probnu2, probweno1, probweno2] ``` @@ -100,27 +101,28 @@ setups = [Dict(:alg => solver, :prob_choice => 1), Dict(:alg => solver, :prob_choice => 3), Dict(:alg => solver, :prob_choice => 4), Dict(:alg => solver, :prob_choice => 5), - Dict(:alg => solver, :prob_choice => 6),] -names = ["Uniform Upwind, center_align", "Uniform Upwind, edge_align", "Nonuniform Upwind, center_align", - "Nonuniform Upwind, edge_align", "WENO, center_align", "WENO, edge_align"]; - -wp = WorkPrecisionSet(probs1, abstols, reltols, setups; names=names, - save_everystep=false, appxsol = dummy_appxsol, maxiters=Int(1e5), - numruns=10, wrap=Val(false)) + Dict(:alg => solver, :prob_choice => 6)] +names = ["Uniform Upwind, center_align", "Uniform Upwind, edge_align", + "Nonuniform Upwind, center_align", + "Nonuniform Upwind, edge_align", "WENO, center_align", "WENO, edge_align"]; + +wp = WorkPrecisionSet(probs1, abstols, reltols, setups; names = names, + save_everystep = false, appxsol = dummy_appxsol, maxiters = Int(1e5), + numruns = 10, wrap = Val(false)) plot(wp) ``` Here are the problems for pdesys2: ```julia -probupwind1 = discretize(pdesys2, discupwind1; analytic=pdesys2.analytic_func) -probupwind2 = discretize(pdesys2, discupwind2; analytic=pdesys2.analytic_func) +probupwind1 = discretize(pdesys2, discupwind1; analytic = pdesys2.analytic_func) +probupwind2 = discretize(pdesys2, discupwind2; analytic = pdesys2.analytic_func) -probweno1 = discretize(pdesys2, discweno1; analytic=pdesys2.analytic_func) -probweno2 = discretize(pdesys2, discweno2; analytic=pdesys2.analytic_func) +probweno1 = discretize(pdesys2, discweno1; analytic = pdesys2.analytic_func) +probweno2 = discretize(pdesys2, discweno2; analytic = pdesys2.analytic_func) -probnu1 = discretize(pdesys2, discnu1; analytic=pdesys2.analytic_func) -probnu2 = discretize(pdesys2, discnu2; analytic=pdesys2.analytic_func) +probnu1 = discretize(pdesys2, discnu1; analytic = pdesys2.analytic_func) +probnu2 = discretize(pdesys2, discnu2; analytic = pdesys2.analytic_func) probs2 = [probupwind1, probupwind2, probnu1, probnu2, probweno1, probweno2] ``` @@ -131,16 +133,17 @@ probs2 = [probupwind1, probupwind2, probnu1, probnu2, probweno1, probweno2] abstols = 1.0 ./ 10.0 .^ (5:8) reltols = 1.0 ./ 10.0 .^ (1:4); setups = [Dict(:alg => solver, :prob_choice => 1), - Dict(:alg => solver, :prob_choice => 2), - Dict(:alg => solver, :prob_choice => 3), - Dict(:alg => solver, :prob_choice => 4), - Dict(:alg => solver, :prob_choice => 5), - Dict(:alg => solver, :prob_choice => 6),] -names = ["Uniform Upwind, center_align", "Uniform Upwind, edge_align", "Nonuniform Upwind, center_align", - "Nonuniform Upwind, edge_align", "WENO, center_align", "WENO, edge_align"]; - -wp = WorkPrecisionSet(probs2, abstols, reltols, setups; names=names, - save_everystep=false, maxiters=Int(1e5), - numruns=10, wrap=Val(false)) + Dict(:alg => solver, :prob_choice => 2), + Dict(:alg => solver, :prob_choice => 3), + Dict(:alg => solver, :prob_choice => 4), + Dict(:alg => solver, :prob_choice => 5), + Dict(:alg => solver, :prob_choice => 6)] +names = ["Uniform Upwind, center_align", "Uniform Upwind, edge_align", + "Nonuniform Upwind, center_align", + "Nonuniform Upwind, edge_align", "WENO, center_align", "WENO, edge_align"]; + +wp = WorkPrecisionSet(probs2, abstols, reltols, setups; names = names, + save_everystep = false, maxiters = Int(1e5), + numruns = 10, wrap = Val(false)) plot(wp) ``` diff --git a/benchmarks/MethodOfLinesPDE/MOLxPDESystemLibrary.jmd b/benchmarks/MethodOfLinesPDE/MOLxPDESystemLibrary.jmd index 7338c5195..736b7ab0e 100644 --- a/benchmarks/MethodOfLinesPDE/MOLxPDESystemLibrary.jmd +++ b/benchmarks/MethodOfLinesPDE/MOLxPDESystemLibrary.jmd @@ -1,14 +1,14 @@ +* * * ---- -title: PDESystemLibrary.jl Work-Precision Diagrams with Various MethodOfLines.jl Methods +## title: PDESystemLibrary.jl Work-Precision Diagrams with Various MethodOfLines.jl Methods author: Alex Jones ---- This benchmark is for the MethodOfLines.jl package, which is an automatic PDE discretization package. It is concerned with comparing the performance of various discretization methods for the Burgers equation. ```julia -using MethodOfLines, DomainSets, OrdinaryDiffEq, ModelingToolkit, DiffEqDevTools, LinearAlgebra, +using MethodOfLines, DomainSets, OrdinaryDiffEq, ModelingToolkit, DiffEqDevTools, + LinearAlgebra, LinearSolve, Plots, RecursiveFactorization using PDESystemLibrary ``` @@ -49,40 +49,40 @@ end function uniformupwind1(ex, ivs, t, N) dxs = center_uniform_grid(ex, ivs, N) - MOLFiniteDifference(dxs, t, advection_scheme=UpwindScheme()) + MOLFiniteDifference(dxs, t, advection_scheme = UpwindScheme()) end function uniformupwind2(ex, ivs, t, N) dxs = edge_uniform_grid(ex, ivs, N) - MOLFiniteDifference(dxs, t, advection_scheme=UpwindScheme(), grid_align=edge_align) + MOLFiniteDifference(dxs, t, advection_scheme = UpwindScheme(), grid_align = edge_align) end function chebyupwind1(ex, ivs, t, N) dxs = center_chebygrid(ex, ivs, N) - MOLFiniteDifference(dxs, t, advection_scheme=UpwindScheme()) + MOLFiniteDifference(dxs, t, advection_scheme = UpwindScheme()) end function chebyupwind2(ex, ivs, t, N) dxs = edge_chebygrid(ex, ivs, N) - MOLFiniteDifference(dxs, t, advection_scheme=UpwindScheme(), grid_align=edge_align) + MOLFiniteDifference(dxs, t, advection_scheme = UpwindScheme(), grid_align = edge_align) end - function discweno1(ex, ivs, t, N) dxs = center_uniform_grid(ex, ivs, N) - MOLFiniteDifference(dxs, t, advection_scheme=WENOScheme()) + MOLFiniteDifference(dxs, t, advection_scheme = WENOScheme()) end function discweno2(ex, ivs, t, N) dxs = edge_uniform_grid(ex, ivs, N) - MOLFiniteDifference(dxs, t, advection_scheme=WENOScheme(), grid_align=edge_align) + MOLFiniteDifference(dxs, t, advection_scheme = WENOScheme(), grid_align = edge_align) end ``` + This script tests all systems in PDESystemLibrary against different MethodOfLines.jl discretizations. It then plots the work precision sets. @@ -186,15 +186,15 @@ for ex in PSL.all_systems Dict(:alg => solver, :prob_choice => 3), Dict(:alg => solver, :prob_choice => 4), Dict(:alg => solver, :prob_choice => 5), - Dict(:alg => solver, :prob_choice => 6),] + Dict(:alg => solver, :prob_choice => 6)] names = ["Uniform Upwind, center_align", "Uniform Upwind, edge_align", - "Chebyshev Upwind, center_align", "Chebyshev Upwind, edge_align", - "Uniform WENO, center_align", "Uniform WENO, edge_align"]; + "Chebyshev Upwind, center_align", "Chebyshev Upwind, edge_align", + "Uniform WENO, center_align", "Uniform WENO, edge_align"]; - wp = WorkPrecisionSet(probs, abstols, reltols, setups; names=names, - save_everystep=false, appxsol = dummy_appxsol, maxiters=Int(1e5), - numruns=10, wrap=Val(false)) - plot(wp, title=title) + wp = WorkPrecisionSet(probs, abstols, reltols, setups; names = names, + save_everystep = false, appxsol = dummy_appxsol, maxiters = Int(1e5), + numruns = 10, wrap = Val(false)) + plot(wp, title = title) else dummy_appxsol = [nothing for i in 1:length(probs)] abstols = 1.0 ./ 10.0 .^ (5:8) @@ -202,20 +202,19 @@ for ex in PSL.all_systems setups = [Dict(:alg => solver, :prob_choice => 1), Dict(:alg => solver, :prob_choice => 2), Dict(:alg => solver, :prob_choice => 3), - Dict(:alg => solver, :prob_choice => 4),] + Dict(:alg => solver, :prob_choice => 4)] names = ["Uniform, center_align", "Uniform, edge_align", - "Chebyshev, center_align", "Chebyshev, edge_align"]; + "Chebyshev, center_align", "Chebyshev, edge_align"]; - wp = WorkPrecisionSet(probs1, abstols, reltols, setups; names=names, - save_everystep=false, appxsol = dummy_appxsol, maxiters=Int(1e5), - numruns=10, wrap=Val(false)) - plot(wp, title=title) + wp = WorkPrecisionSet(probs1, abstols, reltols, setups; names = names, + save_everystep = false, appxsol = dummy_appxsol, maxiters = Int(1e5), + numruns = 10, wrap = Val(false)) + plot(wp, title = title) end - end catch e println("Failed on $(ex.name):") println(e) end -end -``` \ No newline at end of file +end +``` diff --git a/benchmarks/ModelingToolkit/Multibody_Robot.jmd b/benchmarks/ModelingToolkit/Multibody_Robot.jmd index c85b2c237..e044a1699 100644 --- a/benchmarks/ModelingToolkit/Multibody_Robot.jmd +++ b/benchmarks/ModelingToolkit/Multibody_Robot.jmd @@ -28,17 +28,15 @@ time_simplify = @elapsed ssys = structural_simplify(IRSystem(robot)) const C = JuliaSimCompiler.CTarget(); const LLVM = JuliaSimCompiler.llvm.LLVMTarget(); labels = ["Instantiate", "Simplify", "Problem creation", "Solve", "Extract data"] -const u0 = [ - robot.mechanics.r1.phi => deg2rad(-60) - robot.mechanics.r2.phi => deg2rad(20) - robot.mechanics.r3.phi => deg2rad(90) - robot.mechanics.r4.phi => deg2rad(0) - robot.mechanics.r5.phi => deg2rad(-110) - robot.mechanics.r6.phi => deg2rad(0) - robot.axis1.motor.Jmotor.phi => deg2rad(-60) * (-105) - robot.axis2.motor.Jmotor.phi => deg2rad(20) * (210) - robot.axis3.motor.Jmotor.phi => deg2rad(90) * (60) - ] +const u0 = [robot.mechanics.r1.phi => deg2rad(-60) + robot.mechanics.r2.phi => deg2rad(20) + robot.mechanics.r3.phi => deg2rad(90) + robot.mechanics.r4.phi => deg2rad(0) + robot.mechanics.r5.phi => deg2rad(-110) + robot.mechanics.r6.phi => deg2rad(0) + robot.axis1.motor.Jmotor.phi => deg2rad(-60) * (-105) + robot.axis2.motor.Jmotor.phi => deg2rad(20) * (210) + robot.axis3.motor.Jmotor.phi => deg2rad(90) * (60)] const tspan = (0.0, 4.0) ``` @@ -51,29 +49,28 @@ function julia_multibody_timings(ssys, target) else ODEProblem(ssys, target, u0, tspan) end - time_solve = @elapsed sol = solve(prob, Rodas5P(autodiff=false)); # With autodiff=true this takes over 150 seconds - + time_solve = @elapsed sol = solve(prob, Rodas5P(autodiff = false)); # With autodiff=true this takes over 150 seconds + tv = 0:0.01:4 - time_extract_data = @elapsed data = sol(tv, idxs=[ - robot.pathPlanning.controlBus.axisControlBus1.angle - robot.pathPlanning.controlBus.axisControlBus2.angle - robot.pathPlanning.controlBus.axisControlBus3.angle - robot.pathPlanning.controlBus.axisControlBus4.angle - robot.pathPlanning.controlBus.axisControlBus5.angle - robot.pathPlanning.controlBus.axisControlBus6.angle - robot.mechanics.r1.phi - robot.mechanics.r2.phi - robot.mechanics.r3.phi - robot.mechanics.r4.phi - robot.mechanics.r5.phi - robot.mechanics.r6.phi - robot.axis1.controller.feedback1.output.u - robot.axis2.controller.feedback1.output.u - robot.axis3.controller.feedback1.output.u - robot.axis4.controller.feedback1.output.u - robot.axis5.controller.feedback1.output.u - robot.axis6.controller.feedback1.output.u - ]); + time_extract_data = @elapsed data = sol(tv, + idxs = [robot.pathPlanning.controlBus.axisControlBus1.angle + robot.pathPlanning.controlBus.axisControlBus2.angle + robot.pathPlanning.controlBus.axisControlBus3.angle + robot.pathPlanning.controlBus.axisControlBus4.angle + robot.pathPlanning.controlBus.axisControlBus5.angle + robot.pathPlanning.controlBus.axisControlBus6.angle + robot.mechanics.r1.phi + robot.mechanics.r2.phi + robot.mechanics.r3.phi + robot.mechanics.r4.phi + robot.mechanics.r5.phi + robot.mechanics.r6.phi + robot.axis1.controller.feedback1.output.u + robot.axis2.controller.feedback1.output.u + robot.axis3.controller.feedback1.output.u + robot.axis4.controller.feedback1.output.u + robot.axis5.controller.feedback1.output.u + robot.axis6.controller.feedback1.output.u]); timings = [time_instantiate, time_simplify, time_prob, time_solve, time_extract_data] end ``` @@ -85,9 +82,13 @@ f = Figure() xs = 1:length(labels) points = Makie.Point.(xs .- 0.25, julia_timings .+ 1) anns = [@sprintf("%3.3g", t) for t in julia_timings] -barplot(f[1,1], julia_timings, axis=(; title="Julia Backend Timings", xticks = (xs, labels), limits = (nothing, (0, maximum(julia_timings)*1.2 + 2)))) -annotations!(f[1,1], anns, points) -barplot(f[2,1], julia_timings, axis=(; title="Log Timings", xticks = (xs, labels), yscale=log10)) +barplot(f[1, 1], + julia_timings, + axis = (; title = "Julia Backend Timings", xticks = (xs, labels), + limits = (nothing, (0, maximum(julia_timings)*1.2 + 2)))) +annotations!(f[1, 1], anns, points) +barplot(f[2, 1], julia_timings, axis = (; + title = "Log Timings", xticks = (xs, labels), yscale = log10)) f ``` @@ -98,9 +99,13 @@ f = Figure() xs = 1:length(labels) points = Makie.Point.(xs .- 0.25, llvm_timings .+ 1) anns = [@sprintf("%3.3g", t) for t in llvm_timings] -barplot(f[1,1], llvm_timings, axis=(; title="LLVM Backend Timings", xticks = (xs, labels), limits = (nothing, (0, maximum(llvm_timings)*1.2 + 2)))) -annotations!(f[1,1], anns, points) -barplot(f[2,1], llvm_timings, axis=(; title="Log Timings", xticks = (xs, labels), yscale=log10)) +barplot(f[1, 1], + llvm_timings, + axis = (; title = "LLVM Backend Timings", xticks = (xs, labels), + limits = (nothing, (0, maximum(llvm_timings)*1.2 + 2)))) +annotations!(f[1, 1], anns, points) +barplot(f[2, 1], llvm_timings, axis = (; + title = "Log Timings", xticks = (xs, labels), yscale = log10)) f ``` @@ -111,9 +116,13 @@ f = Figure() xs = 1:length(labels) points = Makie.Point.(xs .- 0.25, c_timings .+ 1) anns = [@sprintf("%3.3g", t) for t in c_timings] -barplot(f[1,1], c_timings, axis=(; title="C Backend Timings", xticks = (xs, labels), limits = (nothing, (0, maximum(c_timings)*1.2 + 2)))) -annotations!(f[1,1], anns, points) -barplot(f[2,1], c_timings, axis=(; title="Log Timings", xticks = (xs, labels), yscale=log10)) +barplot(f[1, 1], + c_timings, + axis = (; title = "C Backend Timings", xticks = (xs, labels), + limits = (nothing, (0, maximum(c_timings)*1.2 + 2)))) +annotations!(f[1, 1], anns, points) +barplot(f[2, 1], c_timings, axis = (; + title = "Log Timings", xticks = (xs, labels), yscale = log10)) f ``` @@ -130,8 +139,11 @@ OMJulia.sendExpression(mod, "installPackage(Modelica)") @show "Start OpenModelica Timings" om_total = @elapsed begin - om_build = @elapsed ModelicaSystem(mod, modelName="Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.FullRobot", library="Modelica") - om_sim = @elapsed res = sendExpression(mod, "simulate(Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.FullRobot)") + om_build = @elapsed ModelicaSystem( + mod, modelName = "Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.FullRobot", + library = "Modelica") + om_sim = @elapsed res = sendExpression( + mod, "simulate(Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.FullRobot)") end @assert res["messages"][1:11] == "LOG_SUCCESS" @@ -139,6 +151,7 @@ OMJulia.quit(mod) ``` ## Comparison + ```julia colors = Makie.wong_colors() labels = ["Build", "Simulate", "Total"] @@ -158,32 +171,31 @@ dymola_build = sum([5.075, 3.912, 4.024])/3 dymola_total = sum([5.267, 4.112, 4.255])/3 dymola_sim = dymola_total - dymola_build -data = [ - julia_build julia_sim julia_total - llvm_build llvm_sim llvm_total - # c_build c_sim c_total - om_build om_sim om_total - dymola_build dymola_sim dymola_total -] +data = [julia_build julia_sim julia_total + llvm_build llvm_sim llvm_total + # c_build c_sim c_total + om_build om_sim om_total + dymola_build dymola_sim dymola_total] -xs = repeat(1:length(labels), inner=4) -group = repeat([1,2,3,4], outer=3) +xs = repeat(1:length(labels), inner = 4) +group = repeat([1, 2, 3, 4], outer = 3) fig = Figure() -barplot(fig[1,1], xs, vec(data), dodge=group, color=colors[group], axis=(; title="Timings", xticks = ([1,2,3], labels))) +barplot(fig[1, 1], xs, vec(data), dodge = group, color = colors[group], + axis = (; title = "Timings", xticks = ([1, 2, 3], labels))) # Legend -legendentries = ["Julia Backend", "LLVM Backend", #= "C Backend", =# "OpenModelica", "Dymola"] +legendentries = ["Julia Backend", "LLVM Backend", + #= "C Backend", =#"OpenModelica", "Dymola"] elements = [PolyElement(polycolor = colors[i]) for i in 1:length(legendentries)] title = "Contestants" -Legend(fig[1,2], elements, legendentries, title) +Legend(fig[1, 2], elements, legendentries, title) fig ``` - ## Appendix ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/ModelingToolkit/Project.toml b/benchmarks/ModelingToolkit/Project.toml index 605cfeee1..1b950b7c9 100644 --- a/benchmarks/ModelingToolkit/Project.toml +++ b/benchmarks/ModelingToolkit/Project.toml @@ -20,7 +20,7 @@ Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" [compat] BenchmarkTools = "1.5.0" CSV = "0.10" -CairoMakie = "0.11.11, 0.13" +CairoMakie = "0.11.11, 0.13, 0.14, 0.15" DataFrames = "1" JuliaSimCompiler = "0.1.9" JuliaSimCompilerRuntime = "1.0.0" diff --git a/benchmarks/ModelingToolkit/RCCircuit.jmd b/benchmarks/ModelingToolkit/RCCircuit.jmd index d4d78a594..4df1268b8 100644 --- a/benchmarks/ModelingToolkit/RCCircuit.jmd +++ b/benchmarks/ModelingToolkit/RCCircuit.jmd @@ -11,7 +11,8 @@ runtimes of MTK vs JuliaSimCompiler's three backends with and without loop rerol ## Setup Model Code ```julia -using JuliaSimCompiler, ModelingToolkit, OrdinaryDiffEq, BenchmarkTools, ModelingToolkitStandardLibrary, OMJulia, CairoMakie +using JuliaSimCompiler, ModelingToolkit, OrdinaryDiffEq, BenchmarkTools, + ModelingToolkitStandardLibrary, OMJulia, CairoMakie using ModelingToolkitStandardLibrary.Blocks using ModelingToolkitStandardLibrary.Electrical ``` @@ -21,83 +22,92 @@ using ModelingToolkitStandardLibrary.Electrical const t = Blocks.t function build_system(n) - systems = @named begin - sine = Sine(frequency = 10) - source = Voltage() - resistors[1:n] = Resistor() - capacitors[1:n] = Capacitor() - ground = Ground() - end - systems = reduce(vcat, systems) - eqs = [connect(sine.output, source.V) - connect(source.p, resistors[1].p) - [connect(resistors[i].n, resistors[i + 1].p, capacitors[i].p) - for i in 1:(n - 1)] - connect(resistors[end].n, capacitors[end].p) - [connect(capacitors[i].n, source.n) for i in 1:n] - connect(source.n, ground.g)] - @named sys = ODESystem(eqs, t; systems) - u0 = [capacitors[i].v => float(i) for i in 1:n]; - ps = [[resistors[i].R => 1 / i for i in 1:n]; - [capacitors[i].C => 1 / i^2 for i in 1:n]] - return sys, u0, ps + systems = @named begin + sine = Sine(frequency = 10) + source = Voltage() + resistors[1:n] = Resistor() + capacitors[1:n] = Capacitor() + ground = Ground() + end + systems = reduce(vcat, systems) + eqs = [connect(sine.output, source.V) + connect(source.p, resistors[1].p) + [connect(resistors[i].n, resistors[i + 1].p, capacitors[i].p) + for i in 1:(n - 1)] + connect(resistors[end].n, capacitors[end].p) + [connect(capacitors[i].n, source.n) for i in 1:n] + connect(source.n, ground.g)] + @named sys = ODESystem(eqs, t; systems) + u0 = [capacitors[i].v => float(i) for i in 1:n]; + ps = [[resistors[i].R => 1 / i for i in 1:n]; + [capacitors[i].C => 1 / i^2 for i in 1:n]] + return sys, u0, ps end -function compile_run_problem(sys, u0, ps; target=JuliaSimCompiler.JuliaTarget(), duref=nothing) - tspan = (0.0, 10.0) - t0 = time() - prob = if target === JuliaSimCompiler.JuliaTarget() - ODEProblem(sys, u0, tspan, ps; sparse = true) - else - ODEProblem(sys, target, u0, tspan, ps; sparse = true) - end - (; f, u0, p) = prob - ff = f.f - du = similar(u0) - ff(du, u0, p, 0.0) - t_fode = time() - t0 - duref === nothing || @assert duref ≈ du - t_run = @belapsed $ff($du, $u0, $p, 0.0) - t_solve = @elapsed sol = solve(prob, Rodas5(autodiff = false)) - @assert SciMLBase.successful_retcode(sol) - (t_fode, t_run, t_solve), du +function compile_run_problem( + sys, u0, ps; target = JuliaSimCompiler.JuliaTarget(), duref = nothing) + tspan = (0.0, 10.0) + t0 = time() + prob = if target === JuliaSimCompiler.JuliaTarget() + ODEProblem(sys, u0, tspan, ps; sparse = true) + else + ODEProblem(sys, target, u0, tspan, ps; sparse = true) + end + (; f, u0, p) = prob + ff = f.f + du = similar(u0) + ff(du, u0, p, 0.0) + t_fode = time() - t0 + duref === nothing || @assert duref ≈ du + t_run = @belapsed $ff($du, $u0, $p, 0.0) + t_solve = @elapsed sol = solve(prob, Rodas5(autodiff = false)) + @assert SciMLBase.successful_retcode(sol) + (t_fode, t_run, t_solve), du end const C = JuliaSimCompiler.CTarget(); const LLVM = JuliaSimCompiler.llvm.LLVMTarget(); function run_and_time_julia!(ss_times, times, max_sizes, i, n) - sys, u0, ps = build_system(n); - if n <= max_sizes[1] - ss_times[i, 1] = @elapsed sys_mtk = structural_simplify(sys) - times[i, 1], _ = compile_run_problem(sys_mtk, u0, ps) - end - ss_times[i, 2] = @elapsed sys_jsir_scalar = structural_simplify(IRSystem(sys), loop=false) - ss_times[i, 3] = @elapsed sys_jsir_loop = structural_simplify(JuliaSimCompiler.compressed_connection_expansion(sys)) - oderef = daeref = nothing - n <= max_sizes[2] && ((times[i, 2], oderef) = compile_run_problem(sys_jsir_scalar, u0, ps; duref = oderef)) - n <= max_sizes[3] && ((times[i, 3], oderef) = compile_run_problem(sys_jsir_scalar, u0, ps; target=C, duref = oderef)) - n <= max_sizes[4] && ((times[i, 4], oderef) = compile_run_problem(sys_jsir_scalar, u0, ps; target=LLVM, duref = oderef)) - n <= max_sizes[5] && ((times[i, 5], deeref) = compile_run_problem(sys_jsir_loop, u0, ps; duref = daeref)) - n <= max_sizes[6] && ((times[i, 6], daeref) = compile_run_problem(sys_jsir_loop, u0, ps; target=C, duref = daeref)) - n <= max_sizes[7] && ((times[i, 7], daeref) = compile_run_problem(sys_jsir_loop, u0, ps; target=LLVM, duref = daeref)) - for j = 1:7 - ss_time = j == 1 ? ss_times[i,1] : ss_times[i, 2 + (j >= 5)] - t_fode, t_run, t_solve = times[i,j] - total_times[i, j] = ss_time + t_fode + t_solve - end + sys, u0, ps = build_system(n); + if n <= max_sizes[1] + ss_times[i, 1] = @elapsed sys_mtk = structural_simplify(sys) + times[i, 1], _ = compile_run_problem(sys_mtk, u0, ps) + end + ss_times[i, 2] = @elapsed sys_jsir_scalar = structural_simplify(IRSystem(sys), loop = false) + ss_times[i, 3] = @elapsed sys_jsir_loop = structural_simplify(JuliaSimCompiler.compressed_connection_expansion(sys)) + oderef = daeref = nothing + n <= max_sizes[2] && ((times[i, 2], + oderef) = compile_run_problem(sys_jsir_scalar, u0, ps; duref = oderef)) + n <= max_sizes[3] && ((times[i, 3], + oderef) = compile_run_problem(sys_jsir_scalar, u0, ps; target = C, duref = oderef)) + n <= max_sizes[4] && ((times[i, 4], + oderef) = compile_run_problem( + sys_jsir_scalar, u0, ps; target = LLVM, duref = oderef)) + n <= max_sizes[5] && + ((times[i, 5], deeref) = compile_run_problem(sys_jsir_loop, u0, ps; duref = daeref)) + n <= max_sizes[6] && ((times[i, 6], + daeref) = compile_run_problem(sys_jsir_loop, u0, ps; target = C, duref = daeref)) + n <= max_sizes[7] && ((times[i, 7], + daeref) = compile_run_problem(sys_jsir_loop, u0, ps; target = LLVM, duref = daeref)) + for j in 1:7 + ss_time = j == 1 ? ss_times[i, 1] : ss_times[i, 2 + (j >= 5)] + t_fode, t_run, t_solve = times[i, j] + total_times[i, j] = ss_time + t_fode + t_solve + end end ``` ```julia -N = [5, 10, 20, 40, 60, 80, 160, 320, 480, 640, 800, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000]; +N = [5, 10, 20, 40, 60, 80, 160, 320, 480, 640, 800, 1000, 2000, + 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000]; # max size we test per method max_sizes = [4_000, 8_000, 20_000, 20_000, 20_000, 20_000, 20_000, 9000]; # NaN-initialize so Makie will ignore incomplete ss_times = fill(NaN, length(N), 3); -times = fill((NaN,NaN,NaN), length(N), length(max_sizes) - 1); +times = fill((NaN, NaN, NaN), length(N), length(max_sizes) - 1); total_times = fill(NaN, length(N), length(max_sizes) + 1); ``` @@ -106,7 +116,7 @@ total_times = fill(NaN, length(N), length(max_sizes) + 1); ```julia @time run_and_time_julia!(ss_times, times, max_sizes, 1, 4); # precompile for (i, n) in enumerate(N) - @time run_and_time_julia!(ss_times, times, max_sizes, i, n) + @time run_and_time_julia!(ss_times, times, max_sizes, i, n) end ``` @@ -120,23 +130,23 @@ OMJulia.sendExpression(omod, "installPackage(Modelica)") const modelicafile = joinpath(@__DIR__, "RC_Circuit.mo") function time_open_modelica(n::Int) - totaltime = @elapsed res = begin - @sync ModelicaSystem(omod, modelicafile, "RC_Circuit.Test.RC_Circuit_MTK_test_$n") - sendExpression(omod, "simulate(RC_Circuit.Test.RC_Circuit_MTK_test_$n)") - end - @assert res["messages"][1:11] == "LOG_SUCCESS" - return totaltime + totaltime = @elapsed res = begin + @sync ModelicaSystem(omod, modelicafile, "RC_Circuit.Test.RC_Circuit_MTK_test_$n") + sendExpression(omod, "simulate(RC_Circuit.Test.RC_Circuit_MTK_test_$n)") + end + @assert res["messages"][1:11] == "LOG_SUCCESS" + return totaltime end function run_and_time_om!(ss_times, times, max_sizes, i, n) - if n <= max_sizes[8] - total_times[i, end] = time_open_modelica(n) - end - @views println("n = $(n)\nstructural_simplify_times = $(ss_times[i,:])\ncomponent times = $(times[i, :])\ntotal times = $(total_times[i, :])") + if n <= max_sizes[8] + total_times[i, end] = time_open_modelica(n) + end + @views println("n = $(n)\nstructural_simplify_times = $(ss_times[i,:])\ncomponent times = $(times[i, :])\ntotal times = $(total_times[i, :])") end for (i, n) in enumerate(N) - @time run_and_time_om!(ss_times, times, max_sizes, i, n) + @time run_and_time_om!(ss_times, times, max_sizes, i, n) end OMJulia.quit(omod) @@ -148,53 +158,52 @@ Dymola requires a license server and thus cannot be hosted. This was run locally following times: ```julia -translation_and_total_times = [ - 5 2.428 2.458 - 10 2.727 2.757 - 20 1.764 1.797 - 40 1.849 1.885 - 60 1.953 1.995 - 80 2.041 2.089 - 160 2.422 2.485 - 320 3.157 3.258 - 480 3.943 4.092 - 640 4.718 4.912 - 800 5.531 5.773 - 1000 6.526 6.826 - 2000 11.467 12.056 - 3000 16.8 17.831 - 4000 22.355 24.043 - 5000 27.768 30.083 - 6000 33.561 36.758 - 7000 39.197 43.154 - 8000 45.194 52.153 - 9000 50.689 57.187 - 10000 NaN NaN - 20000 NaN NaN -] - -total_times[:, 9] = translation_and_total_times[:,3] +translation_and_total_times = [5 2.428 2.458 + 10 2.727 2.757 + 20 1.764 1.797 + 40 1.849 1.885 + 60 1.953 1.995 + 80 2.041 2.089 + 160 2.422 2.485 + 320 3.157 3.258 + 480 3.943 4.092 + 640 4.718 4.912 + 800 5.531 5.773 + 1000 6.526 6.826 + 2000 11.467 12.056 + 3000 16.8 17.831 + 4000 22.355 24.043 + 5000 27.768 30.083 + 6000 33.561 36.758 + 7000 39.197 43.154 + 8000 45.194 52.153 + 9000 50.689 57.187 + 10000 NaN NaN + 20000 NaN NaN] + +total_times[:, 9] = translation_and_total_times[:, 3] ``` ## Results ```julia -f = Figure(size=(800,1200)); +f = Figure(size = (800, 1200)); ss_names = ["MTK", "JSIR-Scalar", "JSIR-Loop"]; -let ax = Axis(f[1, 1]; yscale = log10, xscale = log10, title="Structural Simplify Time") - _lines = map(eachcol(ss_times)) do ts - lines!(N, ts) - end - Legend(f[1,2], _lines, ss_names) +let ax = Axis(f[1, 1]; yscale = log10, xscale = log10, title = "Structural Simplify Time") + _lines = map(eachcol(ss_times)) do ts + lines!(N, ts) + end + Legend(f[1, 2], _lines, ss_names) end -method_names = ["MTK", "JSIR - Scalar - Julia", "JSIR - Scalar - C", "JSIR - Scalar - LLVM", "JSIR - Loop - Julia", "JSIR - Loop - C", "JSIR - Loop - LLVM"]; +method_names = ["MTK", "JSIR - Scalar - Julia", "JSIR - Scalar - C", "JSIR - Scalar - LLVM", + "JSIR - Loop - Julia", "JSIR - Loop - C", "JSIR - Loop - LLVM"]; for (i, timecat) in enumerate(("ODEProblem + f!", "Run", "Solve")) - title = timecat * " Time" - ax = Axis(f[i+1, 1]; yscale = log10, xscale = log10, title) - _lines = map(eachcol(times)) do ts - lines!(N, getindex.(ts, i)) - end - Legend(f[i+1, 2], _lines, method_names) + title = timecat * " Time" + ax = Axis(f[i + 1, 1]; yscale = log10, xscale = log10, title) + _lines = map(eachcol(times)) do ts + lines!(N, getindex.(ts, i)) + end + Legend(f[i + 1, 2], _lines, method_names) end f ``` @@ -203,12 +212,14 @@ f f2 = Figure(size = (800, 400)); title = "Total Time: RC Circuit Benchmark" ax = Axis(f2[1, 1]; yscale = log10, xscale = log10, title) -names = ["MTK", "JSIR - Scalar - Julia", "JSIR - Scalar - C", "JSIR - Scalar - LLVM", "JSIR - Loop - Julia", "JSIR - Loop - C", "JSIR - Loop - LLVM", "OpenModelica", "Dymola"] +names = ["MTK", "JSIR - Scalar - Julia", "JSIR - Scalar - C", + "JSIR - Scalar - LLVM", "JSIR - Loop - Julia", "JSIR - Loop - C", + "JSIR - Loop - LLVM", "OpenModelica", "Dymola"] _lines = map(enumerate(names)) do (j, label) ts = @view(total_times[:, j]) lines!(N, ts) end -Legend(f2[1,2], _lines, names) +Legend(f2[1, 2], _lines, names) f2 ``` @@ -219,5 +230,5 @@ The impact on runtime was more varied. ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/ModelingToolkit/ThermalFluid.jmd b/benchmarks/ModelingToolkit/ThermalFluid.jmd index f46547ef8..9b2cc240a 100644 --- a/benchmarks/ModelingToolkit/ThermalFluid.jmd +++ b/benchmarks/ModelingToolkit/ThermalFluid.jmd @@ -8,9 +8,10 @@ This is a 1D advection-diffusion-source PDE that uses a second order upwind sche ```julia using Pkg # Rev fixes precompilation https://github.com/hzgzh/XSteam.jl/pull/2 -Pkg.add(Pkg.PackageSpec(;name="XSteam", rev="f2a1c589054cfd6bba307985a3a534b6f5a1863b")) +Pkg.add(Pkg.PackageSpec(; name = "XSteam", rev = "f2a1c589054cfd6bba307985a3a534b6f5a1863b")) -using ModelingToolkit, JuliaSimCompiler, Symbolics, XSteam, Polynomials, BenchmarkTools, CairoMakie, OrdinaryDiffEq +using ModelingToolkit, JuliaSimCompiler, Symbolics, XSteam, Polynomials, BenchmarkTools, + CairoMakie, OrdinaryDiffEq using OMJulia ``` @@ -34,268 +35,289 @@ T_source(t) = (t > 12 * 3600) * 56.0 + 12.0 #build polynomial liquid-water property only dependent on Temperature p_l = 5 #bar T_vec = collect(1:1:150); -@generated kin_visc_T(t) = :(Base.evalpoly(t, $(fit(T_vec, my_pT.(p_l, T_vec) ./ rho_pT.(p_l, T_vec), 5).coeffs...,))) +@generated kin_visc_T(t) = :(Base.evalpoly( + t, $(fit(T_vec, my_pT.(p_l, T_vec) ./ rho_pT.(p_l, T_vec), 5).coeffs...,))) @generated lambda_T(t) = :(Base.evalpoly(t, $(fit(T_vec, tc_pT.(p_l, T_vec), 3).coeffs...,))) -@generated Pr_T(t) = :(Base.evalpoly(t, $(fit(T_vec, 1e3 * Cp_pT.(p_l, T_vec) .* my_pT.(p_l, T_vec) ./ tc_pT.(p_l, T_vec), 5).coeffs...,))) +@generated Pr_T(t) = :(Base.evalpoly(t, + $(fit(T_vec, 1e3 * Cp_pT.(p_l, T_vec) .* my_pT.(p_l, T_vec) ./ tc_pT.(p_l, T_vec), 5).coeffs...,))) @generated rho_T(t) = :(Base.evalpoly(t, $(fit(T_vec, rho_pT.(p_l, T_vec), 4).coeffs...,))) -@generated rhocp_T(t) = :(Base.evalpoly(t, $(fit(T_vec, 1000 * rho_pT.(p_l, T_vec) .* Cp_pT.(p_l, T_vec), 5).coeffs...,))) +@generated rhocp_T(t) = :(Base.evalpoly( + t, $(fit(T_vec, 1000 * rho_pT.(p_l, T_vec) .* Cp_pT.(p_l, T_vec), 5).coeffs...,))) @register_symbolic kin_visc_T(t) @register_symbolic lambda_T(t) @register_symbolic Pr_T(t) @register_symbolic rho_T(t) @register_symbolic rhocp_T(t) -@connector function FluidPort(; name, p=101325.0, m=0.0, T=0.0) - sts = @variables p(t) = p m(t) = m [connect = Flow] T(t) = T [connect = Stream] - ODESystem(Equation[], t, sts, []; name=name) +@connector function FluidPort(; name, p = 101325.0, m = 0.0, T = 0.0) + sts = @variables p(t)=p m(t)=m [connect=Flow] T(t)=T [connect=Stream] + ODESystem(Equation[], t, sts, []; name = name) end -@connector function VectorHeatPort(; name, N=100, T0=0.0, Q0=0.0) - sts = @variables (T(t))[1:N] = T0 (Q(t))[1:N] = Q0 [connect = Flow] - ODESystem(Equation[], t, [T; Q], []; name=name) +@connector function VectorHeatPort(; name, N = 100, T0 = 0.0, Q0 = 0.0) + sts = @variables (T(t))[1:N]=T0 (Q(t))[1:N]=Q0 [connect=Flow] + ODESystem(Equation[], t, [T; Q], []; name = name) end @register_symbolic Dxx_coeff(u, d, T) #Taylor-aris dispersion model function Dxx_coeff(u, d, T) - Re = abs(u) * d / kin_visc_T(T) + 0.1 - if Re < 1000.0 - (d^2 / 4) * u^2 / 48 / 0.14e-6 - else - d * u * (1.17e9 * Re^(-2.5) + 0.41) - end + Re = abs(u) * d / kin_visc_T(T) + 0.1 + if Re < 1000.0 + (d^2 / 4) * u^2 / 48 / 0.14e-6 + else + d * u * (1.17e9 * Re^(-2.5) + 0.41) + end end @register_symbolic Nusselt(Re, Pr, f) #Nusselt number model function Nusselt(Re, Pr, f) - if Re <= 2300.0 - 3.66 - elseif Re <= 3100.0 - 3.5239 * (Re / 1000)^4 - 45.158 * (Re / 1000)^3 + 212.13 * (Re / 1000)^2 - 427.45 * (Re / 1000) + 316.08 - else - f / 8 * ((Re - 1000) * Pr) / (1 + 12.7 * (f / 8)^(1 / 2) * (Pr^(2 / 3) - 1)) - end + if Re <= 2300.0 + 3.66 + elseif Re <= 3100.0 + 3.5239 * (Re / 1000)^4 - 45.158 * (Re / 1000)^3 + 212.13 * (Re / 1000)^2 - + 427.45 * (Re / 1000) + 316.08 + else + f / 8 * ((Re - 1000) * Pr) / (1 + 12.7 * (f / 8)^(1 / 2) * (Pr^(2 / 3) - 1)) + end end @register_symbolic Churchill_f(Re, epsilon, d) #Darcy weisbach friction factor function Churchill_f(Re, epsilon, d) - theta_1 = (-2.457 * log(((7 / Re)^0.9) + (0.27 * (epsilon / d))))^16 - theta_2 = (37530 / Re)^16 - 8 * ((((8 / Re)^12) + (1 / ((theta_1 + theta_2)^1.5)))^(1 / 12)) + theta_1 = (-2.457 * log(((7 / Re)^0.9) + (0.27 * (epsilon / d))))^16 + theta_2 = (37530 / Re)^16 + 8 * ((((8 / Re)^12) + (1 / ((theta_1 + theta_2)^1.5)))^(1 / 12)) end -function FluidRegion(; name, L=1.0, dn=0.05, N=100, T0=0.0, - lumped_T=50, diffusion=true, e=1e-4) - @named inlet = FluidPort() - @named outlet = FluidPort() - @named heatport = VectorHeatPort(N=N) - - dx = L / N - c = [-1 / 8, -3 / 8, -3 / 8] # advection stencil coefficients - A = pi * dn^2 / 4 - - p = @parameters C_shift = 0.0 Rw = 0.0 # stuff for latter - @variables begin - (T(t))[1:N] = fill(T0, N) - Twall(t)[1:N] = fill(T0, N) - (S(t))[1:N] = fill(T0, N) - (C(t))[1:N] = fill(1.0, N) - u(t) = 1e-6 - Re(t) = 1000.0 - Dxx(t) = 0.0 - Pr(t) = 1.0 - alpha(t) = 1.0 - f(t) = 1.0 - end - - sts = vcat(T, Twall, S, C, Num[u], Num[Re], Num[Dxx], Num[Pr], Num[alpha], Num[f]) - - eqs = Equation[ - Re ~ 0.1 + dn * abs(u) / kin_visc_T(lumped_T) - Pr ~ Pr_T(lumped_T) - f ~ Churchill_f(Re, e, dn) #Darcy-weisbach - alpha ~ Nusselt(Re, Pr, f) * lambda_T(lumped_T) / dn - Dxx ~ diffusion * Dxx_coeff(u, dn, lumped_T) - inlet.m ~ -outlet.m - inlet.p ~ outlet.p - inlet.T ~ instream(inlet.T) - outlet.T ~ T[N] - u ~ inlet.m / rho_T(inlet.T) / A - [C[i] ~ dx * A * rhocp_T(T[i]) for i in 1:N] - [S[i] ~ heatport.Q[i] for i in 1:N] - [Twall[i] ~ heatport.T[i] for i in 1:N] - - #source term - [S[i] ~ (1 / (1 / (alpha * dn * pi * dx) + abs(Rw / 1000))) * (Twall[i] - T[i]) for i in 1:N] - - #second order upwind + diffusion + source - D(T[1]) ~ u / dx * (inlet.T - T[1]) + Dxx * (T[2] - T[1]) / dx^2 + S[1] / (C[1] - C_shift) - D(T[2]) ~ u / dx * (c[1] * inlet.T - sum(c) * T[1] + c[2] * T[2] + c[3] * T[3]) + Dxx * (T[1] - 2 * T[2] + T[3]) / dx^2 + S[2] / (C[2] - C_shift) - [D(T[i]) ~ u / dx * (c[1] * T[i-2] - sum(c) * T[i-1] + c[2] * T[i] + c[3] * T[i+1]) + Dxx * (T[i-1] - 2 * T[i] + T[i+1]) / dx^2 + S[i] / (C[i] - C_shift) for i in 3:N-1] - D(T[N]) ~ u / dx * (T[N-1] - T[N]) + Dxx * (T[N-1] - T[N]) / dx^2 + S[N] / (C[N] - C_shift) - ] - - ODESystem(eqs, t, sts, p; systems=[inlet, outlet, heatport], name=name) +function FluidRegion(; name, L = 1.0, dn = 0.05, N = 100, T0 = 0.0, + lumped_T = 50, diffusion = true, e = 1e-4) + @named inlet = FluidPort() + @named outlet = FluidPort() + @named heatport = VectorHeatPort(N = N) + + dx = L / N + c = [-1 / 8, -3 / 8, -3 / 8] # advection stencil coefficients + A = pi * dn^2 / 4 + + p = @parameters C_shift=0.0 Rw=0.0 # stuff for latter + @variables begin + (T(t))[1:N] = fill(T0, N) + Twall(t)[1:N] = fill(T0, N) + (S(t))[1:N] = fill(T0, N) + (C(t))[1:N] = fill(1.0, N) + u(t) = 1e-6 + Re(t) = 1000.0 + Dxx(t) = 0.0 + Pr(t) = 1.0 + alpha(t) = 1.0 + f(t) = 1.0 + end + + sts = vcat(T, Twall, S, C, Num[u], Num[Re], Num[Dxx], Num[Pr], Num[alpha], Num[f]) + + eqs = Equation[Re ~ 0.1 + dn * abs(u) / kin_visc_T(lumped_T) + Pr ~ Pr_T(lumped_T) + f ~ Churchill_f(Re, e, dn) #Darcy-weisbach + alpha ~ Nusselt(Re, Pr, f) * lambda_T(lumped_T) / dn + Dxx ~ diffusion * Dxx_coeff(u, dn, lumped_T) + inlet.m ~ -outlet.m + inlet.p ~ outlet.p + inlet.T ~ instream(inlet.T) + outlet.T ~ T[N] + u ~ inlet.m / rho_T(inlet.T) / A + [C[i] ~ dx * A * rhocp_T(T[i]) for i in 1:N] + [S[i] ~ heatport.Q[i] for i in 1:N] + [Twall[i] ~ heatport.T[i] for i in 1:N] + + #source term + [S[i] ~ + (1 / (1 / (alpha * dn * pi * dx) + abs(Rw / 1000))) * (Twall[i] - T[i]) + for i in 1:N] + + #second order upwind + diffusion + source + D(T[1]) ~ + u / dx * (inlet.T - T[1]) + Dxx * (T[2] - T[1]) / dx^2 + + S[1] / (C[1] - C_shift) + D(T[2]) ~ + u / dx * (c[1] * inlet.T - sum(c) * T[1] + c[2] * T[2] + c[3] * T[3]) + + Dxx * (T[1] - 2 * T[2] + T[3]) / dx^2 + S[2] / (C[2] - C_shift) + [D(T[i]) ~ + u / dx * + (c[1] * T[i - 2] - sum(c) * T[i - 1] + c[2] * T[i] + c[3] * T[i + 1]) + + Dxx * (T[i - 1] - 2 * T[i] + T[i + 1]) / dx^2 + S[i] / (C[i] - C_shift) + for i in 3:(N - 1)] + D(T[N]) ~ + u / dx * (T[N - 1] - T[N]) + Dxx * (T[N - 1] - T[N]) / dx^2 + + S[N] / (C[N] - C_shift)] + + ODESystem(eqs, t, sts, p; systems = [inlet, outlet, heatport], name = name) end @register_symbolic Cn_circular_wall_inner(d, D, cp, ρ) function Cn_circular_wall_inner(d, D, cp, ρ) - C = pi / 4 * (D^2 - d^2) * cp * ρ - return C / 2 + C = pi / 4 * (D^2 - d^2) * cp * ρ + return C / 2 end @register_symbolic Cn_circular_wall_outer(d, D, cp, ρ) function Cn_circular_wall_outer(d, D, cp, ρ) - C = pi / 4 * (D^2 - d^2) * cp * ρ - return C / 2 + C = pi / 4 * (D^2 - d^2) * cp * ρ + return C / 2 end @register_symbolic Ke_circular_wall(d, D, λ) function Ke_circular_wall(d, D, λ) - 2 * pi * λ / log(D / d) + 2 * pi * λ / log(D / d) end -function CircularWallFEM(; name, L=100, N=10, d=0.05, t_layer=[0.002], - λ=[50], cp=[500], ρ=[7850], T0=0.0) - @named inner_heatport = VectorHeatPort(N=N) - @named outer_heatport = VectorHeatPort(N=N) - dx = L / N - Ne = length(t_layer) - Nn = Ne + 1 - dn = vcat(d, d .+ 2.0 .* cumsum(t_layer)) - Cn = zeros(Nn) - Cn[1:Ne] += Cn_circular_wall_inner.(dn[1:Ne], dn[2:Nn], cp, ρ) .* dx - Cn[2:Nn] += Cn_circular_wall_outer.(dn[1:Ne], dn[2:Nn], cp, ρ) .* dx - p = @parameters C_shift = 0.0 - Ke = Ke_circular_wall.(dn[1:Ne], dn[2:Nn], λ) .* dx - @variables begin - (Tn(t))[1:N, 1:Nn] = fill(T0, N, Nn) - (Qe(t))[1:N, 1:Ne] = fill(T0, N, Ne) - end - sts = [vec(Tn); vec(Qe)] - e0 = Equation[inner_heatport.T[i] ~ Tn[i, 1] for i in 1:N] - e1 = Equation[outer_heatport.T[i] ~ Tn[i, Nn] for i in 1:N] - e2 = Equation[Qe[i, j] ~ Ke[j] * (-Tn[i, j+1] + Tn[i, j]) for i in 1:N for j in 1:Ne] - e3 = Equation[D(Tn[i, 1]) * (Cn[1] + C_shift) ~ inner_heatport.Q[i] - Qe[i, 1] for i in 1:N] - e4 = Equation[D(Tn[i, j]) * Cn[j] ~ Qe[i, j-1] - Qe[i, j] for i in 1:N for j in 2:Nn-1] - e5 = Equation[D(Tn[i, Nn]) * Cn[Nn] ~ Qe[i, Ne] + outer_heatport.Q[i] for i in 1:N] - eqs = vcat(e0, e1, e2, e3, e4, e5) - ODESystem(eqs, t, sts, p; systems=[inner_heatport, outer_heatport], name=name) +function CircularWallFEM(; name, L = 100, N = 10, d = 0.05, t_layer = [0.002], + λ = [50], cp = [500], ρ = [7850], T0 = 0.0) + @named inner_heatport = VectorHeatPort(N = N) + @named outer_heatport = VectorHeatPort(N = N) + dx = L / N + Ne = length(t_layer) + Nn = Ne + 1 + dn = vcat(d, d .+ 2.0 .* cumsum(t_layer)) + Cn = zeros(Nn) + Cn[1:Ne] += Cn_circular_wall_inner.(dn[1:Ne], dn[2:Nn], cp, ρ) .* dx + Cn[2:Nn] += Cn_circular_wall_outer.(dn[1:Ne], dn[2:Nn], cp, ρ) .* dx + p = @parameters C_shift = 0.0 + Ke = Ke_circular_wall.(dn[1:Ne], dn[2:Nn], λ) .* dx + @variables begin + (Tn(t))[1:N, 1:Nn] = fill(T0, N, Nn) + (Qe(t))[1:N, 1:Ne] = fill(T0, N, Ne) + end + sts = [vec(Tn); vec(Qe)] + e0 = Equation[inner_heatport.T[i] ~ Tn[i, 1] for i in 1:N] + e1 = Equation[outer_heatport.T[i] ~ Tn[i, Nn] for i in 1:N] + e2 = Equation[Qe[i, j] ~ Ke[j] * (-Tn[i, j + 1] + Tn[i, j]) for i in 1:N for j in 1:Ne] + e3 = Equation[D(Tn[i, 1]) * (Cn[1] + C_shift) ~ inner_heatport.Q[i] - Qe[i, 1] + for i in 1:N] + e4 = Equation[D(Tn[i, j]) * Cn[j] ~ Qe[i, j - 1] - Qe[i, j] for i in 1:N + for j in 2:(Nn - 1)] + e5 = Equation[D(Tn[i, Nn]) * Cn[Nn] ~ Qe[i, Ne] + outer_heatport.Q[i] for i in 1:N] + eqs = vcat(e0, e1, e2, e3, e4, e5) + ODESystem(eqs, t, sts, p; systems = [inner_heatport, outer_heatport], name = name) end -function CylindricalSurfaceConvection(; name, L=100, N=100, d=1.0, α=5.0) - dx = L / N - S = pi * d * dx - @named heatport = VectorHeatPort(N=N) - sts = @variables Tenv(t) = 0.0 - eqs = [ - Tenv ~ 18.0 - [heatport.Q[i] ~ α * S * (heatport.T[i] - Tenv) for i in 1:N] - ] - - ODESystem(eqs, t, sts, []; systems=[heatport], name=name) +function CylindricalSurfaceConvection(; name, L = 100, N = 100, d = 1.0, α = 5.0) + dx = L / N + S = pi * d * dx + @named heatport = VectorHeatPort(N = N) + sts = @variables Tenv(t) = 0.0 + eqs = [Tenv ~ 18.0 + [heatport.Q[i] ~ α * S * (heatport.T[i] - Tenv) for i in 1:N]] + + ODESystem(eqs, t, sts, []; systems = [heatport], name = name) end -function PreinsulatedPipe(; name, L=100.0, N=100.0, dn=0.05, T0=0.0, t_layer=[0.004, 0.013], - λ=[50, 0.04], cp=[500, 1200], ρ=[7800, 40], α=5.0, - e=1e-4, lumped_T=50, diffusion=true) - @named inlet = FluidPort() - @named outlet = FluidPort() - @named fluid_region = FluidRegion(L=L, N=N, dn=dn, e=e, lumped_T=lumped_T, diffusion=diffusion) - @named shell = CircularWallFEM(L=L, N=N, d=dn, t_layer=t_layer, λ=λ, cp=cp, ρ=ρ) - @named surfconv = CylindricalSurfaceConvection(L=L, N=N, d=dn + 2.0 * sum(t_layer), α=α) - systems = [fluid_region, shell, inlet, outlet, surfconv] - eqs = [ - connect(fluid_region.inlet, inlet) - connect(fluid_region.outlet, outlet) - connect(fluid_region.heatport, shell.inner_heatport) - connect(shell.outer_heatport, surfconv.heatport) - ] - ODESystem(eqs, t, [], []; systems=systems, name=name) +function PreinsulatedPipe(; + name, L = 100.0, N = 100.0, dn = 0.05, T0 = 0.0, t_layer = [0.004, 0.013], + λ = [50, 0.04], cp = [500, 1200], ρ = [7800, 40], α = 5.0, + e = 1e-4, lumped_T = 50, diffusion = true) + @named inlet = FluidPort() + @named outlet = FluidPort() + @named fluid_region = FluidRegion( + L = L, N = N, dn = dn, e = e, lumped_T = lumped_T, diffusion = diffusion) + @named shell = CircularWallFEM( + L = L, N = N, d = dn, t_layer = t_layer, λ = λ, cp = cp, ρ = ρ) + @named surfconv = CylindricalSurfaceConvection(L = L, N = N, d = dn + + 2.0 * sum(t_layer), α = α) + systems = [fluid_region, shell, inlet, outlet, surfconv] + eqs = [connect(fluid_region.inlet, inlet) + connect(fluid_region.outlet, outlet) + connect(fluid_region.heatport, shell.inner_heatport) + connect(shell.outer_heatport, surfconv.heatport)] + ODESystem(eqs, t, [], []; systems = systems, name = name) end -function Source(; name, p_feed=100000) - @named outlet = FluidPort() - sts = @variables m_flow(t) = 1e-6 - eqs = [ - m_flow ~ m_flow_source(t) - outlet.m ~ -m_flow - outlet.p ~ p_feed - outlet.T ~ T_source(t) - ] - compose(ODESystem(eqs, t, sts, []; name=name), [outlet]) +function Source(; name, p_feed = 100000) + @named outlet = FluidPort() + sts = @variables m_flow(t) = 1e-6 + eqs = [m_flow ~ m_flow_source(t) + outlet.m ~ -m_flow + outlet.p ~ p_feed + outlet.T ~ T_source(t)] + compose(ODESystem(eqs, t, sts, []; name = name), [outlet]) end function Sink(; name) - @named inlet = FluidPort() - eqs = [ - inlet.T ~ instream(inlet.T) - ] - compose(ODESystem(eqs, t, [], []; name=name), [inlet]) + @named inlet = FluidPort() + eqs = [ + inlet.T ~ instream(inlet.T) + ] + compose(ODESystem(eqs, t, [], []; name = name), [inlet]) end -function TestBenchPreinsulated(; name, L=1.0, dn=0.05, t_layer=[0.0056, 0.013], N=100, diffusion=true, lumped_T=20) - @named pipe = PreinsulatedPipe(L=L, dn=dn, N=N, diffusion=diffusion, t_layer=t_layer, lumped_T=lumped_T) - @named source = Source() - @named sink = Sink() - subs = [source, pipe, sink] - eqs = [ - connect(source.outlet, pipe.inlet) - connect(pipe.outlet, sink.inlet) - ] - compose(ODESystem(eqs, t, [], []; name=name), subs) +function TestBenchPreinsulated(; name, L = 1.0, dn = 0.05, t_layer = [0.0056, 0.013], + N = 100, diffusion = true, lumped_T = 20) + @named pipe = PreinsulatedPipe(L = L, dn = dn, N = N, diffusion = diffusion, + t_layer = t_layer, lumped_T = lumped_T) + @named source = Source() + @named sink = Sink() + subs = [source, pipe, sink] + eqs = [connect(source.outlet, pipe.inlet) + connect(pipe.outlet, sink.inlet)] + compose(ODESystem(eqs, t, [], []; name = name), subs) end function build_system(fsys, N) - N >= 4 || throw("Problem sizes smaller than 4 not supported; received $N.") - @named testbench = TestBenchPreinsulated(; L=470, N, dn=0.3127, t_layer=[0.0056, 0.058]) - t0 = time() - sys = structural_simplify(fsys(testbench)) - return time() - t0, sys + N >= 4 || throw("Problem sizes smaller than 4 not supported; received $N.") + @named testbench = TestBenchPreinsulated(; L = 470, N, dn = 0.3127, t_layer = [ + 0.0056, 0.058]) + t0 = time() + sys = structural_simplify(fsys(testbench)) + return time() - t0, sys end -function compile_run_problem(sys; target=JuliaSimCompiler.JuliaTarget(), solver=FBDF(;autodiff = target===JuliaSimCompiler.JuliaTarget()), duref=nothing) - tspan = (0.0, 19 * 3600.0) - t0 = time() - prob = if target === JuliaSimCompiler.JuliaTarget() - ODEProblem(sys, [], tspan; sparse = true) - else - ODEProblem(sys, target, [], tspan; sparse = true) - end - (; f, u0, p) = prob - fill!(u0, 12.0) - ff = f.f - du = similar(u0) - ff(du, u0, p, 0.0) - t_fode = time() - t0 - duref === nothing || @assert duref ≈ du - t_run = @belapsed $ff($du, $u0, $p, 0.0) - t_solve = @elapsed sol = solve(prob, solver; reltol=1e-6, abstol=1e-6, saveat=100) - @assert SciMLBase.successful_retcode(sol) - (t_fode, t_run, t_solve), du +function compile_run_problem(sys; target = JuliaSimCompiler.JuliaTarget(), + solver = FBDF(; autodiff = target===JuliaSimCompiler.JuliaTarget()), + duref = nothing) + tspan = (0.0, 19 * 3600.0) + t0 = time() + prob = if target === JuliaSimCompiler.JuliaTarget() + ODEProblem(sys, [], tspan; sparse = true) + else + ODEProblem(sys, target, [], tspan; sparse = true) + end + (; f, u0, p) = prob + fill!(u0, 12.0) + ff = f.f + du = similar(u0) + ff(du, u0, p, 0.0) + t_fode = time() - t0 + duref === nothing || @assert duref ≈ du + t_run = @belapsed $ff($du, $u0, $p, 0.0) + t_solve = @elapsed sol = solve(prob, solver; reltol = 1e-6, abstol = 1e-6, saveat = 100) + @assert SciMLBase.successful_retcode(sol) + (t_fode, t_run, t_solve), du end const C = JuliaSimCompiler.CTarget(); const LLVM = JuliaSimCompiler.llvm.LLVMTarget(); function run_and_time_julia!(ss_times, times, max_sizes, i, N) - @named testbench = TestBenchPreinsulated(L=470, N=N, dn=0.3127, t_layer=[0.0056, 0.058]) - if N <= max_sizes[1] - ss_times[i, 1] = @elapsed sys_mtk = structural_simplify(testbench) - times[i, 1], _ = compile_run_problem(sys_mtk) - end - ss_times[i, 2] = @elapsed sys_jsir_scalar = structural_simplify(IRSystem(testbench), loop=false) - oderef = daeref = nothing - N <= max_sizes[2] && ((times[i, 2], oderef) = compile_run_problem(sys_jsir_scalar; duref = oderef)) - N <= max_sizes[3] && ((times[i, 3], oderef) = compile_run_problem(sys_jsir_scalar; target=C, duref = oderef)) - N <= max_sizes[4] && ((times[i, 4], oderef) = compile_run_problem(sys_jsir_scalar; target=LLVM, duref = oderef)) - for j = 1:4 - ss_time = ss_times[i, 1 + (j>1)] - t_fode, t_run, t_solve = times[i, j] - total_times[i, j] = ss_time + t_fode + t_solve - end + @named testbench = TestBenchPreinsulated(L = 470, N = N, dn = 0.3127, t_layer = [ + 0.0056, 0.058]) + if N <= max_sizes[1] + ss_times[i, 1] = @elapsed sys_mtk = structural_simplify(testbench) + times[i, 1], _ = compile_run_problem(sys_mtk) + end + ss_times[i, 2] = @elapsed sys_jsir_scalar = structural_simplify(IRSystem(testbench), loop = false) + oderef = daeref = nothing + N <= max_sizes[2] && + ((times[i, 2], oderef) = compile_run_problem(sys_jsir_scalar; duref = oderef)) + N <= max_sizes[3] && ((times[i, 3], + oderef) = compile_run_problem(sys_jsir_scalar; target = C, duref = oderef)) + N <= max_sizes[4] && ((times[i, 4], + oderef) = compile_run_problem(sys_jsir_scalar; target = LLVM, duref = oderef)) + for j in 1:4 + ss_time = ss_times[i, 1 + (j > 1)] + t_fode, t_run, t_solve = times[i, j] + total_times[i, j] = ss_time + t_fode + t_solve + end end ``` @@ -308,7 +330,7 @@ max_sizes = [480, last(N), last(N), last(N), last(N)]; # NaN-initialize so Makie will ignore incomplete ss_times = fill(NaN, length(N), 2); # more indepth Julia-times -times = fill((NaN,NaN,NaN), length(N), length(max_sizes) - 1); +times = fill((NaN, NaN, NaN), length(N), length(max_sizes) - 1); # all times, including Dymola total_times = fill(NaN, length(N), length(max_sizes) + 1); # +1 for Dymola ``` @@ -318,7 +340,7 @@ total_times = fill(NaN, length(N), length(max_sizes) + 1); # +1 for Dymola ```julia @time run_and_time_julia!(ss_times, times, max_sizes, 1, 4); # precompile for (i, n) in enumerate(N) - @time run_and_time_julia!(ss_times, times, max_sizes, i, n) + @time run_and_time_julia!(ss_times, times, max_sizes, i, n) end ``` @@ -370,33 +392,32 @@ translation_and_total_times = [1.802 1.921 9.707 14.393 11.411 17.752 15.094 27.268] -total_times[:, 6] = translation_and_total_times[1:length(N),2] +total_times[:, 6] = translation_and_total_times[1:length(N), 2] ``` ## Generate Final Plots ```julia -f = Figure(size=(800,1200)); +f = Figure(size = (800, 1200)); ss_names = ["MTK", "JSIR"]; -let ax = Axis(f[1, 1]; yscale = log10, xscale = log10, title="Structural Simplify Time") - _lines = map(eachcol(ss_times)) do ts - lines!(N, ts) - end - Legend(f[1,2], _lines, ss_names) +let ax = Axis(f[1, 1]; yscale = log10, xscale = log10, title = "Structural Simplify Time") + _lines = map(eachcol(ss_times)) do ts + lines!(N, ts) + end + Legend(f[1, 2], _lines, ss_names) end method_names = ["MTK", "JSIR - Julia", "JSIR - C", "JSIR - LLVM"]; for (i, timecat) in enumerate(("ODEProblem + f!", "Run", "Solve")) - title = timecat * " Time" - ax = Axis(f[i+1, 1]; yscale = log10, xscale = log10, title) - _lines = map(eachcol(times)) do ts - lines!(N, getindex.(ts, i)) - end - Legend(f[i+1, 2], _lines, method_names) + title = timecat * " Time" + ax = Axis(f[i + 1, 1]; yscale = log10, xscale = log10, title) + _lines = map(eachcol(times)) do ts + lines!(N, getindex.(ts, i)) + end + Legend(f[i + 1, 2], _lines, method_names) end f ``` - ```julia f2 = Figure(size = (800, 400)); title = "Total Time: Thermal Fluid Benchmark" @@ -406,7 +427,7 @@ _lines = map(enumerate(names)) do (j, label) ts = @view(total_times[:, j]) lines!(N_states, ts) end -Legend(f2[1,2], _lines, names) +Legend(f2[1, 2], _lines, names) f2 ``` @@ -414,5 +435,5 @@ f2 ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/MultiLanguage/ode_wrapper_packages.jmd b/benchmarks/MultiLanguage/ode_wrapper_packages.jmd index a6da91baf..171de78e8 100644 --- a/benchmarks/MultiLanguage/ode_wrapper_packages.jmd +++ b/benchmarks/MultiLanguage/ode_wrapper_packages.jmd @@ -11,12 +11,12 @@ Julia 1.7, MATLAB 2019B, deSolve 1.3.0, and SciPy 1.6.1. These benchmarks are generated using the following bindings: -- [MATLABDiffEq.jl](https://github.com/JuliaDiffEq/MATLABDiffEq.jl) (MATLAB) -- [SciPyDiffEq.jl](https://github.com/JuliaDiffEq/SciPyDiffEq.jl) (SciPy) -- [deSolveDiffEq.jl](https://github.com/JuliaDiffEq/deSolveDiffEq.jl) (deSolve) -- [OrdinaryDiffEq.jl](https://github.com/JuliaDiffEq/OrdinaryDiffEq.jl) (OrdinaryDiffEq.jl) -- [Sundials.jl](https://github.com/JuliaDiffEq/Sundials.jl) (Sundials) -- [ODEInterfaceDiffEq.jl](https://github.com/JuliaDiffEq/ODEInterfaceDiffEq.jl) (Hairer and Netlib) + - [MATLABDiffEq.jl](https://github.com/JuliaDiffEq/MATLABDiffEq.jl) (MATLAB) + - [SciPyDiffEq.jl](https://github.com/JuliaDiffEq/SciPyDiffEq.jl) (SciPy) + - [deSolveDiffEq.jl](https://github.com/JuliaDiffEq/deSolveDiffEq.jl) (deSolve) + - [OrdinaryDiffEq.jl](https://github.com/JuliaDiffEq/OrdinaryDiffEq.jl) (OrdinaryDiffEq.jl) + - [Sundials.jl](https://github.com/JuliaDiffEq/Sundials.jl) (Sundials) + - [ODEInterfaceDiffEq.jl](https://github.com/JuliaDiffEq/ODEInterfaceDiffEq.jl) (Hairer and Netlib) The respective repos verify negligible overhead on interop (MATLAB, ODEInterface, and Sundials overhead are negligible, SciPy is accelerated 3x over SciPy+Numba @@ -39,20 +39,19 @@ using LinearAlgebra, StaticArrays ```julia f = @ode_def_bare LotkaVolterra begin - dx = a*x - b*x*y - dy = -c*y + d*x*y + dx = a*x - b*x*y + dy = -c*y + d*x*y end a b c d -p = [1.5,1,3,1] -tspan = (0.0,10.0) -u0 = [1.0,1.0] -prob = ODEProblem(f,u0,tspan,p) -staticprob = ODEProblem{false}(f,SVector{2}(u0),tspan,SVector{4}(p)) +p = [1.5, 1, 3, 1] +tspan = (0.0, 10.0) +u0 = [1.0, 1.0] +prob = ODEProblem(f, u0, tspan, p) +staticprob = ODEProblem{false}(f, SVector{2}(u0), tspan, SVector{4}(p)) -sol = solve(prob,Vern7(),abstol=1/10^14,reltol=1/10^14) +sol = solve(prob, Vern7(), abstol = 1/10^14, reltol = 1/10^14) test_sol = TestSolution(sol) -setups = [ - Dict(:alg=>DP5()) +setups = [Dict(:alg=>DP5()) Dict(:alg=>Tsit5()) Dict(:alg=>Vern7()) Dict(:prob_choice => 2, :alg=>DP5()) @@ -66,55 +65,52 @@ setups = [ Dict(:alg=>SciPyDiffEq.odeint()) Dict(:alg=>deSolveDiffEq.lsoda()) Dict(:alg=>deSolveDiffEq.ode45()) - Dict(:alg=>CVODE_Adams()) - ] - -labels = [ - "Julia: DP5" - "Julia: Tsit5" - "Julia: Vern7" - "Julia: DP5 Static" - "Julia: Tsit5 Static" - "Julia: Vern7 Static" - "Hairer: dopri5" - "MATLAB: ode45" - "MATLAB: ode113" - "SciPy: RK45" - "SciPy: LSODA" - "SciPy: odeint" - "deSolve: lsoda" - "deSolve: ode45" - "Sundials: Adams" - ] + Dict(:alg=>CVODE_Adams())] + +labels = ["Julia: DP5" + "Julia: Tsit5" + "Julia: Vern7" + "Julia: DP5 Static" + "Julia: Tsit5 Static" + "Julia: Vern7 Static" + "Hairer: dopri5" + "MATLAB: ode45" + "MATLAB: ode113" + "SciPy: RK45" + "SciPy: LSODA" + "SciPy: odeint" + "deSolve: lsoda" + "deSolve: ode45" + "Sundials: Adams"] abstols = 1.0 ./ 10.0 .^ (6:13) reltols = 1.0 ./ 10.0 .^ (3:10) -wp = WorkPrecisionSet([prob,staticprob],abstols,reltols,setups; - names = labels,print_names = true, - appxsol=[test_sol,test_sol],dense=false, - save_everystep=false,numruns=100,maxiters=10000000, - timeseries_errors=false,verbose=false) -plot(wp,title="Non-stiff 1: Lotka-Volterra",legend=:outertopleft, - color=permutedims([repeat([:LightGreen],3)...,repeat([:DarkGreen],3)..., - :Red,repeat([:Orange],2)...,repeat([:Yellow],3)..., - repeat([:Blue],2)...,:Purple]),size = (800,350), - xticks = 10.0 .^ (-12:1:5), - yticks = 10.0 .^ (-6:0.5:5), - bottom_margin=5Plots.mm) +wp = WorkPrecisionSet([prob, staticprob], abstols, reltols, setups; + names = labels, print_names = true, + appxsol = [test_sol, test_sol], dense = false, + save_everystep = false, numruns = 100, maxiters = 10000000, + timeseries_errors = false, verbose = false) +plot(wp, title = "Non-stiff 1: Lotka-Volterra", legend = :outertopleft, + color = permutedims([repeat([:LightGreen], 3)..., repeat([:DarkGreen], 3)..., + :Red, repeat([:Orange], 2)..., repeat([:Yellow], 3)..., + repeat([:Blue], 2)..., :Purple]), size = (800, 350), + xticks = 10.0 .^ (-12:1:5), + yticks = 10.0 .^ (-6:0.5:5), + bottom_margin = 5Plots.mm) ``` #### Non-Stiff Problem 2: Rigid Body ```julia f = @ode_def_bare RigidBodyBench begin - dy1 = -2*y2*y3 - dy2 = 1.25*y1*y3 - dy3 = -0.5*y1*y2 + 0.25*sin(t)^2 + dy1 = -2*y2*y3 + dy2 = 1.25*y1*y3 + dy3 = -0.5*y1*y2 + 0.25*sin(t)^2 end -u0 = [1.0;0.0;0.9] -prob = ODEProblem(f,u0,(0.0,100.0)) -staticprob = ODEProblem{false}(f,SVector{3}(u0),(0.0,100.0)) -sol = solve(prob,Vern7(),abstol=1/10^14,reltol=1/10^14) +u0 = [1.0; 0.0; 0.9] +prob = ODEProblem(f, u0, (0.0, 100.0)) +staticprob = ODEProblem{false}(f, SVector{3}(u0), (0.0, 100.0)) +sol = solve(prob, Vern7(), abstol = 1/10^14, reltol = 1/10^14) test_sol = TestSolution(sol) setups = [Dict(:alg=>DP5()) @@ -131,57 +127,54 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>SciPyDiffEq.odeint()) Dict(:alg=>deSolveDiffEq.lsoda()) Dict(:alg=>deSolveDiffEq.ode45()) - Dict(:alg=>CVODE_Adams()) - ] - -labels = [ - "Julia: DP5" - "Julia: Tsit5" - "Julia: Vern7" - "Julia: DP5 Static" - "Julia: Tsit5 Static" - "Julia: Vern7 Static" - "Hairer: dopri5" - "MATLAB: ode45" - "MATLAB: ode113" - "SciPy: RK45" - "SciPy: LSODA" - "SciPy: odeint" - "deSolve: lsoda" - "deSolve: ode45" - "Sundials: Adams" - ] + Dict(:alg=>CVODE_Adams())] + +labels = ["Julia: DP5" + "Julia: Tsit5" + "Julia: Vern7" + "Julia: DP5 Static" + "Julia: Tsit5 Static" + "Julia: Vern7 Static" + "Hairer: dopri5" + "MATLAB: ode45" + "MATLAB: ode113" + "SciPy: RK45" + "SciPy: LSODA" + "SciPy: odeint" + "deSolve: lsoda" + "deSolve: ode45" + "Sundials: Adams"] abstols = 1.0 ./ 10.0 .^ (6:13) reltols = 1.0 ./ 10.0 .^ (3:10) -wp = WorkPrecisionSet([prob,staticprob],abstols,reltols,setups; - names = labels,print_names = true, - appxsol=[test_sol,test_sol],dense=false, - save_everystep=false,numruns=100,maxiters=10000000, - timeseries_errors=false,verbose=false) -plot(wp,title="Non-stiff 2: Rigid-Body",legend=:outertopleft, - color=permutedims([repeat([:LightGreen],3)...,repeat([:DarkGreen],3)..., - :Red,repeat([:Orange],2)...,repeat([:Yellow],3)..., - repeat([:Blue],2)...,:Purple]),size = (800,350), +wp = WorkPrecisionSet([prob, staticprob], abstols, reltols, setups; + names = labels, print_names = true, + appxsol = [test_sol, test_sol], dense = false, + save_everystep = false, numruns = 100, maxiters = 10000000, + timeseries_errors = false, verbose = false) +plot(wp, title = "Non-stiff 2: Rigid-Body", legend = :outertopleft, + color = permutedims([repeat([:LightGreen], 3)..., repeat([:DarkGreen], 3)..., + :Red, repeat([:Orange], 2)..., repeat([:Yellow], 3)..., + repeat([:Blue], 2)..., :Purple]), size = (800, 350), xticks = 10.0 .^ (-12:1:5), yticks = 10.0 .^ (-6:0.5:5), - bottom_margin=5Plots.mm) + bottom_margin = 5Plots.mm) ``` #### Stiff Problem 1: ROBER ```julia rober = @ode_def begin - dy₁ = -k₁*y₁+k₃*y₂*y₃ - dy₂ = k₁*y₁-k₂*y₂^2-k₃*y₂*y₃ - dy₃ = k₂*y₂^2 + dy₁ = -k₁*y₁+k₃*y₂*y₃ + dy₂ = k₁*y₁-k₂*y₂^2-k₃*y₂*y₃ + dy₃ = k₂*y₂^2 end k₁ k₂ k₃ -u0 = [1.0,0.0,0.0] -p = [0.04,3e7,1e4] -prob = ODEProblem(rober,u0,(0.0,1e5),p) -staticprob = ODEProblem{false}(rober,SVector{3}(u0),(0.0,1e5),SVector{3}(p)) -sol = solve(prob,CVODE_BDF(),abstol=1/10^14,reltol=1/10^14) +u0 = [1.0, 0.0, 0.0] +p = [0.04, 3e7, 1e4] +prob = ODEProblem(rober, u0, (0.0, 1e5), p) +staticprob = ODEProblem{false}(rober, SVector{3}(u0), (0.0, 1e5), SVector{3}(p)) +sol = solve(prob, CVODE_BDF(), abstol = 1/10^14, reltol = 1/10^14) test_sol = TestSolution(sol) abstols = 1.0 ./ 10.0 .^ (7:12) @@ -201,63 +194,60 @@ setups = [Dict(:alg=>Rosenbrock23()) Dict(:alg=>SciPyDiffEq.BDF()) Dict(:alg=>SciPyDiffEq.odeint()) Dict(:alg=>deSolveDiffEq.lsoda()) - Dict(:alg=>CVODE_BDF()) - ] - -labels = [ - "Julia: Rosenbrock23" - "Julia: Rodas4" - "Julia: Rodas5" - "Julia: Rosenbrock23 Static" - "Julia: Rodas4 Static" - "Julia: Rodas5 Static" - "Hairer: rodas" - "Hairer: radau" - "MATLAB: ode23s" - "MATLAB: ode15s" - "SciPy: LSODA" - "SciPy: BDF" - "SciPy: odeint" - "deSolve: lsoda" - "Sundials: CVODE" - ] - -wp = WorkPrecisionSet([prob,staticprob],abstols,reltols,setups; - names = labels,print_names = true, - dense=false,verbose = false, - save_everystep=false,appxsol=[test_sol,test_sol], - maxiters=Int(1e5)) -plot(wp,title="Stiff 1: ROBER", legend=:outertopleft, - color=permutedims([repeat([:LightGreen],3)...,repeat([:DarkGreen],3)..., - :Red,:Red,repeat([:Orange],2)...,repeat([:Yellow],3)..., - repeat([:Blue],1)...,:Purple]),size = (800,350), - xticks = 10.0 .^ (-12:1:5), - yticks = 10.0 .^ (-6:0.5:5), - bottom_margin=5Plots.mm) + Dict(:alg=>CVODE_BDF())] + +labels = ["Julia: Rosenbrock23" + "Julia: Rodas4" + "Julia: Rodas5" + "Julia: Rosenbrock23 Static" + "Julia: Rodas4 Static" + "Julia: Rodas5 Static" + "Hairer: rodas" + "Hairer: radau" + "MATLAB: ode23s" + "MATLAB: ode15s" + "SciPy: LSODA" + "SciPy: BDF" + "SciPy: odeint" + "deSolve: lsoda" + "Sundials: CVODE"] + +wp = WorkPrecisionSet([prob, staticprob], abstols, reltols, setups; + names = labels, print_names = true, + dense = false, verbose = false, + save_everystep = false, appxsol = [test_sol, test_sol], + maxiters = Int(1e5)) +plot(wp, title = "Stiff 1: ROBER", legend = :outertopleft, + color = permutedims([repeat([:LightGreen], 3)..., repeat([:DarkGreen], 3)..., + :Red, :Red, repeat([:Orange], 2)..., repeat([:Yellow], 3)..., + repeat([:Blue], 1)..., :Purple]), size = (800, 350), + xticks = 10.0 .^ (-12:1:5), + yticks = 10.0 .^ (-6:0.5:5), + bottom_margin = 5Plots.mm) ``` #### Stiff Problem 2: HIRES ```julia f = @ode_def Hires begin - dy1 = -1.71*y1 + 0.43*y2 + 8.32*y3 + 0.0007 - dy2 = 1.71*y1 - 8.75*y2 - dy3 = -10.03*y3 + 0.43*y4 + 0.035*y5 - dy4 = 8.32*y2 + 1.71*y3 - 1.12*y4 - dy5 = -1.745*y5 + 0.43*y6 + 0.43*y7 - dy6 = -280.0*y6*y8 + 0.69*y4 + 1.71*y5 - - 0.43*y6 + 0.69*y7 - dy7 = 280.0*y6*y8 - 1.81*y7 - dy8 = -280.0*y6*y8 + 1.81*y7 + dy1 = -1.71*y1 + 0.43*y2 + 8.32*y3 + 0.0007 + dy2 = 1.71*y1 - 8.75*y2 + dy3 = -10.03*y3 + 0.43*y4 + 0.035*y5 + dy4 = 8.32*y2 + 1.71*y3 - 1.12*y4 + dy5 = -1.745*y5 + 0.43*y6 + 0.43*y7 + dy6 = -280.0*y6*y8 + 0.69*y4 + 1.71*y5 - + 0.43*y6 + 0.69*y7 + dy7 = 280.0*y6*y8 - 1.81*y7 + dy8 = -280.0*y6*y8 + 1.81*y7 end u0 = zeros(8) u0[1] = 1 u0[8] = 0.0057 -prob = ODEProblem(f,u0,(0.0,321.8122)) -staticprob = ODEProblem{false}(f,SVector{8}(u0),(0.0,321.8122)) +prob = ODEProblem(f, u0, (0.0, 321.8122)) +staticprob = ODEProblem{false}(f, SVector{8}(u0), (0.0, 321.8122)) -sol = solve(prob,Rodas5(),abstol=1/10^14,reltol=1/10^14) +sol = solve(prob, Rodas5(), abstol = 1/10^14, reltol = 1/10^14) test_sol = TestSolution(sol) abstols = 1.0 ./ 10.0 .^ (5:10) @@ -277,37 +267,34 @@ setups = [Dict(:alg=>Rosenbrock23()) Dict(:alg=>SciPyDiffEq.BDF()) Dict(:alg=>SciPyDiffEq.odeint()) Dict(:alg=>deSolveDiffEq.lsoda()) - Dict(:alg=>CVODE_BDF()) - ] - -labels = [ - "Julia: Rosenbrock23" - "Julia: Rodas4" - "Julia: radau" - "Julia: Rosenbrock23 Static" - "Julia: Rodas4 Static" - "Julia: radau Static" - "Hairer: rodas" - "Hairer: radau" - "MATLAB: ode23s" - "MATLAB: ode15s" - "SciPy: LSODA" - "SciPy: BDF" - "SciPy: odeint" - "deSolve: lsoda" - "Sundials: CVODE" - ] - -wp = WorkPrecisionSet([prob,staticprob],abstols,reltols,setups; - names = labels,print_names = true, - dense=false,verbose = false, - save_everystep=false,appxsol=[test_sol,test_sol], - maxiters=Int(1e5),numruns=100) -plot(wp,title="Stiff 2: Hires",legend=:outertopleft, - color=permutedims([repeat([:LightGreen],3)...,repeat([:DarkGreen],3)..., - :Red,:Red,repeat([:Orange],2)...,repeat([:Yellow],3)..., - repeat([:Blue],1)...,:Purple]),size = (800,350), - xticks = 10.0 .^ (-12:1:5), - yticks = 10.0 .^ (-6:0.5:5), - bottom_margin=5Plots.mm) + Dict(:alg=>CVODE_BDF())] + +labels = ["Julia: Rosenbrock23" + "Julia: Rodas4" + "Julia: radau" + "Julia: Rosenbrock23 Static" + "Julia: Rodas4 Static" + "Julia: radau Static" + "Hairer: rodas" + "Hairer: radau" + "MATLAB: ode23s" + "MATLAB: ode15s" + "SciPy: LSODA" + "SciPy: BDF" + "SciPy: odeint" + "deSolve: lsoda" + "Sundials: CVODE"] + +wp = WorkPrecisionSet([prob, staticprob], abstols, reltols, setups; + names = labels, print_names = true, + dense = false, verbose = false, + save_everystep = false, appxsol = [test_sol, test_sol], + maxiters = Int(1e5), numruns = 100) +plot(wp, title = "Stiff 2: Hires", legend = :outertopleft, + color = permutedims([repeat([:LightGreen], 3)..., repeat([:DarkGreen], 3)..., + :Red, :Red, repeat([:Orange], 2)..., repeat([:Yellow], 3)..., + repeat([:Blue], 1)..., :Purple]), size = (800, 350), + xticks = 10.0 .^ (-12:1:5), + yticks = 10.0 .^ (-6:0.5:5), + bottom_margin = 5Plots.mm) ``` diff --git a/benchmarks/NBodySimulator/acceleration_functions.jmd b/benchmarks/NBodySimulator/acceleration_functions.jmd index 93f78d3f0..451a98a44 100644 --- a/benchmarks/NBodySimulator/acceleration_functions.jmd +++ b/benchmarks/NBodySimulator/acceleration_functions.jmd @@ -16,21 +16,21 @@ function call. ```julia using BenchmarkTools, NBodySimulator -using NBodySimulator: gather_bodies_initial_coordinates, gather_accelerations_for_potentials, - gather_simultaneous_acceleration, gather_group_accelerations +using NBodySimulator: gather_bodies_initial_coordinates, + gather_accelerations_for_potentials, + gather_simultaneous_acceleration, gather_group_accelerations using StaticArrays const SUITE = BenchmarkGroup(); function acceleration(simulation) - (u0, v0, n) = gather_bodies_initial_coordinates(simulation) acceleration_functions = gather_accelerations_for_potentials(simulation) simultaneous_acceleration = gather_simultaneous_acceleration(simulation) function soode_system!(dv, v, u, p, t) - @inbounds for i = 1:n + @inbounds for i in 1:n a = MVector(0.0, 0.0, 0.0) for acceleration! in acceleration_functions acceleration!(a, u, v, t, i); @@ -66,7 +66,7 @@ let SUITE=SUITE u0, v0, n = gather_bodies_initial_coordinates(simulation) dv = zero(v0) - b = @benchmarkable $f(dv, $v0, $u0, $g_parameters, 0.) setup=(dv=zero($v0)) evals=1 + b = @benchmarkable $f(dv, $v0, $u0, $g_parameters, 0.0) setup=(dv=zero($v0)) evals=1 SUITE["gravitational"] = b end @@ -83,12 +83,12 @@ let SUITE=SUITE q = 1.0 count = 1 dL = L / (ceil(n^(1 / 3)) + 1) - for x = dL / 2:dL:L, y = dL / 2:dL:L, z = dL / 2:dL:L + for x in (dL / 2):dL:L, y in (dL / 2):dL:L, z in (dL / 2):dL:L if count > n break end r = SVector(x, y, z) - v = SVector(.0, .0, .0) + v = SVector(0.0, 0.0, 0.0) body = ChargedParticle(r, v, m, q) push!(bodies, body) count += 1 @@ -108,7 +108,7 @@ let SUITE=SUITE u0, v0, n = gather_bodies_initial_coordinates(simulation) dv = zero(v0) - b = @benchmarkable $f(dv, $v0, $u0, $potential, 0.) setup=(dv=zero($v0)) evals=1 + b = @benchmarkable $f(dv, $v0, $u0, $potential, 0.0) setup=(dv=zero($v0)) evals=1 SUITE["coulomb"] = b end @@ -124,12 +124,12 @@ let SUITE=SUITE m = 1.0 count = 1 dL = L / (ceil(n^(1 / 3)) + 1) - for x = dL / 2:dL:L, y = dL / 2:dL:L, z = dL / 2:dL:L + for x in (dL / 2):dL:L, y in (dL / 2):dL:L, z in (dL / 2):dL:L if count > n break end r = SVector(x, y, z) - v = SVector(.0, .0, .0) + v = SVector(0.0, 0.0, 0.0) mm = rand(SVector{3}) body = MagneticParticle(r, v, m, mm) push!(bodies, body) @@ -149,7 +149,7 @@ let SUITE=SUITE u0, v0, n = gather_bodies_initial_coordinates(simulation) dv = zero(v0) - b = @benchmarkable $f(dv, $v0, $u0, $parameters, 0.) setup=(dv=zero($v0)) evals=1 + b = @benchmarkable $f(dv, $v0, $u0, $parameters, 0.0) setup=(dv=zero($v0)) evals=1 SUITE["magnetic_dipole"] = b end @@ -186,7 +186,7 @@ let SUITE=SUITE u0, v0, n = gather_bodies_initial_coordinates(simulation) dv = zero(v0) - b = @benchmarkable $f(dv, $v0, $u0, $lj_parameters, 0.) setup=(dv=zero($v0)) evals=1 + b = @benchmarkable $f(dv, $v0, $u0, $lj_parameters, 0.0) setup=(dv=zero($v0)) evals=1 SUITE["lennard_jones"] = b end @@ -196,7 +196,6 @@ end ```julia function acceleration(simulation::NBodySimulation{<:WaterSPCFw}) - (u0, v0, n) = gather_bodies_initial_coordinates(simulation) (o_acelerations, h_acelerations) = gather_accelerations_for_potentials(simulation) @@ -204,21 +203,22 @@ function acceleration(simulation::NBodySimulation{<:WaterSPCFw}) simultaneous_acceleration = gather_simultaneous_acceleration(simulation) function soode_system!(dv, v, u, p, t) - @inbounds for i = 1:n + @inbounds for i in 1:n a = MVector(0.0, 0.0, 0.0) for acceleration! in o_acelerations acceleration!(a, u, v, t, 3 * (i - 1) + 1); end - dv[:, 3 * (i - 1) + 1] .= a + dv[:, 3 * (i - 1) + 1] .= a end @inbounds for i in 1:n, j in (2, 3) + a = MVector(0.0, 0.0, 0.0) for acceleration! in h_acelerations acceleration!(a, u, v, t, 3 * (i - 1) + j); end - dv[:, 3 * (i - 1) + j] .= a + dv[:, 3 * (i - 1) + j] .= a end - @inbounds for i = 1:n + @inbounds for i in 1:n for acceleration! in group_accelerations acceleration!(dv, u, v, t, i); end @@ -245,7 +245,7 @@ let SUITE=SUITE L = (mH2O*N/ρ)^(1/3) R = 0.9 # ~3*σOO Rel = 0.49*L - v_dev = sqrt(kb * T /mH2O) + v_dev = sqrt(kb * T / mH2O) τ = 0.5e-3 # ps t1 = 0τ t2 = 5τ # ps @@ -261,31 +261,34 @@ let SUITE=SUITE e_parameters = ElectrostaticParameters(k, Rel) spc_parameters = SPCFwParameters(rOH, ∠HOH, k_bond, k_angle) pbc = CubicPeriodicBoundaryConditions(L) - water = WaterSPCFw(bodies, mH, mO, qH, qO, jl_parameters, e_parameters, spc_parameters); + water = WaterSPCFw(bodies, mH, mO, qH, qO, jl_parameters, e_parameters, spc_parameters); simulation = NBodySimulation(water, (t1, t2), pbc, kb); f = acceleration(simulation) u0, v0, n = gather_bodies_initial_coordinates(simulation) dv = zero(v0) - b = @benchmarkable $f(dv, $v0, $u0, $spc_parameters, 0.) setup=(dv=zero($v0)) evals=1 + b = @benchmarkable $f(dv, $v0, $u0, $spc_parameters, 0.0) setup=(dv=zero($v0)) evals=1 SUITE["water_spcfw"] = b end ``` Here are the results of the benchmarks + ```julia r = run(SUITE) minimum(r) ``` + and + ```julia memory(r) ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NBodySimulator/liquid_argon.jmd b/benchmarks/NBodySimulator/liquid_argon.jmd index 4cfeb80b8..8ae6dd895 100644 --- a/benchmarks/NBodySimulator/liquid_argon.jmd +++ b/benchmarks/NBodySimulator/liquid_argon.jmd @@ -43,14 +43,18 @@ end In order to compare different integrating methods we will consider a fixed simulation time and change the timestep (or tolerances in the case of adaptive methods). + ```julia function benchmark(energyerr, rts, bytes, allocs, nt, nf, t, configs) simulation = setup(t) prob = SecondOrderODEProblem(simulation) for config in configs alg = config.alg - sol, rt, b, gc, memalloc = @timed solve(prob, alg(); - save_everystep=false, progress=true, progress_name="$alg", config...) + sol, rt, + b, + gc, + memalloc = @timed solve(prob, alg(); + save_everystep = false, progress = true, progress_name = "$alg", config...) result = NBodySimulator.SimulationResult(sol, simulation) ΔE = total_energy(result, t) - total_energy(result, 0) energyerr[alg] = ΔE @@ -62,7 +66,7 @@ function benchmark(energyerr, rts, bytes, allocs, nt, nf, t, configs) end end -function run_benchmark!(results, t, integrators, tol...; c=ones(length(integrators))) +function run_benchmark!(results, t, integrators, tol...; c = ones(length(integrators))) @progress "Benchmark at t=$t" for τ in zip(tol...) runtime = Dict() ΔE = Dict() @@ -74,10 +78,12 @@ function run_benchmark!(results, t, integrators, tol...; c=ones(length(integrato GC.gc() benchmark(ΔE, runtime, b, allocs, nt, nf, t, cfg) - get_tol(idx) = haskey(cfg[idx], :dt) ? cfg[idx].dt : (cfg[idx].abstol, cfg[idx].rtol) + get_tol(idx) = haskey(cfg[idx], :dt) ? cfg[idx].dt : + (cfg[idx].abstol, cfg[idx].rtol) - for (idx,i) in enumerate(integrators) - push!(results, [string(i), runtime[i], get_tol(idx)..., abs(ΔE[i]), nt[i], nf[i], c[idx]]) + for (idx, i) in enumerate(integrators) + push!(results, [ + string(i), runtime[i], get_tol(idx)..., abs(ΔE[i]), nt[i], nf[i], c[idx]]) end end return results @@ -85,6 +91,7 @@ end ``` We will consider symplectic integrators first + ```julia symplectic_integrators = [ VelocityVerlet, @@ -109,15 +116,16 @@ The calibration is based on running a simulation with equal tolerances for all solvers and then computing the cost as the runtime / number of timesteps. The absolute value of the cost is not very relevant, so the cost was normalized to the cost of one `VelocityVerlet` step. + ```julia -config(integrators, c, τ) = [ (alg=a, dt=τ*cₐ) for (a,cₐ) in zip(integrators, c)] +config(integrators, c, τ) = [(alg = a, dt = τ*cₐ) for (a, cₐ) in zip(integrators, c)] t = 35.0 τs = 1e-3 # warmup c_symplectic = ones(length(symplectic_integrators)) -benchmark(Dict(), Dict(), Dict(), Dict(), Dict(), Dict(), 10., +benchmark(Dict(), Dict(), Dict(), Dict(), Dict(), Dict(), 10.0, config(symplectic_integrators, c_symplectic, τs)) # results = DataFrame(:integrator=>String[], :runtime=>Float64[], :τ=>Float64[], @@ -142,41 +150,47 @@ c_symplectic = [ ``` Let us now benchmark the solvers for a fixed simulation time and variable timestep + ```julia t = 40.0 -τs = 10 .^range(-4, -3, length=10) +τs = 10 .^ range(-4, -3, length = 10) results = DataFrame(:integrator=>String[], :runtime=>Float64[], :τ=>Float64[], :EnergyError=>Float64[], :timesteps=>Int[], :f_evals=>Int[], :cost=>Float64[]); -run_benchmark!(results, t, symplectic_integrators, τs, c=c_symplectic) +run_benchmark!(results, t, symplectic_integrators, τs, c = c_symplectic) ``` The energy error as a function of runtime is given by + ```julia -@df results plot(:EnergyError, :runtime, group=:integrator, - xscale=:log10, yscale=:log10, xlabel="Energy error", ylabel="Runtime (s)") +@df results plot(:EnergyError, :runtime, group = :integrator, + xscale = :log10, yscale = :log10, xlabel = "Energy error", ylabel = "Runtime (s)") ``` + Looking at the runtime as a function of timesteps, we can observe that we have a linear dependency for each method, and the slope is the previously computed cost per step. + ```julia -@df results plot(:timesteps, :runtime, group=:integrator, - xscale=:log10, yscale=:log10, xlabel="Number of timesteps", ylabel="Runtime (s)") +@df results plot(:timesteps, :runtime, group = :integrator, + xscale = :log10, yscale = :log10, xlabel = "Number of timesteps", ylabel = "Runtime (s)") ``` We can also look at the energy error history + ```julia function benchmark(energyerr, rts, ts, t, configs) simulation = setup(t) prob = SecondOrderODEProblem(simulation) for config in configs alg = config.alg - sol, rt = @timed solve(prob, alg(); progress=true, progress_name="$alg", config...) + sol, + rt = @timed solve(prob, alg(); progress = true, progress_name = "$alg", config...) result = NBodySimulator.SimulationResult(sol, simulation) ΔE(t) = total_energy(result, t) - total_energy(result, 0) - energyerr[alg] = [ΔE(t) for t in sol.t[2:10^2:end]] + energyerr[alg] = [ΔE(t) for t in sol.t[2:(10 ^ 2):end]] rts[alg] = rt - ts[alg] = sol.t[2:10^2:end] + ts[alg] = sol.t[2:(10 ^ 2):end] end end @@ -184,16 +198,17 @@ end rt = Dict() ts = Dict() configs = config(symplectic_integrators, c_symplectic, 2.3e-4) -benchmark(ΔE, rt, ts, 40., configs) +benchmark(ΔE, rt, ts, 40.0, configs) -plt = plot(xlabel="Rescaled Time", ylabel="Energy error", legend=:bottomleft); +plt = plot(xlabel = "Rescaled Time", ylabel = "Energy error", legend = :bottomleft); for c in configs - plot!(plt, ts[c.alg], abs.(ΔE[c.alg]), label="$(c.alg), $(rt[c.alg])s") + plot!(plt, ts[c.alg], abs.(ΔE[c.alg]), label = "$(c.alg), $(rt[c.alg])s") end plt ``` Now, let us compare some adaptive methods + ```julia adaptive_integrators=[ # Non-stiff ODE methods @@ -203,22 +218,25 @@ adaptive_integrators=[ # DPRKN DPRKN6, DPRKN8, - DPRKN12, + DPRKN12 ]; ``` Similarly to the case of symplectic methods, we will take into account the average cost per timestep in order to have a fair comparison between the solvers. + ```julia -config(integrators, c, at, rt) = [ (alg=a, abstol=at*2^cₐ, rtol=rt*2^cₐ) for (a,cₐ) in zip(integrators, c)] +function config(integrators, c, at, rt) + [(alg = a, abstol = at*2^cₐ, rtol = rt*2^cₐ) for (a, cₐ) in zip(integrators, c)] +end t = 35.0 -ats = 10 .^range(-14, -4, length=10) -rts = 10 .^range(-14, -4, length=10) +ats = 10 .^ range(-14, -4, length = 10) +rts = 10 .^ range(-14, -4, length = 10) # warmup c_adaptive = ones(length(adaptive_integrators)) -benchmark(Dict(), Dict(), Dict(), Dict(), Dict(), Dict(), 10., +benchmark(Dict(), Dict(), Dict(), Dict(), Dict(), Dict(), 10.0, config(adaptive_integrators, 1, ats[1], rts[1])) # results = DataFrame(:integrator=>String[], :runtime=>Float64[], :abstol=>Float64[], @@ -239,26 +257,31 @@ c_adaptive = [ ``` Let us now benchmark the solvers for a fixed simulation time and variable timestep + ```julia t = 40.0 results = DataFrame(:integrator=>String[], :runtime=>Float64[], :abstol=>Float64[], :reltol=>Float64[], :EnergyError=>Float64[], :timesteps=>Int[], :f_evals=>Int[], :cost=>Float64[]); -run_benchmark!(results, t, adaptive_integrators, ats, rts, c=c_adaptive) +run_benchmark!(results, t, adaptive_integrators, ats, rts, c = c_adaptive) ``` The energy error as a function of runtime is given by + ```julia -@df results plot(:EnergyError, :runtime, group=:integrator, - xscale=:log10, yscale=:log10, xlabel="Energy error", ylabel="Runtime (s)") +@df results plot(:EnergyError, :runtime, group = :integrator, + xscale = :log10, yscale = :log10, xlabel = "Energy error", ylabel = "Runtime (s)") ``` + If we consider the number of function evaluations instead, we obtain + ```julia -@df results plot(:EnergyError, :f_evals, group=:integrator, - xscale=:log10, yscale=:log10, xlabel="Energy error", ylabel="Number of f evals") +@df results plot(:EnergyError, :f_evals, group = :integrator, + xscale = :log10, yscale = :log10, xlabel = "Energy error", ylabel = "Number of f evals") ``` We will now compare the best performing solvers + ```julia t = 40.0 @@ -275,17 +298,17 @@ c_symplectic = [ 1.05, # VerletLeapfrog 0.98, # PseudoVerletLeapfrog 1.02, # McAte2 - 2.38, # CalvoSanz4 + 2.38 # CalvoSanz4 ] results1 = DataFrame(:integrator=>String[], :runtime=>Float64[], :τ=>Float64[], :EnergyError=>Float64[], :timesteps=>Int[], :f_evals=>Int[], :cost=>Float64[]); -run_benchmark!(results1, t, symplectic_integrators, τs, c=c_symplectic) +run_benchmark!(results1, t, symplectic_integrators, τs, c = c_symplectic) adaptive_integrators=[ DPRKN6, DPRKN8, - DPRKN12, + DPRKN12 ] c_adaptive = [ @@ -296,19 +319,20 @@ c_adaptive = [ results2 = DataFrame(:integrator=>String[], :runtime=>Float64[], :abstol=>Float64[], :reltol=>Float64[], :EnergyError=>Float64[], :timesteps=>Int[], :f_evals=>Int[], :cost=>Float64[]); -run_benchmark!(results2, t, adaptive_integrators, ats, rts, c=c_adaptive) +run_benchmark!(results2, t, adaptive_integrators, ats, rts, c = c_adaptive) -append!(results1, results2, cols=:union) +append!(results1, results2, cols = :union) results1 ``` The energy error as a function of runtime is given by + ```julia -@df results1 plot(:EnergyError, :runtime, group=:integrator, - xscale=:log10, yscale=:log10, xlabel="Energy error", ylabel="Runtime (s)") +@df results1 plot(:EnergyError, :runtime, group = :integrator, + xscale = :log10, yscale = :log10, xlabel = "Energy error", ylabel = "Runtime (s)") ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NBodySimulator/liquid_argon_long.jmd b/benchmarks/NBodySimulator/liquid_argon_long.jmd index 500dc0320..0bf64a2b5 100644 --- a/benchmarks/NBodySimulator/liquid_argon_long.jmd +++ b/benchmarks/NBodySimulator/liquid_argon_long.jmd @@ -43,14 +43,18 @@ end In order to compare different integrating methods we will consider a fixed simulation time and change the timestep (or tolerances in the case of adaptive methods). + ```julia function benchmark(energyerr, rts, bytes, allocs, nt, nf, t, configs) simulation = setup(t) prob = SecondOrderODEProblem(simulation) for config in configs alg = config.alg - sol, rt, b, gc, memalloc = @timed solve(prob, alg(); - save_everystep=false, progress=true, progress_name="$alg", config...) + sol, rt, + b, + gc, + memalloc = @timed solve(prob, alg(); + save_everystep = false, progress = true, progress_name = "$alg", config...) result = NBodySimulator.SimulationResult(sol, simulation) ΔE = total_energy(result, t) - total_energy(result, 0) energyerr[alg] = ΔE @@ -62,7 +66,7 @@ function benchmark(energyerr, rts, bytes, allocs, nt, nf, t, configs) end end -function run_benchmark!(results, t, integrators, tol...; c=ones(length(integrators))) +function run_benchmark!(results, t, integrators, tol...; c = ones(length(integrators))) @progress "Benchmark at t=$t" for τ in zip(tol...) runtime = Dict() ΔE = Dict() @@ -74,10 +78,12 @@ function run_benchmark!(results, t, integrators, tol...; c=ones(length(integrato GC.gc() benchmark(ΔE, runtime, b, allocs, nt, nf, t, cfg) - get_tol(idx) = haskey(cfg[idx], :dt) ? cfg[idx].dt : (cfg[idx].abstol, cfg[idx].rtol) + get_tol(idx) = haskey(cfg[idx], :dt) ? cfg[idx].dt : + (cfg[idx].abstol, cfg[idx].rtol) - for (idx,i) in enumerate(integrators) - push!(results, [string(i), runtime[i], get_tol(idx)..., abs(ΔE[i]), nt[i], nf[i], c[idx]]) + for (idx, i) in enumerate(integrators) + push!(results, [ + string(i), runtime[i], get_tol(idx)..., abs(ΔE[i]), nt[i], nf[i], c[idx]]) end end return results @@ -85,6 +91,7 @@ end ``` We will consider symplectic integrators first + ```julia symplectic_integrators = [ VelocityVerlet, @@ -100,14 +107,14 @@ symplectic_integrators = [ ``` ```julia -config(integrators, c, τ) = [ (alg=a, dt=τ*cₐ) for (a,cₐ) in zip(integrators, c)] +config(integrators, c, τ) = [(alg = a, dt = τ*cₐ) for (a, cₐ) in zip(integrators, c)] t = 35.0 τs = 1e-3 # warmup c_symplectic = ones(length(symplectic_integrators)) -benchmark(Dict(), Dict(), Dict(), Dict(), Dict(), Dict(), 10., +benchmark(Dict(), Dict(), Dict(), Dict(), Dict(), Dict(), 10.0, config(symplectic_integrators, c_symplectic, τs)) # results = DataFrame(:integrator=>String[], :runtime=>Float64[], :τ=>Float64[], @@ -132,20 +139,24 @@ c_symplectic = [ ``` We will consider a longer simulation time + ```julia t = 200.0 results = DataFrame(:integrator=>String[], :runtime=>Float64[], :τ=>Float64[], :EnergyError=>Float64[], :timesteps=>Int[], :f_evals=>Int[], :cost=>Float64[]); -run_benchmark!(results, t, symplectic_integrators, τs, c=c_symplectic) +run_benchmark!(results, t, symplectic_integrators, τs, c = c_symplectic) ``` + The energy error as a function of runtime is given by + ```julia -@df results plot(:EnergyError, :runtime, group=:integrator, - xscale=:log10, yscale=:log10, xlabel="Energy error", ylabel="Runtime (s)") +@df results plot(:EnergyError, :runtime, group = :integrator, + xscale = :log10, yscale = :log10, xlabel = "Energy error", ylabel = "Runtime (s)") ``` Now, let us compare some adaptive methods + ```julia adaptive_integrators=[ # Non-stiff ODE methods @@ -155,20 +166,22 @@ adaptive_integrators=[ # DPRKN DPRKN6, DPRKN8, - DPRKN12, + DPRKN12 ]; ``` ```julia -config(integrators, c, at, rt) = [ (alg=a, abstol=at*2^cₐ, rtol=rt*2^cₐ) for (a,cₐ) in zip(integrators, c)] +function config(integrators, c, at, rt) + [(alg = a, abstol = at*2^cₐ, rtol = rt*2^cₐ) for (a, cₐ) in zip(integrators, c)] +end t = 35.0 -ats = 10 .^range(-14, -4, length=10) -rts = 10 .^range(-14, -4, length=10) +ats = 10 .^ range(-14, -4, length = 10) +rts = 10 .^ range(-14, -4, length = 10) # warmup c_adaptive = ones(length(adaptive_integrators)) -benchmark(Dict(), Dict(), Dict(), Dict(), Dict(), Dict(), 10., +benchmark(Dict(), Dict(), Dict(), Dict(), Dict(), Dict(), 10.0, config(adaptive_integrators, 1, ats[1], rts[1])) # results = DataFrame(:integrator=>String[], :runtime=>Float64[], :abstol=>Float64[], @@ -189,21 +202,24 @@ c_adaptive = [ ``` We will consider a longer simulation time + ```julia t = 200.0 results = DataFrame(:integrator=>String[], :runtime=>Float64[], :abstol=>Float64[], :reltol=>Float64[], :EnergyError=>Float64[], :timesteps=>Int[], :f_evals=>Int[], :cost=>Float64[]); -run_benchmark!(results, t, integrators, ats, rts, c=c_adaptive) +run_benchmark!(results, t, integrators, ats, rts, c = c_adaptive) ``` The energy error as a function of runtime is given by + ```julia -@df results plot(:EnergyError, :runtime, group=:integrator, - xscale=:log10, yscale=:log10, xlabel="Energy error", ylabel="Runtime (s)") +@df results plot(:EnergyError, :runtime, group = :integrator, + xscale = :log10, yscale = :log10, xlabel = "Energy error", ylabel = "Runtime (s)") ``` We will now compare the best performing solvers + ```julia t = 200.0 @@ -220,17 +236,17 @@ c_symplectic = [ 1.05, # VerletLeapfrog 0.98, # PseudoVerletLeapfrog 1.02, # McAte2 - 2.38, # CalvoSanz4 + 2.38 # CalvoSanz4 ] results1 = DataFrame(:integrator=>String[], :runtime=>Float64[], :τ=>Float64[], :EnergyError=>Float64[], :timesteps=>Int[], :f_evals=>Int[], :cost=>Float64[]); -run_benchmark!(results1, t, symplectic_integrators, τs, c=c_symplectic) +run_benchmark!(results1, t, symplectic_integrators, τs, c = c_symplectic) adaptive_integrators=[ DPRKN6, DPRKN8, - DPRKN12, + DPRKN12 ] c_adaptive = [ @@ -241,19 +257,20 @@ c_adaptive = [ results2 = DataFrame(:integrator=>String[], :runtime=>Float64[], :abstol=>Float64[], :reltol=>Float64[], :EnergyError=>Float64[], :timesteps=>Int[], :f_evals=>Int[], :cost=>Float64[]); -run_benchmark!(results2, t, adaptive_integrators, ats, rts, c=c_adaptive) +run_benchmark!(results2, t, adaptive_integrators, ats, rts, c = c_adaptive) -append!(results1, results2, cols=:union) +append!(results1, results2, cols = :union) results1 ``` The energy error as a function of runtime is given by + ```julia -@df results1 plot(:EnergyError, :runtime, group=:integrator, - xscale=:log10, yscale=:log10, xlabel="Energy error", ylabel="Runtime (s)") +@df results1 plot(:EnergyError, :runtime, group = :integrator, + xscale = :log10, yscale = :log10, xlabel = "Energy error", ylabel = "Runtime (s)") ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffBVP/Project.toml b/benchmarks/NonStiffBVP/Project.toml index af662cbfc..a2e62d3f8 100644 --- a/benchmarks/NonStiffBVP/Project.toml +++ b/benchmarks/NonStiffBVP/Project.toml @@ -15,7 +15,7 @@ SimpleBoundaryValueDiffEq = "be0294bd-f90f-4760-ac4e-3421ce2b2da0" BVProblemLibrary = "0.1.4" BenchmarkTools = "1" BoundaryValueDiffEq = "5.16" -CairoMakie = "0.12, 0.13" +CairoMakie = "0.12, 0.13, 0.14, 0.15" DiffEqDevTools = "2.48" NonlinearSolve = "4.5" ODEInterface = "0.5" diff --git a/benchmarks/NonStiffBVP/linear_wpd.jmd b/benchmarks/NonStiffBVP/linear_wpd.jmd index cbc8d53b0..c19dc8ae2 100644 --- a/benchmarks/NonStiffBVP/linear_wpd.jmd +++ b/benchmarks/NonStiffBVP/linear_wpd.jmd @@ -4,22 +4,23 @@ author: Qingyu Qu --- This benchmark compares the runtime and error of BVP solvers, including MIRK solvers, FIRK solvers, Shooting solvers and FORTRAN BVP solvers on linear boundary value problems. -The testing BVPs are a set of standard BVP test problems as described [here](https://archimede.uniba.it/~bvpsolvers/testsetbvpsolvers/?page_id=29). +The testing BVPs are a set of standard BVP test problems as described [here](https://archimede.uniba.it/%7Ebvpsolvers/testsetbvpsolvers/?page_id=29). The problems are implemented in [BVProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl/blob/master/lib/BVProblemLibrary/src/BVProblemLibrary.jl), where you can find the problem function declarations. For each problem, we test the following solvers: -- BoundaryValueDiffEq.jl's MIRK methods(including `MIRK4`, `MIRK5`, `MIRK6`). -- BoundaryValueDiffEq.jl's Shooting methods(including `Shooting`, `MultipleShooting`). -- BoundaryValueDiffEq.jl's FIRK methods(including `RadauIIa3`, `RadauIIa5`, `RadauIIa7`, `LobattoIIIa4`, `LobattoIIIa5`, `LobattoIIIb4`, `LobattoIIIb5`, `LobattoIIIc4`, `LobattoIIIc5`). -- SimpleBoundaryValueDiffEq.jl's MIRK methods(including `SimpleMIRK4`, `SimpleMIRK5`, `SimpleMIRK6`). -- FORTRAN BVP solvers from ODEInterface.jl(including `BVPM2` and `COLNEW`). + - BoundaryValueDiffEq.jl's MIRK methods(including `MIRK4`, `MIRK5`, `MIRK6`). + - BoundaryValueDiffEq.jl's Shooting methods(including `Shooting`, `MultipleShooting`). + - BoundaryValueDiffEq.jl's FIRK methods(including `RadauIIa3`, `RadauIIa5`, `RadauIIa7`, `LobattoIIIa4`, `LobattoIIIa5`, `LobattoIIIb4`, `LobattoIIIb5`, `LobattoIIIc4`, `LobattoIIIc5`). + - SimpleBoundaryValueDiffEq.jl's MIRK methods(including `SimpleMIRK4`, `SimpleMIRK5`, `SimpleMIRK6`). + - FORTRAN BVP solvers from ODEInterface.jl(including `BVPM2` and `COLNEW`). # Setup Fetch required packages. ```julia -using BoundaryValueDiffEq, SimpleBoundaryValueDiffEq, OrdinaryDiffEq, ODEInterface, DiffEqDevTools, BenchmarkTools, +using BoundaryValueDiffEq, SimpleBoundaryValueDiffEq, OrdinaryDiffEq, ODEInterface, + DiffEqDevTools, BenchmarkTools, BVProblemLibrary, CairoMakie, NonlinearSolve ``` @@ -27,25 +28,47 @@ Set up the benchmarked solvers. ```julia solvers_all = [ - (; pkg = :boundaryvaluediffeq, type = :mirk, name = "MIRK4", solver = Dict(:alg => MIRK4(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :mirk, name = "MIRK5", solver = Dict(:alg => MIRK5(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :mirk, name = "MIRK6", solver = Dict(:alg => MIRK6(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "RadauIIa3", solver = Dict(:alg => RadauIIa3(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "RadauIIa5", solver = Dict(:alg => RadauIIa5(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "RadauIIa7", solver = Dict(:alg => RadauIIa7(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIa4", solver = Dict(:alg => LobattoIIIa4(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIa5", solver = Dict(:alg => LobattoIIIa5(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIb4", solver = Dict(:alg => LobattoIIIb4(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIb5", solver = Dict(:alg => LobattoIIIb5(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIc4", solver = Dict(:alg => LobattoIIIc4(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIc5", solver = Dict(:alg => LobattoIIIc5(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :shooting, name = "Single Shooting", solver = Dict(:alg => Shooting(Tsit5(), NewtonRaphson()), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :boundaryvaluediffeq, type = :shooting, name = "Multiple Shooting", solver = Dict(:alg => MultipleShooting(10, Tsit5()), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :simpleboundaryvaluediffeq, type = :simplemirk, name = "SimpleMIRK4", solver = Dict(:alg => SimpleMIRK4(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :simpleboundaryvaluediffeq, type = :simplemirk, name = "SimpleMIRK5", solver = Dict(:alg => SimpleMIRK5(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :simpleboundaryvaluediffeq, type = :simplemirk, name = "SimpleMIRK6", solver = Dict(:alg => SimpleMIRK6(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :wrapper, type = :general, name = "BVPM2", solver = Dict(:alg => BVPM2(), :dts=>1.0 ./ 10.0 .^ (1:4))), - (; pkg = :wrapper, type = :general, name = "COLNEW", solver = Dict(:alg => COLNEW(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :mirk, name = "MIRK4", + solver = Dict(:alg => MIRK4(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :mirk, name = "MIRK5", + solver = Dict(:alg => MIRK5(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :mirk, name = "MIRK6", + solver = Dict(:alg => MIRK6(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :firk, name = "RadauIIa3", + solver = Dict(:alg => RadauIIa3(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :firk, name = "RadauIIa5", + solver = Dict(:alg => RadauIIa5(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :firk, name = "RadauIIa7", + solver = Dict(:alg => RadauIIa7(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIa4", + solver = Dict(:alg => LobattoIIIa4(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIa5", + solver = Dict(:alg => LobattoIIIa5(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIb4", + solver = Dict(:alg => LobattoIIIb4(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIb5", + solver = Dict(:alg => LobattoIIIb5(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIc4", + solver = Dict(:alg => LobattoIIIc4(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIc5", + solver = Dict(:alg => LobattoIIIc5(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, + type = :shooting, + name = "Single Shooting", + solver = Dict(:alg => Shooting(Tsit5(), NewtonRaphson()), :dts=>1.0 ./ + 10.0 .^ (1:4))), + (; pkg = :boundaryvaluediffeq, type = :shooting, name = "Multiple Shooting", + solver = Dict(:alg => MultipleShooting(10, Tsit5()), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :simpleboundaryvaluediffeq, type = :simplemirk, name = "SimpleMIRK4", + solver = Dict(:alg => SimpleMIRK4(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :simpleboundaryvaluediffeq, type = :simplemirk, name = "SimpleMIRK5", + solver = Dict(:alg => SimpleMIRK5(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :simpleboundaryvaluediffeq, type = :simplemirk, name = "SimpleMIRK6", + solver = Dict(:alg => SimpleMIRK6(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :wrapper, type = :general, name = "BVPM2", + solver = Dict(:alg => BVPM2(), :dts=>1.0 ./ 10.0 .^ (1:4))), + (; pkg = :wrapper, type = :general, name = "COLNEW", + solver = Dict(:alg => COLNEW(), :dts=>1.0 ./ 10.0 .^ (1:4))) ]; solver_tracker = []; @@ -63,9 +86,10 @@ Prepares helper function for benchmarking a specific problem. ```julia function benchmark(prob) - sol = solve(prob, Shooting(Vern7()), abstol=1e-14, reltol=1e-14) + sol = solve(prob, Shooting(Vern7()), abstol = 1e-14, reltol = 1e-14) testsol = TestSolution(sol) - wps = WorkPrecisionSet(prob, abstols, reltols, getfield.(solvers_all, :solver); names = getfield.(solvers_all, :name), appxsol = testsol, maxiters=Int(1e4)) + wps = WorkPrecisionSet(prob, abstols, reltols, getfield.(solvers_all, :solver); + names = getfield.(solvers_all, :name), appxsol = testsol, maxiters = Int(1e4)) push!(wp_general_tracker, wps) return wps end @@ -78,11 +102,11 @@ function plot_wpd(wp_set) HEIGHT = round(Int, WIDTH * ASPECT_RATIO) STROKEWIDTH = 2.5 - colors = cgrad(:seaborn_bright, length(solvers_all); categorical = true) - cycle = Cycle([:marker], covary = true) + colors = cgrad(:seaborn_bright, length(solvers_all); categorical = true) + cycle = Cycle([:marker], covary = true) plot_theme = Theme(Lines = (; cycle), Scatter = (; cycle)) - with_theme(plot_theme) do + with_theme(plot_theme) do fig = Figure(; size = (WIDTH, HEIGHT)) ax = Axis(fig[1, 1], ylabel = L"Time $\mathbf{(s)}$", xlabelsize = 22, ylabelsize = 22, @@ -98,20 +122,22 @@ function plot_wpd(wp_set) for (i, (wp, solver)) in enumerate(zip(wp_set.wps[idxs], solvers_all[idxs])) (; name, times, errors) = wp errors = [err.l∞ for err in errors] - l = lines!(ax, errors, times; linestyle = LINESTYLES[solver.pkg], label = name, + l = lines!( + ax, errors, times; linestyle = LINESTYLES[solver.pkg], label = name, linewidth = 5, color = colors[i]) - sc = scatter!(ax, errors, times; label = name, markersize = 16, strokewidth = 2, + sc = scatter!( + ax, errors, times; label = name, markersize = 16, strokewidth = 2, color = colors[i]) push!(ls, l) push!(scs, sc) end - xlims!(ax; high=1) - ylims!(ax; low=5e-6) + xlims!(ax; high = 1) + ylims!(ax; low = 5e-6) axislegend(ax, [[l, sc] for (l, sc) in zip(ls, scs)], [solver.name for solver in solvers_all[idxs]], "BVP Solvers"; - framevisible=true, framewidth = STROKEWIDTH, position = :rb, + framevisible = true, framewidth = STROKEWIDTH, position = :rb, titlesize = 20, labelsize = 16, patchsize = (40.0f0, 20.0f0)) fig[0, :] = Label(fig, "Linear BVP Benchmark", @@ -295,6 +321,7 @@ fig = begin solver_times = [] for i in 1:4, j in 1:5 + idx = 5 * (i - 1) + j idx > length(wp_general_tracker) && break @@ -338,7 +365,7 @@ fig = begin Legend(fig[4, 4:5], [[l, sc] for (l, sc) in zip(ls, scs)], labels, "BVP Solvers"; - framevisible=true, framewidth = STROKEWIDTH, orientation = :horizontal, + framevisible = true, framewidth = STROKEWIDTH, orientation = :horizontal, titlesize = 20, nbanks = 9, labelsize = 20, halign = :center, tellheight = false, tellwidth = false, patchsize = (40.0f0, 20.0f0)) @@ -353,5 +380,5 @@ save("summary_wp_18test_problems.svg", fig) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffBVP/orbital.jmd b/benchmarks/NonStiffBVP/orbital.jmd index de07ca77f..c26ca4f77 100644 --- a/benchmarks/NonStiffBVP/orbital.jmd +++ b/benchmarks/NonStiffBVP/orbital.jmd @@ -14,7 +14,7 @@ y0 = [ -5.3500183933132319E+06, -5528.612564911408, 1216.8442360202787, - 4845.114446429901, + 4845.114446429901 ] init_val = [ -4.7763169762853989E+06, @@ -22,7 +22,7 @@ init_val = [ -5.3500183933132319E+06, 7.0526926403748598E+06, -7.9650476230388973E+05, - -1.1911128863666430E+06, + -1.1911128863666430E+06 ] J2 = 1.08262668E-3 req = 6378137 @@ -86,6 +86,5 @@ bvp = BVProblem(orbital, cur_bc!, y0, tspan) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` - diff --git a/benchmarks/NonStiffDDE/Mackey_Glass_wpd.jmd b/benchmarks/NonStiffDDE/Mackey_Glass_wpd.jmd index c968e65c2..c82c7531d 100644 --- a/benchmarks/NonStiffDDE/Mackey_Glass_wpd.jmd +++ b/benchmarks/NonStiffDDE/Mackey_Glass_wpd.jmd @@ -6,6 +6,7 @@ author: David Widmann, Chris Rackauckas # Mackey and Glass We study algorithms for solving constant delay differential equations with a test problem from W.H. Enright and H. Hayashi, "The evaluation of numerical software for delay differential equations", 1997. It is a model of blood production that was published by M. C. Mackey and L. Glass in "Oscillation and chaos in physiological control systems", 1977, and is given by + ```math \begin{equation} y'(t) = \frac{0.2y(t-14)}{1 + y(t-14)^{10}} - 0.1y(t) @@ -17,7 +18,8 @@ using DelayDiffEq, DiffEqDevTools, Plots using DDEProblemLibrary: prob_dde_DDETST_A1 as prob gr() -sol = solve(prob, MethodOfSteps(Vern9(); fpsolve = NLFunctional(; max_iter = 1000)); reltol=1e-14, abstol=1e-14) +sol = solve(prob, MethodOfSteps(Vern9(); fpsolve = NLFunctional(; max_iter = 1000)); + reltol = 1e-14, abstol = 1e-14) test_sol = TestSolution(sol) plot(sol) ``` @@ -33,14 +35,14 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(BS3())), - Dict(:alg=>MethodOfSteps(Tsit5())), - Dict(:alg=>MethodOfSteps(RK4())), - Dict(:alg=>MethodOfSteps(DP5())), - Dict(:alg=>MethodOfSteps(OwrenZen3())), - Dict(:alg=>MethodOfSteps(OwrenZen4())), - Dict(:alg=>MethodOfSteps(OwrenZen5()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen3())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -51,14 +53,14 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(BS3())), - Dict(:alg=>MethodOfSteps(Tsit5())), - Dict(:alg=>MethodOfSteps(RK4())), - Dict(:alg=>MethodOfSteps(DP5())), - Dict(:alg=>MethodOfSteps(OwrenZen3())), - Dict(:alg=>MethodOfSteps(OwrenZen4())), - Dict(:alg=>MethodOfSteps(OwrenZen5()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen3())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -73,14 +75,14 @@ abstols = 1.0 ./ 10.0 .^ (8:11) reltols = 1.0 ./ 10.0 .^ (5:8) setups = [Dict(:alg=>MethodOfSteps(BS3())), - Dict(:alg=>MethodOfSteps(Tsit5())), - Dict(:alg=>MethodOfSteps(RK4())), - Dict(:alg=>MethodOfSteps(DP5())), - Dict(:alg=>MethodOfSteps(OwrenZen3())), - Dict(:alg=>MethodOfSteps(OwrenZen4())), - Dict(:alg=>MethodOfSteps(OwrenZen5()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen3())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -91,14 +93,14 @@ abstols = 1.0 ./ 10.0 .^ (8:11) reltols = 1.0 ./ 10.0 .^ (5:8) setups = [Dict(:alg=>MethodOfSteps(BS3())), - Dict(:alg=>MethodOfSteps(Tsit5())), - Dict(:alg=>MethodOfSteps(RK4())), - Dict(:alg=>MethodOfSteps(DP5())), - Dict(:alg=>MethodOfSteps(OwrenZen3())), - Dict(:alg=>MethodOfSteps(OwrenZen4())), - Dict(:alg=>MethodOfSteps(OwrenZen5()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen3())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -115,12 +117,12 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(Vern6())), - Dict(:alg=>MethodOfSteps(Vern7())), - Dict(:alg=>MethodOfSteps(Vern8())), - Dict(:alg=>MethodOfSteps(Vern9())), - Dict(:alg=>MethodOfSteps(OwrenZen4()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9())), + Dict(:alg=>MethodOfSteps(OwrenZen4()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -131,12 +133,12 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(Vern6())), - Dict(:alg=>MethodOfSteps(Vern7())), - Dict(:alg=>MethodOfSteps(Vern8())), - Dict(:alg=>MethodOfSteps(Vern9())), - Dict(:alg=>MethodOfSteps(OwrenZen4()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9())), + Dict(:alg=>MethodOfSteps(OwrenZen4()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -151,12 +153,12 @@ abstols = 1.0 ./ 10.0 .^ (8:11) reltols = 1.0 ./ 10.0 .^ (5:8) setups = [Dict(:alg=>MethodOfSteps(Vern6())), - Dict(:alg=>MethodOfSteps(Vern7())), - Dict(:alg=>MethodOfSteps(Vern8())), - Dict(:alg=>MethodOfSteps(Vern9())), - Dict(:alg=>MethodOfSteps(OwrenZen4()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9())), + Dict(:alg=>MethodOfSteps(OwrenZen4()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -165,12 +167,12 @@ abstols = 1.0 ./ 10.0 .^ (8:11) reltols = 1.0 ./ 10.0 .^ (5:8) setups = [Dict(:alg=>MethodOfSteps(Vern6())), - Dict(:alg=>MethodOfSteps(Vern7())), - Dict(:alg=>MethodOfSteps(Vern8())), - Dict(:alg=>MethodOfSteps(Vern9())), - Dict(:alg=>MethodOfSteps(OwrenZen4()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9())), + Dict(:alg=>MethodOfSteps(OwrenZen4()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -178,5 +180,5 @@ plot(wp) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffDDE/Manifest.toml b/benchmarks/NonStiffDDE/Manifest.toml index 8e85363fe..57beaedf0 100644 --- a/benchmarks/NonStiffDDE/Manifest.toml +++ b/benchmarks/NonStiffDDE/Manifest.toml @@ -1,60 +1,106 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.8.1" +julia_version = "1.10.10" manifest_format = "2.0" -project_hash = "41789802f39af5561d448080416acfa02c47f38c" +project_hash = "c82ab5c28e8cf4584750da0f85a392b26517c609" + +[[deps.ADTypes]] +git-tree-sha1 = "be7ae030256b8ef14a441726c4c37766b90b93a3" +uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" +version = "1.15.0" +weakdeps = ["ChainRulesCore", "ConstructionBase", "EnzymeCore"] + + [deps.ADTypes.extensions] + ADTypesChainRulesCoreExt = "ChainRulesCore" + ADTypesConstructionBaseExt = "ConstructionBase" + ADTypesEnzymeCoreExt = "EnzymeCore" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.42" + + [deps.Accessors.extensions] + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.Adapt]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "195c5505521008abea5aee4f96930717958eac6f" +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "3.4.0" +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] + + [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" + AdaptStaticArraysExt = "StaticArrays" + +[[deps.AliasTables]] +deps = ["PtrArrays", "Random"] +git-tree-sha1 = "9876e1e164b144ca45e9e3198d0b689cadfed9ff" +uuid = "66dad0bd-aa9a-41b7-9441-69ab47430ed8" +version = "1.1.3" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" version = "1.1.1" -[[deps.ArnoldiMethod]] -deps = ["LinearAlgebra", "Random", "StaticArrays"] -git-tree-sha1 = "62e51b39331de8911e4a7ff6f5aaf38a5f4cc0ae" -uuid = "ec485272-7323-5ecc-a04f-4719b315124d" -version = "0.2.0" - [[deps.ArrayInterface]] -deps = ["ArrayInterfaceCore", "Compat", "IfElse", "LinearAlgebra", "Static"] -git-tree-sha1 = "d6173480145eb632d6571c148d94b9d3d773820e" +deps = ["Adapt", "LinearAlgebra"] +git-tree-sha1 = "9606d7832795cbef89e06a550475be300364a8aa" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "6.0.23" - -[[deps.ArrayInterfaceCore]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "5bb0f8292405a516880a3809954cb832ae7a31c5" -uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" -version = "0.1.20" - -[[deps.ArrayInterfaceGPUArrays]] -deps = ["Adapt", "ArrayInterfaceCore", "GPUArraysCore", "LinearAlgebra"] -git-tree-sha1 = "fc114f550b93d4c79632c2ada2924635aabfa5ed" -uuid = "6ba088a2-8465-4c0a-af30-387133b534db" -version = "0.2.2" - -[[deps.ArrayInterfaceOffsetArrays]] -deps = ["ArrayInterface", "OffsetArrays", "Static"] -git-tree-sha1 = "c49f6bad95a30defff7c637731f00934c7289c50" -uuid = "015c0d05-e682-4f19-8f0a-679ce4c54826" -version = "0.1.6" - -[[deps.ArrayInterfaceStaticArrays]] -deps = ["Adapt", "ArrayInterface", "ArrayInterfaceStaticArraysCore", "LinearAlgebra", "Static", "StaticArrays"] -git-tree-sha1 = "efb000a9f643f018d5154e56814e338b5746c560" -uuid = "b0d46f97-bff5-4637-a19a-dd75974142cd" -version = "0.1.4" +version = "7.19.0" + + [deps.ArrayInterface.extensions] + ArrayInterfaceBandedMatricesExt = "BandedMatrices" + ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" + ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceCUDSSExt = "CUDSS" + ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" + ArrayInterfaceChainRulesExt = "ChainRules" + ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceReverseDiffExt = "ReverseDiff" + ArrayInterfaceSparseArraysExt = "SparseArrays" + ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" + ArrayInterfaceTrackerExt = "Tracker" + + [deps.ArrayInterface.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra"] +git-tree-sha1 = "4e25216b8fea1908a0ce0f5d87368587899f75be" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.11.1" +weakdeps = ["SparseArrays"] -[[deps.ArrayInterfaceStaticArraysCore]] -deps = ["Adapt", "ArrayInterfaceCore", "LinearAlgebra", "StaticArraysCore"] -git-tree-sha1 = "a1e2cf6ced6505cbad2490532388683f1e88c3ed" -uuid = "dd5226c6-a4d4-4bc7-8575-46859f9c95b9" -version = "0.1.0" + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" @@ -63,126 +109,177 @@ uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[deps.BitFlags]] -git-tree-sha1 = "84259bb6172806304b9101094a7cc4bc6f56dbc6" +git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" -version = "0.1.5" +version = "0.1.9" [[deps.BitTwiddlingConvenienceFunctions]] deps = ["Static"] -git-tree-sha1 = "eaee37f76339077f86679787a71990c4e465477f" +git-tree-sha1 = "f21cfd4950cb9f0587d5067e69405ad2acd27b87" uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" -version = "0.1.4" +version = "0.1.6" + +[[deps.BracketingNonlinearSolve]] +deps = ["CommonSolve", "ConcreteStructs", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "a9014924595b7a2c1dd14aac516e38fa10ada656" +uuid = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e" +version = "1.3.0" +weakdeps = ["ChainRulesCore", "ForwardDiff"] + + [deps.BracketingNonlinearSolve.extensions] + BracketingNonlinearSolveChainRulesCoreExt = ["ChainRulesCore", "ForwardDiff"] + BracketingNonlinearSolveForwardDiffExt = "ForwardDiff" [[deps.Bzip2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1b96ea4a01afe0ea4090c5c8039690672dd13f2e" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.8+0" +version = "1.0.9+0" [[deps.CPUSummary]] -deps = ["CpuId", "IfElse", "Static"] -git-tree-sha1 = "9bdd5aceea9fa109073ace6b430a24839d79315e" +deps = ["CpuId", "IfElse", "PrecompileTools", "Static"] +git-tree-sha1 = "5a97e67919535d6841172016c9530fd69494e5ec" uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" -version = "0.1.27" +version = "0.2.6" [[deps.Cairo_jll]] -deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.16.1+1" - -[[deps.Calculus]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" -uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" -version = "0.5.1" +version = "1.18.5+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "e7ff6cadf743c098e08fca25c91103ee4303c9bb" +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "06ee8d1aa558d2833aa799f6f0b31b30cada405f" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.15.6" +version = "1.25.2" +weakdeps = ["SparseArrays"] -[[deps.ChangesOfVariables]] -deps = ["ChainRulesCore", "LinearAlgebra", "Test"] -git-tree-sha1 = "38f7a08f19d8810338d4f5085211c7dfa5d5bdd8" -uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" -version = "0.1.4" + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.CloseOpenIntervals]] -deps = ["ArrayInterface", "Static"] -git-tree-sha1 = "5522c338564580adf5d58d91e43a55db0fa5fb39" +deps = ["Static", "StaticArrayInterface"] +git-tree-sha1 = "05ba0d07cd4fd8b7a39541e31a7b0254704ea581" uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" -version = "0.1.10" +version = "0.1.13" [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da" +git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.0" +version = "0.7.8" [[deps.ColorSchemes]] -deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Random"] -git-tree-sha1 = "1fd869cc3875b57347f7027521f561cf46d1fcd8" +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] +git-tree-sha1 = "a656525c8b46aa6a1c76891552ed5381bb32ae7b" uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -version = "3.19.0" +version = "3.30.0" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.11.4" +version = "0.12.1" + + [deps.ColorTypes.extensions] + StyledStringsExt = "StyledStrings" + + [deps.ColorTypes.weakdeps] + StyledStrings = "f489334b-da3d-4c2e-b8f0-e476e12c162b" [[deps.ColorVectorSpace]] -deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"] -git-tree-sha1 = "d08c20eef1f2cbc6e60fd3612ac4340b89fea322" +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] +git-tree-sha1 = "8b3b6f87ce8f65a2b4f857528fd8d70086cd72b1" uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" -version = "0.9.9" +version = "0.11.0" +weakdeps = ["SpecialFunctions"] + + [deps.ColorVectorSpace.extensions] + SpecialFunctionsExt = "SpecialFunctions" [[deps.Colors]] deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40" +git-tree-sha1 = "37ea44092930b1811e666c3bc38065d7d87fcc74" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.12.8" +version = "0.13.1" [[deps.CommonSolve]] -git-tree-sha1 = "332a332c97c7071600984b3c31d9067e1a4e6e25" +git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" -version = "0.2.1" +version = "0.2.4" [[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" +version = "0.3.1" + +[[deps.CommonWorldInvalidations]] +git-tree-sha1 = "ae52d1c52048455e85a387fbee9be553ec2b68d0" +uuid = "f70d9fcc-98c5-4d4a-abd7-e4cdeebd8ca8" +version = "1.0.0" [[deps.Compat]] -deps = ["Dates", "LinearAlgebra", "UUIDs"] -git-tree-sha1 = "5856d3031cdb1f3b2b6340dfdc66b6d9a149a374" +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "3a3dfb30697e96a440e4149c8c51bf32f818c0f3" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.2.0" +version = "4.17.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "0.5.2+0" +version = "1.1.1+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConcreteStructs]] +git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" +uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" +version = "0.2.3" + +[[deps.ConcurrentUtilities]] +deps = ["Serialization", "Sockets"] +git-tree-sha1 = "d9d26935a0bcffc87d2613ce14c527c99fc543fd" +uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" +version = "2.5.0" [[deps.Conda]] deps = ["Downloads", "JSON", "VersionParsing"] -git-tree-sha1 = "6e47d11ea2776bc5627421d59cdcc1296c058071" +git-tree-sha1 = "b19db3927f0db4151cb86d073689f2428e524576" uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" -version = "1.7.0" +version = "1.10.2" [[deps.ConstructionBase]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "fb21ddd70a051d882a1686a5a550990bbe371a95" +git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.4.1" +version = "1.6.0" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [[deps.Contour]] -git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" +git-tree-sha1 = "439e35b0b36e2e5881738abc8857bd92ad6ff9a8" uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" -version = "0.6.2" +version = "0.6.3" [[deps.CpuId]] deps = ["Markdown"] @@ -190,6 +287,11 @@ git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" uuid = "adafc99b-e345-5852-983c-f28acb93d879" version = "0.3.1" +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + [[deps.DDEProblemLibrary]] deps = ["DiffEqBase"] git-tree-sha1 = "30bfb0c9bf8cf3b2a97b331984a72fadf9a77aa5" @@ -197,15 +299,15 @@ uuid = "f42792ee-6ffc-4e2a-ae83-8ee2f22de800" version = "0.1.2" [[deps.DataAPI]] -git-tree-sha1 = "1106fa7e1256b402a86a8e7b15c00c85036fef49" +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.11.0" +version = "1.16.0" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.13" +version = "0.18.22" [[deps.DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -216,39 +318,81 @@ version = "1.0.0" deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +[[deps.Dbus_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "473e9afc9cf30814eb67ffa5f2db7df82c3ad9fd" +uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" +version = "1.16.2+0" + [[deps.DelayDiffEq]] -deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "LinearAlgebra", "Logging", "NonlinearSolve", "OrdinaryDiffEq", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "UnPack"] -git-tree-sha1 = "5acc7807b906d6a938dfeb965a6ea931260f054e" +deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "LinearAlgebra", "Logging", "OrdinaryDiffEq", "OrdinaryDiffEqCore", "OrdinaryDiffEqDefault", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqRosenbrock", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SimpleUnPack", "SymbolicIndexingInterface"] +git-tree-sha1 = "8b416f6b1f9ef8df4c13dd0fe6c191752722b36f" uuid = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb" -version = "5.38.0" +version = "5.53.1" [[deps.DelimitedFiles]] deps = ["Mmap"] +git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" - -[[deps.DensityInterface]] -deps = ["InverseFunctions", "Test"] -git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b" -uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d" -version = "0.4.0" +version = "1.9.1" [[deps.DiffEqBase]] -deps = ["ArrayInterfaceCore", "ChainRulesCore", "DataStructures", "Distributions", "DocStringExtensions", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "MuladdMacro", "NonlinearSolve", "Parameters", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "Setfield", "SparseArrays", "Static", "StaticArrays", "Statistics", "Tricks", "ZygoteRules"] -git-tree-sha1 = "0f9f82671406d21f6275cb6e9336259f062e81fa" +deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "e9b34e0eb3443492f396c97e7fed08630752a4f2" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.105.0" +version = "6.177.2" + + [deps.DiffEqBase.extensions] + DiffEqBaseCUDAExt = "CUDA" + DiffEqBaseChainRulesCoreExt = "ChainRulesCore" + DiffEqBaseDistributionsExt = "Distributions" + DiffEqBaseEnzymeExt = ["ChainRulesCore", "Enzyme"] + DiffEqBaseForwardDiffExt = ["ForwardDiff"] + DiffEqBaseGTPSAExt = "GTPSA" + DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" + DiffEqBaseMPIExt = "MPI" + DiffEqBaseMeasurementsExt = "Measurements" + DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseMooncakeExt = "Mooncake" + DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseSparseArraysExt = "SparseArrays" + DiffEqBaseTrackerExt = "Tracker" + DiffEqBaseUnitfulExt = "Unitful" + + [deps.DiffEqBase.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" + GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.DiffEqDevTools]] -deps = ["DiffEqBase", "DiffEqNoiseProcess", "Distributed", "LinearAlgebra", "Logging", "NLsolve", "RecipesBase", "RecursiveArrayTools", "RootedTrees", "Statistics"] -git-tree-sha1 = "bc35b571b28b23748ea907fbb6a2c1987a24f3d7" +deps = ["DiffEqBase", "DiffEqNoiseProcess", "Distributed", "LinearAlgebra", "Logging", "NLsolve", "RecipesBase", "RecursiveArrayTools", "RootedTrees", "SciMLBase", "Statistics", "StructArrays"] +git-tree-sha1 = "53aa030c02c786270542debbb577b53f6383796b" uuid = "f3b72e0c-5b89-59e1-b016-84e28bfd966d" -version = "2.32.0" +version = "2.48.0" [[deps.DiffEqNoiseProcess]] -deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "ResettableStacks", "SciMLBase", "StaticArrays", "Statistics"] -git-tree-sha1 = "8ba7a8913dc57c087d3cdc9b67eb1c9d760125bc" +deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "ResettableStacks", "SciMLBase", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "516d553f5deee7c55b2945b5edf05b6542837887" uuid = "77a26b50-5914-5dd7-bc55-306e6241c503" -version = "5.13.0" +version = "5.24.1" + + [deps.DiffEqNoiseProcess.extensions] + DiffEqNoiseProcessReverseDiffExt = "ReverseDiff" + + [deps.DiffEqNoiseProcess.weakdeps] + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" [[deps.DiffResults]] deps = ["StaticArraysCore"] @@ -258,215 +402,351 @@ version = "1.1.0" [[deps.DiffRules]] deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "992a23afdb109d0d2f8802a30cf5ae4b1fe7ea68" +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.11.1" +version = "1.15.1" + +[[deps.DifferentiationInterface]] +deps = ["ADTypes", "LinearAlgebra"] +git-tree-sha1 = "c092fd1dd0d94e609cd0d29e13897b2825c804bb" +uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" +version = "0.7.2" + + [deps.DifferentiationInterface.extensions] + DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" + DifferentiationInterfaceDiffractorExt = "Diffractor" + DifferentiationInterfaceEnzymeExt = ["EnzymeCore", "Enzyme"] + DifferentiationInterfaceFastDifferentiationExt = "FastDifferentiation" + DifferentiationInterfaceFiniteDiffExt = "FiniteDiff" + DifferentiationInterfaceFiniteDifferencesExt = "FiniteDifferences" + DifferentiationInterfaceForwardDiffExt = ["ForwardDiff", "DiffResults"] + DifferentiationInterfaceGPUArraysCoreExt = "GPUArraysCore" + DifferentiationInterfaceGTPSAExt = "GTPSA" + DifferentiationInterfaceMooncakeExt = "Mooncake" + DifferentiationInterfacePolyesterForwardDiffExt = ["PolyesterForwardDiff", "ForwardDiff", "DiffResults"] + DifferentiationInterfaceReverseDiffExt = ["ReverseDiff", "DiffResults"] + DifferentiationInterfaceSparseArraysExt = "SparseArrays" + DifferentiationInterfaceSparseConnectivityTracerExt = "SparseConnectivityTracer" + DifferentiationInterfaceSparseMatrixColoringsExt = "SparseMatrixColorings" + DifferentiationInterfaceStaticArraysExt = "StaticArrays" + DifferentiationInterfaceSymbolicsExt = "Symbolics" + DifferentiationInterfaceTrackerExt = "Tracker" + DifferentiationInterfaceZygoteExt = ["Zygote", "ForwardDiff"] + + [deps.DifferentiationInterface.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" + Diffractor = "9f5e2b26-1114-432f-b630-d3fe2085c51c" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + FastDifferentiation = "eb9bf01b-bf85-4b60-bf87-ee5de06c00be" + FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" + FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" + SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [[deps.Distances]] -deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04" +deps = ["LinearAlgebra", "Statistics", "StatsAPI"] +git-tree-sha1 = "c7e3a542b999843086e2f29dac96a618c105be1d" uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -version = "0.10.7" +version = "0.10.12" +weakdeps = ["ChainRulesCore", "SparseArrays"] + + [deps.Distances.extensions] + DistancesChainRulesCoreExt = "ChainRulesCore" + DistancesSparseArraysExt = "SparseArrays" [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] -deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] -git-tree-sha1 = "0d7d213133d948c56e8c2d9f4eab0293491d8e4a" +deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] +git-tree-sha1 = "3e6d038b77f22791b8e3472b7c633acea1ecac06" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.75" +version = "0.25.120" + + [deps.Distributions.extensions] + DistributionsChainRulesCoreExt = "ChainRulesCore" + DistributionsDensityInterfaceExt = "DensityInterface" + DistributionsTestExt = "Test" + + [deps.Distributions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b" +git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.8.6" +version = "0.9.5" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.6.0" -[[deps.DualNumbers]] -deps = ["Calculus", "NaNMath", "SpecialFunctions"] -git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" -uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" -version = "0.6.8" +[[deps.EnumX]] +git-tree-sha1 = "bddad79635af6aec424f53ed8aad5d7555dc6f00" +uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" +version = "1.0.5" + +[[deps.EnzymeCore]] +git-tree-sha1 = "8272a687bca7b5c601c0c24fc0c71bff10aafdfd" +uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" +version = "0.8.12" +weakdeps = ["Adapt"] + + [deps.EnzymeCore.extensions] + AdaptExt = "Adapt" + +[[deps.EpollShim_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8a4be429317c42cfae6a7fc03c31bad1970c310d" +uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" +version = "0.0.20230411+1" + +[[deps.ExceptionUnwrapping]] +deps = ["Test"] +git-tree-sha1 = "d36f682e590a83d63d1c7dbd287573764682d12a" +uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" +version = "0.1.11" [[deps.Expat_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "d55dffd9ae73ff72f1c0482454dcf2ec6c6c4a63" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.4.8+0" +version = "2.6.5+0" [[deps.ExponentialUtilities]] -deps = ["ArrayInterfaceCore", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "Printf", "SparseArrays", "libblastrampoline_jll"] -git-tree-sha1 = "b19c3f5001b11b71d0f970f354677d604f3a1a97" +deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "PrecompileTools", "Printf", "SparseArrays", "libblastrampoline_jll"] +git-tree-sha1 = "cae251c76f353e32d32d76fae2fea655eab652af" uuid = "d4d017d3-3776-5f7e-afef-a10c40355c18" -version = "1.19.0" +version = "1.27.0" +weakdeps = ["StaticArrays"] + + [deps.ExponentialUtilities.extensions] + ExponentialUtilitiesStaticArraysExt = "StaticArrays" + +[[deps.ExprTools]] +git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" +uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" +version = "0.1.10" + +[[deps.ExproniconLite]] +git-tree-sha1 = "c13f0b150373771b0fdc1713c97860f8df12e6c2" +uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" +version = "0.10.14" [[deps.FFMPEG]] deps = ["FFMPEG_jll"] -git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +git-tree-sha1 = "53ebe7511fa11d33bec688a9178fac4e49eeee00" uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" -version = "0.4.1" +version = "0.4.2" [[deps.FFMPEG_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] -git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623" +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "466d45dc38e15794ec7d5d63ec03d776a9aff36e" uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" -version = "4.4.2+0" +version = "4.4.4+1" [[deps.FastBroadcast]] -deps = ["ArrayInterface", "ArrayInterfaceCore", "LinearAlgebra", "Polyester", "Static", "StrideArraysCore"] -git-tree-sha1 = "21cdeff41e5a1822c2acd7fc7934c5f450588e00" +deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] +git-tree-sha1 = "ab1b34570bcdf272899062e1a56285a53ecaae08" uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" -version = "0.2.1" +version = "0.3.5" [[deps.FastClosures]] git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" version = "0.3.2" -[[deps.FastLapackInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "14a6f7a21125f715d935fe8f83560ee833f7d79d" -uuid = "29a986be-02c6-4525-aec4-84b980013641" -version = "1.2.7" +[[deps.FastGaussQuadrature]] +deps = ["LinearAlgebra", "SpecialFunctions", "StaticArrays"] +git-tree-sha1 = "fd923962364b645f3719855c88f7074413a6ad92" +uuid = "442a2c76-b920-505d-bb47-c5924d526838" +version = "1.0.2" + +[[deps.FastPower]] +git-tree-sha1 = "5f7afd4b1a3969dc34d692da2ed856047325b06e" +uuid = "a4df4552-cc26-4903-aec0-212e50a0e84b" +version = "1.1.3" + + [deps.FastPower.extensions] + FastPowerEnzymeExt = "Enzyme" + FastPowerForwardDiffExt = "ForwardDiff" + FastPowerMeasurementsExt = "Measurements" + FastPowerMonteCarloMeasurementsExt = "MonteCarloMeasurements" + FastPowerMooncakeExt = "Mooncake" + FastPowerReverseDiffExt = "ReverseDiff" + FastPowerTrackerExt = "Tracker" + + [deps.FastPower.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FillArrays]] -deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] -git-tree-sha1 = "87519eb762f85534445f5cda35be12e32759ee14" +deps = ["LinearAlgebra"] +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "0.13.4" +version = "1.13.0" +weakdeps = ["PDMats", "SparseArrays", "Statistics"] + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" [[deps.FiniteDiff]] -deps = ["ArrayInterfaceCore", "LinearAlgebra", "Requires", "Setfield", "SparseArrays", "StaticArrays"] -git-tree-sha1 = "5a2cff9b6b77b33b89f3d97a4d367747adce647e" +deps = ["ArrayInterface", "LinearAlgebra", "Setfield"] +git-tree-sha1 = "f089ab1f834470c525562030c8cfde4025d5e915" uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.15.0" +version = "2.27.0" + + [deps.FiniteDiff.extensions] + FiniteDiffBandedMatricesExt = "BandedMatrices" + FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" + FiniteDiffSparseArraysExt = "SparseArrays" + FiniteDiffStaticArraysExt = "StaticArrays" + + [deps.FiniteDiff.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [[deps.FixedPointNumbers]] deps = ["Statistics"] -git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.4" +version = "0.8.5" [[deps.Fontconfig_jll]] -deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] +git-tree-sha1 = "301b5d5d731a0654825f1f2e906990f7141a106b" uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" -version = "2.13.93+0" +version = "2.16.0+0" -[[deps.Formatting]] -deps = ["Printf"] -git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" -uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" -version = "0.4.2" +[[deps.Format]] +git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" +uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" +version = "1.3.7" [[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"] -git-tree-sha1 = "187198a4ed8ccd7b5d99c41b69c679269ea2b2d4" +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.32" +version = "1.0.1" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" [[deps.FreeType2_jll]] -deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "87eb71354d8ec1a96d4a7636bd57a7347dde3ef9" +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "2c5512e11c791d1baed2049c5652441b28fc6a31" uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" -version = "2.10.4+0" +version = "2.13.4+0" [[deps.FriBidi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "7a214fdac5ed5f59a22c2d9a885a16da1c74bbc7" uuid = "559328eb-81f9-559d-9380-de523a88c83c" -version = "1.0.10+0" +version = "1.0.17+0" [[deps.FunctionWrappers]] -git-tree-sha1 = "241552bc2209f0fa068b6415b1942cc0aa486bcc" +git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" -version = "1.1.2" +version = "1.1.3" [[deps.FunctionWrappersWrappers]] deps = ["FunctionWrappers"] -git-tree-sha1 = "a5e6e7f12607e90d71b09e6ce2c965e41b337968" +git-tree-sha1 = "b104d487b34566608f8b4e1c39fb0b10aa279ff8" uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" -version = "0.1.1" +version = "0.1.3" [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" [[deps.GLFW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] -git-tree-sha1 = "d972031d28c8c8d9d7b41a536ad7bb0c2579caca" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] +git-tree-sha1 = "fcb0584ff34e25155876418979d4c8971243bb89" uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -version = "3.3.8+0" +version = "3.4.0+2" [[deps.GPUArraysCore]] deps = ["Adapt"] -git-tree-sha1 = "6872f5ec8fd1a38880f027a26739d42dcda6691f" +git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.1.2" +version = "0.2.0" [[deps.GR]] -deps = ["Base64", "DelimitedFiles", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Printf", "Random", "RelocatableFolders", "Serialization", "Sockets", "Test", "UUIDs"] -git-tree-sha1 = "0ac6f27e784059c68b987f42b909ade0bcfabe69" +deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] +git-tree-sha1 = "1828eb7275491981fa5f1752a5e126e8f26f8741" uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -version = "0.68.0" +version = "0.73.17" [[deps.GR_jll]] -deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Pkg", "Qt5Base_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "ad86229227847772bb985cc1dd3b842ff61317a7" +deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "27299071cc29e409488ada41ec7643e0ab19091f" uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" -version = "0.69.0+0" +version = "0.73.17+0" [[deps.GenericSchur]] deps = ["LinearAlgebra", "Printf"] -git-tree-sha1 = "fb69b2a645fa69ba5f474af09221b9308b160ce6" +git-tree-sha1 = "f88e0ba1f6b42121a7c1dfe93a9687d8e164c91b" uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" -version = "0.5.3" +version = "0.5.5" -[[deps.Gettext_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" -uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" -version = "0.21.0+0" +[[deps.GettextRuntime_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll"] +git-tree-sha1 = "45288942190db7c5f760f59c04495064eedf9340" +uuid = "b0724c58-0f36-5564-988d-3bb0596ebc4a" +version = "0.22.4+0" [[deps.Git]] -deps = ["Git_jll"] -git-tree-sha1 = "d7bffc3fe097e9589145493c08c41297b457e5d0" +deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"] +git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c" uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" -version = "1.2.1" +version = "1.4.0" [[deps.Git_jll]] -deps = ["Artifacts", "Expat_jll", "Gettext_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "6e93d42b97978709e9c941fa43d0f01701f0d290" +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "b981ed24de5855f20fce5b8cb767c179f93e4268" uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" -version = "2.34.1+0" +version = "2.50.0+0" [[deps.Glib_jll]] -deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "a32d672ac2c967f3deb8a81d828afc739c838a06" +deps = ["Artifacts", "GettextRuntime_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "35fbd0cefb04a516104b8e183ce0df11b70a3f1a" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.68.3+2" +version = "2.84.3+0" [[deps.Graphite2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8a6dbda1fd736d60cc477d99f2e7a042acfa46e8" uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" -version = "1.3.14+0" - -[[deps.Graphs]] -deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "ba2d094a88b6b287bd25cfa86f301e7693ffae2f" -uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.7.4" +version = "1.3.15+0" [[deps.Grisu]] git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" @@ -474,76 +754,64 @@ uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" version = "1.0.2" [[deps.HTTP]] -deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "4abede886fcba15cd5fd041fef776b230d004cee" +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "ed5e9c58612c4e081aecdb6e1a479e18462e041e" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.4.0" +version = "1.10.17" [[deps.HarfBuzz_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] -git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] +git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813" uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" -version = "2.8.1+1" +version = "8.5.1+0" [[deps.Highlights]] deps = ["DocStringExtensions", "InteractiveUtils", "REPL"] -git-tree-sha1 = "f823a2d04fb233d52812c8024a6d46d9581904a4" +git-tree-sha1 = "9e13b8d8b1367d9692a90ea4711b4278e4755c32" uuid = "eafb193a-b7ab-5a9e-9068-77385905fa72" -version = "0.4.5" - -[[deps.HostCPUFeatures]] -deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "b7b88a4716ac33fe31d6556c02fc60017594343c" -uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.8" +version = "0.5.3" [[deps.HypergeometricFunctions]] -deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions", "Test"] -git-tree-sha1 = "709d864e3ed6e3545230601f94e11ebc65994641" +deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] +git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.11" +version = "0.3.28" [[deps.IJulia]] -deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Libdl", "Markdown", "MbedTLS", "Pkg", "Printf", "REPL", "Random", "SoftGlobalScope", "Test", "UUIDs", "ZMQ"] -git-tree-sha1 = "98ab633acb0fe071b671f6c1785c46cd70bb86bd" +deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Logging", "Markdown", "MbedTLS", "Pkg", "Printf", "REPL", "Random", "SoftGlobalScope", "UUIDs", "ZMQ"] +git-tree-sha1 = "9e60d328aa8060368d6dadd24b644d0ebaf0c1cb" uuid = "7073ff75-c697-5162-941a-fcdaad2a7d2a" -version = "1.23.3" +version = "1.29.0" [[deps.IfElse]] git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" version = "0.1.1" -[[deps.Inflate]] -git-tree-sha1 = "5cd07aab533df5170988219191dfad0519391428" -uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.3" - -[[deps.IniFile]] -git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625" -uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f" -version = "0.5.1" +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "0f14a5456bdc6b9731a5682f439a672750a09e48" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2025.0.4+0" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.InverseFunctions]] -deps = ["Test"] -git-tree-sha1 = "b3364212fb5d870f724876ffcd34dd8ec6d98918" +git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" uuid = "3587e190-3f89-42d0-90ee-14403ec27112" -version = "0.1.7" +version = "0.1.17" +weakdeps = ["Dates", "Test"] + + [deps.InverseFunctions.extensions] + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" [[deps.IrrationalConstants]] -git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151" +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.1.1" - -[[deps.IterativeSolvers]] -deps = ["LinearAlgebra", "Printf", "Random", "RecipesBase", "SparseArrays"] -git-tree-sha1 = "1169632f425f79429f245113b775a0e3d121457c" -uuid = "42fd0dbc-a981-5370-80f2-aaf504508153" -version = "0.9.2" +version = "0.2.4" [[deps.IteratorInterfaceExtensions]] git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" @@ -551,194 +819,284 @@ uuid = "82899510-4779-5014-852e-03e436cf321d" version = "1.0.0" [[deps.JLFzf]] -deps = ["Pipe", "REPL", "Random", "fzf_jll"] -git-tree-sha1 = "f377670cda23b6b7c1c0b3893e37451c5c1a2185" +deps = ["REPL", "Random", "fzf_jll"] +git-tree-sha1 = "82f7acdc599b65e0f8ccd270ffa1467c21cb647b" uuid = "1019f520-868f-41f5-a6de-eb00f4b6a39c" -version = "0.1.5" +version = "0.1.11" [[deps.JLLWrappers]] -deps = ["Preferences"] -git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.4.1" +version = "1.7.0" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e" +git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.3" +version = "0.21.4" + +[[deps.Jieko]] +deps = ["ExproniconLite"] +git-tree-sha1 = "2f05ed29618da60c06a87e9c033982d4f71d0b6c" +uuid = "ae98c720-c025-4a4a-838c-29b094483192" +version = "0.2.1" [[deps.JpegTurbo_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "b53380851c6e6664204efb2e62cd24fa5c47e4ba" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "eac1206917768cb54957c65a615460d87b455fc1" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "2.1.2+0" - -[[deps.KLU]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] -git-tree-sha1 = "cae5e3dfd89b209e01bcd65b3a25e74462c67ee0" -uuid = "ef3ab10e-7fda-4108-b977-705223b18434" -version = "0.3.0" +version = "3.1.1+0" [[deps.Krylov]] deps = ["LinearAlgebra", "Printf", "SparseArrays"] -git-tree-sha1 = "92256444f81fb094ff5aa742ed10835a621aef75" +git-tree-sha1 = "b94257a1a8737099ca40bc7271a8b374033473ed" uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" -version = "0.8.4" - -[[deps.KrylovKit]] -deps = ["LinearAlgebra", "Printf"] -git-tree-sha1 = "49b0c1dd5c292870577b8f58c51072bd558febb9" -uuid = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" -version = "0.5.4" +version = "0.10.1" [[deps.LAME_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "059aabebaa7c82ccb853dd4a0ee9d17796f7e1bc" uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" -version = "3.100.1+0" +version = "3.100.3+0" [[deps.LERC_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "aaafe88dccbd957a8d82f7d05be9b69172e0cee3" uuid = "88015f11-f218-50d7-93a8-a6af411a945d" -version = "3.0.0+1" +version = "4.0.1+0" + +[[deps.LLVMOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "eb62a3deb62fc6d8822c0c4bef73e4412419c5d8" +uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" +version = "18.1.8+0" [[deps.LZO_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1c602b1127f4751facb671441ca72715cc95938a" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.1+0" +version = "2.10.3+0" [[deps.LaTeXStrings]] -git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.0" +version = "1.4.0" + +[[deps.LabelledArrays]] +deps = ["ArrayInterface", "ChainRulesCore", "ForwardDiff", "LinearAlgebra", "MacroTools", "PreallocationTools", "RecursiveArrayTools", "StaticArrays"] +git-tree-sha1 = "787746e59dc50568695927afd7ffb09e294382c8" +uuid = "2ee39098-c373-598a-b85f-a56591580800" +version = "1.16.1" [[deps.Latexify]] -deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Printf", "Requires"] -git-tree-sha1 = "ab9aa169d2160129beb241cb2750ca499b4e90e9" +deps = ["Format", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] +git-tree-sha1 = "4f34eaabe49ecb3fb0d58d6015e32fd31a733199" uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.15.17" +version = "0.16.8" + + [deps.Latexify.extensions] + DataFramesExt = "DataFrames" + SparseArraysExt = "SparseArrays" + SymEngineExt = "SymEngine" + TectonicExt = "tectonic_jll" + + [deps.Latexify.weakdeps] + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" + tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" [[deps.LayoutPointers]] -deps = ["ArrayInterface", "ArrayInterfaceOffsetArrays", "ArrayInterfaceStaticArrays", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static"] -git-tree-sha1 = "b67e749fb35530979839e7b4b606a97105fe4f1c" +deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] +git-tree-sha1 = "a9eaadb366f5493a5654e843864c13d8b107548c" uuid = "10f19ff3-798f-405d-979b-55457f8fc047" -version = "0.1.10" +version = "0.1.17" + +[[deps.LazyArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"] +git-tree-sha1 = "866ce84b15e54d758c11946aacd4e5df0e60b7a3" +uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02" +version = "2.6.1" + + [deps.LazyArrays.extensions] + LazyArraysBandedMatricesExt = "BandedMatrices" + LazyArraysBlockArraysExt = "BlockArrays" + LazyArraysBlockBandedMatricesExt = "BlockBandedMatrices" + LazyArraysStaticArraysExt = "StaticArrays" + + [deps.LazyArrays.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" [[deps.Libffi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" -version = "3.2.2+1" - -[[deps.Libgcrypt_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] -git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" -uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.8.7+0" +version = "3.4.7+0" [[deps.Libglvnd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] -git-tree-sha1 = "7739f837d6447403596a75d19ed01fd08d6f56bf" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "d36c21b9e7c172a44a10484125024495e2625ac0" uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" -version = "1.3.0+3" - -[[deps.Libgpg_error_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" -uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.42.0+0" +version = "1.7.1+1" [[deps.Libiconv_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "be484f5c92fad0bd8acfef35fe017900b0b73809" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.16.1+1" +version = "1.18.0+0" [[deps.Libmount_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "a31572773ac1b745e0343fe5e2c8ddda7a37e997" uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -version = "2.35.0+0" +version = "2.41.0+0" [[deps.Libtiff_jll]] -deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "Pkg", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "3eb79b0ca5764d4799c06699573fd8f533259713" +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "4ab7581296671007fc33f07a721631b8855f4b1d" uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.4.0+0" +version = "4.7.1+0" [[deps.Libuuid_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "321ccef73a96ba828cd51f2ab5b9f917fa73945a" uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -version = "2.36.0+0" +version = "2.41.0+0" + +[[deps.LineSearch]] +deps = ["ADTypes", "CommonSolve", "ConcreteStructs", "FastClosures", "LinearAlgebra", "MaybeInplace", "SciMLBase", "SciMLJacobianOperators", "StaticArraysCore"] +git-tree-sha1 = "97d502765cc5cf3a722120f50da03c2474efce04" +uuid = "87fe0de2-c867-4266-b59a-2f0a94fc965b" +version = "0.1.4" +weakdeps = ["LineSearches"] + + [deps.LineSearch.extensions] + LineSearchLineSearchesExt = "LineSearches" [[deps.LineSearches]] deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] -git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" +git-tree-sha1 = "4adee99b7262ad2a1a4bbbc59d993d24e55ea96f" uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" -version = "7.2.0" +version = "7.4.0" [[deps.LinearAlgebra]] -deps = ["Libdl", "libblastrampoline_jll"] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LinearSolve]] -deps = ["ArrayInterfaceCore", "DocStringExtensions", "FastLapackInterface", "GPUArraysCore", "IterativeSolvers", "KLU", "Krylov", "KrylovKit", "LinearAlgebra", "RecursiveFactorization", "Reexport", "SciMLBase", "Setfield", "SparseArrays", "SuiteSparse", "UnPack"] -git-tree-sha1 = "c17007396b2ae56b8496f5a9857326dea0b7bb7b" +deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "StaticArraysCore", "UnPack"] +git-tree-sha1 = "062c11f1d84ffc80d00fddaa515f7e37e8e9f9d5" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "1.26.0" +version = "3.18.2" + + [deps.LinearSolve.extensions] + LinearSolveBandedMatricesExt = "BandedMatrices" + LinearSolveBlockDiagonalsExt = "BlockDiagonals" + LinearSolveCUDAExt = "CUDA" + LinearSolveCUDSSExt = "CUDSS" + LinearSolveEnzymeExt = "EnzymeCore" + LinearSolveFastAlmostBandedMatricesExt = "FastAlmostBandedMatrices" + LinearSolveFastLapackInterfaceExt = "FastLapackInterface" + LinearSolveForwardDiffExt = "ForwardDiff" + LinearSolveHYPREExt = "HYPRE" + LinearSolveIterativeSolversExt = "IterativeSolvers" + LinearSolveKernelAbstractionsExt = "KernelAbstractions" + LinearSolveKrylovKitExt = "KrylovKit" + LinearSolveMetalExt = "Metal" + LinearSolvePardisoExt = ["Pardiso", "SparseArrays"] + LinearSolveRecursiveFactorizationExt = "RecursiveFactorization" + LinearSolveSparseArraysExt = "SparseArrays" + LinearSolveSparspakExt = ["SparseArrays", "Sparspak"] + + [deps.LinearSolve.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + FastAlmostBandedMatrices = "9d29842c-ecb8-4973-b1e9-a27b1157504e" + FastLapackInterface = "29a986be-02c6-4525-aec4-84b980013641" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" + IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" + RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac" [[deps.LogExpFunctions]] -deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "94d9c52ca447e23eac0c0f074effbcd38830deb5" +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.18" +version = "0.3.29" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] -git-tree-sha1 = "5d4d2d9904227b8bd66386c1138cf4d5ffa826bf" +git-tree-sha1 = "f02b56007b064fbfddb4c9cd60161b6dd0f40df3" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "0.4.9" +version = "1.1.0" -[[deps.LoopVectorization]] -deps = ["ArrayInterface", "ArrayInterfaceCore", "ArrayInterfaceOffsetArrays", "ArrayInterfaceStaticArrays", "CPUSummary", "ChainRulesCore", "CloseOpenIntervals", "DocStringExtensions", "ForwardDiff", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "SIMDDualNumbers", "SIMDTypes", "SLEEFPirates", "SnoopPrecompile", "SpecialFunctions", "Static", "ThreadingUtilities", "UnPack", "VectorizationBase"] -git-tree-sha1 = "7b97cfe6e51e4fde195b7654425aa84e527d9657" -uuid = "bdcacae8-1622-11e9-2a5c-532679323890" -version = "0.12.128" +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] +git-tree-sha1 = "5de60bc6cb3899cd318d80d627560fae2e2d99ae" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2025.0.1+1" [[deps.MacroTools]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf" +git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.9" +version = "0.5.16" [[deps.ManualMemory]] git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" @@ -749,51 +1107,67 @@ version = "0.1.8" deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +[[deps.MaybeInplace]] +deps = ["ArrayInterface", "LinearAlgebra", "MacroTools"] +git-tree-sha1 = "54e2fdc38130c05b42be423e90da3bade29b74bd" +uuid = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb" +version = "0.1.4" +weakdeps = ["SparseArrays"] + + [deps.MaybeInplace.extensions] + MaybeInplaceSparseArraysExt = "SparseArrays" + [[deps.MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] -git-tree-sha1 = "6872f9594ff273da6d13c7c1a1545d5a8c7d0c1c" +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] +git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.1.6" +version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.0+0" +version = "2.28.2+1" [[deps.Measures]] -git-tree-sha1 = "e498ddeee6f9fdb4551ce855a46f54dbd900245f" +git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" -version = "0.3.1" +version = "0.3.2" [[deps.Missings]] deps = ["DataAPI"] -git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f" +git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.0.2" +version = "1.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" +[[deps.Moshi]] +deps = ["ExproniconLite", "Jieko"] +git-tree-sha1 = "53f817d3e84537d84545e0ad749e483412dd6b2a" +uuid = "2e0e35c7-a2e4-4343-998d-7ef72827ed2d" +version = "0.3.7" + [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.2.1" +version = "2023.1.10" [[deps.MuladdMacro]] -git-tree-sha1 = "c6190f9a7fc5d9d5915ab29f2134421b12d24a68" +git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" -version = "0.2.2" +version = "0.2.4" [[deps.Mustache]] deps = ["Printf", "Tables"] -git-tree-sha1 = "1e566ae913a57d0062ff1af54d2697b9344b99cd" +git-tree-sha1 = "3cbd5dda543bc59f2e482607ccf84b633724fc32" uuid = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70" -version = "1.0.14" +version = "1.0.21" [[deps.NLSolversBase]] -deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] -git-tree-sha1 = "50310f934e55e5ca3912fb941dec199b49ca9b68" +deps = ["ADTypes", "DifferentiationInterface", "Distributed", "FiniteDiff", "ForwardDiff"] +git-tree-sha1 = "25a6638571a902ecfb1ae2a18fc1575f86b1d4df" uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" -version = "7.8.2" +version = "7.10.0" [[deps.NLsolve]] deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] @@ -803,99 +1177,369 @@ version = "4.5.1" [[deps.NaNMath]] deps = ["OpenLibm_jll"] -git-tree-sha1 = "a7c3d1da1189a1c2fe843a3bfa04d18d20eb3211" +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.0.1" +version = "1.1.3" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.NonlinearSolve]] -deps = ["ArrayInterfaceCore", "FiniteDiff", "ForwardDiff", "IterativeSolvers", "LinearAlgebra", "RecursiveArrayTools", "RecursiveFactorization", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "UnPack"] -git-tree-sha1 = "a754a21521c0ab48d37f44bbac1eefd1387bdcfc" +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseMatrixColorings", "StaticArraysCore", "SymbolicIndexingInterface"] +git-tree-sha1 = "aeb6fb02e63b4d4f90337ed90ce54ceb4c0efe77" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "0.3.22" +version = "4.9.0" + + [deps.NonlinearSolve.extensions] + NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" + NonlinearSolveFixedPointAccelerationExt = "FixedPointAcceleration" + NonlinearSolveLeastSquaresOptimExt = "LeastSquaresOptim" + NonlinearSolveMINPACKExt = "MINPACK" + NonlinearSolveNLSolversExt = "NLSolvers" + NonlinearSolveNLsolveExt = ["NLsolve", "LineSearches"] + NonlinearSolvePETScExt = ["PETSc", "MPI"] + NonlinearSolveSIAMFANLEquationsExt = "SIAMFANLEquations" + NonlinearSolveSpeedMappingExt = "SpeedMapping" + NonlinearSolveSundialsExt = "Sundials" + + [deps.NonlinearSolve.weakdeps] + FastLevenbergMarquardt = "7a0df574-e128-4d35-8cbd-3d84502bf7ce" + FixedPointAcceleration = "817d07cb-a79a-5c30-9a31-890123675176" + LeastSquaresOptim = "0fc2ff8b-aaa3-5acd-a817-1944a5e08891" + LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" + MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + NLSolvers = "337daf1e-9722-11e9-073e-8b9effe078ba" + NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" + PETSc = "ace2c81b-2b5f-4b1e-a30d-d662738edfe0" + SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4" + SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412" + Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" + +[[deps.NonlinearSolveBase]] +deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "Compat", "ConcreteStructs", "DifferentiationInterface", "EnzymeCore", "FastClosures", "LinearAlgebra", "Markdown", "MaybeInplace", "Preferences", "Printf", "RecursiveArrayTools", "SciMLBase", "SciMLJacobianOperators", "SciMLOperators", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] +git-tree-sha1 = "404d71dd057759f4d590191a643113485c4a482a" +uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" +version = "1.12.0" + + [deps.NonlinearSolveBase.extensions] + NonlinearSolveBaseBandedMatricesExt = "BandedMatrices" + NonlinearSolveBaseDiffEqBaseExt = "DiffEqBase" + NonlinearSolveBaseForwardDiffExt = "ForwardDiff" + NonlinearSolveBaseLineSearchExt = "LineSearch" + NonlinearSolveBaseLinearSolveExt = "LinearSolve" + NonlinearSolveBaseSparseArraysExt = "SparseArrays" + NonlinearSolveBaseSparseMatrixColoringsExt = "SparseMatrixColorings" + + [deps.NonlinearSolveBase.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + LineSearch = "87fe0de2-c867-4266-b59a-2f0a94fc965b" + LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" + +[[deps.NonlinearSolveFirstOrder]] +deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLJacobianOperators", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "9c8cd0a986518ba317af263549b48e34ac8f776d" +uuid = "5959db7a-ea39-4486-b5fe-2dd0bf03d60d" +version = "1.5.0" -[[deps.OffsetArrays]] -deps = ["Adapt"] -git-tree-sha1 = "1ea784113a6aa054c5ebd95945fa5e52c2f378e7" -uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.12.7" +[[deps.NonlinearSolveQuasiNewton]] +deps = ["ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLOperators", "StaticArraysCore"] +git-tree-sha1 = "e3888bdbab6e0bfadbc3164ef4595e40e7b7e954" +uuid = "9a2c21bd-3a47-402d-9113-8faf9a0ee114" +version = "1.6.0" +weakdeps = ["ForwardDiff"] + + [deps.NonlinearSolveQuasiNewton.extensions] + NonlinearSolveQuasiNewtonForwardDiffExt = "ForwardDiff" + +[[deps.NonlinearSolveSpectralMethods]] +deps = ["CommonSolve", "ConcreteStructs", "DiffEqBase", "LineSearch", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "3398222199e4b9ca0b5840907fb509f28f1a2fdc" +uuid = "26075421-4e9a-44e1-8bd1-420ed7ad02b2" +version = "1.2.0" +weakdeps = ["ForwardDiff"] + + [deps.NonlinearSolveSpectralMethods.extensions] + NonlinearSolveSpectralMethodsForwardDiffExt = "ForwardDiff" [[deps.Ogg_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b6aa4566bb7ae78498a5e68943863fa8b5231b59" uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" -version = "1.3.5+1" +version = "1.3.6+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.20+0" +version = "0.3.23+4" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.5+0" + +[[deps.OpenSSH_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"] +git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800" +uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b" +version = "10.0.1+0" [[deps.OpenSSL]] deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "f561403726db82fe98c0963a382b1b839e9287b1" +git-tree-sha1 = "f1a7e086c677df53e064e0fdd2c9d0b0833e3f6e" uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.1.2" +version = "1.5.0" [[deps.OpenSSL_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "e60321e3f2616584ff98f0a4f18d98ae6f89bbb3" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "87510f7292a2b21aeff97912b0898f9553cc5c2c" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.17+0" +version = "3.5.1+0" [[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.5+0" +version = "0.5.6+0" [[deps.Optim]] -deps = ["Compat", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] -git-tree-sha1 = "b9fe76d1a39807fdcf790b991981a922de0c3050" +deps = ["Compat", "EnumX", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] +git-tree-sha1 = "61942645c38dd2b5b78e2082c9b51ab315315d10" uuid = "429524aa-4258-5aef-a3af-852621145aeb" -version = "1.7.3" +version = "1.13.2" + + [deps.Optim.extensions] + OptimMOIExt = "MathOptInterface" + + [deps.Optim.weakdeps] + MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" [[deps.Opus_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c392fc5dd032381919e3b22dd32d6443760ce7ea" uuid = "91d4177d-7536-5919-b921-800302f37372" -version = "1.3.2+0" +version = "1.5.2+0" [[deps.OrderedCollections]] -git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c" +git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.4.1" +version = "1.8.1" [[deps.OrdinaryDiffEq]] -deps = ["Adapt", "ArrayInterface", "ArrayInterfaceGPUArrays", "ArrayInterfaceStaticArrays", "DataStructures", "DiffEqBase", "DocStringExtensions", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "LinearAlgebra", "LinearSolve", "Logging", "LoopVectorization", "MacroTools", "MuladdMacro", "NLsolve", "NonlinearSolve", "Polyester", "PreallocationTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SnoopPrecompile", "SparseArrays", "SparseDiffTools", "StaticArrays", "UnPack"] -git-tree-sha1 = "eb86665fceb26f3db4123266c7b517146ad83d45" +deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FillArrays", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "MacroTools", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqDefault", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqExplicitRK", "OrdinaryDiffEqExponentialRK", "OrdinaryDiffEqExtrapolation", "OrdinaryDiffEqFIRK", "OrdinaryDiffEqFeagin", "OrdinaryDiffEqFunctionMap", "OrdinaryDiffEqHighOrderRK", "OrdinaryDiffEqIMEXMultistep", "OrdinaryDiffEqLinear", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqNordsieck", "OrdinaryDiffEqPDIRK", "OrdinaryDiffEqPRK", "OrdinaryDiffEqQPRK", "OrdinaryDiffEqRKN", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqSSPRK", "OrdinaryDiffEqStabilizedIRK", "OrdinaryDiffEqStabilizedRK", "OrdinaryDiffEqSymplecticRK", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "Static", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] +git-tree-sha1 = "1c2b2df870944e0dc01454fd87479847c55fa26c" uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.27.2" +version = "6.98.0" + +[[deps.OrdinaryDiffEqAdamsBashforthMoulton]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqLowOrderRK", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "82f78099ecf4e0fa53545811318520d87e7fe0b8" +uuid = "89bda076-bce5-4f1c-845f-551c83cdda9a" +version = "1.2.0" + +[[deps.OrdinaryDiffEqBDF]] +deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqSDIRK", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "StaticArrays", "TruncatedStacktraces"] +git-tree-sha1 = "9124a686af119063bb4d3a8f87044a8f312fcad9" +uuid = "6ad6398a-0878-4a85-9266-38940aa047c8" +version = "1.6.0" + +[[deps.OrdinaryDiffEqCore]] +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "FastBroadcast", "FastClosures", "FastPower", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleUnPack", "Static", "StaticArrayInterface", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "1bd20b621e8dee5f2d170ae31631bf573ab77eec" +uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" +version = "1.26.2" + + [deps.OrdinaryDiffEqCore.extensions] + OrdinaryDiffEqCoreEnzymeCoreExt = "EnzymeCore" + OrdinaryDiffEqCoreMooncakeExt = "Mooncake" + + [deps.OrdinaryDiffEqCore.weakdeps] + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + +[[deps.OrdinaryDiffEqDefault]] +deps = ["ADTypes", "DiffEqBase", "EnumX", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "PrecompileTools", "Preferences", "Reexport"] +git-tree-sha1 = "7e2f4ec76ebac709401064fd2cf73ad993d1e694" +uuid = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" +version = "1.5.0" + +[[deps.OrdinaryDiffEqDifferentiation]] +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqCore", "SciMLBase", "SciMLOperators", "SparseArrays", "SparseMatrixColorings", "StaticArrayInterface", "StaticArrays"] +git-tree-sha1 = "efecf0c4cc44e16251b0e718f08b0876b2a82b80" +uuid = "4302a76b-040a-498a-8c04-15b101fed76b" +version = "1.10.0" + +[[deps.OrdinaryDiffEqExplicitRK]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "TruncatedStacktraces"] +git-tree-sha1 = "4dbce3f9e6974567082ce5176e21aab0224a69e9" +uuid = "9286f039-9fbf-40e8-bf65-aa933bdc4db0" +version = "1.1.0" + +[[deps.OrdinaryDiffEqExponentialRK]] +deps = ["ADTypes", "DiffEqBase", "ExponentialUtilities", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqVerner", "RecursiveArrayTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "8d2ab84d7fabdfde995e5f567361f238069497f5" +uuid = "e0540318-69ee-4070-8777-9e2de6de23de" +version = "1.4.0" + +[[deps.OrdinaryDiffEqExtrapolation]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "FastPower", "LinearSolve", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "Polyester", "RecursiveArrayTools", "Reexport"] +git-tree-sha1 = "80a636aac325c546b04e3bf20f0c80eaa0173dd4" +uuid = "becaefa8-8ca2-5cf9-886d-c06f3d2bd2c4" +version = "1.5.0" + +[[deps.OrdinaryDiffEqFIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "FastGaussQuadrature", "FastPower", "LinearAlgebra", "LinearSolve", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Polyester", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "0da8ec3491821262a3d2828e6370e76b51a770a3" +uuid = "5960d6e9-dd7a-4743-88e7-cf307b64f125" +version = "1.12.0" + +[[deps.OrdinaryDiffEqFeagin]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "a7cc74d3433db98e59dc3d58bc28174c6c290adf" +uuid = "101fe9f7-ebb6-4678-b671-3a81e7194747" +version = "1.1.0" + +[[deps.OrdinaryDiffEqFunctionMap]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static"] +git-tree-sha1 = "925a91583d1ab84f1f0fea121be1abf1179c5926" +uuid = "d3585ca7-f5d3-4ba6-8057-292ed1abd90f" +version = "1.1.1" + +[[deps.OrdinaryDiffEqHighOrderRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "103e017ff186ac39d731904045781c9bacfca2b0" +uuid = "d28bc4f8-55e1-4f49-af69-84c1a99f0f58" +version = "1.1.0" + +[[deps.OrdinaryDiffEqIMEXMultistep]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Reexport"] +git-tree-sha1 = "095bab73a3ff185e9ef971fc42ecc93c7824e589" +uuid = "9f002381-b378-40b7-97a6-27a27c83f129" +version = "1.3.0" + +[[deps.OrdinaryDiffEqLinear]] +deps = ["DiffEqBase", "ExponentialUtilities", "LinearAlgebra", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "940cef72ec8799d869ff1ba3dcf47cf7758e51cf" +uuid = "521117fe-8c41-49f8-b3b6-30780b3f0fb5" +version = "1.3.0" + +[[deps.OrdinaryDiffEqLowOrderRK]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static"] +git-tree-sha1 = "d4bb32e09d6b68ce2eb45fb81001eab46f60717a" +uuid = "1344f307-1e59-4825-a18e-ace9aa3fa4c6" +version = "1.2.0" + +[[deps.OrdinaryDiffEqLowStorageRK]] +deps = ["Adapt", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "StaticArrays"] +git-tree-sha1 = "52ec7081e65291fa5c19749312df0818db2fa1bc" +uuid = "b0944070-b475-4768-8dec-fb6eb410534d" +version = "1.3.0" + +[[deps.OrdinaryDiffEqNonlinearSolve]] +deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "FastClosures", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "PreallocationTools", "RecursiveArrayTools", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "StaticArrays"] +git-tree-sha1 = "ffdb0f5207b0e30f8b1edf99b3b9546d9c48ccaf" +uuid = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" +version = "1.10.0" + +[[deps.OrdinaryDiffEqNordsieck]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqTsit5", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "ef44754f10e0dfb9bb55ded382afed44cd94ab57" +uuid = "c9986a66-5c92-4813-8696-a7ec84c806c8" +version = "1.1.0" + +[[deps.OrdinaryDiffEqPDIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Polyester", "Reexport", "StaticArrays"] +git-tree-sha1 = "ab9897e4bc8e3cf8e15f1cf61dbdd15d6a2341d7" +uuid = "5dd0a6cf-3d4b-4314-aa06-06d4e299bc89" +version = "1.3.1" + +[[deps.OrdinaryDiffEqPRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "Reexport"] +git-tree-sha1 = "da525d277962a1b76102c79f30cb0c31e13fe5b9" +uuid = "5b33eab2-c0f1-4480-b2c3-94bc1e80bda1" +version = "1.1.0" + +[[deps.OrdinaryDiffEqQPRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "332f9d17d0229218f66a73492162267359ba85e9" +uuid = "04162be5-8125-4266-98ed-640baecc6514" +version = "1.1.0" + +[[deps.OrdinaryDiffEqRKN]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport"] +git-tree-sha1 = "41c09d9c20877546490f907d8dffdd52690dd65f" +uuid = "af6ede74-add8-4cfd-b1df-9a4dbb109d7a" +version = "1.1.0" + +[[deps.OrdinaryDiffEqRosenbrock]] +deps = ["ADTypes", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "1ce0096d920e95773220e818f29bf4b37ea2bb78" +uuid = "43230ef6-c299-4910-a778-202eb28ce4ce" +version = "1.11.0" + +[[deps.OrdinaryDiffEqSDIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "RecursiveArrayTools", "Reexport", "SciMLBase", "TruncatedStacktraces"] +git-tree-sha1 = "b3a7e3a2f355d837c823b435630f035aef446b45" +uuid = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" +version = "1.3.0" + +[[deps.OrdinaryDiffEqSSPRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "StaticArrays"] +git-tree-sha1 = "651756c030df7a1d49ad484288937f8c398e8a08" +uuid = "669c94d9-1f4b-4b64-b377-1aa079aa2388" +version = "1.3.0" + +[[deps.OrdinaryDiffEqStabilizedIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "RecursiveArrayTools", "Reexport", "StaticArrays"] +git-tree-sha1 = "111c23b68ad644b47e38242af920d5805c7bedb1" +uuid = "e3e12d00-db14-5390-b879-ac3dd2ef6296" +version = "1.3.0" + +[[deps.OrdinaryDiffEqStabilizedRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "StaticArrays"] +git-tree-sha1 = "1b0d894c880e25f7d0b022d7257638cf8ce5b311" +uuid = "358294b1-0aab-51c3-aafe-ad5ab194a2ad" +version = "1.1.0" + +[[deps.OrdinaryDiffEqSymplecticRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport"] +git-tree-sha1 = "a13d59a2d6cfb6a3332a7782638ca6e1cb6ca688" +uuid = "fa646aed-7ef9-47eb-84c4-9443fc8cbfa8" +version = "1.3.0" + +[[deps.OrdinaryDiffEqTsit5]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "TruncatedStacktraces"] +git-tree-sha1 = "96552f7d4619fabab4038a29ed37dd55e9eb513a" +uuid = "b1df2697-797e-41e3-8120-5422d3b24e4a" +version = "1.1.0" + +[[deps.OrdinaryDiffEqVerner]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "TruncatedStacktraces"] +git-tree-sha1 = "08f2d3be30874b6e2e937a06b501fb9811f7d8bd" +uuid = "79d7bb75-1356-48c1-b8c0-6832512096c2" +version = "1.2.0" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.40.0+0" - -[[deps.PCRE_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "b2a7af664e098055a7529ad1a900ded962bca488" -uuid = "2f80f16e-611a-54ab-bc61-aa92de5b98fc" -version = "8.44.0+0" +version = "10.42.0+1" [[deps.PDMats]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "cf494dca75a69712a72b80bc48f59dcf3dea63ec" +git-tree-sha1 = "f07c06228a1c670ae4c87d1276b92c7c597fdda0" uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.16" +version = "0.11.35" + +[[deps.Pango_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "275a9a6d85dc86c24d03d1837a0010226a96f540" +uuid = "36c8627f-9965-5494-a995-c6b170f724f3" +version = "1.56.3+0" [[deps.Parameters]] deps = ["OrderedCollections", "UnPack"] @@ -904,62 +1548,71 @@ uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" version = "0.12.3" [[deps.Parsers]] -deps = ["Dates"] -git-tree-sha1 = "3d5bf43e3e8b412656404ed9466f1dcbf7c50269" +deps = ["Dates", "PrecompileTools", "UUIDs"] +git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.4.0" - -[[deps.Pipe]] -git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" -uuid = "b98c9c47-44ae-5843-9183-064241ee97a0" -version = "1.3.0" +version = "2.8.3" [[deps.Pixman_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "b4f5d02549a10e20780a24fce72bea96b6329e29" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] +git-tree-sha1 = "db76b1ecd5e9715f3d043cec13b2ec93ce015d53" uuid = "30392449-352a-5448-841d-b1acce4e97dc" -version = "0.40.1+0" +version = "0.44.2+0" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.8.0" +version = "1.10.0" [[deps.PlotThemes]] deps = ["PlotUtils", "Statistics"] -git-tree-sha1 = "8162b2f8547bc23876edd0c5181b27702ae58dce" +git-tree-sha1 = "41031ef3a1be6f5bbbf3e8073f210556daeae5ca" uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" -version = "3.0.0" +version = "3.3.0" [[deps.PlotUtils]] -deps = ["ColorSchemes", "Colors", "Dates", "Printf", "Random", "Reexport", "SnoopPrecompile", "Statistics"] -git-tree-sha1 = "21303256d239f6b484977314674aef4bb1fe4420" +deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "StableRNGs", "Statistics"] +git-tree-sha1 = "3ca9a356cd2e113c420f2c13bea19f8d3fb1cb18" uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" -version = "1.3.1" +version = "1.4.3" [[deps.Plots]] -deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SnoopPrecompile", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "Unzip"] -git-tree-sha1 = "6fae75c2178132582ea261d39f6da50cdd09c3c6" +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] +git-tree-sha1 = "55818b50883d7141bd98cdf5fc2f4ced96ee075f" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.34.0" +version = "1.40.16" + + [deps.Plots.extensions] + FileIOExt = "FileIO" + GeometryBasicsExt = "GeometryBasics" + IJuliaExt = "IJulia" + ImageInTerminalExt = "ImageInTerminal" + UnitfulExt = "Unitful" + + [deps.Plots.weakdeps] + FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" + GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" + IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" + ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.PoissonRandom]] -deps = ["Random"] -git-tree-sha1 = "9ac1bb7c15c39620685a3a7babc0651f5c64c35b" +deps = ["LogExpFunctions", "Random"] +git-tree-sha1 = "bb178012780b34046c6d1600a315d8dbee89d83d" uuid = "e409e4f3-bfea-5376-8464-e040bb5c01ab" -version = "0.4.1" +version = "0.4.5" [[deps.Polyester]] -deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StrideArraysCore", "ThreadingUtilities"] -git-tree-sha1 = "6ee5518f7baa05e154757a003bfb6936a174dbad" +deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] +git-tree-sha1 = "6f7cd22a802094d239824c57d94c8e2d0f7cfc7d" uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" -version = "0.6.15" +version = "0.7.18" [[deps.PolyesterWeave]] deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] -git-tree-sha1 = "b42fb2292fbbaed36f25d33a15c8cc0b4f287fcf" +git-tree-sha1 = "645bed98cd47f72f67316fd42fc47dee771aefcd" uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" -version = "0.1.10" +version = "0.2.2" [[deps.PositiveFactorizations]] deps = ["LinearAlgebra"] @@ -968,75 +1621,143 @@ uuid = "85a6dd25-e78a-55b7-8502-1745935b8125" version = "0.2.4" [[deps.PreallocationTools]] -deps = ["Adapt", "ArrayInterfaceCore", "ForwardDiff"] -git-tree-sha1 = "3953d18698157e1d27a51678c89c88d53e071a42" +deps = ["Adapt", "ArrayInterface", "ForwardDiff"] +git-tree-sha1 = "7a5e02659e293b25a4bfaeeb6cd268acd0742eba" uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -version = "0.4.4" +version = "0.4.28" + + [deps.PreallocationTools.extensions] + PreallocationToolsReverseDiffExt = "ReverseDiff" + PreallocationToolsSparseConnectivityTracerExt = "SparseConnectivityTracer" + + [deps.PreallocationTools.weakdeps] + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" [[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.3.0" +version = "1.4.3" + +[[deps.PrettyTables]] +deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] +git-tree-sha1 = "1101cd475833706e4d0e7b122218257178f48f34" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "2.4.0" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -[[deps.Qt5Base_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"] -git-tree-sha1 = "c6c0f690d0cc7caddb74cef7aa847b824a16b256" -uuid = "ea2cea3b-5b76-57ae-a6ef-0a8af62496e1" -version = "5.15.3+1" +[[deps.PtrArrays]] +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.3.0" + +[[deps.Qt6Base_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] +git-tree-sha1 = "eb38d376097f47316fe089fc62cb7c6d85383a52" +uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" +version = "6.8.2+1" + +[[deps.Qt6Declarative_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6ShaderTools_jll"] +git-tree-sha1 = "da7adf145cce0d44e892626e647f9dcbe9cb3e10" +uuid = "629bc702-f1f5-5709-abd5-49b8460ea067" +version = "6.8.2+1" + +[[deps.Qt6ShaderTools_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll"] +git-tree-sha1 = "9eca9fc3fe515d619ce004c83c31ffd3f85c7ccf" +uuid = "ce943373-25bb-56aa-8eca-768745ed7b5a" +version = "6.8.2+1" + +[[deps.Qt6Wayland_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6Declarative_jll"] +git-tree-sha1 = "e1d5e16d0f65762396f9ca4644a5f4ddab8d452b" +uuid = "e99dba38-086e-5de3-a5b1-6e4c66e897c3" +version = "6.8.2+1" [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "3c009334f45dfd546a16a57960a821a1a023d241" +git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.5.0" +version = "2.11.2" + + [deps.QuadGK.extensions] + QuadGKEnzymeExt = "Enzyme" + + [deps.QuadGK.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.Random123]] deps = ["Random", "RandomNumbers"] -git-tree-sha1 = "7a1a306b72cfa60634f03a911405f4e64d1b718b" +git-tree-sha1 = "dbe5fd0b334694e905cb9fda73cd8554333c46e2" uuid = "74087812-796a-5b5d-8853-05524746bad3" -version = "1.6.0" +version = "1.7.1" [[deps.RandomNumbers]] -deps = ["Random", "Requires"] -git-tree-sha1 = "043da614cc7e95c703498a491e2c21f58a2b8111" +deps = ["Random"] +git-tree-sha1 = "c6ec94d2aaba1ab2ff983052cf6a606ca5985902" uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" -version = "1.5.3" +version = "1.6.0" [[deps.RecipesBase]] -git-tree-sha1 = "6bf3f380ff52ce0832ddd3a2a7b9538ed1bcca7d" +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.2.1" +version = "1.3.4" [[deps.RecipesPipeline]] -deps = ["Dates", "NaNMath", "PlotUtils", "RecipesBase"] -git-tree-sha1 = "e7eac76a958f8664f2718508435d058168c7953d" +deps = ["Dates", "NaNMath", "PlotUtils", "PrecompileTools", "RecipesBase"] +git-tree-sha1 = "45cf9fd0ca5839d06ef333c8201714e888486342" uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" -version = "0.6.3" +version = "0.6.12" [[deps.RecursiveArrayTools]] -deps = ["Adapt", "ArrayInterfaceCore", "ArrayInterfaceStaticArraysCore", "ChainRulesCore", "DocStringExtensions", "FillArrays", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "Tables", "ZygoteRules"] -git-tree-sha1 = "3004608dc42101a944e44c1c68b599fa7c669080" +deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "efc718978d97745c58e69c5115a35c51a080e45e" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "2.32.0" - -[[deps.RecursiveFactorization]] -deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "SnoopPrecompile", "StrideArraysCore", "TriangularSolve"] -git-tree-sha1 = "0a2dfb3358fcde3676beb75405e782faa8c9aded" -uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" -version = "0.2.12" +version = "3.34.1" + + [deps.RecursiveArrayTools.extensions] + RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" + RecursiveArrayToolsForwardDiffExt = "ForwardDiff" + RecursiveArrayToolsKernelAbstractionsExt = "KernelAbstractions" + RecursiveArrayToolsMeasurementsExt = "Measurements" + RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" + RecursiveArrayToolsReverseDiffExt = ["ReverseDiff", "Zygote"] + RecursiveArrayToolsSparseArraysExt = ["SparseArrays"] + RecursiveArrayToolsStructArraysExt = "StructArrays" + RecursiveArrayToolsTrackerExt = "Tracker" + RecursiveArrayToolsZygoteExt = "Zygote" + + [deps.RecursiveArrayTools.weakdeps] + FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [[deps.Reexport]] git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" @@ -1045,15 +1766,15 @@ version = "1.2.2" [[deps.RelocatableFolders]] deps = ["SHA", "Scratch"] -git-tree-sha1 = "90bc7a7c96410424509e4263e277e43250c05691" +git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" -version = "1.0.0" +version = "1.0.1" [[deps.Requires]] deps = ["UUIDs"] -git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.0" +version = "1.3.1" [[deps.ResettableStacks]] deps = ["StaticArrays"] @@ -1063,73 +1784,111 @@ version = "1.1.1" [[deps.Rmath]] deps = ["Random", "Rmath_jll"] -git-tree-sha1 = "bf3188feca147ce108c76ad82c2792c57abe7b1f" +git-tree-sha1 = "852bd0f55565a9e973fcfee83a84413270224dc4" uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -version = "0.7.0" +version = "0.8.0" [[deps.Rmath_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "58cdd8fb2201a6267e1db87ff148dd6c1dbd8ad8" uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.3.0+0" +version = "0.5.1+0" [[deps.RootedTrees]] -deps = ["Latexify", "LinearAlgebra", "Preferences", "RecipesBase", "Requires"] -git-tree-sha1 = "349e3584abc50a1217f2a87514a92818ade655c5" +deps = ["LaTeXStrings", "Latexify", "LinearAlgebra", "Preferences", "RecipesBase", "Requires"] +git-tree-sha1 = "c0c464d3063e46e4128d21fd677ca575ace44fdc" uuid = "47965b36-3f3e-11e9-0dcf-4570dfd42a8c" -version = "2.14.0" +version = "2.23.1" +weakdeps = ["Plots"] + + [deps.RootedTrees.extensions] + PlotsExt = "Plots" + +[[deps.RuntimeGeneratedFunctions]] +deps = ["ExprTools", "SHA", "Serialization"] +git-tree-sha1 = "86a8a8b783481e1ea6b9c91dd949cb32191f8ab4" +uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" +version = "0.5.15" [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" -[[deps.SIMDDualNumbers]] -deps = ["ForwardDiff", "IfElse", "SLEEFPirates", "VectorizationBase"] -git-tree-sha1 = "dd4195d308df24f33fb10dde7c22103ba88887fa" -uuid = "3cdde19b-5bb0-4aaf-8931-af3e248e098b" -version = "0.1.1" - [[deps.SIMDTypes]] git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" uuid = "94e857df-77ce-4151-89e5-788b33177be4" version = "0.1.0" -[[deps.SLEEFPirates]] -deps = ["IfElse", "Static", "VectorizationBase"] -git-tree-sha1 = "2ba4fee025f25d6711487b73e1ac177cbd127913" -uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" -version = "0.6.35" - [[deps.SciMLBase]] -deps = ["ArrayInterfaceCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Preferences", "RecipesBase", "RecursiveArrayTools", "StaticArraysCore", "Statistics", "Tables"] -git-tree-sha1 = "e6778c4d41f3d6213bf4d2803c4eb9ef12b6c0a7" +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] +git-tree-sha1 = "31587e20cdea9fba3a689033313e658dfc9aae78" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "1.59.3" +version = "2.102.1" + + [deps.SciMLBase.extensions] + SciMLBaseChainRulesCoreExt = "ChainRulesCore" + SciMLBaseMLStyleExt = "MLStyle" + SciMLBaseMakieExt = "Makie" + SciMLBasePartialFunctionsExt = "PartialFunctions" + SciMLBasePyCallExt = "PyCall" + SciMLBasePythonCallExt = "PythonCall" + SciMLBaseRCallExt = "RCall" + SciMLBaseZygoteExt = ["Zygote", "ChainRulesCore"] + + [deps.SciMLBase.weakdeps] + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078" + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" + PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" + PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" + RCall = "6f49c342-dc21-5d91-9882-a32aef131414" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [[deps.SciMLBenchmarks]] deps = ["Git", "IJulia", "InteractiveUtils", "Markdown", "Pkg", "Weave"] -git-tree-sha1 = "a1d7791d68494b74fc0062cf63d8df7213dbd9dd" +git-tree-sha1 = "f4076dd5a103010d48bb6c4e50c5526f6622fa96" uuid = "31c91b34-3c75-11e9-0341-95557aab0344" -version = "0.1.1" +version = "0.1.3" + +[[deps.SciMLJacobianOperators]] +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DifferentiationInterface", "FastClosures", "LinearAlgebra", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "7da1216346ad79499d08d7e2a3dbf297dc80c829" +uuid = "19f34311-ddf3-4b8b-af20-060888a46c0e" +version = "0.1.6" + +[[deps.SciMLOperators]] +deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools"] +git-tree-sha1 = "3249fe77f322fe539e935ecb388c8290cd38a3fc" +uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" +version = "1.3.1" +weakdeps = ["SparseArrays", "StaticArraysCore"] + + [deps.SciMLOperators.extensions] + SciMLOperatorsSparseArraysExt = "SparseArrays" + SciMLOperatorsStaticArraysCoreExt = "StaticArraysCore" + +[[deps.SciMLStructures]] +deps = ["ArrayInterface"] +git-tree-sha1 = "566c4ed301ccb2a44cbd5a27da5f885e0ed1d5df" +uuid = "53ae85a6-f571-4167-b2af-e1d143709226" +version = "1.7.0" [[deps.Scratch]] deps = ["Dates"] -git-tree-sha1 = "f94f779c94e58bf9ea243e77a37e16d9de9126bd" +git-tree-sha1 = "9b81b8393e50b7d4e6d0a9f14e192294d3b7c109" uuid = "6c6a2e73-6563-6170-7368-637461726353" -version = "1.1.1" +version = "1.3.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" [[deps.Setfield]] deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] -git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" +git-tree-sha1 = "c5391c6ace3bc430ca630251d02ea9687169ca68" uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" -version = "1.1.1" - -[[deps.SharedArrays]] -deps = ["Distributed", "Mmap", "Random", "Serialization"] -uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" +version = "1.1.2" [[deps.Showoff]] deps = ["Dates", "Grisu"] @@ -1138,20 +1897,32 @@ uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" version = "1.0.3" [[deps.SimpleBufferStream]] -git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +git-tree-sha1 = "f305871d2f381d21527c770d4788c06c097c9bc1" uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" -version = "1.1.0" +version = "1.2.0" -[[deps.SimpleTraits]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" -uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" -version = "0.9.4" +[[deps.SimpleNonlinearSolve]] +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "7aaa5fe4617271b64fce0466d187f2a72edbd81a" +uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" +version = "2.5.0" -[[deps.SnoopPrecompile]] -git-tree-sha1 = "f604441450a3c0569830946e5b33b78c928e1a85" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.1" + [deps.SimpleNonlinearSolve.extensions] + SimpleNonlinearSolveChainRulesCoreExt = "ChainRulesCore" + SimpleNonlinearSolveDiffEqBaseExt = "DiffEqBase" + SimpleNonlinearSolveReverseDiffExt = "ReverseDiff" + SimpleNonlinearSolveTrackerExt = "Tracker" + + [deps.SimpleNonlinearSolve.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.SimpleUnPack]] +git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" +uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" +version = "1.1.0" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" @@ -1164,90 +1935,169 @@ version = "1.1.0" [[deps.SortingAlgorithms]] deps = ["DataStructures"] -git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508" +git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085" uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.0.1" +version = "1.2.1" [[deps.SparseArrays]] -deps = ["LinearAlgebra", "Random"] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" -[[deps.SparseDiffTools]] -deps = ["Adapt", "ArrayInterfaceCore", "ArrayInterfaceStaticArrays", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "Requires", "SparseArrays", "StaticArrays", "VertexSafeGraphs"] -git-tree-sha1 = "5fb8ba9180f467885e87a2c99cae178b67934be1" -uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" -version = "1.26.2" +[[deps.SparseMatrixColorings]] +deps = ["ADTypes", "DocStringExtensions", "LinearAlgebra", "PrecompileTools", "Random", "SparseArrays"] +git-tree-sha1 = "9de43e0b9b976f1019bf7a879a686c4514520078" +uuid = "0a514795-09f3-496d-8182-132a7b665d35" +version = "0.4.21" + + [deps.SparseMatrixColorings.extensions] + SparseMatrixColoringsCUDAExt = "CUDA" + SparseMatrixColoringsCliqueTreesExt = "CliqueTrees" + SparseMatrixColoringsColorsExt = "Colors" + + [deps.SparseMatrixColorings.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" [[deps.SpecialFunctions]] -deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "d75bda01f8c31ebb72df80a46c88b25d1c79c56d" +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "41852b8679f78c8d8961eeadc8f62cef861a52e3" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.1.7" +version = "2.5.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StableRNGs]] +deps = ["Random"] +git-tree-sha1 = "95af145932c2ed859b63329952ce8d633719f091" +uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" +version = "1.0.3" [[deps.Static]] -deps = ["IfElse"] -git-tree-sha1 = "de4f0a4f049a4c87e4948c04acff37baf1be01a6" +deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools"] +git-tree-sha1 = "f737d444cb0ad07e61b3c1bef8eb91203c321eff" uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "0.7.7" +version = "1.2.0" + +[[deps.StaticArrayInterface]] +deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Static"] +git-tree-sha1 = "96381d50f1ce85f2663584c8e886a6ca97e60554" +uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" +version = "1.8.0" + + [deps.StaticArrayInterface.extensions] + StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" + StaticArrayInterfaceStaticArraysExt = "StaticArrays" + + [deps.StaticArrayInterface.weakdeps] + OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [[deps.StaticArrays]] -deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] -git-tree-sha1 = "2189eb2c1f25cb3f43e5807f26aa864052e50c17" +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "0feb6b9031bd5c51f9072393eb5ab3efd31bf9e4" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.5.8" +version = "1.9.13" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] -git-tree-sha1 = "6b7ba252635a5eff6a0b0664a41ee140a1c9e72a" +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.0" +version = "1.4.3" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.10.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] -git-tree-sha1 = "f9af7f195fb13589dd2e2d57fdb401717d2eb1f6" +git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.5.0" +version = "1.7.1" [[deps.StatsBase]] -deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916" +deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "b81c5035922cc89c2d9523afc6c54be512411466" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.33.21" +version = "0.34.5" [[deps.StatsFuns]] -deps = ["ChainRulesCore", "HypergeometricFunctions", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "5783b877201a82fc0014cbf381e7e6eb130473a4" +deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.0.1" +version = "1.5.0" +weakdeps = ["ChainRulesCore", "InverseFunctions"] + + [deps.StatsFuns.extensions] + StatsFunsChainRulesCoreExt = "ChainRulesCore" + StatsFunsInverseFunctionsExt = "InverseFunctions" [[deps.StrideArraysCore]] -deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "ManualMemory", "SIMDTypes", "Static", "ThreadingUtilities"] -git-tree-sha1 = "ac730bd978bf35f9fe45daa0bd1f51e493e97eb4" +deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] +git-tree-sha1 = "f35f6ab602df8413a50c4a25ca14de821e8605fb" uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" -version = "0.3.15" +version = "0.5.7" [[deps.StringEncodings]] deps = ["Libiconv_jll"] -git-tree-sha1 = "50ccd5ddb00d19392577902f0079267a72c5ab04" +git-tree-sha1 = "b765e46ba27ecf6b44faf70df40c57aa3a547dcb" uuid = "69024149-9ee7-55f6-a4c4-859efe599b68" -version = "0.3.5" +version = "0.3.7" + +[[deps.StringManipulation]] +deps = ["PrecompileTools"] +git-tree-sha1 = "725421ae8e530ec29bcbdddbe91ff8053421d023" +uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" +version = "0.4.1" + +[[deps.StructArrays]] +deps = ["ConstructionBase", "DataAPI", "Tables"] +git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.7.1" + + [deps.StructArrays.extensions] + StructArraysAdaptExt = "Adapt" + StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] + StructArraysLinearAlgebraExt = "LinearAlgebra" + StructArraysSparseArraysExt = "SparseArrays" + StructArraysStaticArraysExt = "StaticArrays" + + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [[deps.SuiteSparse]] deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+0" +version = "7.2.1+1" + +[[deps.SymbolicIndexingInterface]] +deps = ["Accessors", "ArrayInterface", "PrettyTables", "RuntimeGeneratedFunctions", "StaticArraysCore"] +git-tree-sha1 = "658f6d01bfe68d6bf47915bf5d868228138c7d71" +uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" +version = "0.3.41" [[deps.TOML]] deps = ["Dates"] uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.0" +version = "1.0.3" [[deps.TableTraits]] deps = ["IteratorInterfaceExtensions"] @@ -1256,10 +2106,10 @@ uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" version = "1.0.1" [[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] -git-tree-sha1 = "2d7164f7b8a066bcfa6224e67736ce0eb54aef5b" +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "f2c1efbc8f3a609aadf318094f8fc5204bdaf344" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.9.0" +version = "1.12.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] @@ -1278,31 +2128,37 @@ uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[deps.ThreadingUtilities]] deps = ["ManualMemory"] -git-tree-sha1 = "f8629df51cab659d70d2e5618a430b4d3f37f2c3" +git-tree-sha1 = "d969183d3d244b6c33796b5ed01ab97328f2db85" uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" -version = "0.5.0" +version = "0.5.5" + +[[deps.TimerOutputs]] +deps = ["ExprTools", "Printf"] +git-tree-sha1 = "3748bd928e68c7c346b52125cf41fff0de6937d0" +uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" +version = "0.5.29" + + [deps.TimerOutputs.extensions] + FlameGraphsExt = "FlameGraphs" + + [deps.TimerOutputs.weakdeps] + FlameGraphs = "08572546-2f56-4bcf-ba4e-bab62c3a3f89" [[deps.TranscodingStreams]] -deps = ["Random", "Test"] -git-tree-sha1 = "8a75929dcd3c38611db2f8d08546decb514fcadf" +git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.9.9" - -[[deps.TriangularSolve]] -deps = ["CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "LoopVectorization", "Polyester", "SnoopPrecompile", "Static", "VectorizationBase"] -git-tree-sha1 = "fdddcf6b2c7751cd97de69c18157aacc18fbc660" -uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" -version = "0.1.14" +version = "0.11.3" -[[deps.Tricks]] -git-tree-sha1 = "6bac775f2d42a611cdfcd1fb217ee719630c4175" -uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.6" +[[deps.TruncatedStacktraces]] +deps = ["InteractiveUtils", "MacroTools", "Preferences"] +git-tree-sha1 = "ea3e54c2bdde39062abf5a9758a23735558705e1" +uuid = "781d530d-4396-4725-bb49-402e4bee1e77" +version = "1.4.0" [[deps.URIs]] -git-tree-sha1 = "e59ecc5a41b000fa94423a578d29290c7266fc10" +git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.4.0" +version = "1.6.1" [[deps.UUIDs]] deps = ["Random", "SHA"] @@ -1322,275 +2178,318 @@ git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" version = "0.4.1" +[[deps.Unitful]] +deps = ["Dates", "LinearAlgebra", "Random"] +git-tree-sha1 = "d2282232f8a4d71f79e85dc4dd45e5b12a6297fb" +uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" +version = "1.23.1" +weakdeps = ["ConstructionBase", "ForwardDiff", "InverseFunctions", "Printf"] + + [deps.Unitful.extensions] + ConstructionBaseUnitfulExt = "ConstructionBase" + ForwardDiffExt = "ForwardDiff" + InverseFunctionsUnitfulExt = "InverseFunctions" + PrintfExt = "Printf" + +[[deps.UnitfulLatexify]] +deps = ["LaTeXStrings", "Latexify", "Unitful"] +git-tree-sha1 = "af305cc62419f9bd61b6644d19170a4d258c7967" +uuid = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" +version = "1.7.0" + [[deps.Unzip]] git-tree-sha1 = "ca0969166a028236229f63514992fc073799bb78" uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" version = "0.2.0" -[[deps.VectorizationBase]] -deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static"] -git-tree-sha1 = "17b6042564eecf893aa893af94ec9ede4ddb307b" -uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" -version = "0.21.49" - [[deps.VersionParsing]] git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" version = "1.3.0" -[[deps.VertexSafeGraphs]] -deps = ["Graphs"] -git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" -uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" -version = "0.2.0" +[[deps.Vulkan_Loader_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] +git-tree-sha1 = "2f0486047a07670caad3a81a075d2e518acc5c59" +uuid = "a44049a8-05dd-5a78-86c9-5fde0876e88c" +version = "1.3.243+0" [[deps.Wayland_jll]] -deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "3e61f0b86f90dacb0bc0e73a0c5a83f6a8636e23" +deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll"] +git-tree-sha1 = "96478df35bbc2f3e1e791bc7a3d0eeee559e60e9" uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -version = "1.19.0+0" - -[[deps.Wayland_protocols_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da" -uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" -version = "1.25.0+0" +version = "1.24.0+0" [[deps.Weave]] -deps = ["Base64", "Dates", "Highlights", "JSON", "Markdown", "Mustache", "Pkg", "Printf", "REPL", "Requires", "Serialization", "YAML"] -git-tree-sha1 = "3095e0708dc274e3ce10fca14327d8d7e8de3d30" +deps = ["Base64", "Dates", "Highlights", "JSON", "Markdown", "Mustache", "Pkg", "Printf", "REPL", "RelocatableFolders", "Requires", "Serialization", "YAML"] +git-tree-sha1 = "092217eb5443926d200ae9325f103906efbb68b1" uuid = "44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9" -version = "0.10.9" - -[[deps.XML2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "58443b63fb7e465a8a7210828c91c08b92132dff" -uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.9.14+0" - -[[deps.XSLT_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" -uuid = "aed1982a-8fda-507f-9586-7b0439959a61" -version = "1.1.34+0" +version = "0.10.12" + +[[deps.XZ_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "fee71455b0aaa3440dfdd54a9a36ccef829be7d4" +uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" +version = "5.8.1+0" + +[[deps.Xorg_libICE_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "a3ea76ee3f4facd7a64684f9af25310825ee3668" +uuid = "f67eecfb-183a-506d-b269-f58e52b52d7c" +version = "1.1.2+0" + +[[deps.Xorg_libSM_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libICE_jll"] +git-tree-sha1 = "9c7ad99c629a44f81e7799eb05ec2746abb5d588" +uuid = "c834827a-8449-5923-a945-d239c165b7dd" +version = "1.2.6+0" [[deps.Xorg_libX11_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] -git-tree-sha1 = "5be649d550f3f4b95308bf0183b82e2582876527" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "b5899b25d17bf1889d25906fb9deed5da0c15b3b" uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" -version = "1.6.9+4" +version = "1.8.12+0" [[deps.Xorg_libXau_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "4e490d5c960c314f33885790ed410ff3a94ce67e" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "aa1261ebbac3ccc8d16558ae6799524c450ed16b" uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" -version = "1.0.9+4" +version = "1.0.13+0" [[deps.Xorg_libXcursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "6c74ca84bbabc18c4547014765d194ff0b4dc9da" uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" -version = "1.2.0+4" +version = "1.2.4+0" [[deps.Xorg_libXdmcp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "4fe47bd2247248125c428978740e18a681372dd4" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "52858d64353db33a56e13c341d7bf44cd0d7b309" uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" -version = "1.1.3+4" +version = "1.1.6+0" [[deps.Xorg_libXext_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "a4c0ee07ad36bf8bbce1c3bb52d21fb1e0b987fb" uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" -version = "1.3.4+4" +version = "1.3.7+0" [[deps.Xorg_libXfixes_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "9caba99d38404b285db8801d5c45ef4f4f425a6d" uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" -version = "5.0.3+4" +version = "6.0.1+0" [[deps.Xorg_libXi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] -git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "a376af5c7ae60d29825164db40787f15c80c7c54" uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" -version = "1.7.10+4" +version = "1.8.3+0" [[deps.Xorg_libXinerama_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] -git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll"] +git-tree-sha1 = "a5bc75478d323358a90dc36766f3c99ba7feb024" uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" -version = "1.1.4+4" +version = "1.1.6+0" [[deps.Xorg_libXrandr_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "aff463c82a773cb86061bce8d53a0d976854923e" uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" -version = "1.5.2+4" +version = "1.5.5+0" [[deps.Xorg_libXrender_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "7ed9347888fac59a618302ee38216dd0379c480d" uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" -version = "0.9.10+4" - -[[deps.Xorg_libpthread_stubs_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "6783737e45d3c59a4a4c4091f5f88cdcf0908cbb" -uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" -version = "0.1.0+3" +version = "0.9.12+0" [[deps.Xorg_libxcb_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] -git-tree-sha1 = "daf17f441228e7a3833846cd048892861cff16d6" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXau_jll", "Xorg_libXdmcp_jll"] +git-tree-sha1 = "bfcaf7ec088eaba362093393fe11aa141fa15422" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.13.0+3" +version = "1.17.1+0" [[deps.Xorg_libxkbfile_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "926af861744212db0eb001d9e40b5d16292080b2" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "e3150c7400c41e207012b41659591f083f3ef795" uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" -version = "1.1.0+4" +version = "1.1.3+0" + +[[deps.Xorg_xcb_util_cursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_jll", "Xorg_xcb_util_renderutil_jll"] +git-tree-sha1 = "c5bf2dad6a03dfef57ea0a170a1fe493601603f2" +uuid = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" +version = "0.1.5+0" [[deps.Xorg_xcb_util_image_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "f4fc02e384b74418679983a97385644b67e1263b" uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] -git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll"] +git-tree-sha1 = "68da27247e7d8d8dafd1fcf0c3654ad6506f5f97" uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_keysyms_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "44ec54b0e2acd408b0fb361e1e9244c60c9c3dd4" uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_renderutil_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "5b0263b6d080716a02544c55fdff2c8d7f9a16a0" uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" -version = "0.3.9+1" +version = "0.3.10+0" [[deps.Xorg_xcb_util_wm_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "f233c83cad1fa0e70b7771e0e21b061a116f2763" uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" -version = "0.4.1+1" +version = "0.4.2+0" [[deps.Xorg_xkbcomp_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxkbfile_jll"] -git-tree-sha1 = "4bcbf660f6c2e714f87e960a171b119d06ee163b" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "801a858fc9fb90c11ffddee1801bb06a738bda9b" uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" -version = "1.4.2+4" +version = "1.4.7+0" [[deps.Xorg_xkeyboard_config_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xkbcomp_jll"] -git-tree-sha1 = "5c8424f8a67c3f2209646d4425f3d415fee5931d" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "00af7ebdc563c9217ecc67776d1bbf037dbcebf4" uuid = "33bec58e-1273-512f-9401-5d533626f822" -version = "2.27.0+4" +version = "2.44.0+0" [[deps.Xorg_xtrans_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "79c31e7844f6ecf779705fbc12146eb190b7d845" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "a63799ff68005991f9d9491b6e95bd3478d783cb" uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" -version = "1.4.0+3" +version = "1.6.0+0" [[deps.YAML]] deps = ["Base64", "Dates", "Printf", "StringEncodings"] -git-tree-sha1 = "3c6e8b9f5cdaaa21340f841653942e1a6b6561e5" +git-tree-sha1 = "2f58ac39f64b41fb812340347525be3b590cce3b" uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" -version = "0.4.7" +version = "0.4.14" [[deps.ZMQ]] -deps = ["FileWatching", "Sockets", "ZeroMQ_jll"] -git-tree-sha1 = "fc68e8a3719166950a0f3e390a14c7302c48f8de" +deps = ["FileWatching", "PrecompileTools", "Sockets", "ZeroMQ_jll"] +git-tree-sha1 = "2d060e1f014c07561817bf6f3c0eb66b309e04bd" uuid = "c2297ded-f4af-51ae-bb23-16f91089e4e1" -version = "1.2.1" +version = "1.4.1" [[deps.ZeroMQ_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "libsodium_jll"] -git-tree-sha1 = "fe5c65a526f066fb3000da137d5785d9649a8a47" +deps = ["Artifacts", "JLLWrappers", "Libdl", "libsodium_jll"] +git-tree-sha1 = "766d90db2817565b667c1cc9cc420d668f2e8dba" uuid = "8f1865be-045e-5c20-9c9f-bfbfb0764568" -version = "4.3.4+0" +version = "4.3.6+0" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.12+3" +version = "1.2.13+1" [[deps.Zstd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "e45044cd873ded54b6a5bac0eb5c971392cf1927" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "446b23e73536f84e8037f5dce465e92275f6a308" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.2+0" +version = "1.5.7+1" -[[deps.ZygoteRules]] -deps = ["MacroTools"] -git-tree-sha1 = "8c1a8e4dfacb1fd631745552c8db35d0deb09ea0" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.2" +[[deps.eudev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c3b0e6196d50eab0c5ed34021aaa0bb463489510" +uuid = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" +version = "3.2.14+0" [[deps.fzf_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "868e669ccb12ba16eaf50cb2957ee2ff61261c56" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b6a34e0e0960190ac2a4363a1bd003504772d631" uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" -version = "0.29.0+0" +version = "0.61.1+0" [[deps.libaom_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "522c1df09d05a71785765d19c9524661234738e9" uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" -version = "3.4.0+0" +version = "3.11.0+0" [[deps.libass_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "e17c115d55c5fbb7e52ebedb427a0dca79d4484e" uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" -version = "0.15.1+0" +version = "0.15.2+0" [[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl", "OpenBLAS_jll"] +deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.1.1+0" +version = "5.11.0+0" + +[[deps.libdecor_jll]] +deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] +git-tree-sha1 = "9bf7903af251d2050b467f76bdbe57ce541f7f4f" +uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" +version = "0.2.2+0" + +[[deps.libevdev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "56d643b57b188d30cccc25e331d416d3d358e557" +uuid = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" +version = "1.13.4+0" [[deps.libfdk_aac_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "646634dd19587a56ee2f1199563ec056c5f228df" uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" -version = "2.0.2+0" +version = "2.0.4+0" + +[[deps.libinput_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "eudev_jll", "libevdev_jll", "mtdev_jll"] +git-tree-sha1 = "91d05d7f4a9f67205bd6cf395e488009fe85b499" +uuid = "36db933b-70db-51c0-b978-0f229ee0e533" +version = "1.28.1+0" [[deps.libpng_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "07b6a107d926093898e82b3b1db657ebe33134ec" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.38+0" +version = "1.6.50+0" [[deps.libsodium_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "848ab3d00fe39d6fbc2a8641048f8f272af1c51e" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "011b0a7331b41c25524b64dc42afc9683ee89026" uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8" -version = "1.0.20+0" +version = "1.0.21+0" [[deps.libvorbis_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] -git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll"] +git-tree-sha1 = "11e1772e7f3cc987e9d3de991dd4f6b2602663a5" uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" -version = "1.3.7+1" +version = "1.3.8+0" + +[[deps.mtdev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b4d631fd51f2e9cdd93724ae25b2efc198b059b1" +uuid = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" +version = "1.1.7+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.52.0+1" + +[[deps.oneTBB_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "d5a767a3bb77135a99e433afe0eb14cd7f6914c3" +uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" +version = "2022.0.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" [[deps.x264_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1605,7 +2504,7 @@ uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" version = "3.5.0+0" [[deps.xkbcommon_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] -git-tree-sha1 = "9ebfc140cc56e8c2156a15ceac2f0302e327ac0a" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "fbf139bce07a534df0e699dbb5f5cc9346f95cc1" uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" -version = "1.4.1+0" +version = "1.9.2+0" diff --git a/benchmarks/NonStiffDDE/Mosquito_wpd.jmd b/benchmarks/NonStiffDDE/Mosquito_wpd.jmd new file mode 100644 index 000000000..c1ad21800 --- /dev/null +++ b/benchmarks/NonStiffDDE/Mosquito_wpd.jmd @@ -0,0 +1,611 @@ +--- +title: Mosquito Population State-Dependent DDE Work-Precision Diagrams +author: Chris Rackauckas, Sean Lawrence Wu +--- + +# Mosquito Population State-Dependent Delay Differential Equation + +This benchmark implements the Ewing model for mosquito population dynamics using state-dependent delay differential equations (DDEs). The model tracks mosquito life stages (eggs, larvae, pupae, adults) with temperature-dependent development rates and delays. This is a complex ecological model with multiple state-dependent delays that presents challenges for numerical solvers. + +```julia +using DelayDiffEq, DiffEqDevTools, Plots +using LabelledArrays, StaticArrays +gr() + +# Predation parameters +pupae_pars = (a = 1, h = 0.002, r = 0.001, V = 200) +p0 = pupae_pars.r / pupae_pars.h +p1 = pupae_pars.V / (pupae_pars.a * pupae_pars.h) + +# Parameter vector definition +parvec = @SLVector ( + # temp + :phi, # PHASE + :lambda, # A + :mu, # M + :gamma, # POWER + # photoperiod + :L, # latitude + # oviposition + :max_egg, # max egg raft size, R + # gonotrophic cycle + :q1, # KG + :q2, # QG + :q3, # BG + # egg death + :nu_0E, # U3 + :nu_1E, # U4 + :nu_2E, # U5 + # larvae death + :nu_0L, # U3 + :nu_1L, # U4 + :nu_2L, # U5 + # pupae death + :nu_0P, # U3 + :nu_1P, # U4 + :nu_2P, # U5 + # adult death + :alpha_A, # ALPHA + :beta_A, # BETA + # egg maturation + :alpha_E, # ALPHA + :beta_E, # BETA + # larvae maturation + :alpha_L, # ALPHA + :beta_L, # BETA + # pupae maturation + :alpha_P, # ALPHA + :beta_P, # BETA + # predation on pupae + :p0, + :p1 +) + +# Parameter values +parameters = parvec( + 1.4, # phi + 6.3, # lambda + 10.3, # mu + 1.21, # gamma + 51, # L + 200, # max_egg + # gonotrophic cycle + 0.2024, # (q1) KG + 74.48, # (q2) QG + 0.2456, # (q3) BG + # egg death + 0.0157, # (nu_0E) U3 + 20.5, # (nu_1E) U4 + 7, # (nu_2E) U5 + # larvae death + 0.0157, # (nu_0L) U3 + 20.5, # (nu_1L) U4 + 7, # (nu_2L) U5 + # pupae death + 0.0157, # (nu_0P) U3 + 20.5, # (nu_1P) U4 + 7, # (nu_2P) U5 + # adult death + 2.166e-8, # (alpha_A) ALPHA + 4.483, # (beta_A) BETA + # egg maturation + 0.0022, # (alpha_E) ALPHA + 1.77, # (beta_E) BETA + # larvae maturation + 0.00315, # (alpha_L) ALPHA + 1.12, # (beta_L) BETA + # pupae maturation + 0.0007109, # (alpha_P) ALPHA + 1.8865648, # (beta_P) BETA + # predation on pupae + p0, # p0 + p1 # p1 +) + +# Maximum allowed values for rates (same as FORTRAN) +death_max = 1.0 # 1.0 +death_min_a = 0.01 # 0.01 +gon_min = 0.0333 # 0.0333 +maturation_min = 0.016667 # 0.016667 + +# Temperature as modified cosine function +function temperature(t, pars) + phi = pars.phi # PHASE + lambda = pars.lambda # A + mu = pars.mu # M + gamma = pars.gamma # POWER + + temp = 0.0 + + if t < 0.0 + temp = (mu - lambda) + + lambda * 2.0 * (0.5 * (1.0 + cos(2.0 * pi * (0.0 - phi) / 365.0)))^gamma + else + temp = (mu - lambda) + + lambda * 2.0 * (0.5 * (1.0 + cos(2.0 * pi * (t - phi) / 365.0)))^gamma + end + + return temp +end + +# Photoperiod +function daylight(t, pars) + L = pars.L # latitude (51 in thesis) + + # define photoperiod values + EPS = asin(0.39795 * cos(0.2163108 + 2 * atan(0.9671396 * tan(0.00860 * (t - 3.5))))) + NUM = sin(0.8333 * pi / 180.0) + (sin(L * pi / 180.0) * sin(EPS)) + DEN = cos(L * pi / 180.0) * cos(EPS) + DAYLIGHT = 24.0 - (24.0 / pi) * acos(NUM / DEN) + + return DAYLIGHT +end + +# Diapause functions +# pp: photoperiod +function diapause_spring(pp) + 1.0 / (1.0 + exp(5.0 * (14.0 - pp))) +end + +function diapause_autumn(pp) + 1.0 / (1.0 + exp(5.0 * (13.0 - pp))) +end + +# Per-capita oviposition rate +# d: diapause +# G: duration of gonotrophic cycle +# pars: parameters +function oviposition(d, G, pars) + max_egg = pars.max_egg + + egg_raft = d * max_egg * 0.5 + ovi = egg_raft / G + + return ovi +end + +# Egg mortality +function death_egg_rate(temp, pars) + nu_0E = pars.nu_0E # U3 + nu_1E = pars.nu_1E # U4 + nu_2E = pars.nu_2E # U5 + + # calculate egg death rate + egg_d = nu_0E * exp(((temp - nu_1E) / nu_2E)^2) + + if egg_d > death_max + egg_d = death_max + end + + return egg_d +end + +# Larvae mortality +function death_larvae_rate(temp, pars) + nu_0L = pars.nu_0L # U3 + nu_1L = pars.nu_1L # U4 + nu_2L = pars.nu_2L # U5 + + # calculate larvae death rate + larvae_d = nu_0L * exp(((temp - nu_1L) / nu_2L)^2) + + if larvae_d > death_max + larvae_d = death_max + end + + return larvae_d +end + +# Pupal mortality +function death_pupae_rate(temp, pars) + nu_0P = pars.nu_0P # U3 + nu_1P = pars.nu_1P # U4 + nu_2P = pars.nu_2P # U5 + + # calculate pupae death rate + pupal_d = nu_0P * exp(((temp - nu_1P)/nu_2P)^2) + + if pupal_d > death_max + pupal_d = death_max + end + + return pupal_d +end + +# Adult mortality +function death_adult_rate(temp, pars) + alpha_A = pars.alpha_A # ALPHA + beta_A = pars.beta_A # BETA + + # calculate adult death rate + adult_d = alpha_A * (temp^beta_A) + + if adult_d < death_min_a + adult_d = death_min_a + end + return adult_d +end + +# G: duration of gonotrophic cycle +function gonotrophic(temp, pars) + q1 = pars.q1 # KG + q2 = pars.q2 # QG + q3 = pars.q3 # BG + + # calculate gonotrophic cycle length + if temp < 0.0 + grate = 0.0333 + else + grate = q1 / (1 + q2*exp(-q3*temp)) + end + + if grate < gon_min + grate = gon_min + end + + return 1.0 / grate +end + +# g_E +function egg_maturation_rate(temp, pars) + alpha_E = pars.alpha_E # ALPHA + beta_E = pars.beta_E # BETA + + # calculate egg development rate + if temp < 0.0 + egg_maturation = 0.016667 + else + egg_maturation = alpha_E * (temp^beta_E) + end + + if egg_maturation < maturation_min + egg_maturation = maturation_min + end + return egg_maturation +end + +# g_L +function larvae_maturation_rate(temp, pars) + alpha_L = pars.alpha_L # ALPHA + beta_L = pars.beta_L # BETA + + # calculate larvae development rate + if temp < 0.0 + larvae_maturation = 0.016667 + else + larvae_maturation = alpha_L * (temp^beta_L) + end + + if larvae_maturation < maturation_min + larvae_maturation = maturation_min + end + return larvae_maturation +end + +# g_P +function pupae_maturation_rate(temp, pars) + alpha_P = pars.alpha_P # ALPHA + beta_P = pars.beta_P # BETA + + # calculate pupae development rate + if temp < 0.0 + pupae_maturation = 0.016667 + else + pupae_maturation = alpha_P * (temp^beta_P) + end + + if pupae_maturation < maturation_min + pupae_maturation = maturation_min + end + return pupae_maturation +end + +# State variable history +function h(p, t; idxs = nothing) + temp = temperature(t, p) + + # history vector + Y = zeros(13) + + Y[8] = 1.0 / egg_maturation_rate(temp, p) # tau_E + Y[9] = 1.0 / larvae_maturation_rate(temp, p) # tau_L + Y[10] = 1.0 / pupae_maturation_rate(temp, p) # tau_P + + Y[5] = exp(-death_egg_rate(temp, p) * Y[8]) # S_E + Y[6] = exp(-death_larvae_rate(temp, p) * Y[9]) # S_L + Y[7] = exp(-death_pupae_rate(temp, p) * Y[10]) #S_P + + temp_L = temperature(t - Y[9], p) + temp_P = temperature(t - Y[10], p) + + Y[11] = 1.0 / egg_maturation_rate(temp_L, p) # tau_E(t - tau_L(t)) + Y[12] = 1.0 / larvae_maturation_rate(temp_P, p) # tau_L(t - tau_P(t)) + + temp_LP = temperature(t - Y[10] - Y[12], p) + + Y[13] = 1.0 / egg_maturation_rate(temp_LP, p) # tau_E(t - tau_P(t) - tau_L(t - tau_P(t))) + + idxs === nothing ? Y : Y[idxs] +end + +# Initial condition calculation +# A0: A(0) +# t0: temp(0); assumed constant for t<0 +function calculate_IC(A0, t0, pars) + u0 = zeros(13) + u0[4] = A0 + + # calculate initial lags first + u0[8] = 1.0 / egg_maturation_rate(t0, pars) # tau_E + u0[9] = 1.0 / larvae_maturation_rate(t0, pars) # tau_L + u0[10] = 1.0 / pupae_maturation_rate(t0, pars) # tau_P + + u0[11] = u0[8] # tau_E(t - tau_L(t)) + u0[12] = u0[9] # tau_L(t - tau_P(t)) + u0[13] = u0[8] # tau_E(t - tau_P(t) - tau_L(t - tau_P(t))) + + # survival probabilities + u0[5] = exp(-u0[8] * death_egg_rate(t0, pars)) # S_E + u0[6] = exp(-u0[9] * death_larvae_rate(t0, pars)) # S_L + u0[7] = exp(-u0[10] * death_pupae_rate(t0, pars)) # S_P + + return u0 +end + +# System of DDEs +# 13 equations +# 6 delays +# DDEs +function ewing_dde(du, u, h, p, t) + + # state variables + E = u[1] + LAR = u[2] + PUP = u[3] + ADU = u[4] + SE = u[5] + SL = u[6] + SP = u[7] + DE = u[8] # tau_E(t) + DL = u[9] # tau_L(t) + DP = u[10] # tau_P(t) + DEL = u[11] # tau_E(t - tau_L(t)) + DLP = u[12] # tau_L(t - tau_P(t)) + DELP = u[13] # tau_E(t - tau_P(t) - tau_L(t - taup_P(t))) + + # larval predation parameters + p0 = p.p0 + p1 = p.p1 + + # Z: state variables at each of the 6 lagged times (lags follow same order as Z/BETA in DDE_SOLVER) + + # Z + Z1 = h(p, t - DE; idxs = 4) # Z(x,1): t - tau_E(t) + Z2 = h(p, t - DL - DEL; idxs = 4) # Z(x,2): t - tau_L(t) - tau_E(t - tau_L(t)) + Z3 = h(p, t - DP - DLP - DELP; idxs = 4) # Z(x,3): t - tau_P(t) - tau_L(t - tau_P(t)) - tau_E(t - tau_P(t) - tau_L(t - tau_P(t))) + Z4 = h(p, t - DL) # Z(x,4): t - tau_L(t) + Z5 = h(p, t - DP - DLP) # Z(x,5): t - tau_P(t) - tau_L(t - tau_P(t)) + Z6 = h(p, t - DP) # Z(x,6): t - tau_P(t) + + # (lagged) temperature + temp = temperature(t, p) + temp_E = temperature(t - DE, p) + temp_L = temperature(t - DL, p) + temp_P = temperature(t - DP, p) + temp_EL = temperature(t - DL - Z4[8], p) + temp_ELP = temperature(t - DP - Z6[9] - Z5[8], p) + temp_LP = temperature(t - DP - Z6[9], p) + + # (lagged) photoperiod + pp = daylight(t, p) + pp_1 = daylight(t - 1, p) + pp_E = daylight(t - DE, p) + pp_EL = daylight(t - DL - Z4[8], p) + pp_ELP = daylight(t - DP - Z6[9] - Z5[8], p) + + # (lagged) gonotrophic cycle + gon = gonotrophic(temp, p) + gon_E = gonotrophic(temp_E, p) + gon_EL = gonotrophic(temp_EL, p) + gon_ELP = gonotrophic(temp_ELP, p) + + # diapause and birth + if pp > pp_1 + dia = diapause_spring(pp) + dia_E = diapause_spring(pp_E) + dia_EL = diapause_spring(pp_EL) + dia_ELP = diapause_spring(pp_ELP) + else + dia = diapause_autumn(pp) + dia_E = diapause_autumn(pp_E) + dia_EL = diapause_autumn(pp_EL) + dia_ELP = diapause_autumn(pp_ELP) + end + + birth = oviposition(dia, gon, p) + birth_E = oviposition(dia_E, gon_E, p) + birth_EL = oviposition(dia_EL, gon_EL, p) + birth_ELP = oviposition(dia_ELP, gon_ELP, p) + + # (lagged) death + death_egg = death_egg_rate(temp, p) + death_egg_E = death_egg_rate(temp_E, p) + + death_larvae = death_larvae_rate(temp, p) + death_larvae_L = death_larvae_rate(temp_L, p) + + death_pupae = death_pupae_rate(temp, p) + death_pupae_P = death_pupae_rate(temp_P, p) + + death_adult = death_adult_rate(temp, p) + + # (lagged) development + larvae_maturation = larvae_maturation_rate(temp, p) + larvae_maturation_L = larvae_maturation_rate(temp_L, p) + larvae_maturation_P = larvae_maturation_rate(temp_P, p) + larvae_maturation_LP = larvae_maturation_rate(temp_LP, p) + + egg_maturation = egg_maturation_rate(temp, p) + egg_maturation_E = egg_maturation_rate(temp_E, p) + egg_maturation_L = egg_maturation_rate(temp_L, p) + egg_maturation_EL = egg_maturation_rate(temp_EL, p) + egg_maturation_LP = egg_maturation_rate(temp_LP, p) + egg_maturation_ELP = egg_maturation_rate(temp_ELP, p) + + pupae_maturation = pupae_maturation_rate(temp, p) + pupae_maturation_P = pupae_maturation_rate(temp_P, p) + + # DDEs describing change in state duration + dDEdt = 1 - egg_maturation/egg_maturation_E + dDLdt = 1 - larvae_maturation/larvae_maturation_L + dDPdt = 1 - pupae_maturation/pupae_maturation_P + dDELdt = (1 - dDLdt) * (1 - egg_maturation_L/egg_maturation_EL) + dDLPdt = (1 - dDPdt) * (1 - larvae_maturation_P/larvae_maturation_LP) + dDELPdt = (1 - dDPdt - dDLPdt) * (1 - egg_maturation_LP/egg_maturation_ELP) + + # stage recruitment + R_E = birth * ADU + R_L = birth_E * Z1 * SE * egg_maturation/egg_maturation_E + R_P = birth_EL * Z2 * Z4[5] * SL * larvae_maturation/larvae_maturation_L * (1 - dDELdt) + R_A = birth_ELP * Z3 * Z5[5] * Z6[6] * SP * pupae_maturation/pupae_maturation_P * + (1 - dDLPdt) * (1 - dDELPdt) + + # maturation rates + M_E = R_L + M_L = R_P + M_P = R_A + + # death rates + D_E = death_egg * E + D_L = ((p0*LAR/(p1+LAR)) + death_larvae) * LAR + D_P = death_pupae * PUP + D_A = death_adult * ADU + + # DDE system + du_1 = R_E - M_E - D_E # E + du_2 = R_L - M_L - D_L # L + du_3 = R_P - M_P - D_P # P + du_4 = R_A - D_A # A + + du_5 = SE * ((egg_maturation * death_egg_E / egg_maturation_E) - death_egg) + du_6 = SL * + (((p0*Z4[2] / (p1+Z4[2])) + death_larvae_L) * (1-dDLdt) - (p0*LAR / (p1+LAR)) - + death_larvae) + du_7 = SP * ((pupae_maturation * death_pupae_P / pupae_maturation_P) - death_pupae) + + du_8 = dDEdt # tau_E(t) + du_9 = dDLdt # tau_L(t) + du_10 = dDPdt # tau_P(t) + du_11 = dDELdt # tau_E(t - tau_L(t)) + du_12 = dDLPdt # tau_L(t - tau_P(t)) + du_13 = dDELPdt # tau_E(t - tau_P(t) - tau_L(t - tau_P(t))) + + du[1] = du_1 + du[2] = du_2 + du[3] = du_3 + du[4] = du_4 + du[5] = du_5 + du[6] = du_6 + du[7] = du_7 + du[8] = du_8 + du[9] = du_9 + du[10] = du_10 + du[11] = du_11 + du[12] = du_12 + du[13] = du_13 +end + +# Dependent lag functions +deplag_1(u, p, t) = u[8] # t - tau_E(t) +deplag_2(u, p, t) = u[9] + u[11] # t - tau_L(t) - tau_E(t - tau_L(t)) +deplag_3(u, p, t) = u[10] + u[12] + u[13] # t - tau_P(t) - tau_L(t - tau_P(t)) - tau_E(t - tau_P(t) - tau_L(t - tau_P(t))) +deplag_4(u, p, t) = u[9] # t - tau_L(t) +deplag_5(u, p, t) = u[10] + u[12] # t - tau_P(t) - tau_L(t - tau_P(t)) +deplag_6(u, p, t) = u[10] # t - tau_P(t) + +# Simulation setup +A0 = 12000.0 +t0 = 0.0 + +temp0 = temperature(t0, parameters) +u0 = calculate_IC(A0, temp0, parameters) + +t0 = 0.0 +times = (t0, t0 + 365.0 * 5) # 2 year simulation for benchmarking + +prob = DDEProblem{true}(ewing_dde, u0, h, times, parameters; + dependent_lags = (deplag_1, deplag_2, deplag_3, deplag_4, deplag_5, deplag_6)) + +# Reference solution +sol = solve(prob, MethodOfSteps(Vern9()); + reltol = 1e-12, abstol = 1e-12, maxiters = Int(1e7)) +test_sol = TestSolution(sol) + +# Plot the reference solution - life stages +plot(sol, vars = [1, 2, 3, 4], title = "Life Stages", + legend = :topleft, labels = ["E" "L" "P" "A"]) +``` + +## Work-Precision Diagrams + +### Explicit RK Methods at High Tolerances + +We test various explicit Runge-Kutta methods suitable for non-stiff problems with state-dependent delays. + +```julia +abstols = 1.0 ./ 10.0 .^ (8:10) +reltols = 1.0 ./ 10.0 .^ (5:7) + +setups = [Dict(:alg=>MethodOfSteps(BS3())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5())), + Dict(:alg=>MethodOfSteps(Vern6())), + Dict(:alg=>MethodOfSteps(Vern7()))] + +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) +plot(wp) +``` + +### Interpolation Error + +We also examine the interpolation errors which are important for accurate delay evaluation: + +```julia +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) +plot(wp) +``` + +### Low Tolerances + +Testing at more stringent tolerances: + +```julia +abstols = 1.0 ./ 10.0 .^ (10:13) +reltols = 1.0 ./ 10.0 .^ (7:10) + +setups = [Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen5())), + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9()))] + +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e6), error_estimate = :final) +plot(wp) +``` + +```julia +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e6), error_estimate = :L2) +plot(wp) +``` + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/NonStiffDDE/Project.toml b/benchmarks/NonStiffDDE/Project.toml index e3fd36625..3f351e74c 100644 --- a/benchmarks/NonStiffDDE/Project.toml +++ b/benchmarks/NonStiffDDE/Project.toml @@ -2,12 +2,16 @@ DDEProblemLibrary = "f42792ee-6ffc-4e2a-ae83-8ee2f22de800" DelayDiffEq = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb" DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d" +LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" SciMLBenchmarks = "31c91b34-3c75-11e9-0341-95557aab0344" +StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [compat] +DDEProblemLibrary = "0.1" DelayDiffEq = "5.37" DiffEqDevTools = "2.30" -DDEProblemLibrary = "0.1" +LabelledArrays = "1" Plots = "1.4" SciMLBenchmarks = "0.1" +StaticArrays = "1" diff --git a/benchmarks/NonStiffDDE/Wheldon_Kirk_Finlay_wpd.jmd b/benchmarks/NonStiffDDE/Wheldon_Kirk_Finlay_wpd.jmd index a6774beef..c66a3ac63 100644 --- a/benchmarks/NonStiffDDE/Wheldon_Kirk_Finlay_wpd.jmd +++ b/benchmarks/NonStiffDDE/Wheldon_Kirk_Finlay_wpd.jmd @@ -6,6 +6,7 @@ author: David Widmann, Chris Rackauckas # Wheldon, Kirk, and Finlay We study algorithms for solving constant delay differential equations with a test problem from W.H. Enright and H. Hayashi, "The evaluation of numerical software for delay differential equations", 1997. It is a model of chronic granulocytic leukemia that was published by T. Wheldon, J. Kirk and H. Finlay in "Cyclical granulopoiesis in chronic granulocytic leukemia: A simulation study", 1974, and is given by + ```math \begin{align} y_1'(t) &= \frac{1.1}{1 + \sqrt{10}y_1(t-20)^{5/4}} - \frac{10y_1(t)}{1 + 40y_2(t)} \\ @@ -18,7 +19,8 @@ using DelayDiffEq, DiffEqDevTools, Plots using DDEProblemLibrary: prob_dde_DDETST_A2 as prob gr() -sol = solve(prob, MethodOfSteps(Vern9(); fpsolve = NLFunctional(; max_iter = 1000)); reltol=1e-14, abstol=1e-14) +sol = solve(prob, MethodOfSteps(Vern9(); fpsolve = NLFunctional(; max_iter = 1000)); + reltol = 1e-14, abstol = 1e-14) test_sol = TestSolution(sol) plot(sol) ``` @@ -34,14 +36,14 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(BS3())), - Dict(:alg=>MethodOfSteps(Tsit5())), - Dict(:alg=>MethodOfSteps(RK4())), - Dict(:alg=>MethodOfSteps(DP5())), - Dict(:alg=>MethodOfSteps(OwrenZen3())), - Dict(:alg=>MethodOfSteps(OwrenZen4())), - Dict(:alg=>MethodOfSteps(OwrenZen5()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen3())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -52,14 +54,14 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(BS3())), - Dict(:alg=>MethodOfSteps(Tsit5())), - Dict(:alg=>MethodOfSteps(RK4())), - Dict(:alg=>MethodOfSteps(DP5())), - Dict(:alg=>MethodOfSteps(OwrenZen3())), - Dict(:alg=>MethodOfSteps(OwrenZen4())), - Dict(:alg=>MethodOfSteps(OwrenZen5()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen3())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -74,14 +76,14 @@ abstols = 1.0 ./ 10.0 .^ (8:11) reltols = 1.0 ./ 10.0 .^ (5:8) setups = [Dict(:alg=>MethodOfSteps(BS3())), - Dict(:alg=>MethodOfSteps(Tsit5())), - Dict(:alg=>MethodOfSteps(RK4())), - Dict(:alg=>MethodOfSteps(DP5())), - Dict(:alg=>MethodOfSteps(OwrenZen3())), - Dict(:alg=>MethodOfSteps(OwrenZen4())), - Dict(:alg=>MethodOfSteps(OwrenZen5()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen3())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -90,14 +92,14 @@ abstols = 1.0 ./ 10.0 .^ (8:11) reltols = 1.0 ./ 10.0 .^ (5:8) setups = [Dict(:alg=>MethodOfSteps(BS3())), - Dict(:alg=>MethodOfSteps(Tsit5())), - Dict(:alg=>MethodOfSteps(RK4())), - Dict(:alg=>MethodOfSteps(DP5())), - Dict(:alg=>MethodOfSteps(OwrenZen3())), - Dict(:alg=>MethodOfSteps(OwrenZen4())), - Dict(:alg=>MethodOfSteps(OwrenZen5()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen3())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -114,12 +116,12 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(Vern6())), - Dict(:alg=>MethodOfSteps(Vern7())), - Dict(:alg=>MethodOfSteps(Vern8())), - Dict(:alg=>MethodOfSteps(Vern9())), - Dict(:alg=>MethodOfSteps(OwrenZen4()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9())), + Dict(:alg=>MethodOfSteps(OwrenZen4()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -128,12 +130,12 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(Vern6())), - Dict(:alg=>MethodOfSteps(Vern7())), - Dict(:alg=>MethodOfSteps(Vern8())), - Dict(:alg=>MethodOfSteps(Vern9())), - Dict(:alg=>MethodOfSteps(OwrenZen4()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9())), + Dict(:alg=>MethodOfSteps(OwrenZen4()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -146,12 +148,12 @@ abstols = 1.0 ./ 10.0 .^ (8:11) reltols = 1.0 ./ 10.0 .^ (5:8) setups = [Dict(:alg=>MethodOfSteps(Vern6())), - Dict(:alg=>MethodOfSteps(Vern7())), - Dict(:alg=>MethodOfSteps(Vern8())), - Dict(:alg=>MethodOfSteps(Vern9())), - Dict(:alg=>MethodOfSteps(OwrenZen4()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9())), + Dict(:alg=>MethodOfSteps(OwrenZen4()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -160,12 +162,12 @@ abstols = 1.0 ./ 10.0 .^ (8:11) reltols = 1.0 ./ 10.0 .^ (5:8) setups = [Dict(:alg=>MethodOfSteps(Vern6())), - Dict(:alg=>MethodOfSteps(Vern7())), - Dict(:alg=>MethodOfSteps(Vern8())), - Dict(:alg=>MethodOfSteps(Vern9())), - Dict(:alg=>MethodOfSteps(OwrenZen4()))] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9())), + Dict(:alg=>MethodOfSteps(OwrenZen4()))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -173,5 +175,5 @@ It seems `Vern6` and `Vern7` are both well suited for the problem at low toleran ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffODE/FitzhughNagumo_wpd.jmd b/benchmarks/NonStiffODE/FitzhughNagumo_wpd.jmd index 8c220b9f9..f23e815c5 100644 --- a/benchmarks/NonStiffODE/FitzhughNagumo_wpd.jmd +++ b/benchmarks/NonStiffODE/FitzhughNagumo_wpd.jmd @@ -3,7 +3,6 @@ title: Fitzhugh-Nagumo Work-Precision Diagrams author: Chris Rackauckas --- - # Fitzhugh-Nagumo The purpose of this is to see how the errors scale on a standard nonlinear problem. @@ -12,24 +11,25 @@ The purpose of this is to see how the errors scale on a standard nonlinear probl using OrdinaryDiffEq, ParameterizedFunctions, ODEInterface, ODEInterfaceDiffEq, LSODA, Sundials, DiffEqDevTools, StaticArrays -using Plots; gr() +using Plots; +gr() f = @ode_def FitzhughNagumo begin - dv = v - v^3/3 -w + l - dw = τinv*(v + a - b*w) + dv = v - v^3/3 - w + l + dw = τinv*(v + a - b*w) end a b τinv l -p = SA[0.7,0.8,1/12.5,0.5] -prob = ODEProblem{true, SciMLBase.FullSpecialize}(f,[1.0;1.0],(0.0,10.0),p) -probstatic = ODEProblem{false}(f,SA[1.0;1.0],(0.0,10.0),p) +p = SA[0.7, 0.8, 1 / 12.5, 0.5] +prob = ODEProblem{true, SciMLBase.FullSpecialize}(f, [1.0; 1.0], (0.0, 10.0), p) +probstatic = ODEProblem{false}(f, SA[1.0; 1.0], (0.0, 10.0), p) abstols = 1.0 ./ 10.0 .^ (6:13) reltols = 1.0 ./ 10.0 .^ (3:10); -sol = solve(prob,Vern7(),abstol=1/10^14,reltol=1/10^14) -sol2 = solve(probstatic,Vern7(),abstol=1/10^14,reltol=1/10^14) -probs = [prob,probstatic] -test_sol = [sol,sol2]; +sol = solve(prob, Vern7(), abstol = 1/10^14, reltol = 1/10^14) +sol2 = solve(probstatic, Vern7(), abstol = 1/10^14, reltol = 1/10^14) +probs = [prob, probstatic] +test_sol = [sol, sol2]; ``` ```julia @@ -46,9 +46,9 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>Tsit5()) Dict(:alg=>Vern6()) Dict(:alg=>Tsit5(), :prob_choice => 2) - Dict(:alg=>Vern6(), :prob_choice => 2) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=100,maxiters=1000) + Dict(:alg=>Vern6(), :prob_choice => 2)] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, numruns = 100, maxiters = 1000) plot(wp) ``` @@ -61,9 +61,9 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>Tsit5()) Dict(:alg=>Vern6()) Dict(:alg=>Tsit5(), :prob_choice => 2) - Dict(:alg=>Vern6(), :prob_choice => 2) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,numruns=100,maxiters=10000,error_estimate=:L2,dense_errors=true) + Dict(:alg=>Vern6(), :prob_choice => 2)] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, numruns = 100, + maxiters = 10000, error_estimate = :L2, dense_errors = true) plot(wp) ``` @@ -80,9 +80,9 @@ setups = [Dict(:alg=>DP8()) Dict(:alg=>Vern6(), :prob_choice => 2) Dict(:alg=>Vern7(), :prob_choice => 2) Dict(:alg=>Vern8(), :prob_choice => 2) - Dict(:alg=>Vern9(), :prob_choice => 2) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=100,maxiters=1000) + Dict(:alg=>Vern9(), :prob_choice => 2)] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, numruns = 100, maxiters = 1000) plot(wp) ``` @@ -91,12 +91,12 @@ setups = [Dict(:alg=>DP8()) Dict(:alg=>Vern7()) Dict(:alg=>Vern7(), :prob_choice => 2) Dict(:alg=>CVODE_Adams()) - Dict(:alg=>ARKODE(Sundials.Explicit(),order=6)) + Dict(:alg=>ARKODE(Sundials.Explicit(), order = 6)) Dict(:alg=>lsoda()) Dict(:alg=>odex()) - Dict(:alg=>ddeabm()) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=100,maxiters=1000) + Dict(:alg=>ddeabm())] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, numruns = 100, maxiters = 1000) plot(wp) ``` @@ -112,9 +112,9 @@ setups = [Dict(:alg=>DP8()) Dict(:alg=>Vern6(), :prob_choice => 2) Dict(:alg=>Vern7(), :prob_choice => 2) Dict(:alg=>Vern8(), :prob_choice => 2) - Dict(:alg=>Vern9(), :prob_choice => 2) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,numruns=100,maxiters=1000,error_estimate=:L2,dense_errors=true) + Dict(:alg=>Vern9(), :prob_choice => 2)] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, numruns = 100, + maxiters = 1000, error_estimate = :L2, dense_errors = true) plot(wp) ``` @@ -129,36 +129,54 @@ setups = [Dict(:alg=>Tsit5()) Dict(:alg=>VCABM()) Dict(:alg=>Vern9(), :prob_choice => 2) Dict(:alg=>VCABM(), :prob_choice => 2) - Dict(:alg=>AitkenNeville(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true))] -solnames = ["Tsit5","Vern9","VCABM","Vern9 Static","VCABM Static","AitkenNeville","Midpoint Deuflhard","Midpoint Hairer Wanner"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) + Dict(:alg=>AitkenNeville(min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true))] +solnames = ["Tsit5", "Vern9", "VCABM", "Vern9 Static", "VCABM Static", + "AitkenNeville", "Midpoint Deuflhard", "Midpoint Hairer Wanner"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=9, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :romberg, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :bulirsch, threading=true))] -solnames = ["Deuflhard","No threads","standard","Romberg","Bulirsch"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 9, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :romberg, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :bulirsch, threading = true))] +solnames = ["Deuflhard", "No threads", "standard", "Romberg", "Bulirsch"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=15, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=7, init_order=6, threading=true))] -solnames = ["1","2","3","4","5"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 15, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 7, init_order = 6, threading = true))] +solnames = ["1", "2", "3", "4", "5"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` @@ -168,5 +186,5 @@ As expected, the algorithms are all pretty matched on time for this problem. How ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffODE/LotkaVolterra_wpd.jmd b/benchmarks/NonStiffODE/LotkaVolterra_wpd.jmd index 06279f336..d1579e2b8 100644 --- a/benchmarks/NonStiffODE/LotkaVolterra_wpd.jmd +++ b/benchmarks/NonStiffODE/LotkaVolterra_wpd.jmd @@ -5,7 +5,6 @@ author: Chris Rackauckas ## Lotka-Volterra - The purpose of this problem is to test the performance on easy problems. Since it's periodic, the error is naturally low, and so most of the difference will come down to startup times and, when measuring the interpolations, the algorithm choices. ```julia @@ -13,21 +12,22 @@ using OrdinaryDiffEq, ParameterizedFunctions, ODEInterfaceDiffEq, LSODA, Sundials, DiffEqDevTools, StaticArrays f = @ode_def LotkaVolterra begin - dx = a*x - b*x*y - dy = -c*y + d*x*y + dx = a*x - b*x*y + dy = -c*y + d*x*y end a b c d -p = SA[1.5,1.0,3.0,1.0] -prob = ODEProblem{true, SciMLBase.FullSpecialize}(f,[1.0;1.0],(0.0,10.0),p) -probstatic = ODEProblem{false}(f,SA[1.0;1.0],(0.0,10.0),p) +p = SA[1.5, 1.0, 3.0, 1.0] +prob = ODEProblem{true, SciMLBase.FullSpecialize}(f, [1.0; 1.0], (0.0, 10.0), p) +probstatic = ODEProblem{false}(f, SA[1.0; 1.0], (0.0, 10.0), p) abstols = 1.0 ./ 10.0 .^ (6:13) reltols = 1.0 ./ 10.0 .^ (3:10); -sol = solve(prob,Vern7(),abstol=1/10^14,reltol=1/10^14) -sol2 = solve(probstatic,Vern7(),abstol=1/10^14,reltol=1/10^14) -probs = [prob,probstatic] -test_sol = [sol,sol2]; -using Plots; gr() +sol = solve(prob, Vern7(), abstol = 1/10^14, reltol = 1/10^14) +sol2 = solve(probstatic, Vern7(), abstol = 1/10^14, reltol = 1/10^14) +probs = [prob, probstatic] +test_sol = [sol, sol2]; +using Plots; +gr() ``` ```julia @@ -43,9 +43,9 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>Tsit5()) Dict(:alg=>Vern6()) Dict(:alg=>Tsit5(), :prob_choice => 2) - Dict(:alg=>Vern6(), :prob_choice => 2) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,maxiters=10000,numruns=100) + Dict(:alg=>Vern6(), :prob_choice => 2)] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, maxiters = 10000, numruns = 100) plot(wp) ``` @@ -61,9 +61,9 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>Tsit5()) Dict(:alg=>Vern6()) Dict(:alg=>Tsit5(), :prob_choice => 2) - Dict(:alg=>Vern6(), :prob_choice => 2) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,maxiters=10000,error_estimate=:L2,dense_errors=true,numruns=100) + Dict(:alg=>Vern6(), :prob_choice => 2)] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, maxiters = 10000, + error_estimate = :L2, dense_errors = true, numruns = 100) plot(wp) ``` @@ -82,9 +82,9 @@ setups = [Dict(:alg=>DP8()) Dict(:alg=>Vern6(), :prob_choice => 2) Dict(:alg=>Vern7(), :prob_choice => 2) Dict(:alg=>Vern8(), :prob_choice => 2) - Dict(:alg=>Vern9(), :prob_choice => 2) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,maxiters=1000,numruns=100) + Dict(:alg=>Vern9(), :prob_choice => 2)] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, maxiters = 1000, numruns = 100) plot(wp) ``` @@ -101,9 +101,9 @@ setups = [Dict(:alg=>odex()) Dict(:alg=>Vern9(), :prob_choice => 2) Dict(:alg=>CVODE_Adams()) Dict(:alg=>lsoda()) - Dict(:alg=>ARKODE(Sundials.Explicit(),order=6)) - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,maxiters=1000,numruns=100) + Dict(:alg=>ARKODE(Sundials.Explicit(), order = 6))] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, maxiters = 1000, numruns = 100) plot(wp) ``` @@ -119,9 +119,9 @@ setups = [Dict(:alg=>DP8()) Dict(:alg=>Vern6(), :prob_choice => 2) Dict(:alg=>Vern7(), :prob_choice => 2) Dict(:alg=>Vern8(), :prob_choice => 2) - Dict(:alg=>Vern9(), :prob_choice => 2) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,dense=true,maxiters=1000,error_estimate=:L2,numruns=100) + Dict(:alg=>Vern9(), :prob_choice => 2)] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, dense = true, + maxiters = 1000, error_estimate = :L2, numruns = 100) plot(wp) ``` @@ -140,45 +140,62 @@ setups = [Dict(:alg=>Tsit5()) Dict(:alg=>VCABM()) Dict(:alg=>Vern9(), :prob_choice => 2) Dict(:alg=>VCABM(), :prob_choice => 2) - Dict(:alg=>AitkenNeville(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true))] -solnames = ["Tsit5","Vern9","VCABM","Vern9 Static","VCABM Static","AitkenNeville","Midpoint Deuflhard","Midpoint Hairer Wanner"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) + Dict(:alg=>AitkenNeville(min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true))] +solnames = ["Tsit5", "Vern9", "VCABM", "Vern9 Static", "VCABM Static", + "AitkenNeville", "Midpoint Deuflhard", "Midpoint Hairer Wanner"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=9, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :romberg, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :bulirsch, threading=true))] -solnames = ["Deuflhard","No threads","standard","Romberg","Bulirsch"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 9, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :romberg, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :bulirsch, threading = true))] +solnames = ["Deuflhard", "No threads", "standard", "Romberg", "Bulirsch"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=15, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=7, init_order=6, threading=true))] -solnames = ["1","2","3","4","5"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 15, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 7, init_order = 6, threading = true))] +solnames = ["1", "2", "3", "4", "5"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` - ## Conclusion The OrdinaryDiffEq.jl are quicker and still solve to a much higher accuracy, especially when the interpolations are involved. ODE.jl errors a lot. ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffODE/Pleiades_wpd.jmd b/benchmarks/NonStiffODE/Pleiades_wpd.jmd index 695ee3a37..f832f858e 100644 --- a/benchmarks/NonStiffODE/Pleiades_wpd.jmd +++ b/benchmarks/NonStiffODE/Pleiades_wpd.jmd @@ -6,37 +6,42 @@ author: Chris Rackauckas ```julia using OrdinaryDiffEq, ODEInterfaceDiffEq, LSODA, Sundials, DiffEqDevTools -f = (du,u,p,t) -> begin - @inbounds begin - x = view(u,1:7) # x - y = view(u,8:14) # y - v = view(u,15:21) # x′ - w = view(u,22:28) # y′ - du[1:7] .= v - du[8:14].= w - for i in 15:28 - du[i] = zero(u[1]) - end - for i=1:7,j=1:7 - if i != j - r = ((x[i]-x[j])^2 + (y[i] - y[j])^2)^(3/2) - du[14+i] += j*(x[j] - x[i])/r - du[21+i] += j*(y[j] - y[i])/r +f = (du, u, p, t) -> begin + @inbounds begin + x = view(u, 1:7) # x + y = view(u, 8:14) # y + v = view(u, 15:21) # x′ + w = view(u, 22:28) # y′ + du[1:7] .= v + du[8:14] .= w + for i in 15:28 + du[i] = zero(u[1]) + end + for i in 1:7, j in 1:7 + + if i != j + r = ((x[i]-x[j])^2 + (y[i] - y[j])^2)^(3/2) + du[14 + i] += j*(x[j] - x[i])/r + du[21 + i] += j*(y[j] - y[i])/r + end + end end - end - end end -prob = ODEProblem{true, SciMLBase.FullSpecialize}(f,[3.0,3.0,-1.0,-3.0,2.0,-2.0,2.0,3.0,-3.0,2.0,0,0,-4.0,4.0,0,0,0,0,0,1.75,-1.5,0,0,0,-1.25,1,0,0],(0.0,3.0)) +prob = ODEProblem{true, SciMLBase.FullSpecialize}(f, + [3.0, 3.0, -1.0, -3.0, 2.0, -2.0, 2.0, 3.0, -3.0, 2.0, 0, 0, + -4.0, 4.0, 0, 0, 0, 0, 0, 1.75, -1.5, 0, 0, 0, -1.25, 1, 0, 0], + (0.0, 3.0)) abstols = 1.0 ./ 10.0 .^ (6:9) reltols = 1.0 ./ 10.0 .^ (3:6); -using Plots; gr() +using Plots; +gr() ``` ```julia -sol = solve(prob,Vern8(),abstol=1/10^12,reltol=1/10^10,maxiters=1000000) +sol = solve(prob, Vern8(), abstol = 1/10^12, reltol = 1/10^10, maxiters = 1000000) test_sol = TestSolution(sol); plot(sol) ``` @@ -55,9 +60,9 @@ ODE.jl had to be discarded. The error estimate is off since it throws errors and setups = [Dict(:alg=>DP5()) Dict(:alg=>dopri5()) Dict(:alg=>Tsit5()) - Dict(:alg=>Vern6()) -] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=100,maxiters=10000) + Dict(:alg=>Vern6())] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, numruns = 100, maxiters = 10000) plot(wp) ``` @@ -66,9 +71,9 @@ plot(wp) ```julia setups = [Dict(:alg=>DP5()) Dict(:alg=>Tsit5()) - Dict(:alg=>Vern6()) -] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;appxsol=test_sol,numruns=100,maxiters=10000,error_estimate=:L2,dense_errors=true) + Dict(:alg=>Vern6())] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, numruns = 100, + maxiters = 10000, error_estimate = :L2, dense_errors = true) plot(wp) ``` @@ -88,9 +93,9 @@ setups = [Dict(:alg=>DP8()) Dict(:alg=>Vern7()) Dict(:alg=>Vern8()) Dict(:alg=>Vern9()) - Dict(:alg=>dop853()) -] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=100,maxiters=1000) + Dict(:alg=>dop853())] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, numruns = 100, maxiters = 1000) plot(wp) ``` @@ -102,9 +107,9 @@ setups = [Dict(:alg=>odex()) Dict(:alg=>Vern6()) Dict(:alg=>Tsit5()) Dict(:alg=>ddeabm()) - Dict(:alg=>ARKODE(Sundials.Explicit(),order=6)) -] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=20) + Dict(:alg=>ARKODE(Sundials.Explicit(), order = 6))] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, numruns = 20) plot(wp) ``` @@ -115,9 +120,9 @@ setups = [Dict(:alg=>DP8()) Dict(:alg=>Vern6()) Dict(:alg=>Vern7()) Dict(:alg=>Vern8()) - Dict(:alg=>Vern9()) -] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;appxsol=test_sol,numruns=100,maxiters=1000,error_estimate=:L2,dense_errors=true) + Dict(:alg=>Vern9())] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, numruns = 100, + maxiters = 1000, error_estimate = :L2, dense_errors = true) plot(wp) ``` @@ -130,36 +135,51 @@ Adams-Bashforth-Moulton: setups = [Dict(:alg=>Tsit5()) Dict(:alg=>Vern9()) Dict(:alg=>VCABM()) - Dict(:alg=>AitkenNeville(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true))] -solnames = ["Tsit5","Vern9","VCABM","AitkenNeville","Midpoint Deuflhard","Midpoint Hairer Wanner"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) + Dict(:alg=>AitkenNeville(min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true))] +solnames = ["Tsit5", "Vern9", "VCABM", "AitkenNeville", + "Midpoint Deuflhard", "Midpoint Hairer Wanner"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=9, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :romberg, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :bulirsch, threading=true))] -solnames = ["Deuflhard","No threads","standard","Romberg","Bulirsch"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 9, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :romberg, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :bulirsch, threading = true))] +solnames = ["Deuflhard", "No threads", "standard", "Romberg", "Bulirsch"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=15, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=7, init_order=6, threading=true))] -solnames = ["1","2","3","4","5"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 15, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 7, init_order = 6, threading = true))] +solnames = ["1", "2", "3", "4", "5"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` @@ -169,5 +189,5 @@ One big conclusion is that, once again, the ODE.jl algorithms fail to run on dif ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffODE/RigidBody_wpd.jmd b/benchmarks/NonStiffODE/RigidBody_wpd.jmd index e5a4eb0e1..ea1925bca 100644 --- a/benchmarks/NonStiffODE/RigidBody_wpd.jmd +++ b/benchmarks/NonStiffODE/RigidBody_wpd.jmd @@ -10,22 +10,23 @@ using OrdinaryDiffEq, ParameterizedFunctions, ODEInterfaceDiffEq, LSODA, k(t) = 0.25*sin(t)^2 g = @ode_def RigidBody begin - dy1 = I₁*y2*y3 - dy2 = I₂*y1*y3 - dy3 = I₃*y1*y2 + k(t) + dy1 = I₁*y2*y3 + dy2 = I₂*y1*y3 + dy3 = I₃*y1*y2 + k(t) end I₁ I₂ I₃ -p = SA[-2.0,1.25,-0.5] -prob = ODEProblem{true, SciMLBase.FullSpecialize}(g,[1.0;0.0;0.9],(0.0,10.0),p) -probstatic = ODEProblem{false}(g,SA[1.0;0.0;0.9],(0.0,10.0),p) +p = SA[-2.0, 1.25, -0.5] +prob = ODEProblem{true, SciMLBase.FullSpecialize}(g, [1.0; 0.0; 0.9], (0.0, 10.0), p) +probstatic = ODEProblem{false}(g, SA[1.0; 0.0; 0.9], (0.0, 10.0), p) abstols = 1.0 ./ 10.0 .^ (6:13) reltols = 1.0 ./ 10.0 .^ (3:10); -sol = solve(prob,Vern7(),abstol=1/10^14,reltol=1/10^14) -sol2 = solve(probstatic,Vern7(),abstol=1/10^14,reltol=1/10^14) -probs = [prob,probstatic] -test_sol = [sol,sol2]; -using Plots; gr() +sol = solve(prob, Vern7(), abstol = 1/10^14, reltol = 1/10^14) +sol2 = solve(probstatic, Vern7(), abstol = 1/10^14, reltol = 1/10^14) +probs = [prob, probstatic] +test_sol = [sol, sol2]; +using Plots; +gr() ``` ```julia @@ -39,9 +40,9 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>Tsit5()) Dict(:alg=>Vern6()) Dict(:alg=>Tsit5(), :prob_choice => 2) - Dict(:alg=>Vern6(), :prob_choice => 2) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=true,numruns=100,maxiters=10000) + Dict(:alg=>Vern6(), :prob_choice => 2)] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = true, numruns = 100, maxiters = 10000) plot(wp) ``` @@ -60,9 +61,9 @@ setups = [Dict(:alg=>DP8()) Dict(:alg=>Vern6(), :prob_choice => 2) Dict(:alg=>Vern7(), :prob_choice => 2) Dict(:alg=>Vern8(), :prob_choice => 2) - Dict(:alg=>Vern9(), :prob_choice => 2) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=100,maxiters=1000) + Dict(:alg=>Vern9(), :prob_choice => 2)] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, numruns = 100, maxiters = 1000) plot(wp) ``` @@ -75,9 +76,9 @@ setups = [Dict(:alg=>Vern7()) Dict(:alg=>CVODE_Adams()) Dict(:alg=>lsoda()) Dict(:alg=>ddeabm()) - Dict(:alg=>ARKODE(Sundials.Explicit(),order=6)) -] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=100,maxiters=1000) + Dict(:alg=>ARKODE(Sundials.Explicit(), order = 6))] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, numruns = 100, maxiters = 1000) plot(wp) ``` @@ -94,45 +95,62 @@ setups = [Dict(:alg=>Tsit5()) Dict(:alg=>VCABM()) Dict(:alg=>Vern9(), :prob_choice => 2) Dict(:alg=>VCABM(), :prob_choice => 2) - Dict(:alg=>AitkenNeville(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true))] -solnames = ["Tsit5","Vern9","VCABM","Vern9 Static","VCABM Static","AitkenNeville","Midpoint Deuflhard","Midpoint Hairer Wanner"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) + Dict(:alg=>AitkenNeville(min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true))] +solnames = ["Tsit5", "Vern9", "VCABM", "Vern9 Static", "VCABM Static", + "AitkenNeville", "Midpoint Deuflhard", "Midpoint Hairer Wanner"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=9, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :romberg, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :bulirsch, threading=true))] -solnames = ["Deuflhard","No threads","standard","Romberg","Bulirsch"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 9, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :romberg, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :bulirsch, threading = true))] +solnames = ["Deuflhard", "No threads", "standard", "Romberg", "Bulirsch"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=15, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=7, init_order=6, threading=true))] -solnames = ["1","2","3","4","5"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 15, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 7, init_order = 6, threading = true))] +solnames = ["1", "2", "3", "4", "5"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` - ### Conclusion Once again, the OrdinaryDiffEq.jl pull far ahead in terms of speed and accuracy. ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffODE/ThreeBody_wpd.jmd b/benchmarks/NonStiffODE/ThreeBody_wpd.jmd index 484df262e..ee5839aa9 100644 --- a/benchmarks/NonStiffODE/ThreeBody_wpd.jmd +++ b/benchmarks/NonStiffODE/ThreeBody_wpd.jmd @@ -5,61 +5,68 @@ author: Chris Rackauckas ```julia using OrdinaryDiffEq, ODEInterfaceDiffEq, LSODA, Sundials, DiffEqDevTools, StaticArrays -using Plots; gr() +using Plots; +gr() ## Define the ThreeBody Problem -const threebody_μ = parse(Float64,"0.012277471") +const threebody_μ = parse(Float64, "0.012277471") const threebody_μ′ = 1 - threebody_μ -function f(du,u,p,t) - @inbounds begin - # 1 = y₁ - # 2 = y₂ - # 3 = y₁' - # 4 = y₂' - D₁ = ((u[1]+threebody_μ)^2 + u[2]^2)^(3/2) - D₂ = ((u[1]-threebody_μ′)^2 + u[2]^2)^(3/2) - du[1] = u[3] - du[2] = u[4] - du[3] = u[1] + 2u[4] - threebody_μ′*(u[1]+threebody_μ)/D₁ - threebody_μ*(u[1]-threebody_μ′)/D₂ - du[4] = u[2] - 2u[3] - threebody_μ′*u[2]/D₁ - threebody_μ*u[2]/D₂ - end +function f(du, u, p, t) + @inbounds begin + # 1 = y₁ + # 2 = y₂ + # 3 = y₁' + # 4 = y₂' + D₁ = ((u[1]+threebody_μ)^2 + u[2]^2)^(3/2) + D₂ = ((u[1]-threebody_μ′)^2 + u[2]^2)^(3/2) + du[1] = u[3] + du[2] = u[4] + du[3] = u[1] + 2u[4] - threebody_μ′*(u[1]+threebody_μ)/D₁ - + threebody_μ*(u[1]-threebody_μ′)/D₂ + du[4] = u[2] - 2u[3] - threebody_μ′*u[2]/D₁ - threebody_μ*u[2]/D₂ + end end -function f(u,p,t) - @inbounds begin - # 1 = y₁ - # 2 = y₂ - # 3 = y₁' - # 4 = y₂' - D₁ = ((u[1]+threebody_μ)^2 + u[2]^2)^(3/2) - D₂ = ((u[1]-threebody_μ′)^2 + u[2]^2)^(3/2) - du1 = u[3] - du2 = u[4] - du3 = u[1] + 2u[4] - threebody_μ′*(u[1]+threebody_μ)/D₁ - threebody_μ*(u[1]-threebody_μ′)/D₂ - du4 = u[2] - 2u[3] - threebody_μ′*u[2]/D₁ - threebody_μ*u[2]/D₂ - end - SA[du1,du2,du3,du4] +function f(u, p, t) + @inbounds begin + # 1 = y₁ + # 2 = y₂ + # 3 = y₁' + # 4 = y₂' + D₁ = ((u[1]+threebody_μ)^2 + u[2]^2)^(3/2) + D₂ = ((u[1]-threebody_μ′)^2 + u[2]^2)^(3/2) + du1 = u[3] + du2 = u[4] + du3 = u[1] + 2u[4] - threebody_μ′*(u[1]+threebody_μ)/D₁ - + threebody_μ*(u[1]-threebody_μ′)/D₂ + du4 = u[2] - 2u[3] - threebody_μ′*u[2]/D₁ - threebody_μ*u[2]/D₂ + end + SA[du1, du2, du3, du4] end -t₀ = 0.0; T = parse(Float64,"17.0652165601579625588917206249") -tspan = (t₀,2T) +t₀ = 0.0; +T = parse(Float64, "17.0652165601579625588917206249") +tspan = (t₀, 2T) -prob = ODEProblem{true, SciMLBase.FullSpecialize}(f,[0.994, 0.0, 0.0, parse(Float64,"-2.00158510637908252240537862224")],tspan) -probstatic = ODEProblem{false}(f,SA[0.994, 0.0, 0.0, parse(Float64,"-2.00158510637908252240537862224")],tspan) +prob = ODEProblem{true, SciMLBase.FullSpecialize}( + f, [0.994, 0.0, 0.0, parse(Float64, "-2.00158510637908252240537862224")], tspan) +probstatic = ODEProblem{false}( + f, SA[0.994, 0.0, 0.0, parse(Float64, "-2.00158510637908252240537862224")], tspan) -sol = solve(prob,Vern7(),abstol=1/10^14,reltol=1/10^14) -sol2 = solve(probstatic,Vern7(),abstol=1/10^14,reltol=1/10^14) -probs = [prob,probstatic] -test_sol = [sol,sol2]; +sol = solve(prob, Vern7(), abstol = 1/10^14, reltol = 1/10^14) +sol2 = solve(probstatic, Vern7(), abstol = 1/10^14, reltol = 1/10^14) +probs = [prob, probstatic] +test_sol = [sol, sol2]; -abstols = 1.0 ./ 10.0 .^ (3:13); reltols = 1.0 ./ 10.0 .^ (0:10); +abstols = 1.0 ./ 10.0 .^ (3:13); +reltols = 1.0 ./ 10.0 .^ (0:10); ``` See that it's periodic in the chosen timespan: ```julia -sol = solve(prob,Vern9(),abstol=1e-14,reltol=1e-14) +sol = solve(prob, Vern9(), abstol = 1e-14, reltol = 1e-14) @show sol[1] - sol[end] @show sol[end] - prob.u0; ``` @@ -68,7 +75,6 @@ This three-body problem is known to be a tough problem. Let's see how the algori ### 5th Order Runge-Kutta Methods - ```julia setups = [Dict(:alg=>DP5()) #Dict(:alg=>ode45()) #fails @@ -76,20 +82,21 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>Tsit5()) Dict(:alg=>Tsit5(), :prob_choice => 2) Dict(:alg=>dopri5())]; -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=100) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, numruns = 100) plot(wp) ``` #### Full save, but no dense ```julia -setups = [Dict(:alg=>DP5(),:dense=>false) +setups = [Dict(:alg=>DP5(), :dense=>false) #Dict(:alg=>ode45()) # Fails - Dict(:alg=>BS5(),:dense=>false) - Dict(:alg=>Tsit5(),:dense=>false) - Dict(:alg=>Tsit5(),:dense=>false, :prob_choice => 2) + Dict(:alg=>BS5(), :dense=>false) + Dict(:alg=>Tsit5(), :dense=>false) + Dict(:alg=>Tsit5(), :dense=>false, :prob_choice => 2) Dict(:alg=>dopri5())]; -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,numruns=100) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, numruns = 100) plot(wp) ``` @@ -102,7 +109,7 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>Tsit5()) Dict(:alg=>Tsit5(), :prob_choice => 2) Dict(:alg=>dopri5())]; -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,numruns=100) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, numruns = 100) plot(wp) ``` @@ -123,17 +130,19 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>Vern7(), :prob_choice => 2) Dict(:alg=>Vern8(), :prob_choice => 2) Dict(:alg=>Vern9(), :prob_choice => 2)]; -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=100) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, numruns = 100) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,dense=false,numruns=100,verbose=false) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + dense = false, numruns = 100, verbose = false) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,numruns=100) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, numruns = 100) plot(wp) ``` @@ -157,9 +166,9 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>Vern8(), :prob_choice => 2) Dict(:alg=>ddeabm()) Dict(:alg=>odex()) - Dict(:alg=>ARKODE(Sundials.Explicit(),order=6)) - ]; -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=100) + Dict(:alg=>ARKODE(Sundials.Explicit(), order = 6))]; +wp = WorkPrecisionSet(probs, abstols, reltols, setups; appxsol = test_sol, + save_everystep = false, numruns = 100) plot(wp) ``` @@ -171,49 +180,67 @@ Now let's test Tsit5 and Vern9 against parallel extrapolation methods and an Adams-Bashforth-Moulton: ```julia -abstols = 1.0 ./ 10.0 .^ (3:13); reltols = 1.0 ./ 10.0 .^ (0:10); +abstols = 1.0 ./ 10.0 .^ (3:13); +reltols = 1.0 ./ 10.0 .^ (0:10); setups = [Dict(:alg=>Tsit5()) Dict(:alg=>Vern9()) Dict(:alg=>Vern9(), :prob_choice => 2) - Dict(:alg=>AitkenNeville(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true))] -solnames = ["Tsit5","Vern9","Vern9 Static","AitkenNeville","Midpoint Deuflhard","Midpoint Hairer Wanner"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) + Dict(:alg=>AitkenNeville(min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true))] +solnames = ["Tsit5", "Vern9", "Vern9 Static", "AitkenNeville", + "Midpoint Deuflhard", "Midpoint Hairer Wanner"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=9, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :romberg, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :bulirsch, threading=true))] -solnames = ["Deuflhard","No threads","standard","Romberg","Bulirsch"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 9, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :romberg, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :bulirsch, threading = true))] +solnames = ["Deuflhard", "No threads", "standard", "Romberg", "Bulirsch"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=15, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=7, init_order=6, threading=true))] -solnames = ["1","2","3","4","5"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;appxsol=test_sol,names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 15, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 7, init_order = 6, threading = true))] +solnames = ["1", "2", "3", "4", "5"] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; appxsol = test_sol, names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` - ### Conclusion As in the other tests, the OrdinaryDiffEq.jl algorithms with the Verner Efficient methods are the most efficient solvers at stringent tolerances for most of the tests, while the order 5 methods do well at cruder tolerances. ODE.jl fails to run the test problems without erroring. ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffODE/linear_wpd.jmd b/benchmarks/NonStiffODE/linear_wpd.jmd index f0be1f937..977636ffa 100644 --- a/benchmarks/NonStiffODE/linear_wpd.jmd +++ b/benchmarks/NonStiffODE/linear_wpd.jmd @@ -28,16 +28,16 @@ using Random Random.seed!(123) gr() # 2D Linear ODE -function f(du,u,p,t) - @inbounds for i in eachindex(u) - du[i] = 1.01*u[i] - end +function f(du, u, p, t) + @inbounds for i in eachindex(u) + du[i] = 1.01*u[i] + end end -function f_analytic(u₀,p,t) - u₀*exp(1.01*t) +function f_analytic(u₀, p, t) + u₀*exp(1.01*t) end -tspan = (0.0,10.0) -prob = ODEProblem(ODEFunction{true, SciMLBase.FullSpecialize}(f,analytic=f_analytic),rand(100,100),tspan) +tspan = (0.0, 10.0) +prob = ODEProblem(ODEFunction{true, SciMLBase.FullSpecialize}(f, analytic = f_analytic), rand(100, 100), tspan) abstols = 1.0 ./ 10.0 .^ (3:13) reltols = 1.0 ./ 10.0 .^ (0:10); @@ -55,23 +55,26 @@ put DifferentialEquations.jl in "speed mode". setups = [Dict(:alg=>DP5()) Dict(:alg=>ode45()) Dict(:alg=>dopri5()) - Dict(:alg=>ARKODE(Sundials.Explicit(),etable=Sundials.DORMAND_PRINCE_7_4_5)) + Dict(:alg=>ARKODE(Sundials.Explicit(), etable = Sundials.DORMAND_PRINCE_7_4_5)) Dict(:alg=>Tsit5())] -solnames = ["OrdinaryDiffEq";"ODE";"ODEInterface";"Sundials ARKODE";"OrdinaryDiffEq Tsit5"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=solnames,save_everystep=false,numruns=100) +solnames = ["OrdinaryDiffEq"; "ODE"; "ODEInterface"; "Sundials ARKODE"; + "OrdinaryDiffEq Tsit5"] +wp = WorkPrecisionSet( + prob, abstols, reltols, setups; names = solnames, save_everystep = false, numruns = 100) plot(wp) ``` ### Full Saving ```julia -setups = [Dict(:alg=>DP5(),:dense=>false) - Dict(:alg=>ode45(),:dense=>false) +setups = [Dict(:alg=>DP5(), :dense=>false) + Dict(:alg=>ode45(), :dense=>false) Dict(:alg=>dopri5()) # dense=false by default: no nonlinear interpolation - Dict(:alg=>ARKODE(Sundials.Explicit(),etable=Sundials.DORMAND_PRINCE_7_4_5),:dense=>false) - Dict(:alg=>Tsit5(),:dense=>false)] -solnames = ["OrdinaryDiffEq";"ODE";"ODEInterface";"Sundials ARKODE";"OrdinaryDiffEq Tsit5"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=solnames,numruns=100) + Dict(:alg=>ARKODE(Sundials.Explicit(), etable = Sundials.DORMAND_PRINCE_7_4_5), :dense=>false) + Dict(:alg=>Tsit5(), :dense=>false)] +solnames = ["OrdinaryDiffEq"; "ODE"; "ODEInterface"; "Sundials ARKODE"; + "OrdinaryDiffEq Tsit5"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; names = solnames, numruns = 100) plot(wp) ``` @@ -84,10 +87,11 @@ timepoint the matrix of rates `k` has to be deep copied. setups = [Dict(:alg=>DP5()) Dict(:alg=>ode45()) Dict(:alg=>dopri5()) - Dict(:alg=>ARKODE(Sundials.Explicit(),etable=Sundials.DORMAND_PRINCE_7_4_5)) + Dict(:alg=>ARKODE(Sundials.Explicit(), etable = Sundials.DORMAND_PRINCE_7_4_5)) Dict(:alg=>Tsit5())] -solnames = ["OrdinaryDiffEq";"ODE";"ODEInterface";"Sundials ARKODE";"OrdinaryDiffEq Tsit5"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=solnames,numruns=100) +solnames = ["OrdinaryDiffEq"; "ODE"; "ODEInterface"; "Sundials ARKODE"; + "OrdinaryDiffEq Tsit5"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; names = solnames, numruns = 100) plot(wp) ``` @@ -102,7 +106,7 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>BS3()) Dict(:alg=>BS5()) Dict(:alg=>Tsit5())] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;save_everystep=false,numruns=100) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; save_everystep = false, numruns = 100) plot(wp) ``` @@ -118,7 +122,7 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>Vern8()) Dict(:alg=>DP8()) Dict(:alg=>Vern9())] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;save_everystep=false,numruns=100) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; save_everystep = false, numruns = 100) plot(wp) ``` @@ -134,9 +138,9 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>odex()) Dict(:alg=>lsoda()) Dict(:alg=>ddeabm()) - Dict(:alg=>ARKODE(Sundials.Explicit(),order=8)) + Dict(:alg=>ARKODE(Sundials.Explicit(), order = 8)) Dict(:alg=>CVODE_Adams())] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;save_everystep=false,numruns=100) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; save_everystep = false, numruns = 100) plot(wp) ``` @@ -151,7 +155,8 @@ would magnify the difference. First the order 4/5 comparison: setups = [Dict(:alg=>DP5()) #Dict(:alg=>ode45()) Dict(:alg=>Tsit5())] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;error_estimate=:L2,dense_errors=true,numruns=100) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; error_estimate = :L2, + dense_errors = true, numruns = 100) plot(wp) ``` @@ -166,7 +171,8 @@ setups = [Dict(:alg=>DP5()) Dict(:alg=>Vern7()) #Dict(:alg=>ode78()) ] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;error_estimate=:L2,dense_errors=true,numruns=100) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; error_estimate = :L2, + dense_errors = true, numruns = 100) plot(wp) ``` @@ -178,15 +184,16 @@ the difference: ```julia abstols = 1.0 ./ 10.0 .^ (3:13) reltols = 1.0 ./ 10.0 .^ (0:10); -dts = [1,1/2,1/4,1/10,1/20,1/40,1/60,1/80,1/100,1/140,1/240] +dts = [1, 1/2, 1/4, 1/10, 1/20, 1/40, 1/60, 1/80, 1/100, 1/140, 1/240] setups = [Dict(:alg=>DP5()) Dict(:alg=>ode45()) Dict(:alg=>dopri5()) - Dict(:alg=>RK4(),:dts=>dts) + Dict(:alg=>RK4(), :dts=>dts) Dict(:alg=>Tsit5())] -solnames = ["DifferentialEquations";"ODE";"ODEInterface";"DifferentialEquations RK4";"DifferentialEquations Tsit5"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=solnames, - save_everystep=false,verbose=false,numruns=100) +solnames = ["DifferentialEquations"; "ODE"; "ODEInterface"; "DifferentialEquations RK4"; + "DifferentialEquations Tsit5"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` @@ -199,36 +206,51 @@ Adams-Bashforth-Moulton: setups = [Dict(:alg=>Tsit5()) Dict(:alg=>Vern9()) Dict(:alg=>VCABM()) - Dict(:alg=>AitkenNeville(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true))] -solnames = ["Tsit5","Vern9","VCABM","AitkenNeville","Midpoint Deuflhard","Midpoint Hairer Wanner"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=solnames, - save_everystep=false,verbose=false,numruns=100) + Dict(:alg=>AitkenNeville(min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true))] +solnames = ["Tsit5", "Vern9", "VCABM", "AitkenNeville", + "Midpoint Deuflhard", "Midpoint Hairer Wanner"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard(min_order=1, max_order=9, init_order=9, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=false)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :romberg, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, sequence = :bulirsch, threading=true))] -solnames = ["Deuflhard","No threads","standard","Romberg","Bulirsch"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointDeuflhard( + min_order = 1, max_order = 9, init_order = 9, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = false)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :romberg, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, + sequence = :bulirsch, threading = true))] +solnames = ["Deuflhard", "No threads", "standard", "Romberg", "Bulirsch"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` ```julia -setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=11, init_order=4, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=11, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=2, max_order=15, init_order=10, threading=true)) - Dict(:alg=>ExtrapolationMidpointHairerWanner(min_order=5, max_order=7, init_order=6, threading=true))] -solnames = ["1","2","3","4","5"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;names=solnames, - save_everystep=false,verbose=false,numruns=100) +setups = [Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 11, init_order = 4, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 11, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 2, max_order = 15, init_order = 10, threading = true)) + Dict(:alg=>ExtrapolationMidpointHairerWanner( + min_order = 5, max_order = 7, init_order = 6, threading = true))] +solnames = ["1", "2", "3", "4", "5"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; names = solnames, + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` @@ -244,11 +266,10 @@ setups = [Dict(:alg=>Tsit5()) Dict(:alg=>ExtrapolationMidpointHairerWanner(threading = OrdinaryDiffEq.PolyesterThreads())) Dict(:alg=>odex()) Dict(:alg=>dop853()) - Dict(:alg=>CVODE_Adams()) - ] + Dict(:alg=>CVODE_Adams())] -wp = WorkPrecisionSet(prob,abstols,reltols,setups; - save_everystep=false,verbose=false,numruns=100) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; + save_everystep = false, verbose = false, numruns = 100) plot(wp) ``` @@ -264,5 +285,5 @@ benchmarks are why these algorithms were chosen as part of the defaults. ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffSDE/BasicSDEWeakWorkPrecision.jmd b/benchmarks/NonStiffSDE/BasicSDEWeakWorkPrecision.jmd index 79e966610..12728090b 100644 --- a/benchmarks/NonStiffSDE/BasicSDEWeakWorkPrecision.jmd +++ b/benchmarks/NonStiffSDE/BasicSDEWeakWorkPrecision.jmd @@ -21,9 +21,10 @@ Thus in each case, we will determine the variance of the true solution and use t ```julia using StochasticDiffEq, DiffEqDevTools, ParameterizedFunctions, SDEProblemLibrary -using Plots; gr() +using Plots; +gr() import SDEProblemLibrary: prob_sde_additive, - prob_sde_linear, prob_sde_wave + prob_sde_linear, prob_sde_wave const N = 1000 ``` @@ -40,31 +41,30 @@ prob = prob_sde_additive reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] -setups = [ - Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRIW1(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRA1(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) +setups = [Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRIW1(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRA1(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) Dict(:alg=>SRA1()) - Dict(:alg=>SRIW1()) - ] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns_error=N, - save_everystep = false, - parallel_type = :none, - error_estimate=:weak_final)# + Dict(:alg=>SRIW1())] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns_error = N, + save_everystep = false, + parallel_type = :none, + error_estimate = :weak_final)# plot(wp) ``` ```julia -sample_size = Int[10;1e2;1e3;1e4] -se = get_sample_errors(prob,setups[6],numruns=sample_size, - sample_error_runs = 100_000,solution_runs=100) +sample_size = Int[10; 1e2; 1e3; 1e4] +se = get_sample_errors(prob, setups[6], numruns = sample_size, + sample_error_runs = 100_000, solution_runs = 100) ``` ```julia times = [wp[i].times for i in 1:length(wp)] -times = [minimum(minimum(t) for t in times),maximum(maximum(t) for t in times)] -plot!([se[end];se[end]],times,color=:red,linestyle=:dash,label="Sample Error: 1000",lw=3) +times = [minimum(minimum(t) for t in times), maximum(maximum(t) for t in times)] +plot!([se[end]; se[end]], times, color = :red, + linestyle = :dash, label = "Sample Error: 1000", lw = 3) ``` ```julia @@ -72,31 +72,30 @@ prob = prob_sde_additive reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] -setups = [ - Dict(:alg=>SRA1()) +setups = [Dict(:alg=>SRA1()) Dict(:alg=>SRA2()) Dict(:alg=>SRA3()) Dict(:alg=>SOSRA()) - Dict(:alg=>SOSRA2()) - ] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns_error=N, - save_everystep = false, - maxiters = 1e7, - parallel_type = :none, - error_estimate=:weak_final) + Dict(:alg=>SOSRA2())] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns_error = N, + save_everystep = false, + maxiters = 1e7, + parallel_type = :none, + error_estimate = :weak_final) plot(wp) ``` ```julia -sample_size = Int[10;1e2;1e3;1e4] -se = get_sample_errors(prob,setups[4],numruns=sample_size, - sample_error_runs = 100_000,solution_runs=100) +sample_size = Int[10; 1e2; 1e3; 1e4] +se = get_sample_errors(prob, setups[4], numruns = sample_size, + sample_error_runs = 100_000, solution_runs = 100) ``` ```julia times = [wp[i].times for i in 1:length(wp)] -times = [minimum(minimum(t) for t in times),maximum(maximum(t) for t in times)] -plot!([se[end];se[end]],times,color=:red,linestyle=:dash,label="Sample Error: 1000",lw=3) +times = [minimum(minimum(t) for t in times), maximum(maximum(t) for t in times)] +plot!([se[end]; se[end]], times, color = :red, + linestyle = :dash, label = "Sample Error: 1000", lw = 3) ``` ### Scalar Noise @@ -116,28 +115,28 @@ reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] setups = [Dict(:alg=>SRIW1()) - Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRIW1(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - ] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns_error=N, - save_everystep = false, - maxiters = 1e7, - parallel_type = :none, - error_estimate=:weak_final) + Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRIW1(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false)] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns_error = N, + save_everystep = false, + maxiters = 1e7, + parallel_type = :none, + error_estimate = :weak_final) plot(wp) ``` ```julia -sample_size = Int[10;1e2;1e3;1e4] -se = get_sample_errors(prob,setups[1],numruns=sample_size, - sample_error_runs = 100_000,solution_runs=100) +sample_size = Int[10; 1e2; 1e3; 1e4] +se = get_sample_errors(prob, setups[1], numruns = sample_size, + sample_error_runs = 100_000, solution_runs = 100) ``` ```julia times = [wp[i].times for i in 1:length(wp)] -times = [minimum(minimum(t) for t in times),maximum(maximum(t) for t in times)] -plot!([se[end];se[end]],times,color=:red,linestyle=:dash,label="Sample Error: 1000",lw=3) +times = [minimum(minimum(t) for t in times), maximum(maximum(t) for t in times)] +plot!([se[end]; se[end]], times, color = :red, + linestyle = :dash, label = "Sample Error: 1000", lw = 3) ``` ```julia @@ -146,32 +145,32 @@ prob = prob_sde_linear reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] -setups = [Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 2)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 2),:adaptive=>false) +setups = [Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 2)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 2), :adaptive=>false) Dict(:alg=>SRI()) Dict(:alg=>SRIW1()) Dict(:alg=>SRIW2()) Dict(:alg=>SOSRI()) - Dict(:alg=>SOSRI2()) - ] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns_error=N, - save_everystep = false, - maxiters = 1e7, - parallel_type = :none, - error_estimate=:weak_final) + Dict(:alg=>SOSRI2())] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns_error = N, + save_everystep = false, + maxiters = 1e7, + parallel_type = :none, + error_estimate = :weak_final) plot(wp) ``` ```julia -sample_size = Int[10;1e2;1e3;1e4] -se = get_sample_errors(prob,setups[6],numruns=sample_size, - sample_error_runs = 100_000,solution_runs=100) +sample_size = Int[10; 1e2; 1e3; 1e4] +se = get_sample_errors(prob, setups[6], numruns = sample_size, + sample_error_runs = 100_000, solution_runs = 100) ``` ```julia times = [wp[i].times for i in 1:length(wp)] -times = [minimum(minimum(t) for t in times),maximum(maximum(t) for t in times)] -plot!([se[end];se[end]],times,color=:red,linestyle=:dash,label="Sample Error: 1000",lw=3) +times = [minimum(minimum(t) for t in times), maximum(maximum(t) for t in times)] +plot!([se[end]; se[end]], times, color = :red, + linestyle = :dash, label = "Sample Error: 1000", lw = 3) ``` ## Scalar Wave SDE @@ -188,31 +187,30 @@ prob = prob_sde_wave reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] -setups = [ - Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRIW1(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRIW1()) - ] +setups = [Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRIW1(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRIW1())] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns_error=N, - save_everystep = false, - maxiters = 1e7, - parallel_type = :none, - error_estimate=:weak_final) +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns_error = N, + save_everystep = false, + maxiters = 1e7, + parallel_type = :none, + error_estimate = :weak_final) plot(wp) ``` ```julia -sample_size = Int[10;1e2;1e3;1e4] -se = get_sample_errors(prob,setups[4],numruns=sample_size, - sample_error_runs = 100_000,solution_runs=100) +sample_size = Int[10; 1e2; 1e3; 1e4] +se = get_sample_errors(prob, setups[4], numruns = sample_size, + sample_error_runs = 100_000, solution_runs = 100) ``` ```julia times = [wp[i].times for i in 1:length(wp)] -times = [minimum(minimum(t) for t in times),maximum(maximum(t) for t in times)] -plot!([se[end];se[end]],times,color=:red,linestyle=:dash,label="Sample Error: 1000",lw=3) +times = [minimum(minimum(t) for t in times), maximum(maximum(t) for t in times)] +plot!([se[end]; se[end]], times, color = :red, + linestyle = :dash, label = "Sample Error: 1000", lw = 3) ``` ```julia @@ -221,32 +219,32 @@ prob = prob_sde_wave reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] -setups = [Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 2)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 2),:adaptive=>false) +setups = [Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 2)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 2), :adaptive=>false) Dict(:alg=>SRI()) Dict(:alg=>SRIW1()) Dict(:alg=>SRIW2()) Dict(:alg=>SOSRI()) - Dict(:alg=>SOSRI2()) - ] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns_error=N, - save_everystep = false, - maxiters = 1e7, - parallel_type = :none, - error_estimate=:weak_final) + Dict(:alg=>SOSRI2())] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns_error = N, + save_everystep = false, + maxiters = 1e7, + parallel_type = :none, + error_estimate = :weak_final) plot(wp) ``` ```julia -sample_size = Int[10;1e2;1e3;1e4] -se = get_sample_errors(prob,setups[6],numruns=sample_size, - sample_error_runs = 100_000,solution_runs=100) +sample_size = Int[10; 1e2; 1e3; 1e4] +se = get_sample_errors(prob, setups[6], numruns = sample_size, + sample_error_runs = 100_000, solution_runs = 100) ``` ```julia times = [wp[i].times for i in 1:length(wp)] -times = [minimum(minimum(t) for t in times),maximum(maximum(t) for t in times)] -plot!([se[end];se[end]],times,color=:red,linestyle=:dash,label="Sample Error: 1000",lw=3) +times = [minimum(minimum(t) for t in times), maximum(maximum(t) for t in times)] +plot!([se[end]; se[end]], times, color = :red, + linestyle = :dash, label = "Sample Error: 1000", lw = 3) ``` ## Summary @@ -255,5 +253,5 @@ In the additive noise problem, the `EM` and `RKMil` algorithms are not effective ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffSDE/BasicSDEWorkPrecision.jmd b/benchmarks/NonStiffSDE/BasicSDEWorkPrecision.jmd index 9cafd5ccc..cb2dcfad9 100644 --- a/benchmarks/NonStiffSDE/BasicSDEWorkPrecision.jmd +++ b/benchmarks/NonStiffSDE/BasicSDEWorkPrecision.jmd @@ -10,7 +10,8 @@ In this notebook we will run some simple work-precision diagrams for the SDE int ```julia using StochasticDiffEq, Plots, DiffEqDevTools, SDEProblemLibrary import SDEProblemLibrary: prob_sde_additivesystem, - prob_sde_additive, prob_sde_2Dlinear, prob_sde_linear, prob_sde_wave + prob_sde_additive, prob_sde_2Dlinear, prob_sde_linear, + prob_sde_wave gr() const N = 1000 ``` @@ -31,41 +32,39 @@ where $\alpha=\frac{1}{10}$ and $\beta=\frac{1}{20}$. Actual Solution: X_{t}=\frac{1}{\sqrt{1+t}}X_{0}+\frac{\beta}{\sqrt{1+t}}\left(t+\alpha W_{t}\right). \end{equation} - First let's solve this using a system of SDEs, repeating this same problem 4 times. ```julia prob = prob_sde_additivesystem -prob = remake(prob,tspan=(0.0,1.0)) +prob = remake(prob, tspan = (0.0, 1.0)) reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] setups = [Dict(:alg=>SRIW1()) - Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRIW1(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRA1(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRA1()) - ] -names = ["SRIW1","EM","RKMil","SRIW1 Fixed","SRA1 Fixed","SRA1"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns=N,names=names,maxiters=1e7,error_estimate=:l2) + Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRIW1(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRA1(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRA1())] +names = ["SRIW1", "EM", "RKMil", "SRIW1 Fixed", "SRA1 Fixed", "SRA1"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns = N, + names = names, maxiters = 1e7, error_estimate = :l2) plot(wp) ``` ```julia prob = prob_sde_additivesystem -prob = remake(prob,tspan=(0.0,1.0)) +prob = remake(prob, tspan = (0.0, 1.0)) reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] -setups = [ - Dict(:alg=>SRA1()) +setups = [Dict(:alg=>SRA1()) Dict(:alg=>SRA2()) Dict(:alg=>SRA3()) Dict(:alg=>SOSRA()) - Dict(:alg=>SOSRA2()) - ] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns=N,maxiters=1e7,error_estimate=:l2) + Dict(:alg=>SOSRA2())] +wp = WorkPrecisionSet( + prob, abstols, reltols, setups; numruns = N, maxiters = 1e7, error_estimate = :l2) plot(wp) ``` @@ -73,39 +72,35 @@ Now as a scalar SDE. ```julia prob = prob_sde_additive -prob = remake(prob,tspan=(0.0,1.0)) +prob = remake(prob, tspan = (0.0, 1.0)) reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] - - setups = [Dict(:alg=>SRIW1()) - Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRIW1(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRA1(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRA1()) - ] -names = ["SRIW1","EM","RKMil","SRIW1 Fixed","SRA1 Fixed","SRA1"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns=N,names=names,maxiters=1e7,error_estimate=:l2) + Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRIW1(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRA1(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRA1())] +names = ["SRIW1", "EM", "RKMil", "SRIW1 Fixed", "SRA1 Fixed", "SRA1"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns = N, + names = names, maxiters = 1e7, error_estimate = :l2) plot(wp) ``` ```julia prob = prob_sde_additive -prob = remake(prob,tspan=(0.0,1.0)) +prob = remake(prob, tspan = (0.0, 1.0)) reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] -setups = [ - Dict(:alg=>SRA1()) +setups = [Dict(:alg=>SRA1()) Dict(:alg=>SRA2()) Dict(:alg=>SRA3()) Dict(:alg=>SOSRA()) - Dict(:alg=>SOSRA2()) - ] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns=N,error_estimate=:l2) + Dict(:alg=>SOSRA2())] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns = N, error_estimate = :l2) plot(wp) ``` @@ -123,37 +118,37 @@ X_{t}=X_{0}e^{\left(\beta-\frac{\alpha^{2}}{2}\right)t+\alpha W_{t}}. ```julia prob = prob_sde_2Dlinear -prob = remake(prob,tspan=(0.0,1.0)) +prob = remake(prob, tspan = (0.0, 1.0)) reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] setups = [Dict(:alg=>SRIW1()) - Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRIW1(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - ] -names = ["SRIW1","EM","RKMil","SRIW1 Fixed"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns=N,names=names,maxiters=1e7,error_estimate=:l2) + Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRIW1(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false)] +names = ["SRIW1", "EM", "RKMil", "SRIW1 Fixed"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns = N, + names = names, maxiters = 1e7, error_estimate = :l2) plot(wp) ``` ```julia prob = prob_sde_2Dlinear -prob = remake(prob,tspan=(0.0,1.0)) +prob = remake(prob, tspan = (0.0, 1.0)) reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] -setups = [Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 2)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 2),:adaptive=>false) +setups = [Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 2)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 2), :adaptive=>false) Dict(:alg=>SRI()) Dict(:alg=>SRIW1()) Dict(:alg=>SRIW2()) Dict(:alg=>SOSRI()) - Dict(:alg=>SOSRI2()) - ] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns=N,maxiters=1e7,error_estimate=:l2) + Dict(:alg=>SOSRI2())] +wp = WorkPrecisionSet( + prob, abstols, reltols, setups; numruns = N, maxiters = 1e7, error_estimate = :l2) plot(wp) ``` @@ -161,31 +156,31 @@ Now just the scalar Black-Scholes ```julia prob = prob_sde_linear -prob = remake(prob,tspan=(0.0,1.0)) +prob = remake(prob, tspan = (0.0, 1.0)) reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] setups = [Dict(:alg=>SRIW1()) - Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRIW1(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - ] -names = ["SRIW1","EM","RKMil","SRIW1 Fixed"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns=N,names=names,maxiters=1e7,error_estimate=:l2) + Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRIW1(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false)] +names = ["SRIW1", "EM", "RKMil", "SRIW1 Fixed"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns = N, + names = names, maxiters = 1e7, error_estimate = :l2) plot(wp) ``` ```julia -setups = [Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 2)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 2),:adaptive=>false) +setups = [Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 2)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 2), :adaptive=>false) Dict(:alg=>SRI()) Dict(:alg=>SRIW1()) Dict(:alg=>SRIW2()) Dict(:alg=>SOSRI()) - Dict(:alg=>SOSRI2()) - ] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns=N,maxiters=1e7,error_estimate=:l2) + Dict(:alg=>SOSRI2())] +wp = WorkPrecisionSet( + prob, abstols, reltols, setups; numruns = N, maxiters = 1e7, error_estimate = :l2) plot(wp) ``` @@ -201,33 +196,33 @@ X_{t}=\arctan\left(\frac{1}{10}W_{t}+\tan\left(X_{0}\right)\right). ```julia prob = prob_sde_wave -prob = remake(prob,tspan=(0.0,1.0)) +prob = remake(prob, tspan = (0.0, 1.0)) reltols = 1.0 ./ 10.0 .^ (1:5) abstols = reltols#[0.0 for i in eachindex(reltols)] setups = [Dict(:alg=>SRIW1()) - Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - Dict(:alg=>SRIW1(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 1),:adaptive=>false) - ] -names = ["SRIW1","EM","RKMil","SRIW1 Fixed"] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns=N,names=names,maxiters=1e7,error_estimate=:l2) + Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false) + Dict(:alg=>SRIW1(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 1), :adaptive=>false)] +names = ["SRIW1", "EM", "RKMil", "SRIW1 Fixed"] +wp = WorkPrecisionSet(prob, abstols, reltols, setups; numruns = N, + names = names, maxiters = 1e7, error_estimate = :l2) plot(wp) ``` Note that in this last problem, the adaptivity algorithm accurately detects that the error is already low enough, and does not increase the number of steps as the tolerance drops further. ```julia -setups = [Dict(:alg=>EM(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 2)) - Dict(:alg=>RKMil(),:dts=>1.0./5.0.^((1:length(reltols)) .+ 2),:adaptive=>false) +setups = [Dict(:alg=>EM(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 2)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 5.0 .^ ((1:length(reltols)) .+ 2), :adaptive=>false) Dict(:alg=>SRI()) Dict(:alg=>SRIW1()) Dict(:alg=>SRIW2()) Dict(:alg=>SOSRI()) - Dict(:alg=>SOSRI2()) - ] -wp = WorkPrecisionSet(prob,abstols,reltols,setups;numruns=N,maxiters=1e7,error_estimate=:l2) + Dict(:alg=>SOSRI2())] +wp = WorkPrecisionSet( + prob, abstols, reltols, setups; numruns = N, maxiters = 1e7, error_estimate = :l2) plot(wp) ``` @@ -237,5 +232,5 @@ The RSwM3 adaptivity algorithm does not appear to have any significant overhead ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffSDE/LotkaVolterraSDE.jmd b/benchmarks/NonStiffSDE/LotkaVolterraSDE.jmd index 4a3e83757..83b368f16 100644 --- a/benchmarks/NonStiffSDE/LotkaVolterraSDE.jmd +++ b/benchmarks/NonStiffSDE/LotkaVolterraSDE.jmd @@ -5,26 +5,27 @@ author: Chris Rackauckas ```julia using StochasticDiffEq, DiffEqDevTools, ParameterizedFunctions -using Plots; gr() +using Plots; +gr() const N = 100 f = @ode_def LotkaVolterraTest begin - dx = a*x - b*x*y - dy = -c*y + d*x*y + dx = a*x - b*x*y + dy = -c*y + d*x*y end a b c d -p = [1.5,1.0,3.0,1.0] +p = [1.5, 1.0, 3.0, 1.0] -function g(du,u,p,t) - du .= 0.1u +function g(du, u, p, t) + du .= 0.1u end -u0 = [1.0;1.0] -tspan = (0.0,10.0) -prob = SDEProblem(f,g,u0,tspan,p); +u0 = [1.0; 1.0] +tspan = (0.0, 10.0) +prob = SDEProblem(f, g, u0, tspan, p); ``` ```julia -sol = solve(prob,SRIW1(),abstol=1e-4,reltol=1e-4) +sol = solve(prob, SRIW1(), abstol = 1e-4, reltol = 1e-4) plot(sol) ``` @@ -36,21 +37,20 @@ The starting `dt`s was chosen as the largest in the `1/4^i` which were stable. A reltols = 1.0 ./ 4.0 .^ (2:4) abstols = reltols#[0.0 for i in eachindex(reltols)] setups = [Dict(:alg=>SRIW1()) - Dict(:alg=>EM(),:dts=>1.0./12.0.^((1:length(reltols)) .+ 1.5)) - Dict(:alg=>RKMil(),:dts=>1.0./12.0.^((1:length(reltols)) .+ 1.5),:adaptive=>false) - Dict(:alg=>SRIW1(),:dts=>1.0./4.0.^((1:length(reltols)) .+ 5),:adaptive=>false) + Dict(:alg=>EM(), :dts=>1.0 ./ 12.0 .^ ((1:length(reltols)) .+ 1.5)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 12.0 .^ ((1:length(reltols)) .+ 1.5), :adaptive=>false) + Dict(:alg=>SRIW1(), :dts=>1.0 ./ 4.0 .^ ((1:length(reltols)) .+ 5), :adaptive=>false) Dict(:alg=>SRIW2()) Dict(:alg=>SOSRI()) - Dict(:alg=>SOSRI2()) - ] + Dict(:alg=>SOSRI2())] test_dt = 1/10^2 -appxsol_setup = Dict(:alg=>SRIW1(),:abstol=>1e-4,:reltol=>1e-4) -wp = WorkPrecisionSet(prob,abstols,reltols,setups,test_dt; - maxiters = 1e7, - verbose=false,save_everystep=false, - parallel_type = :threads, - appxsol_setup = appxsol_setup, - numruns_error=N,error_estimate=:final) +appxsol_setup = Dict(:alg=>SRIW1(), :abstol=>1e-4, :reltol=>1e-4) +wp = WorkPrecisionSet(prob, abstols, reltols, setups, test_dt; + maxiters = 1e7, + verbose = false, save_everystep = false, + parallel_type = :threads, + appxsol_setup = appxsol_setup, + numruns_error = N, error_estimate = :final) plot(wp) ``` @@ -60,47 +60,47 @@ plot(wp) reltols = 1.0 ./ 4.0 .^ (2:4) abstols = reltols#[0.0 for i in eachindex(reltols)] setups = [Dict(:alg=>SRIW1()) - Dict(:alg=>EM(),:dts=>1.0./12.0.^((1:length(reltols)) .+ 1.5)) - Dict(:alg=>RKMil(),:dts=>1.0./12.0.^((1:length(reltols)) .+ 1.5),:adaptive=>false) - Dict(:alg=>SRIW1(),:dts=>1.0./4.0.^((1:length(reltols)) .+ 5),:adaptive=>false) + Dict(:alg=>EM(), :dts=>1.0 ./ 12.0 .^ ((1:length(reltols)) .+ 1.5)) + Dict(:alg=>RKMil(), :dts=>1.0 ./ 12.0 .^ ((1:length(reltols)) .+ 1.5), :adaptive=>false) + Dict(:alg=>SRIW1(), :dts=>1.0 ./ 4.0 .^ ((1:length(reltols)) .+ 5), :adaptive=>false) Dict(:alg=>SRIW2()) Dict(:alg=>SOSRI()) - Dict(:alg=>SOSRI2()) - ] + Dict(:alg=>SOSRI2())] test_dt = 1e-2 -appxsol_setup = Dict(:alg=>SRIW1(),:abstol=>1e-4,:reltol=>1e-4) -wp = WorkPrecisionSet(prob,abstols,reltols,setups,test_dt; - maxiters = 1e7, - verbose=false,save_everystep=false, - parallel_type = :none, - appxsol_setup = appxsol_setup, - numruns_error=N,error_estimate=:weak_final) -plot(wp;legend=:topleft) +appxsol_setup = Dict(:alg=>SRIW1(), :abstol=>1e-4, :reltol=>1e-4) +wp = WorkPrecisionSet(prob, abstols, reltols, setups, test_dt; + maxiters = 1e7, + verbose = false, save_everystep = false, + parallel_type = :none, + appxsol_setup = appxsol_setup, + numruns_error = N, error_estimate = :weak_final) +plot(wp; legend = :topleft) ``` ```julia -sample_size = Int[10;1e2;1e3] -se = get_sample_errors(prob,setups[6],test_dt,numruns=sample_size, - appxsol_setup = appxsol_setup, - sample_error_runs = 100_000,solution_runs=20) +sample_size = Int[10; 1e2; 1e3] +se = get_sample_errors(prob, setups[6], test_dt, numruns = sample_size, + appxsol_setup = appxsol_setup, + sample_error_runs = 100_000, solution_runs = 20) ``` ```julia -plot(wp;legend=:topleft) +plot(wp; legend = :topleft) times = [wp[i].times for i in 1:length(wp)] -times = [minimum(minimum(t) for t in times),maximum(maximum(t) for t in times)] -plot!([se[end];se[end]],times,color=:orange,linestyle=:dash,label="Sample Error: 1000",lw=3) +times = [minimum(minimum(t) for t in times), maximum(maximum(t) for t in times)] +plot!([se[end]; se[end]], times, color = :orange, + linestyle = :dash, label = "Sample Error: 1000", lw = 3) ``` ## Conclusion -These results show that in both strong and weak error, the high order method is more efficient. -The strong and the weak are track each other well for the methods tested on this problem, with the -strong error slightly higher than the weak error. To reach the sample error for a 100 trajectories, -the higher order method is around 5x faster. To reach the sampling error for 10000 trajectories, the +These results show that in both strong and weak error, the high order method is more efficient. +The strong and the weak are track each other well for the methods tested on this problem, with the +strong error slightly higher than the weak error. To reach the sample error for a 100 trajectories, +the higher order method is around 5x faster. To reach the sampling error for 10000 trajectories, the higher order method is nearly 100x faster. ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonStiffSDE/Project.toml b/benchmarks/NonStiffSDE/Project.toml index db2e04ef9..c5c8944cd 100644 --- a/benchmarks/NonStiffSDE/Project.toml +++ b/benchmarks/NonStiffSDE/Project.toml @@ -2,14 +2,14 @@ DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d" ParameterizedFunctions = "65888b18-ceab-5e60-b2b9-181511a3b968" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -SciMLBenchmarks = "31c91b34-3c75-11e9-0341-95557aab0344" SDEProblemLibrary = "c72e72a9-a271-4b2b-8966-303ed956772e" +SciMLBenchmarks = "31c91b34-3c75-11e9-0341-95557aab0344" StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" [compat] DiffEqDevTools = "2.30" ParameterizedFunctions = "5.3" Plots = "1.4" +SDEProblemLibrary = "0.1, 1" SciMLBenchmarks = "0.1" -SDEProblemLibrary = "0.1" StochasticDiffEq = "6.50" diff --git a/benchmarks/NonlinearProblem/Project.toml b/benchmarks/NonlinearProblem/Project.toml index 814f4c686..bf0b9486f 100644 --- a/benchmarks/NonlinearProblem/Project.toml +++ b/benchmarks/NonlinearProblem/Project.toml @@ -32,7 +32,7 @@ Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" [compat] AlgebraicMultigrid = "0.6, 1" BenchmarkTools = "1" -CairoMakie = "0.12, 0.13" +CairoMakie = "0.12, 0.13, 0.14, 0.15" DiffEqBase = "6.142" DiffEqDevTools = "2" DifferentiationInterface = "0.6, 0.7" @@ -52,7 +52,7 @@ RecursiveFactorization = "0.2.23" SciMLBenchmarks = "0.1" Setfield = "1" SimpleNonlinearSolve = "2" -SparseConnectivityTracer = "0.6" +SparseConnectivityTracer = "0.6, 1" SparseMatrixColorings = "0.4" SpeedMapping = "0.3" StableRNGs = "1" diff --git a/benchmarks/NonlinearProblem/bruss.jmd b/benchmarks/NonlinearProblem/bruss.jmd index 5f9860107..cdb7eb986 100644 --- a/benchmarks/NonlinearProblem/bruss.jmd +++ b/benchmarks/NonlinearProblem/bruss.jmd @@ -9,8 +9,8 @@ Fetch required packages ```julia using NonlinearSolve, LinearAlgebra, SparseArrays, DiffEqDevTools, - CairoMakie, Symbolics, BenchmarkTools, PolyesterForwardDiff, LinearSolve, Sundials, - Enzyme, SparseConnectivityTracer, DifferentiationInterface, SparseMatrixColorings + CairoMakie, Symbolics, BenchmarkTools, PolyesterForwardDiff, LinearSolve, Sundials, + Enzyme, SparseConnectivityTracer, DifferentiationInterface, SparseMatrixColorings import NLsolve, MINPACK, PETSc, RecursiveFactorization const RUS = RadiusUpdateSchemes; @@ -26,14 +26,15 @@ function timeout(f, timeout) timer = Timer(timeout) do tm close(tm) ex = ErrorException("timed out after $timeout seconds") - @lock cond notify(cond, ex; error=false) + @lock cond notify(cond, ex; error = false) end Threads.@spawn begin try ret = $f() isopen(timer) && @lock cond notify(cond, ret) catch e - isopen(timer) && @lock cond notify(cond, CapturedException(e, catch_backtrace()); error=true) + isopen(timer) && + @lock cond notify(cond, CapturedException(e, catch_backtrace()); error = true) finally close(timer) end @@ -78,13 +79,13 @@ function generate_brusselator_problem(N::Int; sparsity = nothing, kwargs...) jp1, jm1 = limit(j + 1, N), limit(j - 1, N) du[i, j, 1] = α * (u[im1, j, 1] + u[ip1, j, 1] + u[i, jp1, 1] + u[i, jm1, 1] - - 4u[i, j, 1]) + + 4u[i, j, 1]) + B + u[i, j, 1] ^ 2 * u[i, j, 2] - (A + 1) * u[i, j, 1] + brusselator_f(x, y) du[i, j, 2] = α * (u[im1, j, 2] + u[ip1, j, 2] + u[i, jp1, 2] + u[i, jm1, 2] - - 4u[i, j, 2]) + - A * u[i, j, 1] - u[i, j, 1] ^ 2 * u[i, j, 2] + 4u[i, j, 2]) + + A * u[i, j, 1] - u[i, j, 1] ^ 2 * u[i, j, 2] end return nothing end @@ -161,59 +162,59 @@ adtypes = [ ( AutoSparse( AutoFiniteDiff(); - sparsity_detector=TracerSparsityDetector(), - coloring_algorithm=GreedyColoringAlgorithm(LargestFirst()) + sparsity_detector = TracerSparsityDetector(), + coloring_algorithm = GreedyColoringAlgorithm(LargestFirst()) ), [:finitediff, :exact_sparse] ), ( AutoSparse( AutoPolyesterForwardDiff(); - sparsity_detector=TracerSparsityDetector(), - coloring_algorithm=GreedyColoringAlgorithm(LargestFirst()) + sparsity_detector = TracerSparsityDetector(), + coloring_algorithm = GreedyColoringAlgorithm(LargestFirst()) ), [:polyester, :exact_sparse] ), ( AutoSparse( - AutoEnzyme(; mode=Enzyme.Forward); - sparsity_detector=TracerSparsityDetector(), - coloring_algorithm=GreedyColoringAlgorithm(LargestFirst()) + AutoEnzyme(; mode = Enzyme.Forward); + sparsity_detector = TracerSparsityDetector(), + coloring_algorithm = GreedyColoringAlgorithm(LargestFirst()) ), [:enzyme, :exact_sparse] ), ( AutoSparse( AutoFiniteDiff(); - sparsity_detector=DenseSparsityDetector(AutoFiniteDiff(); atol=1e-5), - coloring_algorithm=GreedyColoringAlgorithm(LargestFirst()) + sparsity_detector = DenseSparsityDetector(AutoFiniteDiff(); atol = 1e-5), + coloring_algorithm = GreedyColoringAlgorithm(LargestFirst()) ), [:finitediff, :approx_sparse] ), ( AutoSparse( AutoPolyesterForwardDiff(); - sparsity_detector=DenseSparsityDetector( - AutoPolyesterForwardDiff(); atol=1e-5 + sparsity_detector = DenseSparsityDetector( + AutoPolyesterForwardDiff(); atol = 1e-5 ), - coloring_algorithm=GreedyColoringAlgorithm(LargestFirst()) + coloring_algorithm = GreedyColoringAlgorithm(LargestFirst()) ), [:polyester, :approx_sparse] ), ( AutoSparse( - AutoEnzyme(; mode=Enzyme.Forward); - sparsity_detector=DenseSparsityDetector( - AutoEnzyme(; mode=Enzyme.Forward); atol=1e-5 + AutoEnzyme(; mode = Enzyme.Forward); + sparsity_detector = DenseSparsityDetector( + AutoEnzyme(; mode = Enzyme.Forward); atol = 1e-5 ), - coloring_algorithm=GreedyColoringAlgorithm(LargestFirst()) + coloring_algorithm = GreedyColoringAlgorithm(LargestFirst()) ), [:enzyme, :approx_sparse] ), ( AutoPolyesterForwardDiff(), [:polyester, :none] - ), + ) ]; times = Matrix{Float64}(undef, length(Ns), length(adtypes)); @@ -245,33 +246,33 @@ symbol_to_adname = Dict( :finitediff => "Finite Diff", :forwarddiff => "Forward Mode AD", :polyester => "Threaded Forward Mode AD", - :enzyme => "Forward Mode AD (Enzyme)", + :enzyme => "Forward Mode AD (Enzyme)" ) fig = begin - cycle = Cycle([:marker], covary=true) - plot_theme = Theme(Lines=(; cycle), Scatter=(; cycle)) + cycle = Cycle([:marker], covary = true) + plot_theme = Theme(Lines = (; cycle), Scatter = (; cycle)) with_theme(plot_theme) do - fig = Figure(; size=(1400, 1400 * 0.5)) + fig = Figure(; size = (1400, 1400 * 0.5)) - ax = Axis(fig[1, 1]; title="Sparsity Pattern for 2D Brusselator Jacobian", - titlesize=22, titlegap=10, - xticksize=20, yticksize=20, xticklabelsize=20, yticklabelsize=20, - xtickwidth=2.5, ytickwidth=2.5, spinewidth=2.5, yreversed=true) + ax = Axis(fig[1, 1]; title = "Sparsity Pattern for 2D Brusselator Jacobian", + titlesize = 22, titlegap = 10, + xticksize = 20, yticksize = 20, xticklabelsize = 20, yticklabelsize = 20, + xtickwidth = 2.5, ytickwidth = 2.5, spinewidth = 2.5, yreversed = true) - spy!(ax, J_; markersize=1, marker=:circle, framecolor=:lightgray, - colormap=:tableau_20) + spy!(ax, J_; markersize = 1, marker = :circle, framecolor = :lightgray, + colormap = :tableau_20) - ax = Axis(fig[1, 2]; title="Scaling of Sparse Jacobian Computation", - titlesize=22, titlegap=10, xscale=log2, yscale=log2, - xticksize=20, yticksize=20, xticklabelsize=20, yticklabelsize=20, - xtickwidth=2.5, ytickwidth=2.5, spinewidth=2.5, - xlabel=L"Input Dimension ($\mathbf{N}$)", - ylabel=L"Time $\mathbf{(s)}$", xlabelsize=22, - ylabelsize=22, yaxisposition=:right) + ax = Axis(fig[1, 2]; title = "Scaling of Sparse Jacobian Computation", + titlesize = 22, titlegap = 10, xscale = log2, yscale = log2, + xticksize = 20, yticksize = 20, xticklabelsize = 20, yticklabelsize = 20, + xtickwidth = 2.5, ytickwidth = 2.5, spinewidth = 2.5, + xlabel = L"Input Dimension ($\mathbf{N}$)", + ylabel = L"Time $\mathbf{(s)}$", xlabelsize = 22, + ylabelsize = 22, yaxisposition = :right) - colors = cgrad(:tableau_20, length(adtypes); categorical=true) + colors = cgrad(:tableau_20, length(adtypes); categorical = true) line_list = [] scatter_list = [] @@ -279,62 +280,59 @@ fig = begin linestyles = [:solid, :solid, :solid, :dash, :dash, :dash, :dot, :dot] for (i, times) in enumerate(eachcol(times)) - l = lines!(Ns_, times; linewidth=5, color=colors[i], linestyle=linestyles[i]) + l = lines!( + Ns_, times; linewidth = 5, color = colors[i], linestyle = linestyles[i]) push!(line_list, l) - sc = scatter!(Ns_, times; markersize=16, strokewidth=2, color=colors[i]) + sc = scatter!(Ns_, times; markersize = 16, strokewidth = 2, color = colors[i]) push!(scatter_list, sc) end tracer_idxs = [idx for idx in 1:length(adtypes) if :exact_sparse ∈ adtypes[idx][2]] - group_tracer = [ - [ - LineElement(; - color=line_list[idx].color, - linestyle=line_list[idx].linestyle, - linewidth=line_list[idx].linewidth, - ), - MarkerElement(; - color=scatter_list[idx].color, - marker=scatter_list[idx].marker, - strokewidth=scatter_list[idx].strokewidth, - markersize=scatter_list[idx].markersize, - ), - ] for idx in tracer_idxs - ] - - local_sparse_idxs = [idx for idx in 1:length(adtypes) if :approx_sparse ∈ adtypes[idx][2]] - group_local_sparse = [ - [ - LineElement(; - color=line_list[idx].color, - linestyle=line_list[idx].linestyle, - linewidth=line_list[idx].linewidth, - ), - MarkerElement(; - color=scatter_list[idx].color, - marker=scatter_list[idx].marker, - strokewidth=scatter_list[idx].strokewidth, - markersize=scatter_list[idx].markersize, - ), - ] for idx in local_sparse_idxs - ] + group_tracer = [[ + LineElement(; + color = line_list[idx].color, + linestyle = line_list[idx].linestyle, + linewidth = line_list[idx].linewidth + ), + MarkerElement(; + color = scatter_list[idx].color, + marker = scatter_list[idx].marker, + strokewidth = scatter_list[idx].strokewidth, + markersize = scatter_list[idx].markersize + ) + ] for idx in tracer_idxs] + + local_sparse_idxs = [idx + for idx in 1:length(adtypes) + if :approx_sparse ∈ adtypes[idx][2]] + group_local_sparse = [[ + LineElement(; + color = line_list[idx].color, + linestyle = line_list[idx].linestyle, + linewidth = line_list[idx].linewidth + ), + MarkerElement(; + color = scatter_list[idx].color, + marker = scatter_list[idx].marker, + strokewidth = scatter_list[idx].strokewidth, + markersize = scatter_list[idx].markersize + ) + ] for idx in local_sparse_idxs] non_sparse_idxs = [idx for idx in 1:length(adtypes) if :none ∈ adtypes[idx][2]] - group_nonsparse = [ - [ - LineElement(; - color=line_list[idx].color, - linestyle=line_list[idx].linestyle, - linewidth=line_list[idx].linewidth, - ), - MarkerElement(; - color=scatter_list[idx].color, - marker=scatter_list[idx].marker, - strokewidth=scatter_list[idx].strokewidth, - markersize=scatter_list[idx].markersize, - ), - ] for idx in non_sparse_idxs - ] + group_nonsparse = [[ + LineElement(; + color = line_list[idx].color, + linestyle = line_list[idx].linestyle, + linewidth = line_list[idx].linewidth + ), + MarkerElement(; + color = scatter_list[idx].color, + marker = scatter_list[idx].marker, + strokewidth = scatter_list[idx].strokewidth, + markersize = scatter_list[idx].markersize + ) + ] for idx in non_sparse_idxs] axislegend( ax, @@ -342,11 +340,11 @@ fig = begin [ [symbol_to_adname[adtypes[idx][2][1]] for idx in tracer_idxs], [symbol_to_adname[adtypes[idx][2][1]] for idx in local_sparse_idxs], - [symbol_to_adname[adtypes[idx][2][1]] for idx in non_sparse_idxs], + [symbol_to_adname[adtypes[idx][2][1]] for idx in non_sparse_idxs] ], ["Exact Sparsity", "Approx. Local Sparsity", "Dense"]; - position=:lt, framevisible=true, framewidth=2.5, titlesize=18, - labelsize=16, patchsize=(40.0f0, 20.0f0) + position = :lt, framevisible = true, framewidth = 2.5, titlesize = 18, + labelsize = 16, patchsize = (40.0f0, 20.0f0) ) fig @@ -366,20 +364,31 @@ First, let us experiment the scaling of each algorithm with the problem size. Ns = vcat(collect(2 .^ (2:7)), [150, 175, 200]) solvers_scaling = [ - (; pkg = :nonlinearsolve, sparsity = :none, name = "NR (No Sparsity)", alg = NewtonRaphson()), - (; pkg = :nonlinearsolve, sparsity = :exact, name = "NR (Exact Sparsity)", alg = NewtonRaphson()), - (; pkg = :wrapper, sparsity = :none, name = "NR [NLsolve.jl]", alg = NLsolveJL(; method = :newton, autodiff = :forward)), - (; pkg = :wrapper, sparsity = :none, name = "NR [Sundials]", alg = KINSOL(; linear_solver = :LapackDense, maxsetupcalls=1)), - (; pkg = :wrapper, sparsity = :none, name = "NR [PETSc] (No Sparsity)", alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", autodiff = missing)), - (; pkg = :wrapper, sparsity = :exact, name = "NR [PETSc] (Exact Sparsity)", alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic")), - - (; pkg = :nonlinearsolve, sparsity = :none, name = "TR (No Sparsity)", alg = TrustRegion(; radius_update_scheme = RUS.NLsolve)), - (; pkg = :nonlinearsolve, sparsity = :exact, name = "TR (Exact Sparsity)", alg = TrustRegion(; radius_update_scheme = RUS.NLsolve)), - (; pkg = :wrapper, sparsity = :none, name = "TR [NLsolve.jl]", alg = NLsolveJL(; autodiff = :forward)), - (; pkg = :wrapper, sparsity = :none, name = "TR [PETSc] (No Sparsity)", alg = PETScSNES(; snes_type = "newtontr", autodiff = missing)), - (; pkg = :wrapper, sparsity = :exact, name = "TR [PETSc] (Exact Sparsity)", alg = PETScSNES(; snes_type = "newtontr")), - - (; pkg = :wrapper, sparsity = :none, name = "Mod. Powell [MINPACK]", alg = CMINPACK()), + (; pkg = :nonlinearsolve, sparsity = :none, + name = "NR (No Sparsity)", alg = NewtonRaphson()), + (; pkg = :nonlinearsolve, sparsity = :exact, + name = "NR (Exact Sparsity)", alg = NewtonRaphson()), + (; pkg = :wrapper, sparsity = :none, name = "NR [NLsolve.jl]", + alg = NLsolveJL(; method = :newton, autodiff = :forward)), + (; pkg = :wrapper, sparsity = :none, name = "NR [Sundials]", + alg = KINSOL(; linear_solver = :LapackDense, maxsetupcalls = 1)), + (; pkg = :wrapper, + sparsity = :none, + name = "NR [PETSc] (No Sparsity)", + alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", autodiff = missing)), + (; pkg = :wrapper, sparsity = :exact, name = "NR [PETSc] (Exact Sparsity)", + alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic")), (; + pkg = :nonlinearsolve, sparsity = :none, name = "TR (No Sparsity)", + alg = TrustRegion(; radius_update_scheme = RUS.NLsolve)), + (; pkg = :nonlinearsolve, sparsity = :exact, name = "TR (Exact Sparsity)", + alg = TrustRegion(; radius_update_scheme = RUS.NLsolve)), + (; pkg = :wrapper, sparsity = :none, name = "TR [NLsolve.jl]", + alg = NLsolveJL(; autodiff = :forward)), + (; pkg = :wrapper, sparsity = :none, name = "TR [PETSc] (No Sparsity)", + alg = PETScSNES(; snes_type = "newtontr", autodiff = missing)), + (; pkg = :wrapper, sparsity = :exact, name = "TR [PETSc] (Exact Sparsity)", + alg = PETScSNES(; snes_type = "newtontr")), (; pkg = :wrapper, sparsity = :none, + name = "Mod. Powell [MINPACK]", alg = CMINPACK()) ] GC.enable(false) # for PETSc @@ -409,13 +418,14 @@ for (i, N) in enumerate(Ns) end if (j > 1 && runtimes_scaling[j - 1, i] == -1) || - (alg isa CMINPACK && N > 32) || - (alg isa KINSOL && N > 64) || - (alg isa NLsolveJL && N > 64 && alg.method == :trust_region) || - (alg isa GeneralizedFirstOrderAlgorithm && alg.name == :TrustRegion && N > 64) || - (alg isa NLsolveJL && N > 128 && alg.method == :newton) || - (alg isa GeneralizedFirstOrderAlgorithm && alg.name == :NewtonRaphson && N > 128 && ptype == :none) || - (alg isa PETScSNES && N > 64) + (alg isa CMINPACK && N > 32) || + (alg isa KINSOL && N > 64) || + (alg isa NLsolveJL && N > 64 && alg.method == :trust_region) || + (alg isa GeneralizedFirstOrderAlgorithm && alg.name == :TrustRegion && N > 64) || + (alg isa NLsolveJL && N > 128 && alg.method == :newton) || + (alg isa GeneralizedFirstOrderAlgorithm && alg.name == :NewtonRaphson && + N > 128 && ptype == :none) || + (alg isa PETScSNES && N > 64) # The last benchmark failed so skip this too runtimes_scaling[j, i] = NaN @warn "$(name): Would Have Timed out" @@ -424,9 +434,9 @@ for (i, N) in enumerate(Ns) termination_condition = (alg isa PETScSNES || alg isa KINSOL) ? nothing : NonlinearSolveBase.AbsNormTerminationMode(Base.Fix1(maximum, abs)) - sol = solve(prob, alg; abstol=1e-6, reltol=1e-6, termination_condition) - runtimes_scaling[j, i] = @belapsed solve($prob, $alg; abstol=1e-6, - reltol=1e-6, termination_condition=$termination_condition) + sol = solve(prob, alg; abstol = 1e-6, reltol = 1e-6, termination_condition) + runtimes_scaling[j, i] = @belapsed solve($prob, $alg; abstol = 1e-6, + reltol = 1e-6, termination_condition = $termination_condition) @info "$(name): $(runtimes_scaling[j, i]) | $(norm(sol.resid, Inf)) | $(sol.retcode)" end @@ -460,7 +470,7 @@ fig = begin (:nonlinearsolve, :exact) => :dashdot, # (:simplenonlinearsolve, :none) => :solid, (:wrapper, :exact) => :dash, - (:wrapper, :none) => :dot, + (:wrapper, :none) => :dot ) Ns_ = Ns .^ 2 .* 2 @@ -486,25 +496,25 @@ fig = begin push!(scs, sc) end - main_legend = [ - [ - LineElement(; color = ls[idx].color, linestyle = ls[idx].linestyle, - linewidth = ls[idx].linewidth), - MarkerElement(; color = scs[idx].color, marker = scs[idx].marker, - markersize = scs[idx].markersize, strokewidth = scs[idx].strokewidth) - ] - for idx in 1:length(solvers_scaling) - ] + main_legend = [[ + LineElement(; + color = ls[idx].color, linestyle = ls[idx].linestyle, + linewidth = ls[idx].linewidth), + MarkerElement(; + color = scs[idx].color, marker = scs[idx].marker, + markersize = scs[idx].markersize, strokewidth = scs[idx].strokewidth) + ] + for idx in 1:length(solvers_scaling)] sparsity_legend = [ LineElement(; linestyle = :solid, linewidth = 5), # LineElement(; linestyle = :dash, linewidth = 5), - LineElement(; linestyle = :dashdot, linewidth = 5), + LineElement(; linestyle = :dashdot, linewidth = 5) ] axislegend(ax, main_legend, [s.name for s in solvers_scaling[idxs]], "Successful Solvers"; - framevisible=true, framewidth = STROKEWIDTH, orientation = :vertical, + framevisible = true, framewidth = STROKEWIDTH, orientation = :vertical, titlesize = 20, nbanks = 1, labelsize = 16, tellheight = true, tellwidth = false, patchsize = (60.0f0, 20.0f0), position = :rb) @@ -515,7 +525,7 @@ fig = begin # "Approx. Sparsity", "Exact Sparsity" ], - "Sparsity Detection"; framevisible=true, framewidth = STROKEWIDTH, + "Sparsity Detection"; framevisible = true, framewidth = STROKEWIDTH, orientation = :vertical, titlesize = 20, nbanks = 1, labelsize = 16, tellheight = true, tellwidth = false, patchsize = (60.0f0, 20.0f0), position = :lt) @@ -540,25 +550,38 @@ exploit sparsity will automatically do so. ```julia solvers_all = [ - (; pkg = :nonlinearsolve, name = "Default PolyAlg", solver = Dict(:alg => FastShortcutNonlinearPolyalg())), - (; pkg = :nonlinearsolve, name = "RobustMultiNewton (GMRES)", solver = Dict(:alg => RobustMultiNewton(; linsolve = KrylovJL_GMRES()))), - - (; pkg = :nonlinearsolve, name = "Newton Raphson", solver = Dict(:alg => NewtonRaphson(; linsolve = nothing))), - (; pkg = :nonlinearsolve, name = "Newton Krylov", solver = Dict(:alg => NewtonRaphson(; linsolve = KrylovJL_GMRES()))), - (; pkg = :nonlinearsolve, name = "Trust Region", solver = Dict(:alg => TrustRegion())), - (; pkg = :nonlinearsolve, name = "TR Krylov", solver = Dict(:alg => TrustRegion(; linsolve = KrylovJL_GMRES()))), - - (; pkg = :wrapper, name = "NR [NLsolve.jl]", solver = Dict(:alg => NLsolveJL(; method = :newton, autodiff = :forward))), - (; pkg = :wrapper, name = "TR [NLsolve.jl]", solver = Dict(:alg => NLsolveJL(; autodiff = :forward))), - - (; pkg = :wrapper, name = "NR [Sundials]", solver = Dict(:alg => KINSOL(; linear_solver = :LapackDense, maxsetupcalls=1))), - (; pkg = :wrapper, name = "Newton Krylov [Sundials]", solver = Dict(:alg => KINSOL(; linear_solver = :GMRES, maxsetupcalls=1, krylov_dim = 1000))), - - (; pkg = :wrapper, name = "Mod. Powell [MINPACK]", solver = Dict(:alg => CMINPACK())), - - (; pkg = :wrapper, name = "NR [PETSc]", solver = Dict(:alg => PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", autodiff = missing))), - (; pkg = :wrapper, name = "TR [PETSc]", solver = Dict(:alg => PETScSNES(; snes_type = "newtontr", autodiff = missing))), - (; pkg = :wrapper, name = "Newton Krylov [PETSc]", solver = Dict(:alg => PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", autodiff = missing, snes_mf = true, ksp_gmres_restart = 1000))), + (; pkg = :nonlinearsolve, name = "Default PolyAlg", + solver = Dict(:alg => FastShortcutNonlinearPolyalg())), + (; pkg = :nonlinearsolve, name = "RobustMultiNewton (GMRES)", + solver = Dict(:alg => RobustMultiNewton(; linsolve = KrylovJL_GMRES()))), (; + pkg = :nonlinearsolve, name = "Newton Raphson", + solver = Dict(:alg => NewtonRaphson(; linsolve = nothing))), + (; pkg = :nonlinearsolve, name = "Newton Krylov", + solver = Dict(:alg => NewtonRaphson(; linsolve = KrylovJL_GMRES()))), + (; pkg = :nonlinearsolve, name = "Trust Region", solver = Dict(:alg => TrustRegion())), + (; pkg = :nonlinearsolve, name = "TR Krylov", + solver = Dict(:alg => TrustRegion(; linsolve = KrylovJL_GMRES()))), (; + pkg = :wrapper, name = "NR [NLsolve.jl]", + solver = Dict(:alg => NLsolveJL(; method = :newton, autodiff = :forward))), + (; pkg = :wrapper, name = "TR [NLsolve.jl]", + solver = Dict(:alg => NLsolveJL(; autodiff = :forward))), (; + pkg = :wrapper, name = "NR [Sundials]", + solver = Dict(:alg => KINSOL(; linear_solver = :LapackDense, maxsetupcalls = 1))), + (; pkg = :wrapper, + name = "Newton Krylov [Sundials]", + solver = Dict(:alg => KINSOL(; linear_solver = :GMRES, maxsetupcalls = 1, krylov_dim = 1000))), (; + pkg = :wrapper, name = "Mod. Powell [MINPACK]", solver = Dict(:alg => CMINPACK())), + (; pkg = :wrapper, + name = "NR [PETSc]", + solver = Dict(:alg => PETScSNES(; + snes_type = "newtonls", snes_linesearch_type = "basic", autodiff = missing))), + (; pkg = :wrapper, name = "TR [PETSc]", + solver = Dict(:alg => PETScSNES(; snes_type = "newtontr", autodiff = missing))), + (; pkg = :wrapper, + name = "Newton Krylov [PETSc]", + solver = Dict(:alg => PETScSNES(; + snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", + autodiff = missing, snes_mf = true, ksp_gmres_restart = 1000))) ]; ``` @@ -574,11 +597,13 @@ function check_solver(prob, solver) maxiters = 10000) err = norm(sol.resid, Inf) if !SciMLBase.successful_retcode(sol.retcode) - Base.printstyled("[Warn] Solver $(solver.name) returned retcode $(sol.retcode) with an residual norm = $(norm(sol.resid)).\n"; + Base.printstyled( + "[Warn] Solver $(solver.name) returned retcode $(sol.retcode) with an residual norm = $(norm(sol.resid)).\n"; color = :red) return false elseif err > 1e3 - Base.printstyled("[Warn] Solver $(solver.name) had a very large residual (norm = $(norm(sol.resid))).\n"; + Base.printstyled( + "[Warn] Solver $(solver.name) had a very large residual (norm = $(norm(sol.resid))).\n"; color = :red) return false elseif isinf(err) || isnan(err) @@ -586,7 +611,8 @@ function check_solver(prob, solver) color = :red) return false end - Base.printstyled("[Info] Solver $(solver.name) successfully solved the problem (norm = $(norm(sol.resid))).\n"; + Base.printstyled( + "[Info] Solver $(solver.name) successfully solved the problem (norm = $(norm(sol.resid))).\n"; color = :green) catch e Base.printstyled("[Warn] Solver $(solver.name) threw an error: $e.\n"; color = :red) @@ -602,7 +628,8 @@ function generate_wpset(prob, solvers) return WorkPrecisionSet(prob, abstols, reltols, getfield.(successful_solvers, :solver); names = getfield.(successful_solvers, :name), numruns = 10, error_estimate = :l∞, - maxiters = 1000, verbose = true), successful_solvers + maxiters = 1000, verbose = true), + successful_solvers end ``` @@ -644,18 +671,19 @@ fig = begin errors = [err.l∞ for err in errors] l = lines!(ax, errors, times; linestyle = LINESTYLES[solver.pkg], label = name, linewidth = 5, color = colors[i]) - sc = scatter!(ax, errors, times; label = name, markersize = 16, strokewidth = 2, + sc = scatter!( + ax, errors, times; label = name, markersize = 16, strokewidth = 2, color = colors[i]) push!(ls, l) push!(scs, sc) end - xlims!(ax; high=1) - ylims!(ax; low=5e-3) + xlims!(ax; high = 1) + ylims!(ax; low = 5e-3) axislegend(ax, [[l, sc] for (l, sc) in zip(ls, scs)], [solver.name for solver in successful_solvers[idxs]], "Successful Solvers"; - framevisible=true, framewidth = STROKEWIDTH, position = :rb, + framevisible = true, framewidth = STROKEWIDTH, position = :rb, titlesize = 20, labelsize = 16, patchsize = (40.0f0, 20.0f0)) fig[0, :] = Label(fig, "Brusselator Steady State PDE: Work Precision Diagram", @@ -670,8 +698,7 @@ end save("brusselator_wpd.svg", fig) ``` - ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonlinearProblem/bruss_krylov.jmd b/benchmarks/NonlinearProblem/bruss_krylov.jmd index 2a899948c..6b2e91792 100644 --- a/benchmarks/NonlinearProblem/bruss_krylov.jmd +++ b/benchmarks/NonlinearProblem/bruss_krylov.jmd @@ -9,8 +9,8 @@ Fetch required packages ```julia using NonlinearSolve, LinearAlgebra, SparseArrays, DiffEqDevTools, - CairoMakie, Symbolics, BenchmarkTools, PolyesterForwardDiff, LinearSolve, Sundials, - Enzyme, SparseConnectivityTracer, DifferentiationInterface, SparseMatrixColorings + CairoMakie, Symbolics, BenchmarkTools, PolyesterForwardDiff, LinearSolve, Sundials, + Enzyme, SparseConnectivityTracer, DifferentiationInterface, SparseMatrixColorings import NLsolve, MINPACK, PETSc, RecursiveFactorization const RUS = RadiusUpdateSchemes; @@ -26,14 +26,15 @@ function timeout(f, timeout) timer = Timer(timeout) do tm close(tm) ex = ErrorException("timed out after $timeout seconds") - @lock cond notify(cond, ex; error=false) + @lock cond notify(cond, ex; error = false) end Threads.@spawn begin try ret = $f() isopen(timer) && @lock cond notify(cond, ret) catch e - isopen(timer) && @lock cond notify(cond, CapturedException(e, catch_backtrace()); error=true) + isopen(timer) && + @lock cond notify(cond, CapturedException(e, catch_backtrace()); error = true) finally close(timer) end @@ -100,13 +101,13 @@ function generate_brusselator_problem(N::Int; sparsity = nothing, kwargs...) jp1, jm1 = limit(j + 1, N), limit(j - 1, N) du[i, j, 1] = α * (u[im1, j, 1] + u[ip1, j, 1] + u[i, jp1, 1] + u[i, jm1, 1] - - 4u[i, j, 1]) + + 4u[i, j, 1]) + B + u[i, j, 1] ^ 2 * u[i, j, 2] - (A + 1) * u[i, j, 1] + brusselator_f(x, y) du[i, j, 2] = α * (u[im1, j, 2] + u[ip1, j, 2] + u[i, jp1, 2] + u[i, jm1, 2] - - 4u[i, j, 2]) + - A * u[i, j, 1] - u[i, j, 1] ^ 2 * u[i, j, 2] + 4u[i, j, 2]) + + A * u[i, j, 1] - u[i, j, 1] ^ 2 * u[i, j, 2] end return nothing end @@ -120,7 +121,6 @@ function generate_brusselator_problem(N::Int; sparsity = nothing, kwargs...) end ``` - # Jacobian-Free Newton / TR Krylov Methods In this section, we will benchmark jacobian-free nonlinear solvers with Krylov methods. We @@ -154,27 +154,67 @@ Ns = 2 .^ (2:7) krylov_dim = 1000 solvers_scaling_jacobian_free = [ - (; pkg = :nonlinearsolve, name = "Newton Krylov", alg = NewtonRaphson(; linsolve = KrylovJL_GMRES())), - (; pkg = :nonlinearsolve, name = "Newton Krylov (ILU)", alg = NewtonRaphson(; linsolve = KrylovJL_GMRES(; precs = incompletelu), concrete_jac = true)), - (; pkg = :nonlinearsolve, name = "Newton Krylov (AMG)", alg = NewtonRaphson(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid), concrete_jac = true)), - (; pkg = :nonlinearsolve, name = "Newton Krylov (AMG Jacobi)", alg = NewtonRaphson(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid_jacobi), concrete_jac = true)), - - (; pkg = :nonlinearsolve, name = "TR Krylov", alg = TrustRegion(; linsolve = KrylovJL_GMRES())), - (; pkg = :nonlinearsolve, name = "TR Krylov (ILU)", alg = TrustRegion(; linsolve = KrylovJL_GMRES(; precs = incompletelu), concrete_jac = true)), - (; pkg = :nonlinearsolve, name = "TR Krylov (AMG)", alg = TrustRegion(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid), concrete_jac = true)), - (; pkg = :nonlinearsolve, name = "TR Krylov (AMG Jacobi)", alg = TrustRegion(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid_jacobi), concrete_jac = true)), - - (; pkg = :wrapper, name = "Newton Krylov [Sundials]", alg = KINSOL(; linear_solver = :GMRES, maxsetupcalls=1, krylov_dim)), - - (; pkg = :wrapper, name = "Newton Krylov [PETSc]", alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", snes_mf = true, ksp_gmres_restart = krylov_dim)), - (; pkg = :wrapper, name = "Newton Krylov (ILU) [PETSc]", alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", pc_type = "ilu", ksp_gmres_restart = krylov_dim, pc_factor_levels = 0, pc_factor_drop_tolerance = 50.0)), - (; pkg = :wrapper, name = "Newton Krylov (AMG) [PETSc]", alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", pc_type = "gamg", ksp_gmres_restart = krylov_dim)), - (; pkg = :wrapper, name = "Newton Krylov (AMG Jacobi) [PETSc]", alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", pc_type = "gamg", mg_levels_ksp_type = "richardson", mg_levels_pc_type = "jacobi", ksp_gmres_restart = krylov_dim)), - - (; pkg = :wrapper, name = "TR Krylov (Not Matrix Free) [PETSc]", alg = PETScSNES(; snes_type = "newtontr", ksp_type = "gmres", ksp_gmres_restart = krylov_dim)), - (; pkg = :wrapper, name = "TR Krylov (ILU) [PETSc]", alg = PETScSNES(; snes_type = "newtontr", ksp_type = "gmres", pc_type = "ilu", ksp_gmres_restart = krylov_dim, pc_factor_levels = 0, pc_factor_drop_tolerance = 50.0)), - (; pkg = :wrapper, name = "TR Krylov (AMG) [PETSc]", alg = PETScSNES(; snes_type = "newtontr", ksp_type = "gmres", pc_type = "gamg", ksp_gmres_restart = krylov_dim)), - (; pkg = :wrapper, name = "TR Krylov (AMG Jacobi) [PETSc]", alg = PETScSNES(; snes_type = "newtontr", ksp_type = "gmres", pc_type = "gamg", mg_levels_ksp_type = "richardson", mg_levels_pc_type = "jacobi", ksp_gmres_restart = krylov_dim)), + (; pkg = :nonlinearsolve, name = "Newton Krylov", + alg = NewtonRaphson(; linsolve = KrylovJL_GMRES())), + (; pkg = :nonlinearsolve, + name = "Newton Krylov (ILU)", + alg = NewtonRaphson(; linsolve = KrylovJL_GMRES(; precs = incompletelu), concrete_jac = true)), + (; pkg = :nonlinearsolve, + name = "Newton Krylov (AMG)", + alg = NewtonRaphson(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid), concrete_jac = true)), + (; pkg = :nonlinearsolve, + name = "Newton Krylov (AMG Jacobi)", + alg = NewtonRaphson(; + linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid_jacobi), + concrete_jac = true)), (; pkg = :nonlinearsolve, name = "TR Krylov", + alg = TrustRegion(; linsolve = KrylovJL_GMRES())), + (; pkg = :nonlinearsolve, + name = "TR Krylov (ILU)", + alg = TrustRegion(; linsolve = KrylovJL_GMRES(; precs = incompletelu), concrete_jac = true)), + (; pkg = :nonlinearsolve, + name = "TR Krylov (AMG)", + alg = TrustRegion(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid), concrete_jac = true)), + (; pkg = :nonlinearsolve, + name = "TR Krylov (AMG Jacobi)", + alg = TrustRegion(; + linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid_jacobi), concrete_jac = true)), (; + pkg = :wrapper, name = "Newton Krylov [Sundials]", + alg = KINSOL(; linear_solver = :GMRES, maxsetupcalls = 1, krylov_dim)), + (; pkg = :wrapper, + name = "Newton Krylov [PETSc]", + alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", + ksp_type = "gmres", snes_mf = true, ksp_gmres_restart = krylov_dim)), + (; pkg = :wrapper, + name = "Newton Krylov (ILU) [PETSc]", + alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", + ksp_type = "gmres", pc_type = "ilu", ksp_gmres_restart = krylov_dim, + pc_factor_levels = 0, pc_factor_drop_tolerance = 50.0)), + (; pkg = :wrapper, + name = "Newton Krylov (AMG) [PETSc]", + alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", + ksp_type = "gmres", pc_type = "gamg", ksp_gmres_restart = krylov_dim)), + (; pkg = :wrapper, + name = "Newton Krylov (AMG Jacobi) [PETSc]", + alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", + ksp_type = "gmres", pc_type = "gamg", mg_levels_ksp_type = "richardson", + mg_levels_pc_type = "jacobi", ksp_gmres_restart = krylov_dim)), (; + pkg = :wrapper, + name = "TR Krylov (Not Matrix Free) [PETSc]", + alg = PETScSNES(; snes_type = "newtontr", ksp_type = "gmres", ksp_gmres_restart = krylov_dim)), + (; pkg = :wrapper, + name = "TR Krylov (ILU) [PETSc]", + alg = PETScSNES(; snes_type = "newtontr", ksp_type = "gmres", + pc_type = "ilu", ksp_gmres_restart = krylov_dim, + pc_factor_levels = 0, pc_factor_drop_tolerance = 50.0)), + (; pkg = :wrapper, + name = "TR Krylov (AMG) [PETSc]", + alg = PETScSNES(; snes_type = "newtontr", ksp_type = "gmres", + pc_type = "gamg", ksp_gmres_restart = krylov_dim)), + (; pkg = :wrapper, + name = "TR Krylov (AMG Jacobi) [PETSc]", + alg = PETScSNES(; snes_type = "newtontr", ksp_type = "gmres", + pc_type = "gamg", mg_levels_ksp_type = "richardson", + mg_levels_pc_type = "jacobi", ksp_gmres_restart = krylov_dim)) ] gc_disabled = false @@ -204,14 +244,14 @@ for (j, solver) in enumerate(solvers_scaling_jacobian_free) NonlinearSolveBase.AbsNormTerminationMode(Base.Fix1(maximum, abs)) # PETSc doesn't converge properly tol = alg isa PETScSNES ? 1e-6 : 1e-4 - sol = solve(prob, alg; abstol=tol, reltol=tol, + sol = solve(prob, alg; abstol = tol, reltol = tol, linsolve_kwargs = (; abstol = 1e-8, reltol = 1e-8), termination_condition) if SciMLBase.successful_retcode(sol) || norm(sol.resid, Inf) ≤ 1e-4 runtimes_scaling[j, i] = @belapsed solve($prob, $alg; - abstol=$tol, reltol=$tol, + abstol = $tol, reltol = $tol, linsolve_kwargs = (; abstol = 1e-8, reltol = 1e-8), - termination_condition=$termination_condition) + termination_condition = $termination_condition) else runtimes_scaling[j, i] = NaN end @@ -251,7 +291,7 @@ fig = begin :none => :solid, :amg => :dot, :amg_jacobi => :dash, - :ilu => :dashdot, + :ilu => :dashdot ) Ns_ = Ns .^ 2 .* 2 @@ -269,7 +309,9 @@ fig = begin ls, scs, labels = [], [], [] for (i, solver) in zip(idxs, solvers_scaling_jacobian_free[idxs]) all(isnan, runtimes_scaling[i, :]) && continue - precon = occursin("AMG Jacobi", solver.name) ? :amg_jacobi : occursin("AMG", solver.name) ? :amg : occursin("ILU", solver.name) ? :ilu : :none + precon = occursin("AMG Jacobi", solver.name) ? :amg_jacobi : + occursin("AMG", solver.name) ? :amg : + occursin("ILU", solver.name) ? :ilu : :none linestyle = LINESTYLES[precon] l = lines!(Ns_, runtimes_scaling[i, :]; linewidth = 5, color = colors[i], linestyle) @@ -282,17 +324,19 @@ fig = begin axislegend(ax, [[l, sc] for (l, sc) in zip(ls, scs)], labels, "Successful Solvers"; - framevisible=true, framewidth = STROKEWIDTH, orientation = :vertical, + framevisible = true, framewidth = STROKEWIDTH, orientation = :vertical, titlesize = 20, labelsize = 16, position = :lt, nbanks = 2, tellheight = true, tellwidth = false, patchsize = (40.0f0, 20.0f0)) - axislegend(ax, [ + axislegend(ax, + [ LineElement(; linestyle = :solid, linewidth = 5), LineElement(; linestyle = :dot, linewidth = 5), LineElement(; linestyle = :dash, linewidth = 5), - LineElement(; linestyle = :dashdot, linewidth = 5), - ], ["No Preconditioning", "AMG", "AMG Jacobi", "Incomplete LU"], - "Preconditioning"; framevisible=true, framewidth = STROKEWIDTH, + LineElement(; linestyle = :dashdot, linewidth = 5) + ], + ["No Preconditioning", "AMG", "AMG Jacobi", "Incomplete LU"], + "Preconditioning"; framevisible = true, framewidth = STROKEWIDTH, orientation = :vertical, titlesize = 20, labelsize = 16, tellheight = true, tellwidth = true, patchsize = (40.0f0, 20.0f0), position = :rb) diff --git a/benchmarks/NonlinearProblem/nonlinear_battery_problem.jmd b/benchmarks/NonlinearProblem/nonlinear_battery_problem.jmd index 4de57fc72..37411ab73 100644 --- a/benchmarks/NonlinearProblem/nonlinear_battery_problem.jmd +++ b/benchmarks/NonlinearProblem/nonlinear_battery_problem.jmd @@ -4,16 +4,17 @@ author: Marc D. Berliner & Avik Pal --- These benchmarks compares the runtime and error for a range of nonlinear solvers. The solvers are implemented in [NonlinearProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl/blob/master/lib/NonlinearProblemLibrary/src/NonlinearProblemLibrary.jl), where you can find the problem function declarations. We test the following solvers: -- NonlinearSolve.jl's [Newton Raphson](https://docs.sciml.ai/NonlinearSolve/stable/api/nonlinearsolve/#NonlinearSolve.NewtonRaphson) method (`NewtonRaphson()`). -- NonlinearSolve.jl's [Newton trust region](https://docs.sciml.ai/NonlinearSolve/stable/api/nonlinearsolve/#NonlinearSolve.TrustRegion) method (`TrustRegion()`). -- NonlinearSolve.jl's Levenberg-Marquardt method (`LevenbergMarquardt()`). -- NonlinearSolve.jl's Broyden method (`Broyden()`). -- MINPACK's [Modified Powell](https://docs.sciml.ai/NonlinearSolve/stable/api/minpack/#NonlinearSolveMINPACK.CMINPACK) method (`CMINPACK(method=:hybr)`). -- MINPACK's [Levenberg-Marquardt](https://docs.sciml.ai/NonlinearSolve/stable/api/minpack/#NonlinearSolveMINPACK.CMINPACK) method (`CMINPACK(method=:lm)`). -- NLsolveJL's [Newton Raphson](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL(method=:newton)`). -- NLsolveJL's [Newton trust region](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL()`). -- NLsolveJL's [Anderson acceleration](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL(method=:anderson)`). -- Sundials's [Newton-Krylov](https://docs.sciml.ai/NonlinearSolve/stable/api/sundials/#Solver-API) method (`KINSOL()`). + + - NonlinearSolve.jl's [Newton Raphson](https://docs.sciml.ai/NonlinearSolve/stable/api/nonlinearsolve/#NonlinearSolve.NewtonRaphson) method (`NewtonRaphson()`). + - NonlinearSolve.jl's [Newton trust region](https://docs.sciml.ai/NonlinearSolve/stable/api/nonlinearsolve/#NonlinearSolve.TrustRegion) method (`TrustRegion()`). + - NonlinearSolve.jl's Levenberg-Marquardt method (`LevenbergMarquardt()`). + - NonlinearSolve.jl's Broyden method (`Broyden()`). + - MINPACK's [Modified Powell](https://docs.sciml.ai/NonlinearSolve/stable/api/minpack/#NonlinearSolveMINPACK.CMINPACK) method (`CMINPACK(method=:hybr)`). + - MINPACK's [Levenberg-Marquardt](https://docs.sciml.ai/NonlinearSolve/stable/api/minpack/#NonlinearSolveMINPACK.CMINPACK) method (`CMINPACK(method=:lm)`). + - NLsolveJL's [Newton Raphson](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL(method=:newton)`). + - NLsolveJL's [Newton trust region](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL()`). + - NLsolveJL's [Anderson acceleration](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL(method=:anderson)`). + - Sundials's [Newton-Krylov](https://docs.sciml.ai/NonlinearSolve/stable/api/sundials/#Solver-API) method (`KINSOL()`). # Setup @@ -21,8 +22,8 @@ Fetch required packages. ```julia using NonlinearSolve, LinearSolve, StaticArrays, Sundials, SpeedMapping, - BenchmarkTools, LinearAlgebra, DiffEqDevTools, PolyesterForwardDiff, CairoMakie, - RecursiveFactorization, Enzyme + BenchmarkTools, LinearAlgebra, DiffEqDevTools, PolyesterForwardDiff, CairoMakie, + RecursiveFactorization, Enzyme import MINPACK, NLsolve, PETSc import LineSearches @@ -38,43 +39,92 @@ MoreThuente() = LineSearchesJL(; method = LineSearches.MoreThuente()) GC.enable(false) # for PETSc solvers_all = [ - (; pkg = :nonlinearsolve, name = "Default PolyAlgorithm", solver = Dict(:alg => FastShortcutNonlinearPolyalg(; autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Newton Raphson", solver = Dict(:alg => NewtonRaphson(; autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Newton Raphson (HagerZhang LineSearch)", solver = Dict(:alg => NewtonRaphson(; linesearch = HagerZhang(), autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Newton Raphson (MoreThuente LineSearch)", solver = Dict(:alg => NewtonRaphson(; linesearch = MoreThuente(), autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Newton Raphson (BackTracking LineSearch)", solver = Dict(:alg => NewtonRaphson(; linesearch = BackTracking(), autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Newton Krylov with GMRES", solver = Dict(:alg => NewtonRaphson(; linsolve = KrylovJL_GMRES(), autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "DFSane", solver = Dict(:alg => DFSane())), - (; pkg = :nonlinearsolve, name = "Trust Region", solver = Dict(:alg => TrustRegion(; autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Trust Region (NLsolve Update)", solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.NLsolve, autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Trust Region (Nocedal Wright)", solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.NocedalWright, autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Trust Region (Hei)", solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.Hei, autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Trust Region (Yuan)", solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.Yuan, autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Trust Region (Bastin)", solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.Bastin, autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Trust Region (Fan)", solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.Fan, autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Levenberg-Marquardt", solver = Dict(:alg => LevenbergMarquardt(; autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Levenberg-Marquardt with Cholesky", solver = Dict(:alg => LevenbergMarquardt(; linsolve = CholeskyFactorization(), autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Levenberg-Marquardt (No Geodesic Accln.)", solver = Dict(:alg => LevenbergMarquardt(; disable_geodesic = Val(true), autodiff = AutoEnzyme()))), - (; pkg = :nonlinearsolve, name = "Levenberg-Marquardt (No Geodesic Accln.) with Cholesky", solver = Dict(:alg => LevenbergMarquardt(; disable_geodesic = Val(true), linsolve = CholeskyFactorization(), autodiff = AutoEnzyme()))), - - (; pkg = :wrapper, name = "Newton Raphson [Sundials]", solver = Dict(:alg => KINSOL(; linear_solver = :LapackDense, maxsetupcalls=1))), - (; pkg = :wrapper, name = "Newton Krylov [Sundials]", solver = Dict(:alg => KINSOL(; linear_solver = :GMRES, maxsetupcalls=1, krylov_dim = 1000))), - (; pkg = :wrapper, name = "Newton Raphson with LineSearch [Sundials]", solver = Dict(:alg => KINSOL(; globalization_strategy = :LineSearch, maxsetupcalls=1))), - - (; pkg = :wrapper, name = "Newton Raphson [NLsolve.jl]", solver = Dict(:alg => NLsolveJL(; method = :newton, autodiff = :forward))), - (; pkg = :wrapper, name = "Trust Region [NLsolve.jl]", solver = Dict(:alg => NLsolveJL(; autodiff = :forward))), - - (; pkg = :wrapper, name = "Modified Powell [MINPACK]", solver = Dict(:alg => CMINPACK(; method = :hybr))), - (; pkg = :wrapper, name = "Levenberg-Marquardt [MINPACK]", solver = Dict(:alg => CMINPACK(; method = :lm))), - - (; pkg = :wrapper, name = "Speed Mapping [SpeedMapping.jl]", solver = Dict(:alg => SpeedMappingJL())), - - (; pkg = :wrapper, name = "Newton Raphson [PETSc]", solver = Dict(:alg => PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic"))), - (; pkg = :wrapper, name = "Newton Raphson with QR [PETSc]", solver = Dict(:alg => PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", pc_type = "qr"))), - (; pkg = :wrapper, name = "Newton Raphson with BackTracking [PETSc]", solver = Dict(:alg => PETScSNES(; snes_type = "newtonls"))), - (; pkg = :wrapper, name = "Newton Raphson with BackTracking & QR [PETSc]", solver = Dict(:alg => PETScSNES(; snes_type = "newtonls", pc_type = "qr"))), - (; pkg = :wrapper, name = "Trust Region [PETSc]", solver = Dict(:alg => PETScSNES(; snes_type = "newtontr"))), - (; pkg = :wrapper, name = "Newton Krylov with GMRES [PETSc]", solver = Dict(:alg => PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", ksp_gmres_restart = 1000))), + (; pkg = :nonlinearsolve, name = "Default PolyAlgorithm", + solver = Dict(:alg => FastShortcutNonlinearPolyalg(; autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, name = "Newton Raphson", + solver = Dict(:alg => NewtonRaphson(; autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Newton Raphson (HagerZhang LineSearch)", + solver = Dict(:alg => NewtonRaphson(; linesearch = HagerZhang(), autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Newton Raphson (MoreThuente LineSearch)", + solver = Dict(:alg => NewtonRaphson(; linesearch = MoreThuente(), autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Newton Raphson (BackTracking LineSearch)", + solver = Dict(:alg => NewtonRaphson(; linesearch = BackTracking(), autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Newton Krylov with GMRES", + solver = Dict(:alg => NewtonRaphson(; linsolve = KrylovJL_GMRES(), autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, name = "DFSane", solver = Dict(:alg => DFSane())), + (; pkg = :nonlinearsolve, name = "Trust Region", + solver = Dict(:alg => TrustRegion(; autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Trust Region (NLsolve Update)", + solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.NLsolve, autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Trust Region (Nocedal Wright)", + solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.NocedalWright, autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Trust Region (Hei)", + solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.Hei, autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Trust Region (Yuan)", + solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.Yuan, autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Trust Region (Bastin)", + solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.Bastin, autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Trust Region (Fan)", + solver = Dict(:alg => TrustRegion(; radius_update_scheme = RUS.Fan, autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, name = "Levenberg-Marquardt", + solver = Dict(:alg => LevenbergMarquardt(; autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Levenberg-Marquardt with Cholesky", + solver = Dict(:alg => LevenbergMarquardt(; + linsolve = CholeskyFactorization(), autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Levenberg-Marquardt (No Geodesic Accln.)", + solver = Dict(:alg => LevenbergMarquardt(; disable_geodesic = Val(true), autodiff = AutoEnzyme()))), + (; pkg = :nonlinearsolve, + name = "Levenberg-Marquardt (No Geodesic Accln.) with Cholesky", + solver = Dict(:alg => LevenbergMarquardt(; disable_geodesic = Val(true), + linsolve = CholeskyFactorization(), autodiff = AutoEnzyme()))), (; + pkg = :wrapper, name = "Newton Raphson [Sundials]", + solver = Dict(:alg => KINSOL(; linear_solver = :LapackDense, maxsetupcalls = 1))), + (; pkg = :wrapper, + name = "Newton Krylov [Sundials]", + solver = Dict(:alg => KINSOL(; linear_solver = :GMRES, maxsetupcalls = 1, krylov_dim = 1000))), + (; pkg = :wrapper, + name = "Newton Raphson with LineSearch [Sundials]", + solver = Dict(:alg => KINSOL(; globalization_strategy = :LineSearch, maxsetupcalls = 1))), (; + pkg = :wrapper, name = "Newton Raphson [NLsolve.jl]", + solver = Dict(:alg => NLsolveJL(; method = :newton, autodiff = :forward))), + (; pkg = :wrapper, name = "Trust Region [NLsolve.jl]", + solver = Dict(:alg => NLsolveJL(; autodiff = :forward))), (; + pkg = :wrapper, name = "Modified Powell [MINPACK]", + solver = Dict(:alg => CMINPACK(; method = :hybr))), + (; pkg = :wrapper, name = "Levenberg-Marquardt [MINPACK]", + solver = Dict(:alg => CMINPACK(; method = :lm))), (; + pkg = :wrapper, name = "Speed Mapping [SpeedMapping.jl]", + solver = Dict(:alg => SpeedMappingJL())), + (; pkg = :wrapper, + name = "Newton Raphson [PETSc]", + solver = Dict(:alg => PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic"))), + (; pkg = :wrapper, + name = "Newton Raphson with QR [PETSc]", + solver = Dict(:alg => PETScSNES(; + snes_type = "newtonls", snes_linesearch_type = "basic", pc_type = "qr"))), + (; pkg = :wrapper, name = "Newton Raphson with BackTracking [PETSc]", + solver = Dict(:alg => PETScSNES(; snes_type = "newtonls"))), + (; pkg = :wrapper, name = "Newton Raphson with BackTracking & QR [PETSc]", + solver = Dict(:alg => PETScSNES(; snes_type = "newtonls", pc_type = "qr"))), + (; pkg = :wrapper, name = "Trust Region [PETSc]", + solver = Dict(:alg => PETScSNES(; snes_type = "newtontr"))), + (; pkg = :wrapper, + name = "Newton Krylov with GMRES [PETSc]", + solver = Dict(:alg => PETScSNES(; + snes_type = "newtonls", snes_linesearch_type = "basic", + ksp_type = "gmres", ksp_gmres_restart = 1000))) ]; ``` @@ -192,18 +242,20 @@ x_sol = [ 3.837750304468262, 0.0, 0.0, - 0.0, + 0.0 ] x_start = zeros(length(x_sol)) x_start[25:27] .= 0.6608489145760508 x_start[28:30] .= 3.3618450059739433 -dict = Dict("n" => n, "start" => x_start, "sol" => x_sol, "title" => "Doyle-Fuller-Newman (DFN) Battery Model Initialization") +dict = Dict("n" => n, "start" => x_start, "sol" => x_sol, + "title" => "Doyle-Fuller-Newman (DFN) Battery Model Initialization") testcase = (; prob = NonlinearProblem(f!, dict["start"]), true_sol = dict["sol"]) ``` Sets tolerances. + ```julia abstols = 1.0 ./ 10.0 .^ (3:0.5:6) reltols = 1.0 ./ 10.0 .^ (3:0.5:6); @@ -232,11 +284,13 @@ function check_solver(prob, solver) maxiters = 10000) err = norm(sol.resid, Inf) if !SciMLBase.successful_retcode(sol.retcode) - log_msg("[Warn] Solver $(solver.name) returned retcode $(sol.retcode) with an residual norm = $(norm(sol.resid)).\n"; + log_msg( + "[Warn] Solver $(solver.name) returned retcode $(sol.retcode) with an residual norm = $(norm(sol.resid)).\n"; color = :red) return false elseif err > 1e3 - log_msg("[Warn] Solver $(solver.name) had a very large residual (norm = $(norm(sol.resid))).\n"; + log_msg( + "[Warn] Solver $(solver.name) had a very large residual (norm = $(norm(sol.resid))).\n"; color = :red) return false elseif isinf(err) || isnan(err) @@ -244,7 +298,8 @@ function check_solver(prob, solver) color = :red) return false end - log_msg("[Info] Solver $(solver.name) successfully solved the problem (norm = $(norm(sol.resid))).\n"; + log_msg( + "[Info] Solver $(solver.name) successfully solved the problem (norm = $(norm(sol.resid))).\n"; color = :green) catch e log_msg("[Warn] Solver $(solver.name) threw an error: $e.\n"; color = :red) @@ -260,7 +315,8 @@ function generate_wpset(prob, solvers) return WorkPrecisionSet(prob.prob, abstols, reltols, getfield.(successful_solvers, :solver); names = getfield.(successful_solvers, :name), numruns = 50, error_estimate = :l∞, - maxiters = 10000, verbose = true), successful_solvers + maxiters = 10000, verbose = true), + successful_solvers end ``` @@ -308,7 +364,8 @@ fig = begin errors = [err.l∞ for err in errors] l = lines!(ax, errors, times; linestyle = LINESTYLES[solver.pkg], label = name, linewidth = 5, color = colors[i]) - sc = scatter!(ax, errors, times; label = name, markersize = 16, strokewidth = 3, + sc = scatter!( + ax, errors, times; label = name, markersize = 16, strokewidth = 3, color = colors[i]) push!(ls, l) push!(scs, sc) @@ -316,12 +373,13 @@ fig = begin axislegend(ax, [[l, sc] for (l, sc) in zip(ls, scs)], [solver.name for solver in successful_solvers[idxs]], "Successful Solvers"; - framevisible=true, framewidth = STROKEWIDTH, orientation = :vertical, + framevisible = true, framewidth = STROKEWIDTH, orientation = :vertical, titlesize = 20, nbanks = 1, labelsize = 16,# margin = (0.0, 80.0, 0.0, 0.0), tellheight = false, tellwidth = true, patchsize = (40.0f0, 20.0f0), position = :rb) - fig[0, :] = Label(fig, "Doyle-Fuller-Newman (DFN) Battery Model Initialization: Work Precision Diagram", + fig[0, :] = Label(fig, + "Doyle-Fuller-Newman (DFN) Battery Model Initialization: Work Precision Diagram", fontsize = 24, tellwidth = false, font = :bold) fig @@ -346,12 +404,12 @@ using PrettyTables io = IOBuffer() println(io, "```@raw html") pretty_table(io, reshape(solver_successes, 1, :); backend = Val(:html), - header = getfield.(solvers_all, :name), alignment=:c) + header = getfield.(solvers_all, :name), alignment = :c) println(io, "```") Docs.Text(String(take!(io))) ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonlinearProblem/nonlinear_solver_23_tests.jmd b/benchmarks/NonlinearProblem/nonlinear_solver_23_tests.jmd index 6dbc03200..db021150a 100644 --- a/benchmarks/NonlinearProblem/nonlinear_solver_23_tests.jmd +++ b/benchmarks/NonlinearProblem/nonlinear_solver_23_tests.jmd @@ -3,30 +3,33 @@ title: Nonlinear Solver 23 Test Problems author: Torkel Loman & Avik Pal --- -These benchmarks compares the runtime and error for a range of nonlinear solvers. The problems are a standard set of problems as described [here](https://people.sc.fsu.edu/~jburkardt/m_src/test_nonlin/test_nonlin.html). The solvers are implemented in [NonlinearProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl/blob/master/lib/NonlinearProblemLibrary/src/NonlinearProblemLibrary.jl), where you can find the problem function declarations. For each problem we test the following solvers: -- NonlinearSolve.jl's [Newton Raphson](https://docs.sciml.ai/NonlinearSolve/stable/api/nonlinearsolve/#NonlinearSolve.NewtonRaphson) method (`NewtonRaphson()`). -- NonlinearSolve.jl's [Trust Region](https://docs.sciml.ai/NonlinearSolve/stable/api/nonlinearsolve/#NonlinearSolve.TrustRegion) method (`TrustRegion()`). -- NonlinearSolve.jl's Levenberg-Marquardt method (`LevenbergMarquardt()`). -- MINPACK's [Modified Powell](https://docs.sciml.ai/NonlinearSolve/stable/api/minpack/#NonlinearSolveMINPACK.CMINPACK) method (`CMINPACK(method=:hybr)`). -- MINPACK's [Levenberg-Marquardt](https://docs.sciml.ai/NonlinearSolve/stable/api/minpack/#NonlinearSolveMINPACK.CMINPACK) method (`CMINPACK(method=:lm)`). -- NLsolveJL's [Newton Raphson](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL(method=:newton)`). -- NLsolveJL's [Trust Region](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL()`). -- NLsolveJL's [Anderson acceleration](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL(method=:anderson)`). -- Sundials's [Newton-Krylov](https://docs.sciml.ai/NonlinearSolve/stable/api/sundials/#Solver-API) method (`KINSOL()`). +These benchmarks compares the runtime and error for a range of nonlinear solvers. The problems are a standard set of problems as described [here](https://people.sc.fsu.edu/%7Ejburkardt/m_src/test_nonlin/test_nonlin.html). The solvers are implemented in [NonlinearProblemLibrary.jl](https://github.com/SciML/DiffEqProblemLibrary.jl/blob/master/lib/NonlinearProblemLibrary/src/NonlinearProblemLibrary.jl), where you can find the problem function declarations. For each problem we test the following solvers: + + - NonlinearSolve.jl's [Newton Raphson](https://docs.sciml.ai/NonlinearSolve/stable/api/nonlinearsolve/#NonlinearSolve.NewtonRaphson) method (`NewtonRaphson()`). + - NonlinearSolve.jl's [Trust Region](https://docs.sciml.ai/NonlinearSolve/stable/api/nonlinearsolve/#NonlinearSolve.TrustRegion) method (`TrustRegion()`). + - NonlinearSolve.jl's Levenberg-Marquardt method (`LevenbergMarquardt()`). + - MINPACK's [Modified Powell](https://docs.sciml.ai/NonlinearSolve/stable/api/minpack/#NonlinearSolveMINPACK.CMINPACK) method (`CMINPACK(method=:hybr)`). + - MINPACK's [Levenberg-Marquardt](https://docs.sciml.ai/NonlinearSolve/stable/api/minpack/#NonlinearSolveMINPACK.CMINPACK) method (`CMINPACK(method=:lm)`). + - NLsolveJL's [Newton Raphson](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL(method=:newton)`). + - NLsolveJL's [Trust Region](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL()`). + - NLsolveJL's [Anderson acceleration](https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/#Solver-API) (`NLsolveJL(method=:anderson)`). + - Sundials's [Newton-Krylov](https://docs.sciml.ai/NonlinearSolve/stable/api/sundials/#Solver-API) method (`KINSOL()`). Furthermore, for NonlinearSolve.jl's Newton Raphson method we try the following Line Search options (in addition to the default): -- `HagerZhang` -- `MoreThuente` -- `BackTracking` + + - `HagerZhang` + - `MoreThuente` + - `BackTracking` and for NonlinearSolve.jl's Trust Region we try the following Radius Update schemes (in addition to the default): -- `NLsolve` -- `NocedalWright` -- `Hei` -- `Yuan` -- `Bastin` -- `Fan` -and finally for NonlinearSolve.jl's Levenberg-Marquardt method why try using both the default `α_geodesic` value (`0.75`) and a modified value (`0.5`), and also with and without setting the `CholeskyFactorization` linear solver. + + - `NLsolve` + - `NocedalWright` + - `Hei` + - `Yuan` + - `Bastin` + - `Fan` + and finally for NonlinearSolve.jl's Levenberg-Marquardt method why try using both the default `α_geodesic` value (`0.75`) and a modified value (`0.5`), and also with and without setting the `CholeskyFactorization` linear solver. For each benchmarked problem, the second, third, and fourth plots compares the performance of NonlinearSolve's Newton Raphson, Trust Region, and Levenberg-Marquardt methods, respectively. The first plot compares the best methods from each of these categories to the various methods available from other packages. At the end of the benchmarks, we print a summary table of which solvers succeeded for which problems. @@ -36,8 +39,8 @@ Fetch required packages. ```julia using NonlinearSolve, LinearSolve, StaticArrays, Sundials, Setfield, - BenchmarkTools, LinearAlgebra, DiffEqDevTools, NonlinearProblemLibrary, CairoMakie, - RecursiveFactorization, Enzyme + BenchmarkTools, LinearAlgebra, DiffEqDevTools, NonlinearProblemLibrary, CairoMakie, + RecursiveFactorization, Enzyme import PolyesterForwardDiff, MINPACK, NLsolve, LineSearches const RUS = RadiusUpdateSchemes; @@ -50,31 +53,80 @@ HagerZhang() = LineSearchesJL(; method = LineSearches.HagerZhang()) MoreThuente() = LineSearchesJL(; method = LineSearches.MoreThuente()) solvers_all = [ - (; pkg = :nonlinearsolve, type = :general, name = "Default PolyAlg.", solver = Dict(:alg => FastShortcutNonlinearPolyalg(; u0_len = 10, linsolve = \))), - (; pkg = :nonlinearsolve, type = :NR, name = "Newton Raphson", solver = Dict(:alg => NewtonRaphson(; linsolve = \))), - (; pkg = :nonlinearsolve, type = :NR, name = "NR (HagerZhang)", solver = Dict(:alg => NewtonRaphson(; linsolve = \, linesearch = HagerZhang()))), - (; pkg = :nonlinearsolve, type = :NR, name = "NR (MoreThuente)", solver = Dict(:alg => NewtonRaphson(; linsolve = \, linesearch = MoreThuente()))), - (; pkg = :nonlinearsolve, type = :NR, name = "NR (BackTracking)", solver = Dict(:alg => NewtonRaphson(; linsolve = \, linesearch = BackTracking()))), - (; pkg = :nonlinearsolve, type = :TR, name = "Trust Region", solver = Dict(:alg => TrustRegion(; linsolve = \))), - (; pkg = :nonlinearsolve, type = :TR, name = "TR (NLsolve Update)", solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.NLsolve))), - (; pkg = :nonlinearsolve, type = :TR, name = "TR (Nocedal Wright)", solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.NocedalWright))), - (; pkg = :nonlinearsolve, type = :TR, name = "TR (Hei)", solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.Hei))), - (; pkg = :nonlinearsolve, type = :TR, name = "TR (Yuan)", solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.Yuan))), - (; pkg = :nonlinearsolve, type = :TR, name = "TR (Bastin)", solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.Bastin))), - (; pkg = :nonlinearsolve, type = :TR, name = "TR (Fan)", solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.Fan))), - (; pkg = :nonlinearsolve, type = :LM, name = "Levenberg-Marquardt", solver = Dict(:alg => LevenbergMarquardt(; linsolve = QRFactorization()))), - (; pkg = :nonlinearsolve, type = :LM, name = "LM with Cholesky", solver = Dict(:alg => LevenbergMarquardt(; linsolve = CholeskyFactorization()))), - (; pkg = :nonlinearsolve, type = :LM, name = "LM (α_geodesic=0.5)", solver = Dict(:alg => LevenbergMarquardt(; linsolve = QRFactorization(), α_geodesic=0.5))), - (; pkg = :nonlinearsolve, type = :LM, name = "LM (α_geodesic=0.5) Chol.", solver = Dict(:alg => LevenbergMarquardt(; linsolve = CholeskyFactorization(), α_geodesic=0.5))), - (; pkg = :nonlinearsolve, type = :LM, name = "LM (no Accln.)", solver = Dict(:alg => LevenbergMarquardt(; linsolve = QRFactorization(), disable_geodesic = Val(true)))), - (; pkg = :nonlinearsolve, type = :LM, name = "LM (no Accln.) Chol.", solver = Dict(:alg => LevenbergMarquardt(; linsolve = CholeskyFactorization(), disable_geodesic = Val(true)))), - (; pkg = :nonlinearsolve, type = :general, name = "Pseudo Transient", solver = Dict(:alg => PseudoTransient(; linsolve = \, alpha_initial=10.0))), - (; pkg = :wrapper, type = :general, name = "Powell [MINPACK]", solver = Dict(:alg => CMINPACK(; method=:hybr))), - (; pkg = :wrapper, type = :LM, name = "LM [MINPACK]", solver = Dict(:alg => CMINPACK(; method=:lm))), - (; pkg = :wrapper, type = :NR, name = "NR [NLsolve.jl]", solver = Dict(:alg => NLsolveJL(; method=:newton))), - (; pkg = :wrapper, type = :TR, name = "TR [NLsolve.jl]", solver = Dict(:alg => NLsolveJL())), - (; pkg = :wrapper, type = :NR, name = "NR [Sundials]", solver = Dict(:alg => KINSOL(; linear_solver = :LapackDense, maxsetupcalls=1))), - (; pkg = :wrapper, type = :NR, name = "NR LineSearch [Sundials]", solver = Dict(:alg => KINSOL(; linear_solver = :LapackDense, globalization_strategy=:LineSearch, maxsetupcalls=1))) + (; pkg = :nonlinearsolve, type = :general, name = "Default PolyAlg.", + solver = Dict(:alg => FastShortcutNonlinearPolyalg(; u0_len = 10, linsolve = \))), + (; pkg = :nonlinearsolve, type = :NR, name = "Newton Raphson", + solver = Dict(:alg => NewtonRaphson(; linsolve = \))), + (; pkg = :nonlinearsolve, type = :NR, name = "NR (HagerZhang)", + solver = Dict(:alg => NewtonRaphson(; linsolve = \, linesearch = HagerZhang()))), + (; pkg = :nonlinearsolve, type = :NR, name = "NR (MoreThuente)", + solver = Dict(:alg => NewtonRaphson(; linsolve = \, linesearch = MoreThuente()))), + (; pkg = :nonlinearsolve, type = :NR, name = "NR (BackTracking)", + solver = Dict(:alg => NewtonRaphson(; linsolve = \, linesearch = BackTracking()))), + (; pkg = :nonlinearsolve, type = :TR, name = "Trust Region", + solver = Dict(:alg => TrustRegion(; linsolve = \))), + (; pkg = :nonlinearsolve, + type = :TR, + name = "TR (NLsolve Update)", + solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.NLsolve))), + (; pkg = :nonlinearsolve, + type = :TR, + name = "TR (Nocedal Wright)", + solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.NocedalWright))), + (; pkg = :nonlinearsolve, + type = :TR, + name = "TR (Hei)", + solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.Hei))), + (; pkg = :nonlinearsolve, + type = :TR, + name = "TR (Yuan)", + solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.Yuan))), + (; pkg = :nonlinearsolve, + type = :TR, + name = "TR (Bastin)", + solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.Bastin))), + (; pkg = :nonlinearsolve, + type = :TR, + name = "TR (Fan)", + solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.Fan))), + (; pkg = :nonlinearsolve, type = :LM, name = "Levenberg-Marquardt", + solver = Dict(:alg => LevenbergMarquardt(; linsolve = QRFactorization()))), + (; pkg = :nonlinearsolve, type = :LM, name = "LM with Cholesky", + solver = Dict(:alg => LevenbergMarquardt(; linsolve = CholeskyFactorization()))), + (; pkg = :nonlinearsolve, + type = :LM, + name = "LM (α_geodesic=0.5)", + solver = Dict(:alg => LevenbergMarquardt(; linsolve = QRFactorization(), α_geodesic = 0.5))), + (; pkg = :nonlinearsolve, + type = :LM, + name = "LM (α_geodesic=0.5) Chol.", + solver = Dict(:alg => LevenbergMarquardt(; linsolve = CholeskyFactorization(), α_geodesic = 0.5))), + (; pkg = :nonlinearsolve, + type = :LM, + name = "LM (no Accln.)", + solver = Dict(:alg => LevenbergMarquardt(; linsolve = QRFactorization(), disable_geodesic = Val(true)))), + (; pkg = :nonlinearsolve, + type = :LM, + name = "LM (no Accln.) Chol.", + solver = Dict(:alg => LevenbergMarquardt(; + linsolve = CholeskyFactorization(), disable_geodesic = Val(true)))), + (; pkg = :nonlinearsolve, type = :general, name = "Pseudo Transient", + solver = Dict(:alg => PseudoTransient(; linsolve = \, alpha_initial = 10.0))), + (; pkg = :wrapper, type = :general, name = "Powell [MINPACK]", + solver = Dict(:alg => CMINPACK(; method = :hybr))), + (; pkg = :wrapper, type = :LM, name = "LM [MINPACK]", + solver = Dict(:alg => CMINPACK(; method = :lm))), + (; pkg = :wrapper, type = :NR, name = "NR [NLsolve.jl]", + solver = Dict(:alg => NLsolveJL(; method = :newton))), + (; pkg = :wrapper, type = :TR, name = "TR [NLsolve.jl]", + solver = Dict(:alg => NLsolveJL())), + (; pkg = :wrapper, type = :NR, name = "NR [Sundials]", + solver = Dict(:alg => KINSOL(; linear_solver = :LapackDense, maxsetupcalls = 1))), + (; pkg = :wrapper, + type = :NR, + name = "NR LineSearch [Sundials]", + solver = Dict(:alg => KINSOL(; + linear_solver = :LapackDense, globalization_strategy = :LineSearch, maxsetupcalls = 1))) ]; solver_tracker = []; @@ -116,7 +168,7 @@ end __set_ad_chunksize(solver, ck, N) = solver # Benchmarks a specific problem, checks which solvers can solve it and their performance -function benchmark_problem!(prob_name; solver_tracker=solver_tracker) +function benchmark_problem!(prob_name; solver_tracker = solver_tracker) # Finds the problem and the true solution. prob = nlprob_23_testcases[prob_name] @@ -130,16 +182,16 @@ function benchmark_problem!(prob_name; solver_tracker=solver_tracker) solvers_TR = filter(s -> s.type==:TR, successful_solvers) solvers_LM = filter(s -> s.type==:LM, successful_solvers) wp_NR = WorkPrecisionSet(prob.prob, abstols, reltols, getfield.(solvers_NR, :solver); - names=getfield.(solvers_NR, :name), numruns=100, error_estimate=:l∞, - maxiters=1000, + names = getfield.(solvers_NR, :name), numruns = 100, error_estimate = :l∞, + maxiters = 1000, termination_condition = AbsNormTerminationMode(Base.Fix1(maximum, abs))) wp_TR = WorkPrecisionSet(prob.prob, abstols, reltols, getfield.(solvers_TR, :solver); - names=getfield.(solvers_TR, :name), numruns=100, error_estimate=:l∞, - maxiters=1000, + names = getfield.(solvers_TR, :name), numruns = 100, error_estimate = :l∞, + maxiters = 1000, termination_condition = AbsNormTerminationMode(Base.Fix1(maximum, abs))) wp_LM = WorkPrecisionSet(prob.prob, abstols, reltols, getfield.(solvers_LM, :solver); - names=getfield.(solvers_LM, :name), numruns=100, error_estimate=:l∞, - maxiters=1000, + names = getfield.(solvers_LM, :name), numruns = 100, error_estimate = :l∞, + maxiters = 1000, termination_condition = AbsNormTerminationMode(Base.Fix1(maximum, abs))) # Handles the general case @@ -149,8 +201,8 @@ function benchmark_problem!(prob_name; solver_tracker=solver_tracker) add_solver!(solvers_general, nothing, solvers_NR, wp_NR) wp_general = WorkPrecisionSet(prob.prob, abstols, reltols, - getfield.(solvers_general, :solver); names=getfield.(solvers_general, :name), - numruns=100, error_estimate=:l∞, maxiters=1000, + getfield.(solvers_general, :solver); names = getfield.(solvers_general, :name), + numruns = 100, error_estimate = :l∞, maxiters = 1000, termination_condition = AbsNormTerminationMode(Base.Fix1(maximum, abs))) push!(wp_general_tracker, prob_name => wp_general) @@ -165,22 +217,25 @@ end # Checks if a solver can successfully solve a given problem. function check_solver(prob, solver) try - sol = solve(prob.prob, solver.solver[:alg]; abstol=1e-8, reltol=1e-8, - maxiters=1000000, - termination_condition=AbsNormTerminationMode(Base.Fix1(maximum, abs))) + sol = solve(prob.prob, solver.solver[:alg]; abstol = 1e-8, reltol = 1e-8, + maxiters = 1000000, + termination_condition = AbsNormTerminationMode(Base.Fix1(maximum, abs))) if norm(sol.resid, Inf) < 1e-6 - Base.printstyled("[Info] Solver $(solver.name) returned retcode $(sol.retcode) \ - with an residual norm = $(norm(sol.resid, Inf)).\n"; color=:green) + Base.printstyled( + "[Info] Solver $(solver.name) returned retcode $(sol.retcode) \ + with an residual norm = $(norm(sol.resid, Inf)).\n"; + color = :green) return true else - Base.printstyled("[Warn] Solver $(solver.name) had a very large residual \ - (norm = $(norm(sol.resid, Inf))).\n"; color=:red) + Base.printstyled( + "[Warn] Solver $(solver.name) had a very large residual \ + (norm = $(norm(sol.resid, Inf))).\n"; color = :red) return false end WorkPrecisionSet(prob.prob, [1e-4, 1e-12], [1e-4, 1e-12], [solver.solver]; - names=[solver.name], numruns=5, error_estimate=:l∞, maxiters=1000) + names = [solver.name], numruns = 5, error_estimate = :l∞, maxiters = 1000) catch e - Base.printstyled("[Warn] Solver $(solver.name) threw an error: $e.\n"; color=:red) + Base.printstyled("[Warn] Solver $(solver.name) threw an error: $e.\n"; color = :red) return false end return true @@ -216,14 +271,15 @@ function Makie.get_minor_tickvalues(i::IntervalsBetween, scale::typeof(__log10_z return [] end -tickformatter(values) = map(values) do v - e = log10(v) - if isinteger(e) && e == -100 - return rich("10", superscript("-∞")) +tickformatter(values) = + map(values) do v + e = log10(v) + if isinteger(e) && e == -100 + return rich("10", superscript("-∞")) + end + sup = isinteger(e) ? Int(e) : round(e; digits = 2) + return rich("10", superscript(string(sup))) end - sup = isinteger(e) ? Int(e) : round(e; digits=2) - return rich("10", superscript(string(sup))) -end function __filter_nearzero((ticks, ticklabels)) if first(ticks) ≈ 1e-100 @@ -253,6 +309,7 @@ function plot_collective_benchmark(prob_name, wp_general, wp_NR, wp_TR, wp_LM) xmin, xmax, ymin, ymax = Inf, -Inf, Inf, -Inf for i in 1:2, j in 1:2 + wp = (wp_general, wp_NR, wp_TR, wp_LM)[2 * (i - 1) + j] ax = Axis(fig[i + 1, j], ylabel = j == 1 ? L"Time $\mathbf{(s)}$" : "", @@ -263,7 +320,7 @@ function plot_collective_benchmark(prob_name, wp_general, wp_NR, wp_TR, wp_LM) ytickwidth = STROKEWIDTH, spinewidth = STROKEWIDTH, xticklabelsize = 20, yticklabelsize = 20, xticklabelsvisible = i == 2, yticklabelsvisible = j == 1, - xticksvisible = i == 2, yticksvisible = j == 1,) + xticksvisible = i == 2, yticksvisible = j == 1) push!(axs, ax) ls = [] @@ -294,7 +351,7 @@ function plot_collective_benchmark(prob_name, wp_general, wp_NR, wp_TR, wp_LM) Legend(fig[ifelse(i == 1, 1, 4), j], [[l, sc] for (l, sc) in zip(ls, scs)], [wpᵢ.name for wpᵢ in wp.wps], legend_title; - framevisible=true, framewidth = STROKEWIDTH, + framevisible = true, framewidth = STROKEWIDTH, nbanks = 3, labelsize = 16, titlesize = 16, tellheight = true, tellwidth = false, patchsize = (40.0f0, 20.0f0)) end @@ -470,8 +527,9 @@ benchmark_problem!("Chandrasekhar function") Finally, we print a summary of which solvers successfully solved which problems. ```julia -solver_successes = [(solver.name in getfield.(prob[2], :name)) ? "O" : "X" for prob in solver_tracker, solver in solvers_all] -total_successes = [sum(solver_successes[:,i] .== "O") for i in 1:length(solvers_all)] +solver_successes = [(solver.name in getfield.(prob[2], :name)) ? "O" : "X" + for prob in solver_tracker, solver in solvers_all] +total_successes = [sum(solver_successes[:, i] .== "O") for i in 1:length(solvers_all)] solver_outcomes = vcat(total_successes', solver_successes); ``` @@ -479,7 +537,8 @@ solver_outcomes = vcat(total_successes', solver_successes); using PrettyTables io = IOBuffer() println(io, "```@raw html") -pretty_table(io, solver_outcomes; backend = Val(:html), header = getfield.(solvers_all, :name), alignment=:c) +pretty_table(io, solver_outcomes; backend = Val(:html), + header = getfield.(solvers_all, :name), alignment = :c) println(io, "```") Base.Text(String(take!(io))) ``` @@ -510,6 +569,7 @@ fig = begin solver_times = [] for i in 1:5, j in 1:5 + idx = 5 * (i - 1) + j idx > length(wp_general_tracker) && break @@ -559,9 +619,11 @@ fig = begin xmin = max(xmin, 10^-100) - xticks = __filter_nearzero(Makie.get_ticks(LogTicks(WilkinsonTicks(5; k_min = 3)), + xticks = __filter_nearzero(Makie.get_ticks( + LogTicks(WilkinsonTicks(5; k_min = 3)), __log10_zero, tickformatter, xmin, xmax)) - yticks = __filter_nearzero(Makie.get_ticks(LogTicks(WilkinsonTicks(5; k_min = 3)), + yticks = __filter_nearzero(Makie.get_ticks( + LogTicks(WilkinsonTicks(5; k_min = 3)), __log10_zero, tickformatter, ymin, ymax)) ax.xticks = xticks @@ -581,7 +643,7 @@ fig = begin Legend(fig[5, 4:5], [[l, sc] for (l, sc) in zip(ls[ordering], scs[ordering])], labels[ordering], "Solvers"; - framevisible=true, framewidth = STROKEWIDTH, orientation = :horizontal, + framevisible = true, framewidth = STROKEWIDTH, orientation = :horizontal, titlesize = 20, nbanks = 9, labelsize = 20, halign = :center, tellheight = false, tellwidth = false, patchsize = (40.0f0, 20.0f0)) @@ -596,5 +658,5 @@ save("summary_wp_23test_problems.svg", fig) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/NonlinearProblem/quadratic_nonlinear.jmd b/benchmarks/NonlinearProblem/quadratic_nonlinear.jmd index 74546cca4..823ea7961 100644 --- a/benchmarks/NonlinearProblem/quadratic_nonlinear.jmd +++ b/benchmarks/NonlinearProblem/quadratic_nonlinear.jmd @@ -7,7 +7,7 @@ This is a test of a simple small nonlinear rootfinding problem. ```julia using NonlinearSolve, StaticArrays, DiffEqDevTools, Sundials, CairoMakie, LinearSolve, - LinearAlgebra, StableRNGs, BenchmarkTools, Setfield, RecursiveFactorization + LinearAlgebra, StableRNGs, BenchmarkTools, Setfield, RecursiveFactorization import PolyesterForwardDiff, MINPACK, NLsolve, SpeedMapping const RUS = RadiusUpdateSchemes; @@ -30,24 +30,39 @@ List of Solvers to Benchmark: ```julia solvers = [ - (; pkg = :nonlinearsolve, full_pkgname = "NonlinearSolve.jl", name = "Default PolyAlgorithm", solver = Dict(:alg => nothing)), - - (; pkg = :simplenonlinearsolve, full_pkgname = "SimpleNonlinearSolve.jl", name = "Simple Newton Raphson", solver = Dict(:alg => SimpleNewtonRaphson())), - (; pkg = :simplenonlinearsolve, full_pkgname = "SimpleNonlinearSolve.jl", name = "Simple DFSane", solver = Dict(:alg => SimpleDFSane())), - (; pkg = :simplenonlinearsolve, full_pkgname = "SimpleNonlinearSolve.jl", name = "Simple Trust Region", solver = Dict(:alg => SimpleTrustRegion(; nlsolve_update_rule = Val(true)))), - (; pkg = :simplenonlinearsolve, full_pkgname = "SimpleNonlinearSolve.jl", name = "Simple Broyden", solver = Dict(:alg => SimpleBroyden())), - (; pkg = :simplenonlinearsolve, full_pkgname = "SimpleNonlinearSolve.jl", name = "Simple Klement", solver = Dict(:alg => SimpleKlement())), - - (; pkg = :nonlinearsolve, full_pkgname = "NonlinearSolve.jl", name = "Newton Raphson", solver = Dict(:alg => NewtonRaphson(; linsolve = \))), - (; pkg = :nonlinearsolve, full_pkgname = "NonlinearSolve.jl", name = "DFSane", solver = Dict(:alg => DFSane())), - (; pkg = :nonlinearsolve, full_pkgname = "NonlinearSolve.jl", name = "Trust Region", solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.NLsolve))), - (; pkg = :nonlinearsolve, full_pkgname = "NonlinearSolve.jl", name = "Broyden", solver = Dict(:alg => Broyden())), - (; pkg = :nonlinearsolve, full_pkgname = "NonlinearSolve.jl", name = "Klement", solver = Dict(:alg => Klement(; linsolve = \))), - - (; pkg = :wrapper, full_pkgname = "NLsolve.jl", name = "Newton Raphson (NLsolve.jl)", solver = Dict(:alg => NLsolveJL(; method = :newton, autodiff = :forward))), - (; pkg = :wrapper, full_pkgname = "NLsolve.jl", name = "Trust Region (NLsolve.jl)", solver = Dict(:alg => NLsolveJL(; autodiff = :forward))), - (; pkg = :wrapper, full_pkgname = "Sundials", name = "Newton Raphson (Sundials)", solver = Dict(:alg => KINSOL())), - (; pkg = :wrapper, full_pkgname = "SpeedMapping.jl", name = "Speed Mapping (SpeedMapping.jl)", solver = Dict(:alg => SpeedMappingJL())), + (; pkg = :nonlinearsolve, full_pkgname = "NonlinearSolve.jl", + name = "Default PolyAlgorithm", solver = Dict(:alg => nothing)), (; + pkg = :simplenonlinearsolve, full_pkgname = "SimpleNonlinearSolve.jl", + name = "Simple Newton Raphson", solver = Dict(:alg => SimpleNewtonRaphson())), + (; pkg = :simplenonlinearsolve, full_pkgname = "SimpleNonlinearSolve.jl", + name = "Simple DFSane", solver = Dict(:alg => SimpleDFSane())), + (; pkg = :simplenonlinearsolve, full_pkgname = "SimpleNonlinearSolve.jl", + name = "Simple Trust Region", + solver = Dict(:alg => SimpleTrustRegion(; nlsolve_update_rule = Val(true)))), + (; pkg = :simplenonlinearsolve, full_pkgname = "SimpleNonlinearSolve.jl", + name = "Simple Broyden", solver = Dict(:alg => SimpleBroyden())), + (; pkg = :simplenonlinearsolve, full_pkgname = "SimpleNonlinearSolve.jl", + name = "Simple Klement", solver = Dict(:alg => SimpleKlement())), (; + pkg = :nonlinearsolve, full_pkgname = "NonlinearSolve.jl", + name = "Newton Raphson", solver = Dict(:alg => NewtonRaphson(; linsolve = \))), + (; pkg = :nonlinearsolve, full_pkgname = "NonlinearSolve.jl", + name = "DFSane", solver = Dict(:alg => DFSane())), + (; pkg = :nonlinearsolve, + full_pkgname = "NonlinearSolve.jl", + name = "Trust Region", + solver = Dict(:alg => TrustRegion(; linsolve = \, radius_update_scheme = RUS.NLsolve))), + (; pkg = :nonlinearsolve, full_pkgname = "NonlinearSolve.jl", + name = "Broyden", solver = Dict(:alg => Broyden())), + (; pkg = :nonlinearsolve, full_pkgname = "NonlinearSolve.jl", + name = "Klement", solver = Dict(:alg => Klement(; linsolve = \))), (; + pkg = :wrapper, full_pkgname = "NLsolve.jl", name = "Newton Raphson (NLsolve.jl)", + solver = Dict(:alg => NLsolveJL(; method = :newton, autodiff = :forward))), + (; pkg = :wrapper, full_pkgname = "NLsolve.jl", name = "Trust Region (NLsolve.jl)", + solver = Dict(:alg => NLsolveJL(; autodiff = :forward))), + (; pkg = :wrapper, full_pkgname = "Sundials", + name = "Newton Raphson (Sundials)", solver = Dict(:alg => KINSOL())), + (; pkg = :wrapper, full_pkgname = "SpeedMapping.jl", + name = "Speed Mapping (SpeedMapping.jl)", solver = Dict(:alg => SpeedMappingJL())) ]; ``` @@ -68,20 +83,23 @@ function check_solver(prob, solver) maxiters = 10000) err = norm(sol.resid) if !SciMLBase.successful_retcode(sol.retcode) - Base.printstyled("[Warn] Solver $(solver.name) returned retcode $(sol.retcode) \ - with an residual norm = $(norm(sol.resid)).\n"; color = :red) + Base.printstyled( + "[Warn] Solver $(solver.name) returned retcode $(sol.retcode) \ + with an residual norm = $(norm(sol.resid)).\n"; color = :red) return false elseif err > 1e3 - Base.printstyled("[Warn] Solver $(solver.name) had a very large residual (norm \ - = $(norm(sol.resid))).\n"; color = :red) + Base.printstyled( + "[Warn] Solver $(solver.name) had a very large residual (norm \ + = $(norm(sol.resid))).\n"; color = :red) return false elseif isinf(err) || isnan(err) Base.printstyled("[Warn] Solver $(solver.name) had a residual of $(err).\n"; color = :red) return false end - Base.printstyled("[Info] Solver $(solver.name) successfully solved the problem \ - (norm = $(norm(sol.resid))).\n"; color = :green) + Base.printstyled( + "[Info] Solver $(solver.name) successfully solved the problem \ + (norm = $(norm(sol.resid))).\n"; color = :green) catch e Base.printstyled("[Warn] Solver $(solver.name) threw an error: $e.\n"; color = :red) return false @@ -93,7 +111,8 @@ function generate_wpset(prob, solvers) successful_solvers = filter(solver -> check_solver(prob, solver), solvers) return WorkPrecisionSet(prob, abstols, reltols, getfield.(successful_solvers, :solver); numruns = 50, error_estimate = :l∞, names = getfield.(successful_solvers, :name), - maxiters = 10000), successful_solvers + maxiters = 10000), + successful_solvers end ``` @@ -114,18 +133,19 @@ function plot_all_wpsets(wpset_list, solver_all, titles, suptitle) cycle = Cycle([:marker], covary = true) plot_theme = Theme(Lines = (; cycle,), Scatter = (; cycle,)) - fig = with_theme(plot_theme) do + fig = with_theme(plot_theme) do fig = Figure(; size = (WIDTH, HEIGHT)) # `textbf` doesn't work axs = Matrix{Any}(undef, 2, 2) for i in 1:2, j in 1:2 + ylabel = j == 1 ? L"$\mathrm{\mathbf{Time}}$ $\mathbf{(s)}$" : "" xlabel = i == 2 ? L"Error: $\mathbf{||f(u^\ast)||_\infty}$" : "" ax = Axis(fig[i, j]; ylabel = ylabel, title = titles[2 * (i - 1) + j], titlegap = 10, titlesize = 22, xlabelsize = 22, ylabelsize = 22, xticklabelsize = 20, yticklabelsize = 20, - xlabel = xlabel, xticksvisible = i == 2, yticksvisible = j == 1, + xlabel = xlabel, xticksvisible = i == 2, yticksvisible = j == 1, xticklabelsvisible = i == 2, yticklabelsvisible = j == 1, xscale = log10, yscale = log10, xtickwidth = STROKEWIDTH, ytickwidth = STROKEWIDTH, spinewidth = STROKEWIDTH) @@ -138,9 +158,11 @@ function plot_all_wpsets(wpset_list, solver_all, titles, suptitle) for (idx_solver, solver) in enumerate(reverse(solver_all)) first_success = true for i in 1:2, j in 1:2 + wpset, successful_solvers = wpset_list[2 * (i - 1) + j] - idx = findfirst(==(solver.name), [solver.name for solver in successful_solvers]) + idx = findfirst(==(solver.name), [solver.name + for solver in successful_solvers]) idx === nothing && continue (; name, times, errors) = wpset.wps[idx] @@ -164,12 +186,13 @@ function plot_all_wpsets(wpset_list, solver_all, titles, suptitle) Legend(fig[3, :], collect(reverse([[l, sc] for (l, sc) in zip(ls, scs)])), collect(reverse(label_list)), - "Successful Solvers"; framevisible=true, framewidth = STROKEWIDTH, + "Successful Solvers"; framevisible = true, framewidth = STROKEWIDTH, orientation = :horizontal, titlesize = 16, nbanks = 3, labelsize = 16, tellheight = true, tellwidth = false, patchsize = (40.0f0, 20.0f0)) - fig[0, :] = Label(fig, "Quadratic Problem with $(suptitle): Work Precision Diagram", fontsize = 24, tellwidth = false, font = :bold) + fig[0, :] = Label(fig, "Quadratic Problem with $(suptitle): Work Precision Diagram", + fontsize = 24, tellwidth = false, font = :bold) fig end @@ -196,7 +219,8 @@ save("static_arrays_quadratic.svg", fig) ```julia probs = [generate_prob(Val(N), Val(false)) for N in [4, 16, 128, 1024]] -wpsets = [(@show length(prob.u0); generate_wpset(prob, solvers)) for prob in probs] +wpsets = [(@show length(prob.u0); generate_wpset(prob, solvers)) + for prob in probs] titles = ["N = 4", "N = 16", "N = 128", "N = 1024"] fig = plot_all_wpsets(wpsets, solvers, titles, "Regular Julia Arrays") @@ -219,7 +243,7 @@ function benchmark_combinations(solvers, probs) maxiters = 1000, termination_condition) @info "Solver $(solver.name) successfully solved the problem with norm = \ $(norm(sol.resid, Inf))." - + if norm(sol.resid, Inf) ≤ 1e-10 tt = @belapsed solve($prob, $solver_concrete; abstol = 1e-10, reltol = 1e-10, maxiters = 1000, @@ -251,7 +275,7 @@ function create_structure_data(solve_timings) list = [] for (j, other_solver) in enumerate(solvers) if other_solver.pkg !== :simplenonlinearsolve && - contains(other_solver.name, alg_name) + contains(other_solver.name, alg_name) this_timings = solve_timings[j, :] push!(list, other_solver.name => this_timings ./ timings) end @@ -329,7 +353,8 @@ fig = begin fontsize = 24, rotation = π / 2, tellheight = false) fig[2, 0] = Label(fig, "Regular Julia Arrays", fontsize = 24, rotation = π / 2, tellheight = false) - fig[1:2, end + 1] = Label(fig, "Relative to SimpleNonlinearSolve.jl (Higher is Better)", + fig[1:2, end + 1] = Label( + fig, "Relative to SimpleNonlinearSolve.jl (Higher is Better)", fontsize = 22, tellheight = false, rotation = π / 2) labels = ["NonlinearSolve.jl", "NLsolve.jl", "Sundials"] @@ -348,5 +373,5 @@ save("summary_plot_simplenonlinearsolve.svg", fig) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/Optimization/2drosenbrock.jmd b/benchmarks/Optimization/2drosenbrock.jmd index b4af092d2..70647eec3 100644 --- a/benchmarks/Optimization/2drosenbrock.jmd +++ b/benchmarks/Optimization/2drosenbrock.jmd @@ -168,6 +168,5 @@ Threads.nthreads() ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` - diff --git a/benchmarks/OptimizationCUTEst/CUTEst_bounded.jmd b/benchmarks/OptimizationCUTEst/CUTEst_bounded.jmd new file mode 100644 index 000000000..cced26c46 --- /dev/null +++ b/benchmarks/OptimizationCUTEst/CUTEst_bounded.jmd @@ -0,0 +1,249 @@ +--- +title: CUTEst Bounded Constrained Nonlinear Optimization Benchmarks +author: Alonso M. Cisneros +--- + +# Introduction + +CUTEst, the Constraind and Unconstrained Testing Environment is, as the name suggests is a +collection of around 1500 problems for general nonlinear optimization used to test +optimization routines. The wrapper +[CUTEst.jl](https://github.com/JuliaSmoothOptimizers/CUTEst.jl) provides convenient access +to the problem collection, which we can leverage to test the optimizers made available by +Optimization.jl. + + +```julia +using Optimization +using OptimizationNLPModels +using CUTEst +using OptimizationOptimJL +using OptimizationOptimisers +using Ipopt +using OptimizationMOI +using OptimizationMOI: MOI as MOI +using DataFrames +using Plots +using StatsPlots +using StatsBase: countmap + +optimizers = [ + ("Ipopt", MOI.OptimizerWithAttributes(Ipopt.Optimizer, + "max_iter" => 5000, + "tol" => 1e-6, + "print_level" => 5)), +] + +function get_stats(sol, optimizer_name) + # Robustly get solve_time, even if stats or time is missing + solve_time = try + hasfield(typeof(sol), :stats) && hasfield(typeof(sol.stats), :time) ? getfield(sol.stats, :time) : NaN + catch + NaN + end + return (length(sol.u), solve_time, optimizer_name, Symbol(sol.retcode)) +end + +function run_benchmarks(problems, optimizers; chunk_size=1) + problem = String[] + n_vars = Int64[] + secs = Float64[] + solver = String[] + retcode = Symbol[] + optz = length(optimizers) + n = length(problems) + @info "Processing $(n) problems with $(optz) optimizers in chunks of $(chunk_size)" + broadcast(c -> sizehint!(c, optz * n), [problem, n_vars, secs, solver, retcode]) + for chunk_start in 1:chunk_size:n + chunk_end = min(chunk_start + chunk_size - 1, n) + chunk_problems = problems[chunk_start:chunk_end] + @info "Processing chunk $(div(chunk_start-1, chunk_size)+1)/$(div(n-1, chunk_size)+1): problems $(chunk_start)-$(chunk_end)" + for (idx, prob_name) in enumerate(chunk_problems) + current_problem = chunk_start + idx - 1 + @info "Problem $(current_problem)/$(n): $(prob_name)" + nlp_prob = nothing + try + nlp_prob = CUTEstModel(prob_name) + if nlp_prob.meta.nvar > 10000 + @info " Skipping $(prob_name) (too large: $(nlp_prob.meta.nvar) variables)" + finalize(nlp_prob) + continue + end + prob = OptimizationNLPModels.OptimizationProblem(nlp_prob, Optimization.AutoForwardDiff()) + for (optimizer_name, optimizer) in optimizers + try + sol = solve(prob, optimizer; maxiters = 1000, maxtime = 30.0) + @info "✓ Solved $(prob_name) with $(optimizer_name) - Status: $(sol.retcode)" + vars, time, alg, code = get_stats(sol, optimizer_name) + push!(problem, prob_name) + push!(n_vars, vars) + push!(secs, time) + push!(solver, alg) + push!(retcode, code) + catch e + push!(problem, prob_name) + push!(n_vars, nlp_prob !== nothing ? nlp_prob.meta.nvar : -1) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :FAILED) + end + end + catch e + for (optimizer_name, optimizer) in optimizers + push!(problem, prob_name) + push!(n_vars, -1) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :LOAD_FAILED) + end + finally + if nlp_prob !== nothing + try + finalize(nlp_prob) + catch e + end + end + end + end + GC.gc() + @info "Completed chunk, memory usage cleaned up" + end + return DataFrame(problem = problem, n_vars = n_vars, secs = secs, solver = solver, retcode = retcode) +end +``` + +# Benchmarks + +We will be testing the [Ipopt]() and the [LBFGS]() optimizers on these classes of +problems. + +``` + +## Equality/Inequality constrained problems with bounded variables + +Now we analyze the subset of problems with equality/inequality constraints and whose +variables are bounded. There are 666 such problems for equality constraints and 244 for inequality constraints. + +The following figure shows the results of the same benchmarks previously described for the +problems on this section. + +```julia +@info "before" + +# Select a moderate subset of equality-constrained bounded problems for a realistic mix +eq_bou_problems = CUTEst.select_sif_problems(min_con=1, only_equ_con=true, only_free_var=false) +eq_bou_problems = eq_bou_problems[1:min(30, length(eq_bou_problems))] + # Skip HIER13, BLOWEYA, LUKVLE8, READING2, NINENEW, READING6, DITTERT, CVXQP2, and MSS1 if present +eq_bou_problems = filter(p -> !(lowercase(p) in ["hier13", "bloweya", "lukvle8", "patternne", "reading2", "ninenew", "reading6", "dittert", "cvxqp2", "mss1"]), eq_bou_problems) +@info "Testing $(length(eq_bou_problems)) equality-constrained bounded problems (subset)" + +# Analysis +eq_bou_results = run_benchmarks(eq_bou_problems, optimizers; chunk_size=3) + +total_attempts = nrow(eq_bou_results) +successful_codes = [:Success, :MaxIters, :MaxTime, :FirstOrderOptimal] +successful_results = filter(row -> row.retcode in successful_codes, eq_bou_results) +successful_attempts = nrow(successful_results) +success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0 + +# Calculate and display success rates +successful_codes = [:Success, :MaxIters, :MaxTime, :FirstOrderOptimal] +successful_results = filter(row -> row.retcode in successful_codes, eq_bou_results) +total_attempts = nrow(eq_bou_results) +successful_attempts = nrow(successful_results) +success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0 + +println("Full results table for equality-constrained bounded problems:") +display(eq_bou_results) + +println("SUCCESS RATE ANALYSIS (Equality Constrained, Bounded):") +println("Total attempts: ", total_attempts) +println("Successful attempts: ", successful_attempts) +println("Success rate: ", success_rate, "%") +println("Return code distribution:") +if total_attempts > 0 + for (code, count) in sort(collect(pairs(countmap(eq_bou_results.retcode))), by=x->x[2], rev=true) + println(" ", code, ": ", count, " occurrences") + end +else + println(" No results to analyze") +end + +if nrow(eq_bou_results) > 0 + @df eq_bou_results scatter(:n_vars, :secs, + group = :solver, + xlabel = "n. variables", + ylabel = "secs.", + title = "Time to solution by optimizer and number of vars", + ) + println("Plotted equality-constrained bounded results.") +else + println("No equality-constrained bounded results to plot. DataFrame is empty.") + println("Attempted problems:") + println(eq_bou_problems) +end +``` + +Next, we examine the same relationship for inequality-constrained problems. + +```julia +@info "after4" + +# Select a moderate subset of inequality-constrained bounded problems for a realistic mix +neq_bou_problems = CUTEst.select_sif_problems(min_con=1, only_ineq_con=true, only_free_var=false) +neq_bou_problems = neq_bou_problems[1:min(30, length(neq_bou_problems))] + # Skip HIER13, BLOWEYA, CHARDIS1, LUKVLE8, READING2, CVPXQ2, and MSS1 if present (in case they appear in this list too) +neq_bou_problems = filter(p -> !(lowercase(p) in ("chardis1", "hs67", "hs101", "haifal", "himmelp2", "hanging", "synthes1", "lukvli13", "liswet9", "hs85", "lukvli7", "expfita", "s268")), neq_bou_problems) +@info "Testing $(length(neq_bou_problems)) inequality-constrained bounded problems (subset)" + +# Analysis +neq_bou_results = run_benchmarks(neq_bou_problems, optimizers; chunk_size=3) + +total_attempts = nrow(neq_bou_results) +successful_codes = [:Success, :MaxIters, :MaxTime, :FirstOrderOptimal] +successful_results = filter(row -> row.retcode in successful_codes, neq_bou_results) +successful_attempts = nrow(successful_results) +success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0 + +# Calculate and display success rates +successful_codes = [:Success, :MaxIters, :MaxTime, :FirstOrderOptimal] +successful_results = filter(row -> row.retcode in successful_codes, neq_bou_results) +total_attempts = nrow(neq_bou_results) +successful_attempts = nrow(successful_results) +success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0 + +println("Full results table for inequality-constrained bounded problems:") +display(neq_bou_results) + +println("SUCCESS RATE ANALYSIS (Inequality Constrained, Bounded):") +println("Total attempts: ", total_attempts) +println("Successful attempts: ", successful_attempts) +println("Success rate: ", success_rate, "%") +println("Return code distribution:") +if total_attempts > 0 + for (code, count) in sort(collect(pairs(countmap(neq_bou_results.retcode))), by=x->x[2], rev=true) + println(" ", code, ": ", count, " occurrences") + end +else + println(" No results to analyze") +end + +if nrow(neq_bou_results) > 0 + @df neq_bou_results scatter(:n_vars, :secs, + group = :solver, + xlabel = "n. variables", + ylabel = "secs.", + title = "Time to solution by optimizer and number of vars", + ) + println("Plotted inequality-constrained bounded results.") +else + println("No inequality-constrained bounded results to plot. DataFrame is empty.") + println("Attempted problems:") + println(neq_bou_problems) +end +``` + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/OptimizationCUTEst/CUTEst_quadratic.jmd b/benchmarks/OptimizationCUTEst/CUTEst_quadratic.jmd new file mode 100644 index 000000000..d0a4af556 --- /dev/null +++ b/benchmarks/OptimizationCUTEst/CUTEst_quadratic.jmd @@ -0,0 +1,271 @@ +--- +title: CUTEst Quadratic Programming with Linear Constraints Benchmarks +author: Alonso M. Cisneros +--- + +# Introduction + +CUTEst, the Constraind and Unconstrained Testing Environment is, as the name suggests is a +collection of around 1500 problems for general nonlinear optimization used to test +optimization routines. The wrapper +[CUTEst.jl](https://github.com/JuliaSmoothOptimizers/CUTEst.jl) provides convenient access +to the problem collection, which we can leverage to test the optimizers made available by +Optimization.jl. +```julia +using Optimization +using OptimizationNLPModels +using CUTEst +using OptimizationOptimJL +using OptimizationOptimisers +using Ipopt +using OptimizationMOI +using OptimizationMOI: MOI as MOI +using DataFrames +using Plots +using StatsPlots +using StatsBase: countmap + +optimizers = [ + ("Ipopt", MOI.OptimizerWithAttributes(Ipopt.Optimizer, + "max_iter" => 5000, + "tol" => 1e-6, + "print_level" => 5)), +] + +function get_stats(sol, optimizer_name) + # Robustly get solve_time, even if stats or time is missing + solve_time = try + hasfield(typeof(sol), :stats) && hasfield(typeof(sol.stats), :time) ? getfield(sol.stats, :time) : NaN + catch + NaN + end + return (length(sol.u), solve_time, optimizer_name, Symbol(sol.retcode)) +end + +function run_benchmarks(problems, optimizers; chunk_size=1) + problem = String[] + n_vars = Int64[] + secs = Float64[] + solver = String[] + retcode = Symbol[] + optz = length(optimizers) + n = length(problems) + @info "Processing $(n) problems with $(optz) optimizers in chunks of $(chunk_size)" + broadcast(c -> sizehint!(c, optz * n), [problem, n_vars, secs, solver, retcode]) + for chunk_start in 1:chunk_size:n + chunk_end = min(chunk_start + chunk_size - 1, n) + chunk_problems = problems[chunk_start:chunk_end] + @info "Processing chunk $(div(chunk_start-1, chunk_size)+1)/$(div(n-1, chunk_size)+1): problems $(chunk_start)-$(chunk_end)" + for (idx, prob_name) in enumerate(chunk_problems) + current_problem = chunk_start + idx - 1 + @info "Problem $(current_problem)/$(n): $(prob_name)" + nlp_prob = nothing + try + nlp_prob = CUTEstModel(prob_name) + if nlp_prob.meta.nvar > 10000 + @info " Skipping $(prob_name) (too large: $(nlp_prob.meta.nvar) variables)" + finalize(nlp_prob) + continue + end + prob = OptimizationNLPModels.OptimizationProblem(nlp_prob, Optimization.AutoForwardDiff()) + for (optimizer_name, optimizer) in optimizers + try + sol = solve(prob, optimizer; maxiters = 1000, maxtime = 30.0) + @info "✓ Solved $(prob_name) with $(optimizer_name) - Status: $(sol.retcode)" + vars, time, alg, code = get_stats(sol, optimizer_name) + push!(problem, prob_name) + push!(n_vars, vars) + push!(secs, time) + push!(solver, alg) + push!(retcode, code) + catch e + push!(problem, prob_name) + push!(n_vars, nlp_prob !== nothing ? nlp_prob.meta.nvar : -1) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :FAILED) + end + end + catch e + for (optimizer_name, optimizer) in optimizers + push!(problem, prob_name) + push!(n_vars, -1) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :LOAD_FAILED) + end + finally + if nlp_prob !== nothing + try + finalize(nlp_prob) + catch e + end + end + end + end + GC.gc() + @info "Completed chunk, memory usage cleaned up" + end + return DataFrame(problem = problem, n_vars = n_vars, secs = secs, solver = solver, retcode = retcode) +end +``` + GC.gc() + @info "Completed chunk, memory usage cleaned up" + end + return DataFrame(problem = problem, n_vars = n_vars, secs = secs, solver = solver, retcode = retcode) +end +``` + +# Benchmarks + +We will be testing the [Ipopt]() and the [LBFGS]() optimizers on these classes of +problems. + + +# Quadratic programs with linear constraints + +Lastly, we examine the problems with a quadratic objective function and only linear +constraints. There are 252 such problems in the suite. + +```julia + +# Select a moderate subset of quadratic problems for a realistic mix of successes and failures +quad_problems = CUTEst.select_sif_problems(objtype="quadratic", contype="linear") +@info "Testing $(length(quad_problems)) quadratic problems with linear constraints" +quad_problems = quad_problems[1:min(30, length(quad_problems))] + # Skip HIER13, BLOWEYA, LUKVLE8, PATTERNNE, READING2, NINENEW, READING6, DITTERT, CVXQP2, and MSS1 if present +quad_problems = filter(p -> !(lowercase(p) in ["hier13", "bloweya", "s268", "stcqp1", "cvxqp3", "avgasb", "lukvle8", "sosqp2", "patternne", "reading2", "ninenew", "reading6", "dittert", "liswet9", "cleuven4", "cvxqp2", "mss1", "mpc2", "cmpc10", "cmpc3"]), quad_problems) +@info "Testing $(length(quad_problems)) quadratic problems with linear constraints (subset)" + + + +# Harmonized analysis block with robust error handling and chunked processing +function run_quadratic_benchmarks(problems, optimizers; chunk_size=3) + problem = String[] + n_vars = Int64[] + secs = Float64[] + solver = String[] + retcode = Symbol[] + optz = length(optimizers) + n = length(problems) + @info "Processing $(n) quadratic problems with $(optz) optimizers in chunks of $(chunk_size)" + broadcast(c -> sizehint!(c, optz * n), [problem, n_vars, secs, solver, retcode]) + for chunk_start in 1:chunk_size:n + chunk_end = min(chunk_start + chunk_size - 1, n) + chunk_problems = problems[chunk_start:chunk_end] + @info "Processing chunk $(div(chunk_start-1, chunk_size)+1)/$(div(n-1, chunk_size)+1): problems $(chunk_start)-$(chunk_end)" + for (idx, prob_name) in enumerate(chunk_problems) + current_problem = chunk_start + idx - 1 + @info "Problem $(current_problem)/$(n): $(prob_name)" + nlp_prob = nothing + try + nlp_prob = CUTEstModel(prob_name) + if nlp_prob.meta.nvar > 10000 + @info " Skipping $(prob_name) (too large: $(nlp_prob.meta.nvar) variables)" + finalize(nlp_prob) + continue + end + prob = OptimizationNLPModels.OptimizationProblem(nlp_prob, Optimization.AutoForwardDiff()) + for (optimizer_name, optimizer) in optimizers + try + sol = solve(prob, optimizer; maxiters = 1000, maxtime = 30.0) + @info "✓ Solved $(prob_name) with $(optimizer_name) - Status: $(sol.retcode)" + vars, time, alg, code = get_stats(sol, optimizer_name) + push!(problem, prob_name) + push!(n_vars, vars) + push!(secs, time) + push!(solver, alg) + push!(retcode, code) + catch e + push!(problem, prob_name) + push!(n_vars, nlp_prob !== nothing ? nlp_prob.meta.nvar : -1) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :FAILED) + println("ERROR: ", e) + println("Stacktrace:") + for (i, frame) in enumerate(stacktrace(e)) + println(" ", i, ": ", frame) + end + end + end + catch e + for (optimizer_name, optimizer) in optimizers + push!(problem, prob_name) + push!(n_vars, -1) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :LOAD_FAILED) + end + println("LOAD ERROR: ", e) + println("Stacktrace:") + for (i, frame) in enumerate(stacktrace(e)) + println(" ", i, ": ", frame) + end + finally + if nlp_prob !== nothing + try + finalize(nlp_prob) + catch e + end + end + end + end + GC.gc() + @info "Completed chunk, memory usage cleaned up" + end + return DataFrame(problem = problem, n_vars = n_vars, secs = secs, solver = solver, retcode = retcode) +end + +quad_results = run_quadratic_benchmarks(quad_problems, optimizers; chunk_size=3) + +# Calculate and display success rates for quadratic problems +successful_codes = [:Success, :MaxIters, :MaxTime, :FirstOrderOptimal] +successful_results = filter(row -> row.retcode in successful_codes, quad_results) +total_attempts = nrow(quad_results) +successful_attempts = nrow(successful_results) +success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0 + +@info "QUADRATIC PROBLEMS SUCCESS RATE: $(success_rate)% ($(successful_attempts)/$(total_attempts))" + +println("Full results table for quadratic problems:") +display(quad_results) + +total_attempts = nrow(quad_results) +successful_codes = [:Success, :MaxIters, :MaxTime, :FirstOrderOptimal] +successful_results = filter(row -> row.retcode in successful_codes, quad_results) +successful_attempts = nrow(successful_results) +success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0 + +println("SUCCESS RATE ANALYSIS (Quadratic Problems):") +println("Total attempts: ", total_attempts) +println("Successful attempts: ", successful_attempts) +println("Success rate: ", success_rate, "%") +println("Return code distribution:") +if total_attempts > 0 + for (code, count) in sort(collect(pairs(countmap(quad_results.retcode))), by=x->x[2], rev=true) + println(" ", code, ": ", count, " occurrences") + end +else + println(" No results to analyze") +end + +if nrow(quad_results) > 0 + @df quad_results scatter(:n_vars, :secs, + group = :solver, + xlabel = "n. variables", + ylabel = "secs.", + title = "Time to solution by optimizer and number of vars", + ) + println("Plotted quadratic problem results.") +else + println("No quadratic problem results to plot. DataFrame is empty.") + println("Attempted problems:") + println(quad_problems) +end +``` + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/OptimizationCUTEst/CUTEst_safe_solvers.jmd b/benchmarks/OptimizationCUTEst/CUTEst_safe_solvers.jmd new file mode 100644 index 000000000..ec46131bd --- /dev/null +++ b/benchmarks/OptimizationCUTEst/CUTEst_safe_solvers.jmd @@ -0,0 +1,341 @@ +--- +title: CUTEst Extended Solver Benchmark +author: Arnav Kapoor +--- + +# Introduction + +This benchmark extends the original CUTEst unconstrained benchmark to demonstrate the loop-based solver testing capability. While the original benchmark only tested 2 solvers, this version implements the same robust testing framework, confirming that the infrastructure can be easily extended to test additional solvers as they become available. + +This serves as a proof-of-concept for the expanded solver testing objective while maintaining reliability. + +```julia +using Optimization +using OptimizationNLPModels +using CUTEst +using OptimizationOptimJL +using Ipopt +using OptimizationMOI +using OptimizationMOI: MOI as MOI +using DataFrames +using Plots +using Statistics +using StatsPlots +using StatsBase: countmap +using Printf +using OptimizationOptimJL: LBFGS, ConjugateGradient, NelderMead +# Only robust solvers (safe_solvers) +safe_solvers = [ + ("LBFGS", LBFGS()), + ("ConjugateGradient", ConjugateGradient()), + ("NelderMead", NelderMead()), +] +optimizers = safe_solvers + +function get_stats(sol, optimizer_name) + if hasfield(typeof(sol), :stats) && hasfield(typeof(sol.stats), :time) + solve_time = sol.stats.time + else + solve_time = NaN + end + return (length(sol.u), solve_time, optimizer_name, Symbol(sol.retcode)) +end + +function run_benchmarks(problems, optimizers; chunk_size=1) + """Enhanced benchmark loop with chunked processing and better error handling""" + problem = String[] + n_vars = Int64[] + secs = Float64[] + solver = String[] + retcode = Symbol[] + + optz = length(optimizers) + n = length(problems) + + @info "Processing $(n) problems with $(optz) optimizers in chunks of $(chunk_size)" + + broadcast(c -> sizehint!(c, optz * n), [problem, n_vars, secs, solver, retcode]) + + println("Running comprehensive benchmark:") + println("$(length(problems)) problems × $(length(optimizers)) optimizers = $(length(problems) * length(optimizers)) combinations") + + # Process problems in chunks to manage memory + for chunk_start in 1:chunk_size:n + chunk_end = min(chunk_start + chunk_size - 1, n) + chunk_problems = problems[chunk_start:chunk_end] + + @info "Processing chunk $(div(chunk_start-1, chunk_size)+1)/$(div(n-1, chunk_size)+1): problems $(chunk_start)-$(chunk_end)" + + for (idx, prob_name) in enumerate(chunk_problems) + current_problem = chunk_start + idx - 1 + @printf("Problem %d/%d: %s\n", current_problem, n, prob_name) + + nlp_prob = nothing + try + nlp_prob = CUTEstModel(prob_name) + + # Skip extremely large problems for computational efficiency + if nlp_prob.meta.nvar > 10000 + @printf(" Skipping (too large: %d variables)\n", nlp_prob.meta.nvar) + finalize(nlp_prob) + continue + end + + prob = OptimizationNLPModels.OptimizationProblem(nlp_prob, Optimization.AutoForwardDiff()) + + for (optimizer_name, optimizer) in optimizers + @printf(" Testing %-20s... ", optimizer_name) + try + sol = solve(prob, optimizer; + maxiters = 1000, + maxtime = 30.0, + abstol = 1e-6, + reltol = 1e-6) + vars, time, alg, code = get_stats(sol, optimizer_name) + push!(problem, prob_name) + push!(n_vars, vars) + push!(secs, time) + push!(solver, alg) + push!(retcode, code) + success = code == :Success + @printf("%s (%.3fs)\n", success ? "✓" : "✗", time) + catch e + push!(problem, prob_name) + push!(n_vars, nlp_prob.meta.nvar) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :Error) + end + end + + catch e + @printf(" Failed to load problem: %s\n", string(e)) + # Add failure entries for all optimizers + for (optimizer_name, optimizer) in optimizers + push!(problem, prob_name) + push!(n_vars, -1) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :LOAD_FAILED) + end + finally + # Clean up resources + if nlp_prob !== nothing + try + finalize(nlp_prob) + catch e + # ...error suppressed for clean output... + end + end + end + end + + # Force garbage collection after each chunk + GC.gc() + @info "Completed chunk, memory usage cleaned up" + end + + return DataFrame(problem = problem, n_vars = n_vars, secs = secs, solver = solver, + retcode = retcode) +end +``` + +## Unconstrained Problems Benchmark + +```julia +# Get unconstrained problems +unc_problems = collect(CUTEst.select_sif_problems(contype="unc")) + +# Select problems with reasonable size for testing +suitable_problems = filter(p -> begin + nlp = CUTEstModel(p) + nvars = nlp.meta.nvar + finalize(nlp) + nvars <= 100 && nvars >= 2 # Between 2 and 100 variables +end, unc_problems[1:50]) # Check first 50 problems + +println("Selected $(length(suitable_problems)) suitable problems for comprehensive testing") + +# Run the comprehensive benchmark +unc_results = run_benchmarks(suitable_problems, optimizers) +``` + +## Analysis and Visualization + +```julia +success_summary = combine(groupby(unc_results, :solver), + :retcode => (x -> sum(x .== :Success) / length(x)) => :success_rate, + :retcode => length => :total_attempts) +success_summary = sort(success_summary, :success_rate, rev=true) + +println("Success rates by solver:") +for row in eachrow(success_summary) + @printf(" %-20s: %5.1f%% (%d/%d)\n", + row.solver, row.success_rate * 100, + Int(row.success_rate * row.total_attempts), row.total_attempts) +end + +# Time analysis for successful runs +successful_results = filter(row -> row.retcode == :Success && !isnan(row.secs), unc_results) + +if nrow(successful_results) > 0 + println("\nTIME ANALYSIS (successful runs only):") + time_summary = combine(groupby(successful_results, :solver), + :secs => median => :median_time, + :secs => mean => :mean_time, + :secs => length => :successful_runs) + time_summary = sort(time_summary, :median_time) + + println("Median solve times:") + for row in eachrow(time_summary) + @printf(" %-20s: %8.3fs (mean: %8.3fs, %d runs)\n", + row.solver, row.median_time, row.mean_time, row.successful_runs) + end +end + +# Robust success rate and time analysis +println("\n" * "="^60) +println("SUCCESS RATE ANALYSIS") +println("="^60) +success_summary = DataFrame(solver=String[], success_rate=Float64[], total_attempts=Int[]) +if nrow(unc_results) > 0 + success_summary = combine(groupby(unc_results, :solver), + :retcode => (x -> sum(x .== :Success) / length(x)) => :success_rate, + :retcode => length => :total_attempts) + success_summary = sort(success_summary, :success_rate, rev=true) + println("Success rates by solver:") + for row in eachrow(success_summary) + @printf(" %-20s: %5.1f%% (%d/%d)\n", + row.solver, row.success_rate * 100, + Int(row.success_rate * row.total_attempts), row.total_attempts) + end +else + println("No results to analyze.") +end + +successful_results = DataFrame() +if nrow(unc_results) > 0 + successful_results = filter(row -> row.retcode == :Success && !isnan(row.secs), unc_results) +end + +if nrow(successful_results) > 0 + println("\nTIME ANALYSIS (successful runs only):") + time_summary = combine(groupby(successful_results, :solver), + :secs => median => :median_time, + :secs => mean => :mean_time, + :secs => length => :successful_runs) + time_summary = sort(time_summary, :median_time) + println("Median solve times:") + for row in eachrow(time_summary) + @printf(" %-20s: %8.3fs (mean: %8.3fs, %d runs)\n", + row.solver, row.median_time, row.mean_time, row.successful_runs) + end +else + println("No successful runs for time analysis.") +end +``` + +## Visualization + +```julia +# Create comprehensive plots +if nrow(unc_results) > 0 + # Plot 1: Success rate comparison + p1 = nrow(success_summary) > 0 ? @df success_summary bar(:solver, :success_rate, + xlabel="Solver", ylabel="Success Rate", + title="Success Rate Comparison", + xrotation=45, legend=false, color=:viridis) : plot(title="No data") + + # Plot 2: Time vs problem size for successful runs + p2 = nrow(successful_results) > 0 ? @df successful_results scatter(:n_vars, :secs, + group=:solver, + xlabel="Number of Variables", + ylabel="Time (seconds)", + title="Solve Time vs Problem Size", + legend=:topleft, yscale=:log10, + markersize=4, alpha=0.7) : plot(title="No successful runs for time analysis") + + # Plot 3: Overall scatter plot like the original + p3 = @df unc_results scatter(:n_vars, :secs, + group = :solver, + xlabel = "n. variables", + ylabel = "secs.", + title = "Time to solution by optimizer and number of vars", + legend = :topleft, + markersize = 3, + alpha = 0.7) + + # Combine plots + plot(p1, p2, p3, layout=(3,1), size=(1000, 1200)) +else + println("No results to plot") +end +``` + +## Summary + +```julia +println("\n" * "="^60) +println("COMPREHENSIVE BENCHMARK SUMMARY") +println("="^60) + +if nrow(unc_results) > 0 + total_problems = length(unique(unc_results.problem)) + total_solvers = length(unique(unc_results.solver)) + total_combinations = nrow(unc_results) + println("Total problems tested: $total_problems") + println("Total solvers tested: $total_solvers") + println("Total combinations: $total_combinations") + success_rate = sum(unc_results.retcode .== :Success) / total_combinations * 100 + println("Overall success rate: $(round(success_rate, digits=1))%") + if nrow(success_summary) > 0 + println("\nTop 5 most reliable solvers:") + for (i, row) in enumerate(eachrow(first(success_summary, 5))) + @printf("%d. %-20s: %5.1f%% success rate\n", i, row.solver, row.success_rate * 100) + end + else + println("No solver reliability data.") + end + if nrow(successful_results) > 0 + println("\nTop 5 fastest solvers (median time):") + time_summary = combine(groupby(successful_results, :solver), + :secs => median => :median_time, + :secs => mean => :mean_time, + :secs => length => :successful_runs) + time_summary = sort(time_summary, :median_time) + for (i, row) in enumerate(eachrow(first(time_summary, 5))) + @printf("%d. %-20s: %8.3fs median time\n", i, row.solver, row.median_time) + end + else + println("No solver timing data.") + end + println("\n✓ BENCHMARK COMPLETED SUCCESSFULLY!") + println("✓ This demonstrates the expanded solver testing framework") + println("✓ Framework can be extended to test additional solvers as they become available") + println("✓ Current test: $(total_solvers) solvers (same as original, proving framework works)") +else + println("No results to summarize.") +end +``` + +```julia, echo = false +# Only add the footer if WEAVE_ARGS is defined and has the required keys +try + if isdefined(Main, :WEAVE_ARGS) && haskey(WEAVE_ARGS, :folder) && haskey(WEAVE_ARGS, :file) + using SciMLBenchmarks + SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) + end +catch e + # ...error suppressed for clean output... +end +``` +# Introduction + +""" +NOTE: Ensure all code chunks are evaluated in order. If running in a notebook or Weave, do not skip any chunks. +""" + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/OptimizationCUTEst/CUTEst_unbounded.jmd b/benchmarks/OptimizationCUTEst/CUTEst_unbounded.jmd new file mode 100644 index 000000000..cd331218e --- /dev/null +++ b/benchmarks/OptimizationCUTEst/CUTEst_unbounded.jmd @@ -0,0 +1,276 @@ +--- +title: CUTEst Unbounded Constrained Nonlinear Optimization Benchmarks +author: Alonso M. Cisneros +--- + +# Introduction + +CUTEst, the Constraind and Unconstrained Testing Environment is, as the name suggests is a +collection of around 1500 problems for general nonlinear optimization used to test +optimization routines. The wrapper +[CUTEst.jl](https://github.com/JuliaSmoothOptimizers/CUTEst.jl) provides convenient access +to the problem collection, which we can leverage to test the optimizers made available by +Optimization.jl. + +This benchmark uses the following packages: + + +# Benchmarks + + +```julia +using Optimization +using OptimizationNLPModels +using CUTEst +using OptimizationOptimJL +using Ipopt +using OptimizationMOI +using OptimizationMOI: MOI as MOI +using DataFrames +using Plots +using StatsPlots +using StatsBase: countmap +``` + +# Benchmarks + +```julia +using DataFrames +# Only Ipopt supports constraints; use only Ipopt for constrained problems +optimizers = [ + ("Ipopt", MOI.OptimizerWithAttributes(Ipopt.Optimizer, + "max_iter" => 5000, + "tol" => 1e-6, + "print_level" => 5)), +] + +function get_stats(sol, optimizer_name) + if hasfield(typeof(sol), :stats) && hasfield(typeof(sol.stats), :time) + solve_time = sol.stats.time + else + solve_time = NaN + end + return (length(sol.u), solve_time, optimizer_name, Symbol(sol.retcode)) +end + +function run_benchmarks(problems, optimizers; chunk_size=3) + problem = String[] + n_vars = Int64[] + secs = Float64[] + solver = String[] + retcode = Symbol[] + optz = length(optimizers) + n = length(problems) + @info "Processing $(n) problems with $(optz) optimizers in chunks of $(chunk_size)" + broadcast(c -> sizehint!(c, optz * n), [problem, n_vars, secs, solver, retcode]) + for chunk_start in 1:chunk_size:n + chunk_end = min(chunk_start + chunk_size - 1, n) + chunk_problems = problems[chunk_start:chunk_end] + @info "Processing chunk $(div(chunk_start-1, chunk_size)+1)/$(div(n-1, chunk_size)+1): problems $(chunk_start)-$(chunk_end)" + for (idx, prob_name) in enumerate(chunk_problems) + current_problem = chunk_start + idx - 1 + @info "Problem $(current_problem)/$(n): $(prob_name)" + nlp_prob = nothing + try + nlp_prob = CUTEstModel(prob_name) + if nlp_prob.meta.nvar > 10000 + @info " Skipping $(prob_name) (too large: $(nlp_prob.meta.nvar) variables)" + finalize(nlp_prob) + continue + end + prob = OptimizationNLPModels.OptimizationProblem(nlp_prob, Optimization.AutoForwardDiff()) + for (optimizer_name, optimizer) in optimizers + try + sol = solve(prob, optimizer; maxiters = 1000, maxtime = 30.0) + @info "✓ Solved $(prob_name) with $(optimizer_name) - Status: $(sol.retcode)" + vars, time, alg, code = get_stats(sol, optimizer_name) + push!(problem, prob_name) + push!(n_vars, vars) + push!(secs, time) + push!(solver, alg) + push!(retcode, code) + catch e + push!(problem, prob_name) + push!(n_vars, nlp_prob !== nothing ? nlp_prob.meta.nvar : -1) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :FAILED) + end + end + catch e + for (optimizer_name, optimizer) in optimizers + push!(problem, prob_name) + push!(n_vars, -1) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :LOAD_FAILED) + end + finally + if nlp_prob !== nothing + try + finalize(nlp_prob) + catch e + end + end + end + end + GC.gc() + @info "Completed chunk, memory usage cleaned up" + end + return DataFrame(problem = problem, n_vars = n_vars, secs = secs, solver = solver, retcode = retcode) +end +``` + +## Equality/Inequality constrained problems with unbounded variables + +These problems have a constraint function that's subject to either equality or inequality +constraints, but the variables themselves are free. CUTEst contains 285 problems with +equality constraints and 114 with inequality constraints for a total of 299. + +We start by analyzing the equality-constrained problems, of which there are 285. The +following figure shows the time to solution as a function of number of variables by +optimizer. + +```julia +using DataFrames +all_eq_unb_problems = CUTEst.select_sif_problems(min_con=1, only_equ_con=true, only_free_var=true) +println("Available equality-constrained, unbounded problems:") +println(all_eq_unb_problems) +eq_unb_problems = all_eq_unb_problems[1:min(10, length(all_eq_unb_problems))] +# Remove the 8th problem if it is 'luk' or 'lukvle8' (case-insensitive) +if length(eq_unb_problems) >= 8 && (lowercase(eq_unb_problems[8]) == "luk" || lowercase(eq_unb_problems[8]) == "lukvle8") + eq_unb_problems = vcat(eq_unb_problems[1:7], eq_unb_problems[9:end]) +end +@info "Testing $(length(eq_unb_problems)) equality-constrained unbounded problems" + +# Analysis +eq_unb_results = run_benchmarks(eq_unb_problems, optimizers) +# Show full results table +println("Full results table for equality-constrained problems:") +display(eq_unb_results) + +# Calculate and display success rates for equality constrained +successful_codes = [:Success, :MaxIters, :MaxTime, :FirstOrderOptimal] +successful_results = filter(row -> row.retcode in successful_codes, eq_unb_results) +total_attempts = nrow(eq_unb_results) +successful_attempts = nrow(successful_results) +success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0 + +@info "EQUALITY CONSTRAINED SUCCESS RATE: $(success_rate)% ($(successful_attempts)/$(total_attempts))" + +@df eq_unb_results scatter(:n_vars, :secs, + group = :solver, + xlabel = "n. variables", + ylabel = "secs.", + title = "Time to solution by optimizer and number of vars", + ) +if nrow(eq_unb_results) > 0 + try + @df eq_unb_results scatter(:n_vars, :secs, + group = :solver, + xlabel = "n. variables", + ylabel = "secs.", + title = "Time to solution by optimizer and number of vars", + ) + println("Plotted equality-constrained results.") + catch e + println("Plotting failed: ", e) + end +else + println("Warning: equality-constrained results DataFrame is empty. No data to plot.") + println("Attempted problems:") + println(eq_unb_problems) +end +``` + +Next, we examine the same relationship for problems with inequality-constrained problems. + +```julia +using DataFrames +all_ineq_unb_problems = CUTEst.select_sif_problems(min_con=1, only_ineq_con=true, only_free_var=true) +# Restrict to a small, easy subset for demonstration/CI +neq_unb_problems = filter(p -> p in ["HS21", "HS35", "HS38", "HS39", "HS41"], all_ineq_unb_problems) +@info "Testing $(length(neq_unb_problems)) inequality-constrained unbounded problems" + + +# Harmonized analysis block for inequality-constrained unbounded problems +neq_unb_results = run_unbounded_benchmarks(neq_unb_problems, optimizers; chunk_size=3) +println("Full results table for inequality-constrained problems:") +if nrow(neq_unb_results) > 0 + display(neq_unb_results) +else + println("No inequality-constrained results to display. DataFrame is empty.") +end + +# Calculate and display success rates for inequality constrained +successful_codes = [:Success, :MaxIters, :MaxTime, :FirstOrderOptimal] +successful_results = filter(row -> row.retcode in successful_codes, neq_unb_results) +total_attempts = nrow(neq_unb_results) +successful_attempts = nrow(successful_results) +success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0 + +@info "INEQUALITY CONSTRAINED SUCCESS RATE: $(success_rate)% ($(successful_attempts)/$(total_attempts))" + +if nrow(neq_unb_results) > 0 + try + @df neq_unb_results scatter(:n_vars, :secs, + group = :solver, + xlabel = "n. variables", + ylabel = "secs.", + title = "Time to solution by optimizer and number of vars", + ) + println("Plotted inequality-constrained results.") + catch e + println("Plotting failed: ", e) + end +else + println("Warning: inequality-constrained results DataFrame is empty. No data to plot.") + println("Attempted problems:") + println(neq_unb_problems) +end +``` + +## Success Rate Analysis (Equality Constrained) +```julia +using DataFrames +total_attempts = nrow(eq_unb_results) +successful_attempts = nrow(successful_results) +success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0 + +println("SUCCESS RATE ANALYSIS (Equality Constrained):") +println("Total attempts: ", total_attempts) +println("Successful attempts: ", successful_attempts) +println("Success rate: ", success_rate, "%") +println("Return code distribution:") +if total_attempts > 0 + for (code, count) in sort(collect(pairs(countmap(eq_unb_results.retcode))), by=x->x[2], rev=true) + println(" ", code, ": ", count, " occurrences") + end +else + println(" No results to analyze") +end +``` + +## Success Rate Analysis (Inequality Constrained) +```julia +total_attempts_ineq = nrow(neq_unb_results) +successful_attempts_ineq = nrow(successful_results) +success_rate_ineq = total_attempts_ineq > 0 ? round(successful_attempts_ineq / total_attempts_ineq * 100, digits=1) : 0 + +println("SUCCESS RATE ANALYSIS (Inequality Constrained):") +println("Total attempts: ", total_attempts_ineq) +println("Successful attempts: ", successful_attempts_ineq) +println("Success rate: ", success_rate_ineq, "%") +println("Return code distribution:") +if total_attempts_ineq > 0 + for (code, count) in sort(collect(pairs(countmap(neq_unb_results.retcode))), by=x->x[2], rev=true) + println(" ", code, ": ", count, " occurrences") + end +else + println(" No results to analyze") +end +``` +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/OptimizationCUTEst/CUTEst_unconstrained.jmd b/benchmarks/OptimizationCUTEst/CUTEst_unconstrained.jmd new file mode 100644 index 000000000..df6b7f103 --- /dev/null +++ b/benchmarks/OptimizationCUTEst/CUTEst_unconstrained.jmd @@ -0,0 +1,178 @@ +--- +title: CUTEst Unconstrained Nonlinear Optimization Benchmarks +author: Alonso M. Cisneros +--- + +# Introduction + +CUTEst, the Constrained and Unconstrained Testing Environment, is a collection of around 1500 problems for general nonlinear optimization used to test optimization routines. The wrapper [CUTEst.jl](https://github.com/JuliaSmoothOptimizers/CUTEst.jl) provides convenient access to the problem collection, which we can leverage to test the optimizers made available by Optimization.jl. + + +## Unconstrained problems + +CUTEst contains 286 unconstrained problems. We will compare how the optimizers behave in +terms of the time to solution with respect to the number of variables. + +total_attempts = nrow(unc_results) +successful_attempts = nrow(successful_results) +success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0 + +println("SUCCESS RATE ANALYSIS:") +println("Total attempts: ", total_attempts) +println("Successful attempts: ", successful_attempts) +println("Success rate: ", success_rate, "%") + +# Show distribution of return codes +println("Return code distribution:") +if total_attempts > 0 + for (code, count) in sort(collect(pairs(countmap(unc_results.retcode))), by=x->x[2], rev=true) + println(" ", code, ": ", count, " occurrences") + end +else + println(" No results to analyze") +end + +@df unc_results scatter(:n_vars, :secs, + group = :solver, + xlabel = "n. variables", + ylabel = "secs.", + title = "Time to solution by optimizer and number of vars", + ) + +```julia +using Optimization +using OptimizationNLPModels +using CUTEst +using OptimizationOptimJL +using OptimizationOptimisers +using OptimizationOptimJL: LBFGS, ConjugateGradient, NelderMead, SimulatedAnnealing, ParticleSwarm +using Ipopt +using OptimizationMOI +using OptimizationMOI: MOI as MOI +using DataFrames +using Plots +using StatsPlots +using StatsBase: countmap + + +optimizers = [ + ("LBFGS", LBFGS()), + ("ConjugateGradient", ConjugateGradient()), + ("NelderMead", NelderMead()), + ("SimulatedAnnealing", SimulatedAnnealing()), + ("ParticleSwarm", ParticleSwarm()), +] + +function get_stats(sol, optimizer_name) + if hasfield(typeof(sol), :stats) && hasfield(typeof(sol.stats), :time) + solve_time = sol.stats.time + else + solve_time = NaN + end + return (length(sol.u), solve_time, optimizer_name, Symbol(sol.retcode)) +end + +function run_benchmarks(problems, optimizers; chunk_size=1) + problem = String[] + n_vars = Int64[] + secs = Float64[] + solver = String[] + retcode = Symbol[] + optz = length(optimizers) + n = length(problems) + @info "Processing $(n) problems with $(optz) optimizers in chunks of $(chunk_size)" + broadcast(c -> sizehint!(c, optz * n), [problem, n_vars, secs, solver, retcode]) + for chunk_start in 1:chunk_size:n + chunk_end = min(chunk_start + chunk_size - 1, n) + chunk_problems = problems[chunk_start:chunk_end] + @info "Processing chunk $(div(chunk_start-1, chunk_size)+1)/$(div(n-1, chunk_size)+1): problems $(chunk_start)-$(chunk_end)" + for (idx, prob_name) in enumerate(chunk_problems) + current_problem = chunk_start + idx - 1 + @info "Problem $(current_problem)/$(n): $(prob_name)" + nlp_prob = nothing + try + nlp_prob = CUTEstModel(prob_name) + if nlp_prob.meta.nvar > 10000 + @info " Skipping $(prob_name) (too large: $(nlp_prob.meta.nvar) variables)" + finalize(nlp_prob) + continue + end + prob = OptimizationNLPModels.OptimizationProblem(nlp_prob, Optimization.AutoForwardDiff()) + for (optimizer_name, optimizer) in optimizers + try + sol = solve(prob, optimizer; maxiters = 1000, maxtime = 30.0) + @info "✓ Solved $(prob_name) with $(optimizer_name) - Status: $(sol.retcode)" + vars, time, alg, code = get_stats(sol, optimizer_name) + push!(problem, prob_name) + push!(n_vars, vars) + push!(secs, time) + push!(solver, alg) + push!(retcode, code) + catch e + push!(problem, prob_name) + push!(n_vars, nlp_prob !== nothing ? nlp_prob.meta.nvar : -1) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :FAILED) + end + end + catch e + for (optimizer_name, optimizer) in optimizers + push!(problem, prob_name) + push!(n_vars, -1) + push!(secs, NaN) + push!(solver, optimizer_name) + push!(retcode, :LOAD_FAILED) + end + finally + if nlp_prob !== nothing + try + finalize(nlp_prob) + catch e + end + end + end + end + GC.gc() + @info "Completed chunk, memory usage cleaned up" + end + return DataFrame(problem = problem, n_vars = n_vars, secs = secs, solver = solver, retcode = retcode) +end + +unc_problems = collect(CUTEst.select_sif_problems(contype="unc")) +println("Number of problems: ", length(unc_problems)) +println("First 5 problems: ", unc_problems[1:min(5, end)]) +unc_problems = unc_problems[1:min(50, length(unc_problems))] +println("Limited to ", length(unc_problems), " problems for comprehensive testing") +unc_results = run_benchmarks(unc_problems, optimizers) +@show unc_results +successful_codes = [:Success, :MaxIters, :MaxTime, :FirstOrderOptimal] +successful_results = filter(row -> row.retcode in successful_codes, unc_results) +total_attempts = nrow(unc_results) +successful_attempts = nrow(successful_results) +success_rate = total_attempts > 0 ? round(successful_attempts / total_attempts * 100, digits=1) : 0 +println("SUCCESS RATE ANALYSIS:") +println("Total attempts: ", total_attempts) +println("Successful attempts: ", successful_attempts) +println("Success rate: ", success_rate, "%") +println("Return code distribution:") +if total_attempts > 0 + for (code, count) in sort(collect(pairs(countmap(unc_results.retcode))), by=x->x[2], rev=true) + println(" ", code, ": ", count, " occurrences") + end +else + println(" No results to analyze") +end +@df unc_results scatter(:n_vars, :secs, + group = :solver, + xlabel = "n. variables", + ylabel = "secs.", + title = "Time to solution by optimizer and number of vars", + ) +``` + + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/OptimizationCUTEst/Manifest.toml b/benchmarks/OptimizationCUTEst/Manifest.toml new file mode 100644 index 000000000..9167e85ae --- /dev/null +++ b/benchmarks/OptimizationCUTEst/Manifest.toml @@ -0,0 +1,2979 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.10.10" +manifest_format = "2.0" +project_hash = "33ef9dbe1bab6b23ef14b831494acfe1858f57fa" + +[[deps.ADTypes]] +git-tree-sha1 = "7927b9af540ee964cc5d1b73293f1eb0b761a3a1" +uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" +version = "1.16.0" +weakdeps = ["ChainRulesCore", "ConstructionBase", "EnzymeCore"] + + [deps.ADTypes.extensions] + ADTypesChainRulesCoreExt = "ChainRulesCore" + ADTypesConstructionBaseExt = "ConstructionBase" + ADTypesEnzymeCoreExt = "EnzymeCore" + +[[deps.ASL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6252039f98492252f9e47c312c8ffda0e3b9e78d" +uuid = "ae81ac8f-d209-56e5-92de-9978fef736f9" +version = "0.1.3+0" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" +weakdeps = ["ChainRulesCore", "Test"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + +[[deps.AbstractTrees]] +git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" +uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" +version = "0.4.5" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.42" + + [deps.Accessors.extensions] + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] + + [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" + AdaptStaticArraysExt = "StaticArrays" + +[[deps.AliasTables]] +deps = ["PtrArrays", "Random"] +git-tree-sha1 = "9876e1e164b144ca45e9e3198d0b689cadfed9ff" +uuid = "66dad0bd-aa9a-41b7-9441-69ab47430ed8" +version = "1.1.3" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.ArnoldiMethod]] +deps = ["LinearAlgebra", "Random", "StaticArrays"] +git-tree-sha1 = "d57bd3762d308bded22c3b82d033bff85f6195c6" +uuid = "ec485272-7323-5ecc-a04f-4719b315124d" +version = "0.4.0" + +[[deps.Arpack]] +deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"] +git-tree-sha1 = "9b9b347613394885fd1c8c7729bfc60528faa436" +uuid = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" +version = "0.5.4" + +[[deps.Arpack_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS_jll", "Pkg"] +git-tree-sha1 = "5ba6c757e8feccf03a1554dfaf3e26b3cfc7fd5e" +uuid = "68821587-b530-5797-8361-c406ea357684" +version = "3.5.1+1" + +[[deps.ArrayInterface]] +deps = ["Adapt", "LinearAlgebra"] +git-tree-sha1 = "9606d7832795cbef89e06a550475be300364a8aa" +uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" +version = "7.19.0" + + [deps.ArrayInterface.extensions] + ArrayInterfaceBandedMatricesExt = "BandedMatrices" + ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" + ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceCUDSSExt = "CUDSS" + ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" + ArrayInterfaceChainRulesExt = "ChainRules" + ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceReverseDiffExt = "ReverseDiff" + ArrayInterfaceSparseArraysExt = "SparseArrays" + ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" + ArrayInterfaceTrackerExt = "Tracker" + + [deps.ArrayInterface.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra", "StaticArrays"] +git-tree-sha1 = "120e392af69350960b1d3b89d41dcc1d66543858" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.11.2" +weakdeps = ["SparseArrays"] + + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "01b8ccb13d68535d73d2b0c23e39bd23155fb712" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.1.0" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.BenchmarkTools]] +deps = ["Compat", "JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] +git-tree-sha1 = "e38fbc49a620f5d0b660d7f543db1009fe0f8336" +uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" +version = "1.6.0" + +[[deps.Bijections]] +git-tree-sha1 = "a2d308fcd4c2fb90e943cf9cd2fbfa9c32b69733" +uuid = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04" +version = "0.2.2" + +[[deps.BitFlags]] +git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" +uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" +version = "0.1.9" + +[[deps.BitTwiddlingConvenienceFunctions]] +deps = ["Static"] +git-tree-sha1 = "f21cfd4950cb9f0587d5067e69405ad2acd27b87" +uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" +version = "0.1.6" + +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "291532989f81db780e435452ccb2a5f902ff665f" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "1.7.0" + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" + + [deps.BlockArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + +[[deps.BracketingNonlinearSolve]] +deps = ["CommonSolve", "ConcreteStructs", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "a9014924595b7a2c1dd14aac516e38fa10ada656" +uuid = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e" +version = "1.3.0" +weakdeps = ["ChainRulesCore", "ForwardDiff"] + + [deps.BracketingNonlinearSolve.extensions] + BracketingNonlinearSolveChainRulesCoreExt = ["ChainRulesCore", "ForwardDiff"] + BracketingNonlinearSolveForwardDiffExt = "ForwardDiff" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1b96ea4a01afe0ea4090c5c8039690672dd13f2e" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.9+0" + +[[deps.CPUSummary]] +deps = ["CpuId", "IfElse", "PrecompileTools", "Static"] +git-tree-sha1 = "5a97e67919535d6841172016c9530fd69494e5ec" +uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" +version = "0.2.6" + +[[deps.CUTEst]] +deps = ["CUTEst_jll", "DataStructures", "JSON", "LazyArtifacts", "Libdl", "LinearAlgebra", "NLPModels", "Printf", "Quadmath", "REPL", "SIFDecode_jll", "SparseArrays"] +git-tree-sha1 = "de10348b171129c09fddc1d7c8bfe44972878cfa" +uuid = "1b53aba6-35b6-5f92-a507-53c67d53f819" +version = "1.3.2" + +[[deps.CUTEst_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1adb4f88d44364503a94b051eaf8f35596086ebe" +uuid = "bb5f6f25-f23d-57fd-8f90-3ef7bad1d825" +version = "2.5.3+0" + +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.18.5+0" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "06ee8d1aa558d2833aa799f6f0b31b30cada405f" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.25.2" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.CloseOpenIntervals]] +deps = ["Static", "StaticArrayInterface"] +git-tree-sha1 = "05ba0d07cd4fd8b7a39541e31a7b0254704ea581" +uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" +version = "0.1.13" + +[[deps.Clustering]] +deps = ["Distances", "LinearAlgebra", "NearestNeighbors", "Printf", "Random", "SparseArrays", "Statistics", "StatsBase"] +git-tree-sha1 = "3e22db924e2945282e70c33b75d4dde8bfa44c94" +uuid = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5" +version = "0.15.8" + +[[deps.CodecBzip2]] +deps = ["Bzip2_jll", "TranscodingStreams"] +git-tree-sha1 = "84990fa864b7f2b4901901ca12736e45ee79068c" +uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd" +version = "0.8.5" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.8" + +[[deps.ColorSchemes]] +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] +git-tree-sha1 = "a656525c8b46aa6a1c76891552ed5381bb32ae7b" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.30.0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.12.1" + + [deps.ColorTypes.extensions] + StyledStringsExt = "StyledStrings" + + [deps.ColorTypes.weakdeps] + StyledStrings = "f489334b-da3d-4c2e-b8f0-e476e12c162b" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] +git-tree-sha1 = "8b3b6f87ce8f65a2b4f857528fd8d70086cd72b1" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.11.0" +weakdeps = ["SpecialFunctions"] + + [deps.ColorVectorSpace.extensions] + SpecialFunctionsExt = "SpecialFunctions" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "37ea44092930b1811e666c3bc38065d7d87fcc74" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.13.1" + +[[deps.Combinatorics]] +git-tree-sha1 = "8010b6bb3388abe68d95743dcbea77650bb2eddf" +uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +version = "1.0.3" + +[[deps.CommonMark]] +deps = ["PrecompileTools"] +git-tree-sha1 = "351d6f4eaf273b753001b2de4dffb8279b100769" +uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" +version = "0.9.1" + +[[deps.CommonSolve]] +git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" +uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" +version = "0.2.4" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.1" + +[[deps.CommonWorldInvalidations]] +git-tree-sha1 = "ae52d1c52048455e85a387fbee9be553ec2b68d0" +uuid = "f70d9fcc-98c5-4d4a-abd7-e4cdeebd8ca8" +version = "1.0.0" + +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "0037835448781bb46feb39866934e243886d756a" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.18.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.1.1+0" + +[[deps.CompositeTypes]] +git-tree-sha1 = "bce26c3dab336582805503bed209faab1c279768" +uuid = "b152e2b5-7a66-4b01-a709-34e65c35f657" +version = "0.1.4" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConcreteStructs]] +git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" +uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" +version = "0.2.3" + +[[deps.ConcurrentUtilities]] +deps = ["Serialization", "Sockets"] +git-tree-sha1 = "d9d26935a0bcffc87d2613ce14c527c99fc543fd" +uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" +version = "2.5.0" + +[[deps.Conda]] +deps = ["Downloads", "JSON", "VersionParsing"] +git-tree-sha1 = "b19db3927f0db4151cb86d073689f2428e524576" +uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" +version = "1.10.2" + +[[deps.ConsoleProgressMonitor]] +deps = ["Logging", "ProgressMeter"] +git-tree-sha1 = "3ab7b2136722890b9af903859afcf457fa3059e8" +uuid = "88cd18e8-d9cc-4ea6-8889-5259c0d15c8b" +version = "0.1.2" + +[[deps.ConstructionBase]] +git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.6.0" +weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + +[[deps.Contour]] +git-tree-sha1 = "439e35b0b36e2e5881738abc8857bd92ad6ff9a8" +uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" +version = "0.6.3" + +[[deps.CpuId]] +deps = ["Markdown"] +git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" +uuid = "adafc99b-e345-5852-983c-f28acb93d879" +version = "0.3.1" + +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[deps.DataFrames]] +deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] +git-tree-sha1 = "fb61b4812c49343d7ef0b533ba982c46021938a6" +uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +version = "1.7.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.22" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.Dbus_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "473e9afc9cf30814eb67ffa5f2db7df82c3ad9fd" +uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" +version = "1.16.2+0" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" +version = "1.9.1" + +[[deps.DiffEqBase]] +deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "9782d43bd23a405f7ab06e2cbb4cec267b37d12f" +uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" +version = "6.181.0" + + [deps.DiffEqBase.extensions] + DiffEqBaseCUDAExt = "CUDA" + DiffEqBaseChainRulesCoreExt = "ChainRulesCore" + DiffEqBaseDistributionsExt = "Distributions" + DiffEqBaseEnzymeExt = ["ChainRulesCore", "Enzyme"] + DiffEqBaseForwardDiffExt = ["ForwardDiff"] + DiffEqBaseGTPSAExt = "GTPSA" + DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" + DiffEqBaseMPIExt = "MPI" + DiffEqBaseMeasurementsExt = "Measurements" + DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseMooncakeExt = "Mooncake" + DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseSparseArraysExt = "SparseArrays" + DiffEqBaseTrackerExt = "Tracker" + DiffEqBaseUnitfulExt = "Unitful" + + [deps.DiffEqBase.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" + GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.DiffEqCallbacks]] +deps = ["ConcreteStructs", "DataStructures", "DiffEqBase", "DifferentiationInterface", "Functors", "LinearAlgebra", "Markdown", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "80a782f3e65d4900dcf5f2cb71f5e19d9459c04a" +uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" +version = "4.8.0" + +[[deps.DiffEqNoiseProcess]] +deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "ResettableStacks", "SciMLBase", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "516d553f5deee7c55b2945b5edf05b6542837887" +uuid = "77a26b50-5914-5dd7-bc55-306e6241c503" +version = "5.24.1" + + [deps.DiffEqNoiseProcess.extensions] + DiffEqNoiseProcessReverseDiffExt = "ReverseDiff" + + [deps.DiffEqNoiseProcess.weakdeps] + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.DifferentiationInterface]] +deps = ["ADTypes", "LinearAlgebra"] +git-tree-sha1 = "54d7b8c74408048aea9c055ac8573b2b5c5ec11f" +uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" +version = "0.7.4" + + [deps.DifferentiationInterface.extensions] + DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" + DifferentiationInterfaceDiffractorExt = "Diffractor" + DifferentiationInterfaceEnzymeExt = ["EnzymeCore", "Enzyme"] + DifferentiationInterfaceFastDifferentiationExt = "FastDifferentiation" + DifferentiationInterfaceFiniteDiffExt = "FiniteDiff" + DifferentiationInterfaceFiniteDifferencesExt = "FiniteDifferences" + DifferentiationInterfaceForwardDiffExt = ["ForwardDiff", "DiffResults"] + DifferentiationInterfaceGPUArraysCoreExt = "GPUArraysCore" + DifferentiationInterfaceGTPSAExt = "GTPSA" + DifferentiationInterfaceMooncakeExt = "Mooncake" + DifferentiationInterfacePolyesterForwardDiffExt = ["PolyesterForwardDiff", "ForwardDiff", "DiffResults"] + DifferentiationInterfaceReverseDiffExt = ["ReverseDiff", "DiffResults"] + DifferentiationInterfaceSparseArraysExt = "SparseArrays" + DifferentiationInterfaceSparseConnectivityTracerExt = "SparseConnectivityTracer" + DifferentiationInterfaceSparseMatrixColoringsExt = "SparseMatrixColorings" + DifferentiationInterfaceStaticArraysExt = "StaticArrays" + DifferentiationInterfaceSymbolicsExt = "Symbolics" + DifferentiationInterfaceTrackerExt = "Tracker" + DifferentiationInterfaceZygoteExt = ["Zygote", "ForwardDiff"] + + [deps.DifferentiationInterface.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" + Diffractor = "9f5e2b26-1114-432f-b630-d3fe2085c51c" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + FastDifferentiation = "eb9bf01b-bf85-4b60-bf87-ee5de06c00be" + FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" + FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" + SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.DispatchDoctor]] +deps = ["MacroTools", "Preferences"] +git-tree-sha1 = "fc34127e78323c49984e1a146d577d0f890dd2b4" +uuid = "8d63f2c5-f18a-4cf2-ba9d-b3f60fc568c8" +version = "0.4.26" +weakdeps = ["ChainRulesCore", "EnzymeCore"] + + [deps.DispatchDoctor.extensions] + DispatchDoctorChainRulesCoreExt = "ChainRulesCore" + DispatchDoctorEnzymeCoreExt = "EnzymeCore" + +[[deps.Distances]] +deps = ["LinearAlgebra", "Statistics", "StatsAPI"] +git-tree-sha1 = "c7e3a542b999843086e2f29dac96a618c105be1d" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.12" +weakdeps = ["ChainRulesCore", "SparseArrays"] + + [deps.Distances.extensions] + DistancesChainRulesCoreExt = "ChainRulesCore" + DistancesSparseArraysExt = "SparseArrays" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] +git-tree-sha1 = "3e6d038b77f22791b8e3472b7c633acea1ecac06" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.120" + + [deps.Distributions.extensions] + DistributionsChainRulesCoreExt = "ChainRulesCore" + DistributionsDensityInterfaceExt = "DensityInterface" + DistributionsTestExt = "Test" + + [deps.Distributions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.DocStringExtensions]] +git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.5" + +[[deps.DomainSets]] +deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "StaticArrays"] +git-tree-sha1 = "c249d86e97a7e8398ce2068dce4c078a1c3464de" +uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" +version = "0.7.16" + + [deps.DomainSets.extensions] + DomainSetsMakieExt = "Makie" + DomainSetsRandomExt = "Random" + + [deps.DomainSets.weakdeps] + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.DynamicPolynomials]] +deps = ["Future", "LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Reexport", "Test"] +git-tree-sha1 = "98c4bb95af37e5d980129261fdd6dab0392c6607" +uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07" +version = "0.6.2" + +[[deps.DynamicQuantities]] +deps = ["DispatchDoctor", "PrecompileTools", "TestItems", "Tricks"] +git-tree-sha1 = "44ec2bcde862031866a9f43ee477eaa1ddb0cccc" +uuid = "06fc5a27-2a28-4c7c-a15d-362465fb6821" +version = "1.8.0" + + [deps.DynamicQuantities.extensions] + DynamicQuantitiesLinearAlgebraExt = "LinearAlgebra" + DynamicQuantitiesMeasurementsExt = "Measurements" + DynamicQuantitiesScientificTypesExt = "ScientificTypes" + DynamicQuantitiesUnitfulExt = "Unitful" + + [deps.DynamicQuantities.weakdeps] + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + ScientificTypes = "321657f4-b219-11e9-178b-2701a2544e81" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.EnumX]] +git-tree-sha1 = "bddad79635af6aec424f53ed8aad5d7555dc6f00" +uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" +version = "1.0.5" + +[[deps.EnzymeCore]] +git-tree-sha1 = "8272a687bca7b5c601c0c24fc0c71bff10aafdfd" +uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" +version = "0.8.12" +weakdeps = ["Adapt"] + + [deps.EnzymeCore.extensions] + AdaptExt = "Adapt" + +[[deps.EpollShim_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8a4be429317c42cfae6a7fc03c31bad1970c310d" +uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" +version = "0.0.20230411+1" + +[[deps.ExceptionUnwrapping]] +deps = ["Test"] +git-tree-sha1 = "d36f682e590a83d63d1c7dbd287573764682d12a" +uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" +version = "0.1.11" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "d55dffd9ae73ff72f1c0482454dcf2ec6c6c4a63" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.6.5+0" + +[[deps.ExprTools]] +git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" +uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" +version = "0.1.10" + +[[deps.ExproniconLite]] +git-tree-sha1 = "c13f0b150373771b0fdc1713c97860f8df12e6c2" +uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" +version = "0.10.14" + +[[deps.FFMPEG]] +deps = ["FFMPEG_jll"] +git-tree-sha1 = "83dc665d0312b41367b7263e8a4d172eac1897f4" +uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" +version = "0.4.4" + +[[deps.FFMPEG_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "3a948313e7a41eb1db7a1e733e6335f17b4ab3c4" +uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" +version = "7.1.1+0" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "797762812ed063b9b94f6cc7742bc8883bb5e69e" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.9.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6d6219a004b8cf1e0b4dbe27a2860b8e04eba0be" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.11+0" + +[[deps.FastBroadcast]] +deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] +git-tree-sha1 = "ab1b34570bcdf272899062e1a56285a53ecaae08" +uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" +version = "0.3.5" + +[[deps.FastClosures]] +git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" +uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" +version = "0.3.2" + +[[deps.FastPower]] +git-tree-sha1 = "5f7afd4b1a3969dc34d692da2ed856047325b06e" +uuid = "a4df4552-cc26-4903-aec0-212e50a0e84b" +version = "1.1.3" + + [deps.FastPower.extensions] + FastPowerEnzymeExt = "Enzyme" + FastPowerForwardDiffExt = "ForwardDiff" + FastPowerMeasurementsExt = "Measurements" + FastPowerMonteCarloMeasurementsExt = "MonteCarloMeasurements" + FastPowerMooncakeExt = "Mooncake" + FastPowerReverseDiffExt = "ReverseDiff" + FastPowerTrackerExt = "Tracker" + + [deps.FastPower.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.13.0" +weakdeps = ["PDMats", "SparseArrays", "Statistics"] + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + +[[deps.FindFirstFunctions]] +git-tree-sha1 = "670e1d9ceaa4a3161d32fe2d2fb2177f8d78b330" +uuid = "64ca27bc-2ba2-4a57-88aa-44e436879224" +version = "1.4.1" + +[[deps.FiniteDiff]] +deps = ["ArrayInterface", "LinearAlgebra", "Setfield"] +git-tree-sha1 = "f089ab1f834470c525562030c8cfde4025d5e915" +uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" +version = "2.27.0" + + [deps.FiniteDiff.extensions] + FiniteDiffBandedMatricesExt = "BandedMatrices" + FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" + FiniteDiffSparseArraysExt = "SparseArrays" + FiniteDiffStaticArraysExt = "StaticArrays" + + [deps.FiniteDiff.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.5" + +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] +git-tree-sha1 = "301b5d5d731a0654825f1f2e906990f7141a106b" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.16.0+0" + +[[deps.Format]] +git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" +uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" +version = "1.3.7" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "1.0.1" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "2c5512e11c791d1baed2049c5652441b28fc6a31" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.13.4+0" + +[[deps.FriBidi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "7a214fdac5ed5f59a22c2d9a885a16da1c74bbc7" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.17+0" + +[[deps.FunctionWrappers]] +git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" +uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" +version = "1.1.3" + +[[deps.FunctionWrappersWrappers]] +deps = ["FunctionWrappers"] +git-tree-sha1 = "b104d487b34566608f8b4e1c39fb0b10aa279ff8" +uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" +version = "0.1.3" + +[[deps.Functors]] +deps = ["Compat", "ConstructionBase", "LinearAlgebra", "Random"] +git-tree-sha1 = "60a0339f28a233601cb74468032b5c302d5067de" +uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" +version = "0.5.2" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.GLFW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] +git-tree-sha1 = "fcb0584ff34e25155876418979d4c8971243bb89" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.4.0+2" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.2.0" + +[[deps.GR]] +deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] +git-tree-sha1 = "1828eb7275491981fa5f1752a5e126e8f26f8741" +uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" +version = "0.73.17" + +[[deps.GR_jll]] +deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "27299071cc29e409488ada41ec7643e0ab19091f" +uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" +version = "0.73.17+0" + +[[deps.GettextRuntime_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll"] +git-tree-sha1 = "45288942190db7c5f760f59c04495064eedf9340" +uuid = "b0724c58-0f36-5564-988d-3bb0596ebc4a" +version = "0.22.4+0" + +[[deps.Git]] +deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"] +git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c" +uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" +version = "1.4.0" + +[[deps.Git_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "cb151153e40ad40a6dbf984fcd767e1d266fcc9c" +uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" +version = "2.50.1+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "GettextRuntime_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "35fbd0cefb04a516104b8e183ce0df11b70a3f1a" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.84.3+0" + +[[deps.Glob]] +git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" +uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" +version = "1.3.1" + +[[deps.Graphite2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8a6dbda1fd736d60cc477d99f2e7a042acfa46e8" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.15+0" + +[[deps.Graphs]] +deps = ["ArnoldiMethod", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] +git-tree-sha1 = "c5abfa0ae0aaee162a3fbb053c13ecda39be545b" +uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" +version = "1.13.0" + +[[deps.Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "ed5e9c58612c4e081aecdb6e1a479e18462e041e" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.10.17" + +[[deps.HarfBuzz_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] +git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "8.5.1+0" + +[[deps.Highlights]] +deps = ["DocStringExtensions", "InteractiveUtils", "REPL"] +git-tree-sha1 = "9e13b8d8b1367d9692a90ea4711b4278e4755c32" +uuid = "eafb193a-b7ab-5a9e-9068-77385905fa72" +version = "0.5.3" + +[[deps.Hwloc_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "92f65c4d78ce8cdbb6b68daf88889950b0a99d11" +uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" +version = "2.12.1+0" + +[[deps.HypergeometricFunctions]] +deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] +git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.28" + +[[deps.IJulia]] +deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Logging", "Markdown", "Pkg", "Printf", "REPL", "Random", "SHA", "SoftGlobalScope", "UUIDs", "ZMQ"] +git-tree-sha1 = "016d15e5d186b2dd59ff96e05cb13eea542b54f6" +uuid = "7073ff75-c697-5162-941a-fcdaad2a7d2a" +version = "1.29.2" + +[[deps.IfElse]] +git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" +uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" +version = "0.1.1" + +[[deps.ImplicitDiscreteSolve]] +deps = ["DiffEqBase", "OrdinaryDiffEqCore", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SymbolicIndexingInterface", "UnPack"] +git-tree-sha1 = "1d49fec0d4d325f7ce56e6bd1fa7cbed24a54064" +uuid = "3263718b-31ed-49cf-8a0f-35a466e8af96" +version = "0.1.3" + +[[deps.Inflate]] +git-tree-sha1 = "d1b1b796e47d94588b3757fe84fbf65a5ec4a80d" +uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" +version = "0.1.5" + +[[deps.InlineStrings]] +git-tree-sha1 = "8594fac023c5ce1ef78260f24d1ad18b4327b420" +uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" +version = "1.4.4" + + [deps.InlineStrings.extensions] + ArrowTypesExt = "ArrowTypes" + ParsersExt = "Parsers" + + [deps.InlineStrings.weakdeps] + ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" + Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "4c1acff2dc6b6967e7e750633c50bc3b8d83e617" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.3" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "ec1debd61c300961f98064cfb21287613ad7f303" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2025.2.0+0" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.Interpolations]] +deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "88a101217d7cb38a7b481ccd50d21876e1d1b0e0" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.15.1" +weakdeps = ["Unitful"] + + [deps.Interpolations.extensions] + InterpolationsUnitfulExt = "Unitful" + +[[deps.IntervalSets]] +git-tree-sha1 = "5fbb102dcb8b1a858111ae81d56682376130517d" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.7.11" +weakdeps = ["Random", "RecipesBase", "Statistics"] + + [deps.IntervalSets.extensions] + IntervalSetsRandomExt = "Random" + IntervalSetsRecipesBaseExt = "RecipesBase" + IntervalSetsStatisticsExt = "Statistics" + +[[deps.InverseFunctions]] +git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.17" +weakdeps = ["Dates", "Test"] + + [deps.InverseFunctions.extensions] + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" + +[[deps.InvertedIndices]] +git-tree-sha1 = "6da3c4316095de0f5ee2ebd875df8721e7e0bdbe" +uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" +version = "1.3.1" + +[[deps.Ipopt]] +deps = ["Ipopt_jll", "LinearAlgebra", "OpenBLAS32_jll", "PrecompileTools"] +git-tree-sha1 = "4ad0d2dea51e5d49866b40a2d2521da6a1be7097" +uuid = "b6b21f68-93f8-5de0-b562-5493be1d77c9" +version = "1.10.6" +weakdeps = ["MathOptInterface"] + + [deps.Ipopt.extensions] + IpoptMathOptInterfaceExt = "MathOptInterface" + +[[deps.Ipopt_jll]] +deps = ["ASL_jll", "Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "MUMPS_seq_jll", "SPRAL_jll", "libblastrampoline_jll"] +git-tree-sha1 = "1bb978524c2837be596aeb2b69951feb6b9822f8" +uuid = "9cc047cb-c261-5740-88fc-0cf96f7bdcc7" +version = "300.1400.1701+0" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.4" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLFzf]] +deps = ["REPL", "Random", "fzf_jll"] +git-tree-sha1 = "82f7acdc599b65e0f8ccd270ffa1467c21cb647b" +uuid = "1019f520-868f-41f5-a6de-eb00f4b6a39c" +version = "0.1.11" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.7.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.4" + +[[deps.JSON3]] +deps = ["Dates", "Mmap", "Parsers", "PrecompileTools", "StructTypes", "UUIDs"] +git-tree-sha1 = "411eccfe8aba0814ffa0fdf4860913ed09c34975" +uuid = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" +version = "1.14.3" + + [deps.JSON3.extensions] + JSON3ArrowExt = ["ArrowTypes"] + + [deps.JSON3.weakdeps] + ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" + +[[deps.Jieko]] +deps = ["ExproniconLite"] +git-tree-sha1 = "2f05ed29618da60c06a87e9c033982d4f71d0b6c" +uuid = "ae98c720-c025-4a4a-838c-29b094483192" +version = "0.2.1" + +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "eac1206917768cb54957c65a615460d87b455fc1" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "3.1.1+0" + +[[deps.JuliaFormatter]] +deps = ["CommonMark", "Glob", "JuliaSyntax", "PrecompileTools", "TOML"] +git-tree-sha1 = "f512fefd5fdc7dd1ca05778f08f91e9e4c9fdc37" +uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" +version = "2.1.6" + +[[deps.JuliaSyntax]] +git-tree-sha1 = "937da4713526b96ac9a178e2035019d3b78ead4a" +uuid = "70703baa-626e-46a2-a12c-08ffd08c73b4" +version = "0.4.10" + +[[deps.JumpProcesses]] +deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "SymbolicIndexingInterface", "UnPack"] +git-tree-sha1 = "f8da88993c914357031daf0023f18748ff473924" +uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" +version = "9.16.1" +weakdeps = ["FastBroadcast"] + +[[deps.KernelDensity]] +deps = ["Distributions", "DocStringExtensions", "FFTW", "Interpolations", "StatsBase"] +git-tree-sha1 = "ba51324b894edaf1df3ab16e2cc6bc3280a2f1a7" +uuid = "5ab0869b-81aa-558d-bb23-cbf5423bbe9b" +version = "0.6.10" + +[[deps.Krylov]] +deps = ["LinearAlgebra", "Printf", "SparseArrays"] +git-tree-sha1 = "b94257a1a8737099ca40bc7271a8b374033473ed" +uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" +version = "0.10.1" + +[[deps.LAME_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "059aabebaa7c82ccb853dd4a0ee9d17796f7e1bc" +uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" +version = "3.100.3+0" + +[[deps.LBFGSB]] +deps = ["L_BFGS_B_jll"] +git-tree-sha1 = "e2e6f53ee20605d0ea2be473480b7480bd5091b5" +uuid = "5be7bae1-8223-5378-bac3-9e7378a2f6e6" +version = "0.4.1" + +[[deps.LERC_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "aaafe88dccbd957a8d82f7d05be9b69172e0cee3" +uuid = "88015f11-f218-50d7-93a8-a6af411a945d" +version = "4.0.1+0" + +[[deps.LLVMOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "eb62a3deb62fc6d8822c0c4bef73e4412419c5d8" +uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" +version = "18.1.8+0" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1c602b1127f4751facb671441ca72715cc95938a" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.3+0" + +[[deps.L_BFGS_B_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "77feda930ed3f04b2b0fbb5bea89e69d3677c6b0" +uuid = "81d17ec3-03a1-5e46-b53e-bddc35a13473" +version = "3.0.1+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.4.0" + +[[deps.Latexify]] +deps = ["Format", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] +git-tree-sha1 = "4f34eaabe49ecb3fb0d58d6015e32fd31a733199" +uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +version = "0.16.8" + + [deps.Latexify.extensions] + DataFramesExt = "DataFrames" + SparseArraysExt = "SparseArrays" + SymEngineExt = "SymEngine" + TectonicExt = "tectonic_jll" + + [deps.Latexify.weakdeps] + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" + tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" + +[[deps.LayoutPointers]] +deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] +git-tree-sha1 = "a9eaadb366f5493a5654e843864c13d8b107548c" +uuid = "10f19ff3-798f-405d-979b-55457f8fc047" +version = "0.1.17" + +[[deps.LazyArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"] +git-tree-sha1 = "76627adb8c542c6b73f68d4bfd0aa71c9893a079" +uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02" +version = "2.6.2" + + [deps.LazyArrays.extensions] + LazyArraysBandedMatricesExt = "BandedMatrices" + LazyArraysBlockArraysExt = "BlockArrays" + LazyArraysBlockBandedMatricesExt = "BlockBandedMatrices" + LazyArraysStaticArraysExt = "StaticArrays" + + [deps.LazyArrays.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LeftChildRightSiblingTrees]] +deps = ["AbstractTrees"] +git-tree-sha1 = "95ba48564903b43b2462318aa243ee79d81135ff" +uuid = "1d6d02ad-be62-4b6b-8a6d-2f90e265016e" +version = "0.2.1" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.4" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "8.4.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.11.0+1" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.4.7+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "d36c21b9e7c172a44a10484125024495e2625ac0" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.7.1+1" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "be484f5c92fad0bd8acfef35fe017900b0b73809" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.18.0+0" + +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "a31572773ac1b745e0343fe5e2c8ddda7a37e997" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.41.0+0" + +[[deps.Libtiff_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "4ab7581296671007fc33f07a721631b8855f4b1d" +uuid = "89763e89-9b03-5906-acba-b20f662cd828" +version = "4.7.1+0" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "321ccef73a96ba828cd51f2ab5b9f917fa73945a" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.41.0+0" + +[[deps.LineSearch]] +deps = ["ADTypes", "CommonSolve", "ConcreteStructs", "FastClosures", "LinearAlgebra", "MaybeInplace", "SciMLBase", "SciMLJacobianOperators", "StaticArraysCore"] +git-tree-sha1 = "97d502765cc5cf3a722120f50da03c2474efce04" +uuid = "87fe0de2-c867-4266-b59a-2f0a94fc965b" +version = "0.1.4" +weakdeps = ["LineSearches"] + + [deps.LineSearch.extensions] + LineSearchLineSearchesExt = "LineSearches" + +[[deps.LineSearches]] +deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] +git-tree-sha1 = "4adee99b7262ad2a1a4bbbc59d993d24e55ea96f" +uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" +version = "7.4.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LinearOperators]] +deps = ["FastClosures", "LinearAlgebra", "Printf", "Requires", "SparseArrays", "TimerOutputs"] +git-tree-sha1 = "1894a798ed8887895c5ae70f1fe8331c0c1d8480" +uuid = "5c8ed15e-5a4c-59e4-a42b-c7e8811fb125" +version = "2.10.0" + + [deps.LinearOperators.extensions] + LinearOperatorsAMDGPUExt = "AMDGPU" + LinearOperatorsCUDAExt = "CUDA" + LinearOperatorsChainRulesCoreExt = "ChainRulesCore" + LinearOperatorsJLArraysExt = "JLArrays" + LinearOperatorsLDLFactorizationsExt = "LDLFactorizations" + LinearOperatorsMetalExt = "Metal" + + [deps.LinearOperators.weakdeps] + AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb" + LDLFactorizations = "40e66cde-538c-5869-a4ad-c39174c6795b" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + +[[deps.LinearSolve]] +deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "StaticArraysCore", "UnPack"] +git-tree-sha1 = "639bdab552800d0639fb5878c65e80ce7b034daf" +uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" +version = "3.25.0" + + [deps.LinearSolve.extensions] + LinearSolveBLISExt = ["blis_jll", "LAPACK_jll"] + LinearSolveBandedMatricesExt = "BandedMatrices" + LinearSolveBlockDiagonalsExt = "BlockDiagonals" + LinearSolveCUDAExt = "CUDA" + LinearSolveCUDSSExt = "CUDSS" + LinearSolveCUSOLVERRFExt = ["CUSOLVERRF", "SparseArrays"] + LinearSolveEnzymeExt = "EnzymeCore" + LinearSolveFastAlmostBandedMatricesExt = "FastAlmostBandedMatrices" + LinearSolveFastLapackInterfaceExt = "FastLapackInterface" + LinearSolveForwardDiffExt = "ForwardDiff" + LinearSolveHYPREExt = "HYPRE" + LinearSolveIterativeSolversExt = "IterativeSolvers" + LinearSolveKernelAbstractionsExt = "KernelAbstractions" + LinearSolveKrylovKitExt = "KrylovKit" + LinearSolveMetalExt = "Metal" + LinearSolvePardisoExt = ["Pardiso", "SparseArrays"] + LinearSolveRecursiveFactorizationExt = "RecursiveFactorization" + LinearSolveSparseArraysExt = "SparseArrays" + LinearSolveSparspakExt = ["SparseArrays", "Sparspak"] + + [deps.LinearSolve.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" + CUSOLVERRF = "a8cc9031-bad2-4722-94f5-40deabb4245c" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + FastAlmostBandedMatrices = "9d29842c-ecb8-4973-b1e9-a27b1157504e" + FastLapackInterface = "29a986be-02c6-4525-aec4-84b980013641" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" + IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" + LAPACK_jll = "51474c39-65e3-53ba-86ba-03b1b862ec14" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" + RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac" + blis_jll = "6136c539-28a5-5bf0-87cc-b183200dce32" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.29" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "f02b56007b064fbfddb4c9cd60161b6dd0f40df3" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.1.0" + +[[deps.METIS_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "2eefa8baa858871ae7770c98c3c2a7e46daba5b4" +uuid = "d00139f3-1899-568f-a2f0-47f597d42d70" +version = "5.1.3+0" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] +git-tree-sha1 = "282cadc186e7b2ae0eeadbd7a4dffed4196ae2aa" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2025.2.0+0" + +[[deps.MLStyle]] +git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" +uuid = "d8e11817-5142-5d16-987a-aa16d5891078" +version = "0.4.17" + +[[deps.MUMPS_seq_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "libblastrampoline_jll"] +git-tree-sha1 = "196f61d99adc06f32c32bc4afe5298d9b1e862c8" +uuid = "d7ed1dd3-d0ae-5e8e-bfb4-87a502085b8d" +version = "500.800.0+0" + +[[deps.MacroTools]] +git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.16" + +[[deps.ManualMemory]] +git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" +uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" +version = "0.1.8" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MathOptInterface]] +deps = ["BenchmarkTools", "CodecBzip2", "CodecZlib", "DataStructures", "ForwardDiff", "JSON3", "LinearAlgebra", "MutableArithmetics", "NaNMath", "OrderedCollections", "PrecompileTools", "Printf", "SparseArrays", "SpecialFunctions", "Test"] +git-tree-sha1 = "ce5a316de39941da67730ffec38e5396f7504853" +uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" +version = "1.42.1" + +[[deps.MaybeInplace]] +deps = ["ArrayInterface", "LinearAlgebra", "MacroTools"] +git-tree-sha1 = "54e2fdc38130c05b42be423e90da3bade29b74bd" +uuid = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb" +version = "0.1.4" +weakdeps = ["SparseArrays"] + + [deps.MaybeInplace.extensions] + MaybeInplaceSparseArraysExt = "SparseArrays" + +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] +git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.9" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.2+1" + +[[deps.Measures]] +git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" +uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" +version = "0.3.2" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.2.0" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.ModelingToolkit]] +deps = ["ADTypes", "AbstractTrees", "ArrayInterface", "BlockArrays", "ChainRulesCore", "Combinatorics", "CommonSolve", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffEqNoiseProcess", "DiffRules", "DifferentiationInterface", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "DynamicQuantities", "EnumX", "ExprTools", "FindFirstFunctions", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "Graphs", "ImplicitDiscreteSolve", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "Moshi", "NaNMath", "NonlinearSolve", "OffsetArrays", "OrderedCollections", "OrdinaryDiffEqCore", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SCCNonlinearSolve", "SciMLBase", "SciMLPublic", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] +git-tree-sha1 = "20d3a59dd3c470acadc91ff5669f4398e317b1b0" +uuid = "961ee093-0014-501f-94e3-6117800e7a78" +version = "10.14.0" + + [deps.ModelingToolkit.extensions] + MTKBifurcationKitExt = "BifurcationKit" + MTKCasADiDynamicOptExt = "CasADi" + MTKDeepDiffsExt = "DeepDiffs" + MTKFMIExt = "FMI" + MTKInfiniteOptExt = "InfiniteOpt" + MTKLabelledArraysExt = "LabelledArrays" + MTKPyomoDynamicOptExt = "Pyomo" + + [deps.ModelingToolkit.weakdeps] + BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665" + CasADi = "c49709b8-5c63-11e9-2fb2-69db5844192f" + DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6" + FMI = "14a09403-18e3-468f-ad8a-74f8dda2d9ac" + InfiniteOpt = "20393b10-9daf-11e9-18c9-8db751c92c57" + LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" + Pyomo = "0e8e1daf-01b5-4eba-a626-3897743a3816" + +[[deps.Moshi]] +deps = ["ExproniconLite", "Jieko"] +git-tree-sha1 = "53f817d3e84537d84545e0ad749e483412dd6b2a" +uuid = "2e0e35c7-a2e4-4343-998d-7ef72827ed2d" +version = "0.3.7" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2023.1.10" + +[[deps.MuladdMacro]] +git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" +uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" +version = "0.2.4" + +[[deps.MultivariatePolynomials]] +deps = ["ChainRulesCore", "DataStructures", "LinearAlgebra", "MutableArithmetics"] +git-tree-sha1 = "fade91fe9bee7b142d332fc6ab3f0deea29f637b" +uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" +version = "0.5.9" + +[[deps.MultivariateStats]] +deps = ["Arpack", "Distributions", "LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI", "StatsBase"] +git-tree-sha1 = "816620e3aac93e5b5359e4fdaf23ca4525b00ddf" +uuid = "6f286f6a-111f-5878-ab1e-185364afe411" +version = "0.10.3" + +[[deps.Mustache]] +deps = ["Printf", "Tables"] +git-tree-sha1 = "3cbd5dda543bc59f2e482607ccf84b633724fc32" +uuid = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70" +version = "1.0.21" + +[[deps.MutableArithmetics]] +deps = ["LinearAlgebra", "SparseArrays", "Test"] +git-tree-sha1 = "491bdcdc943fcbc4c005900d7463c9f216aabf4c" +uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" +version = "1.6.4" + +[[deps.NLPModels]] +deps = ["FastClosures", "LinearAlgebra", "LinearOperators", "Printf", "SparseArrays"] +git-tree-sha1 = "ac58082a07f0bd559292e869770d462d7ad0a7e2" +uuid = "a4795742-8479-5a88-8948-cc11e1c8c1a6" +version = "0.21.5" + +[[deps.NLSolversBase]] +deps = ["ADTypes", "DifferentiationInterface", "Distributed", "FiniteDiff", "ForwardDiff"] +git-tree-sha1 = "25a6638571a902ecfb1ae2a18fc1575f86b1d4df" +uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" +version = "7.10.0" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.1.3" + +[[deps.NearestNeighbors]] +deps = ["Distances", "StaticArrays"] +git-tree-sha1 = "ca7e18198a166a1f3eb92a3650d53d94ed8ca8a1" +uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" +version = "0.4.22" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.NonlinearSolve]] +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseMatrixColorings", "StaticArraysCore", "SymbolicIndexingInterface"] +git-tree-sha1 = "d2ec18c1e4eccbb70b64be2435fc3b06fbcdc0a1" +uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" +version = "4.10.0" + + [deps.NonlinearSolve.extensions] + NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" + NonlinearSolveFixedPointAccelerationExt = "FixedPointAcceleration" + NonlinearSolveLeastSquaresOptimExt = "LeastSquaresOptim" + NonlinearSolveMINPACKExt = "MINPACK" + NonlinearSolveNLSolversExt = "NLSolvers" + NonlinearSolveNLsolveExt = ["NLsolve", "LineSearches"] + NonlinearSolvePETScExt = ["PETSc", "MPI"] + NonlinearSolveSIAMFANLEquationsExt = "SIAMFANLEquations" + NonlinearSolveSpeedMappingExt = "SpeedMapping" + NonlinearSolveSundialsExt = "Sundials" + + [deps.NonlinearSolve.weakdeps] + FastLevenbergMarquardt = "7a0df574-e128-4d35-8cbd-3d84502bf7ce" + FixedPointAcceleration = "817d07cb-a79a-5c30-9a31-890123675176" + LeastSquaresOptim = "0fc2ff8b-aaa3-5acd-a817-1944a5e08891" + LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" + MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + NLSolvers = "337daf1e-9722-11e9-073e-8b9effe078ba" + NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" + PETSc = "ace2c81b-2b5f-4b1e-a30d-d662738edfe0" + SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4" + SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412" + Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" + +[[deps.NonlinearSolveBase]] +deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "Compat", "ConcreteStructs", "DifferentiationInterface", "EnzymeCore", "FastClosures", "LinearAlgebra", "Markdown", "MaybeInplace", "Preferences", "Printf", "RecursiveArrayTools", "SciMLBase", "SciMLJacobianOperators", "SciMLOperators", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] +git-tree-sha1 = "ee395563ae6ffaecbdf86d430440fddc779253a4" +uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" +version = "1.13.0" + + [deps.NonlinearSolveBase.extensions] + NonlinearSolveBaseBandedMatricesExt = "BandedMatrices" + NonlinearSolveBaseDiffEqBaseExt = "DiffEqBase" + NonlinearSolveBaseForwardDiffExt = "ForwardDiff" + NonlinearSolveBaseLineSearchExt = "LineSearch" + NonlinearSolveBaseLinearSolveExt = "LinearSolve" + NonlinearSolveBaseSparseArraysExt = "SparseArrays" + NonlinearSolveBaseSparseMatrixColoringsExt = "SparseMatrixColorings" + + [deps.NonlinearSolveBase.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + LineSearch = "87fe0de2-c867-4266-b59a-2f0a94fc965b" + LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" + +[[deps.NonlinearSolveFirstOrder]] +deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLJacobianOperators", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "65101a20b135616a13625ae6f84b052ef5780363" +uuid = "5959db7a-ea39-4486-b5fe-2dd0bf03d60d" +version = "1.6.0" + +[[deps.NonlinearSolveQuasiNewton]] +deps = ["ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLOperators", "StaticArraysCore"] +git-tree-sha1 = "3e04c917d4e3cd48b2a5091b6f76c720bb3f7362" +uuid = "9a2c21bd-3a47-402d-9113-8faf9a0ee114" +version = "1.7.0" +weakdeps = ["ForwardDiff"] + + [deps.NonlinearSolveQuasiNewton.extensions] + NonlinearSolveQuasiNewtonForwardDiffExt = "ForwardDiff" + +[[deps.NonlinearSolveSpectralMethods]] +deps = ["CommonSolve", "ConcreteStructs", "DiffEqBase", "LineSearch", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "3398222199e4b9ca0b5840907fb509f28f1a2fdc" +uuid = "26075421-4e9a-44e1-8bd1-420ed7ad02b2" +version = "1.2.0" +weakdeps = ["ForwardDiff"] + + [deps.NonlinearSolveSpectralMethods.extensions] + NonlinearSolveSpectralMethodsForwardDiffExt = "ForwardDiff" + +[[deps.Observables]] +git-tree-sha1 = "7438a59546cf62428fc9d1bc94729146d37a7225" +uuid = "510215fc-4207-5dde-b226-833fc4488ee2" +version = "0.5.5" + +[[deps.OffsetArrays]] +git-tree-sha1 = "117432e406b5c023f665fa73dc26e79ec3630151" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.17.0" +weakdeps = ["Adapt"] + + [deps.OffsetArrays.extensions] + OffsetArraysAdaptExt = "Adapt" + +[[deps.Ogg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b6aa4566bb7ae78498a5e68943863fa8b5231b59" +uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" +version = "1.3.6+0" + +[[deps.OpenBLAS32_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6065c4cff8fee6c6770b277af45d5082baacdba1" +uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2" +version = "0.3.24+0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.23+4" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.5+0" + +[[deps.OpenSSH_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"] +git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800" +uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b" +version = "10.0.1+0" + +[[deps.OpenSSL]] +deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] +git-tree-sha1 = "f1a7e086c677df53e064e0fdd2c9d0b0833e3f6e" +uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" +version = "1.5.0" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "87510f7292a2b21aeff97912b0898f9553cc5c2c" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "3.5.1+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.6+0" + +[[deps.Optim]] +deps = ["Compat", "EnumX", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] +git-tree-sha1 = "61942645c38dd2b5b78e2082c9b51ab315315d10" +uuid = "429524aa-4258-5aef-a3af-852621145aeb" +version = "1.13.2" +weakdeps = ["MathOptInterface"] + + [deps.Optim.extensions] + OptimMOIExt = "MathOptInterface" + +[[deps.Optimisers]] +deps = ["ChainRulesCore", "ConstructionBase", "Functors", "LinearAlgebra", "Random", "Statistics"] +git-tree-sha1 = "131dc319e7c58317e8c6d5170440f6bdaee0a959" +uuid = "3bd65402-5787-11e9-1adc-39752487f4e2" +version = "0.4.6" + + [deps.Optimisers.extensions] + OptimisersAdaptExt = ["Adapt"] + OptimisersEnzymeCoreExt = "EnzymeCore" + OptimisersReactantExt = "Reactant" + + [deps.Optimisers.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" + +[[deps.Optimization]] +deps = ["ADTypes", "ArrayInterface", "ConsoleProgressMonitor", "DocStringExtensions", "LBFGSB", "LinearAlgebra", "Logging", "LoggingExtras", "OptimizationBase", "Printf", "ProgressLogging", "Reexport", "SciMLBase", "SparseArrays", "TerminalLoggers"] +git-tree-sha1 = "41902230755effe29a8599ea4b61dc3ffc2c952d" +uuid = "7f7a1694-90dd-40f0-9382-eb1efda571ba" +version = "4.5.0" + +[[deps.OptimizationBase]] +deps = ["ADTypes", "ArrayInterface", "DifferentiationInterface", "DocStringExtensions", "FastClosures", "LinearAlgebra", "PDMats", "Reexport", "Requires", "SciMLBase", "SparseArrays", "SparseConnectivityTracer", "SparseMatrixColorings"] +git-tree-sha1 = "474b2fa6de9288d34b8ad42c9c500088132621a7" +uuid = "bca83a33-5cc9-4baa-983d-23429ab6bcbb" +version = "2.10.0" + + [deps.OptimizationBase.extensions] + OptimizationEnzymeExt = "Enzyme" + OptimizationFiniteDiffExt = "FiniteDiff" + OptimizationForwardDiffExt = "ForwardDiff" + OptimizationMLDataDevicesExt = "MLDataDevices" + OptimizationMLUtilsExt = "MLUtils" + OptimizationMTKExt = "ModelingToolkit" + OptimizationReverseDiffExt = "ReverseDiff" + OptimizationSymbolicAnalysisExt = "SymbolicAnalysis" + OptimizationZygoteExt = "Zygote" + + [deps.OptimizationBase.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + MLDataDevices = "7e8f7934-dd98-4c1a-8fe8-92b47a384d40" + MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54" + ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SymbolicAnalysis = "4297ee4d-0239-47d8-ba5d-195ecdf594fe" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.OptimizationMOI]] +deps = ["LinearAlgebra", "MathOptInterface", "ModelingToolkit", "Optimization", "Reexport", "SciMLStructures", "SparseArrays", "SymbolicIndexingInterface", "Symbolics"] +git-tree-sha1 = "f1dc14135e80807caeec88a6b206017b8d51d307" +uuid = "fd9f6733-72f4-499f-8506-86b2bdd0dea1" +version = "0.5.5" + +[[deps.OptimizationNLPModels]] +deps = ["ADTypes", "NLPModels", "Optimization", "Reexport"] +git-tree-sha1 = "92fb266d5c624ce10471591699eedb047af5f19d" +uuid = "064b21be-54cf-11ef-1646-cdfee32b588f" +version = "0.0.2" + +[[deps.OptimizationOptimJL]] +deps = ["Optim", "Optimization", "PrecompileTools", "Reexport", "SparseArrays"] +git-tree-sha1 = "6f228118b81ce4e849091ee0d00805f2ecb18f54" +uuid = "36348300-93cb-4f02-beb5-3c3902f8871e" +version = "0.4.3" + +[[deps.OptimizationOptimisers]] +deps = ["Optimisers", "Optimization", "Printf", "ProgressLogging", "Reexport"] +git-tree-sha1 = "e639068e1b8e3e1e3f9d71f9fec038c9ff3f82fe" +uuid = "42dfb2eb-d2b4-4451-abcd-913932933ac1" +version = "0.3.8" + +[[deps.Opus_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c392fc5dd032381919e3b22dd32d6443760ce7ea" +uuid = "91d4177d-7536-5919-b921-800302f37372" +version = "1.5.2+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.8.1" + +[[deps.OrdinaryDiffEqCore]] +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "FastBroadcast", "FastClosures", "FastPower", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleUnPack", "Static", "StaticArrayInterface", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "1bd20b621e8dee5f2d170ae31631bf573ab77eec" +uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" +version = "1.26.2" + + [deps.OrdinaryDiffEqCore.extensions] + OrdinaryDiffEqCoreEnzymeCoreExt = "EnzymeCore" + OrdinaryDiffEqCoreMooncakeExt = "Mooncake" + + [deps.OrdinaryDiffEqCore.weakdeps] + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + +[[deps.PCRE2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" +version = "10.42.0+1" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "f07c06228a1c670ae4c87d1276b92c7c597fdda0" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.35" + +[[deps.Pango_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "275a9a6d85dc86c24d03d1837a0010226a96f540" +uuid = "36c8627f-9965-5494-a995-c6b170f724f3" +version = "1.56.3+0" + +[[deps.Parameters]] +deps = ["OrderedCollections", "UnPack"] +git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" +uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" +version = "0.12.3" + +[[deps.Parsers]] +deps = ["Dates", "PrecompileTools", "UUIDs"] +git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.8.3" + +[[deps.Pixman_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] +git-tree-sha1 = "db76b1ecd5e9715f3d043cec13b2ec93ce015d53" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.44.2+0" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.10.0" + +[[deps.PlotThemes]] +deps = ["PlotUtils", "Statistics"] +git-tree-sha1 = "41031ef3a1be6f5bbbf3e8073f210556daeae5ca" +uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" +version = "3.3.0" + +[[deps.PlotUtils]] +deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "StableRNGs", "Statistics"] +git-tree-sha1 = "3ca9a356cd2e113c420f2c13bea19f8d3fb1cb18" +uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" +version = "1.4.3" + +[[deps.Plots]] +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] +git-tree-sha1 = "3db9167c618b290a05d4345ca70de6d95304a32a" +uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +version = "1.40.17" + + [deps.Plots.extensions] + FileIOExt = "FileIO" + GeometryBasicsExt = "GeometryBasics" + IJuliaExt = "IJulia" + ImageInTerminalExt = "ImageInTerminal" + UnitfulExt = "Unitful" + + [deps.Plots.weakdeps] + FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" + GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" + IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" + ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.PoissonRandom]] +deps = ["LogExpFunctions", "Random"] +git-tree-sha1 = "c1ea45aa9f209fe97192afa233907bc4e551c8aa" +uuid = "e409e4f3-bfea-5376-8464-e040bb5c01ab" +version = "0.4.6" + +[[deps.Polyester]] +deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] +git-tree-sha1 = "6f7cd22a802094d239824c57d94c8e2d0f7cfc7d" +uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" +version = "0.7.18" + +[[deps.PolyesterWeave]] +deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] +git-tree-sha1 = "645bed98cd47f72f67316fd42fc47dee771aefcd" +uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" +version = "0.2.2" + +[[deps.PooledArrays]] +deps = ["DataAPI", "Future"] +git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3" +uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" +version = "1.4.3" + +[[deps.PositiveFactorizations]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "17275485f373e6673f7e7f97051f703ed5b15b20" +uuid = "85a6dd25-e78a-55b7-8502-1745935b8125" +version = "0.2.4" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.1" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.3" + +[[deps.PrettyTables]] +deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] +git-tree-sha1 = "1101cd475833706e4d0e7b122218257178f48f34" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "2.4.0" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "25cdd1d20cd005b52fc12cb6be3f75faaf59bb9b" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.7" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.Profile]] +deps = ["Printf"] +uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" + +[[deps.ProgressLogging]] +deps = ["Logging", "SHA", "UUIDs"] +git-tree-sha1 = "d95ed0324b0799843ac6f7a6a85e65fe4e5173f0" +uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c" +version = "0.1.5" + +[[deps.ProgressMeter]] +deps = ["Distributed", "Printf"] +git-tree-sha1 = "13c5103482a8ed1536a54c08d0e742ae3dca2d42" +uuid = "92933f4c-e287-5a05-a399-4b506db050ca" +version = "1.10.4" + +[[deps.PtrArrays]] +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.3.0" + +[[deps.Qt6Base_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] +git-tree-sha1 = "eb38d376097f47316fe089fc62cb7c6d85383a52" +uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" +version = "6.8.2+1" + +[[deps.Qt6Declarative_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6ShaderTools_jll"] +git-tree-sha1 = "da7adf145cce0d44e892626e647f9dcbe9cb3e10" +uuid = "629bc702-f1f5-5709-abd5-49b8460ea067" +version = "6.8.2+1" + +[[deps.Qt6ShaderTools_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll"] +git-tree-sha1 = "9eca9fc3fe515d619ce004c83c31ffd3f85c7ccf" +uuid = "ce943373-25bb-56aa-8eca-768745ed7b5a" +version = "6.8.2+1" + +[[deps.Qt6Wayland_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6Declarative_jll"] +git-tree-sha1 = "e1d5e16d0f65762396f9ca4644a5f4ddab8d452b" +uuid = "e99dba38-086e-5de3-a5b1-6e4c66e897c3" +version = "6.8.2+1" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.11.2" + + [deps.QuadGK.extensions] + QuadGKEnzymeExt = "Enzyme" + + [deps.QuadGK.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + +[[deps.Quadmath]] +deps = ["Compat", "Printf", "Random", "Requires"] +git-tree-sha1 = "6bc924717c495f24de85867aa94da4de0e6cd1a1" +uuid = "be4d8f0f-7fa4-5f49-b795-2f01399ab2dd" +version = "0.5.13" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.Random123]] +deps = ["Random", "RandomNumbers"] +git-tree-sha1 = "dbe5fd0b334694e905cb9fda73cd8554333c46e2" +uuid = "74087812-796a-5b5d-8853-05524746bad3" +version = "1.7.1" + +[[deps.RandomNumbers]] +deps = ["Random"] +git-tree-sha1 = "c6ec94d2aaba1ab2ff983052cf6a606ca5985902" +uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" +version = "1.6.0" + +[[deps.Ratios]] +deps = ["Requires"] +git-tree-sha1 = "1342a47bf3260ee108163042310d26f2be5ec90b" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.5" +weakdeps = ["FixedPointNumbers"] + + [deps.Ratios.extensions] + RatiosFixedPointNumbersExt = "FixedPointNumbers" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.RecipesPipeline]] +deps = ["Dates", "NaNMath", "PlotUtils", "PrecompileTools", "RecipesBase"] +git-tree-sha1 = "45cf9fd0ca5839d06ef333c8201714e888486342" +uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" +version = "0.6.12" + +[[deps.RecursiveArrayTools]] +deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "f8726bd5a8b7f5f5d3f6c0ce4793454a599b5243" +uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" +version = "3.36.0" + + [deps.RecursiveArrayTools.extensions] + RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" + RecursiveArrayToolsForwardDiffExt = "ForwardDiff" + RecursiveArrayToolsKernelAbstractionsExt = "KernelAbstractions" + RecursiveArrayToolsMeasurementsExt = "Measurements" + RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" + RecursiveArrayToolsReverseDiffExt = ["ReverseDiff", "Zygote"] + RecursiveArrayToolsSparseArraysExt = ["SparseArrays"] + RecursiveArrayToolsStructArraysExt = "StructArrays" + RecursiveArrayToolsTrackerExt = "Tracker" + RecursiveArrayToolsZygoteExt = "Zygote" + + [deps.RecursiveArrayTools.weakdeps] + FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.RelocatableFolders]] +deps = ["SHA", "Scratch"] +git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" +uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" +version = "1.0.1" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.1" + +[[deps.ResettableStacks]] +deps = ["StaticArrays"] +git-tree-sha1 = "256eeeec186fa7f26f2801732774ccf277f05db9" +uuid = "ae5879a3-cd67-5da8-be7f-38c6eb64a37b" +version = "1.1.1" + +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "852bd0f55565a9e973fcfee83a84413270224dc4" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.8.0" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "58cdd8fb2201a6267e1db87ff148dd6c1dbd8ad8" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.5.1+0" + +[[deps.RuntimeGeneratedFunctions]] +deps = ["ExprTools", "SHA", "Serialization"] +git-tree-sha1 = "86a8a8b783481e1ea6b9c91dd949cb32191f8ab4" +uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" +version = "0.5.15" + +[[deps.SCCNonlinearSolve]] +deps = ["CommonSolve", "PrecompileTools", "Reexport", "SciMLBase", "SymbolicIndexingInterface"] +git-tree-sha1 = "5595105cef621942aceb1aa546b883c79ccbfa8f" +uuid = "9dfe8606-65a1-4bb3-9748-cb89d1561431" +version = "1.4.0" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SIFDecode_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "ff01642c091fe2756799dcb089e1b3eb478adb04" +uuid = "54dcf436-342f-53ea-8005-3708a1ae6c8c" +version = "2.6.3+0" + +[[deps.SIMDTypes]] +git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" +uuid = "94e857df-77ce-4151-89e5-788b33177be4" +version = "0.1.0" + +[[deps.SPRAL_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "Libdl", "METIS_jll", "libblastrampoline_jll"] +git-tree-sha1 = "4f9833187a65ead66ed1907b44d5f20606282e3f" +uuid = "319450e9-13b8-58e8-aa9f-8fd1420848ab" +version = "2025.5.20+0" + +[[deps.SciMLBase]] +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] +git-tree-sha1 = "1c7fd50df465f0684f04f3a63736eac01999c659" +uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +version = "2.107.0" + + [deps.SciMLBase.extensions] + SciMLBaseChainRulesCoreExt = "ChainRulesCore" + SciMLBaseMLStyleExt = "MLStyle" + SciMLBaseMakieExt = "Makie" + SciMLBasePartialFunctionsExt = "PartialFunctions" + SciMLBasePyCallExt = "PyCall" + SciMLBasePythonCallExt = "PythonCall" + SciMLBaseRCallExt = "RCall" + SciMLBaseZygoteExt = ["Zygote", "ChainRulesCore"] + + [deps.SciMLBase.weakdeps] + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078" + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" + PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" + PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" + RCall = "6f49c342-dc21-5d91-9882-a32aef131414" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.SciMLBenchmarks]] +deps = ["Git", "IJulia", "InteractiveUtils", "Markdown", "Pkg", "Weave"] +git-tree-sha1 = "f4076dd5a103010d48bb6c4e50c5526f6622fa96" +uuid = "31c91b34-3c75-11e9-0341-95557aab0344" +version = "0.1.3" + +[[deps.SciMLJacobianOperators]] +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DifferentiationInterface", "FastClosures", "LinearAlgebra", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "3414071e3458f3065de7fa5aed55283b236b4907" +uuid = "19f34311-ddf3-4b8b-af20-060888a46c0e" +version = "0.1.8" + +[[deps.SciMLOperators]] +deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools"] +git-tree-sha1 = "7d3a1519dc4d433a6b20035eaff20bde8be77c66" +uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" +version = "1.4.0" +weakdeps = ["SparseArrays", "StaticArraysCore"] + + [deps.SciMLOperators.extensions] + SciMLOperatorsSparseArraysExt = "SparseArrays" + SciMLOperatorsStaticArraysCoreExt = "StaticArraysCore" + +[[deps.SciMLPublic]] +git-tree-sha1 = "ed647f161e8b3f2973f24979ec074e8d084f1bee" +uuid = "431bcebd-1456-4ced-9d72-93c2757fff0b" +version = "1.0.0" + +[[deps.SciMLStructures]] +deps = ["ArrayInterface"] +git-tree-sha1 = "566c4ed301ccb2a44cbd5a27da5f885e0ed1d5df" +uuid = "53ae85a6-f571-4167-b2af-e1d143709226" +version = "1.7.0" + +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "9b81b8393e50b7d4e6d0a9f14e192294d3b7c109" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.3.0" + +[[deps.SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "712fb0231ee6f9120e005ccd56297abbc053e7e0" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.4.8" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] +git-tree-sha1 = "c5391c6ace3bc430ca630251d02ea9687169ca68" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "1.1.2" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[deps.SimpleBufferStream]] +git-tree-sha1 = "f305871d2f381d21527c770d4788c06c097c9bc1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.2.0" + +[[deps.SimpleNonlinearSolve]] +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "09d986e27a606f172c5b6cffbd8b8b2f10bf1c75" +uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" +version = "2.7.0" + + [deps.SimpleNonlinearSolve.extensions] + SimpleNonlinearSolveChainRulesCoreExt = "ChainRulesCore" + SimpleNonlinearSolveDiffEqBaseExt = "DiffEqBase" + SimpleNonlinearSolveReverseDiffExt = "ReverseDiff" + SimpleNonlinearSolveTrackerExt = "Tracker" + + [deps.SimpleNonlinearSolve.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.SimpleTraits]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" +uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" +version = "0.9.4" + +[[deps.SimpleUnPack]] +git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" +uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" +version = "1.1.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SoftGlobalScope]] +deps = ["REPL"] +git-tree-sha1 = "986ec2b6162ccb95de5892ed17832f95badf770c" +uuid = "b85f4697-e234-5449-a836-ec8e2f98b302" +version = "1.1.0" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "64d974c2e6fdf07f8155b5b2ca2ffa9069b608d9" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.2.2" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" + +[[deps.SparseConnectivityTracer]] +deps = ["ADTypes", "DocStringExtensions", "FillArrays", "LinearAlgebra", "Random", "SparseArrays"] +git-tree-sha1 = "7bd2b8981cc57adcf5cf1add282aba2713a7058f" +uuid = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" +version = "1.0.0" + + [deps.SparseConnectivityTracer.extensions] + SparseConnectivityTracerLogExpFunctionsExt = "LogExpFunctions" + SparseConnectivityTracerNNlibExt = "NNlib" + SparseConnectivityTracerNaNMathExt = "NaNMath" + SparseConnectivityTracerSpecialFunctionsExt = "SpecialFunctions" + + [deps.SparseConnectivityTracer.weakdeps] + LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688" + NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" + NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" + SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" + +[[deps.SparseMatrixColorings]] +deps = ["ADTypes", "DocStringExtensions", "LinearAlgebra", "PrecompileTools", "Random", "SparseArrays"] +git-tree-sha1 = "9de43e0b9b976f1019bf7a879a686c4514520078" +uuid = "0a514795-09f3-496d-8182-132a7b665d35" +version = "0.4.21" + + [deps.SparseMatrixColorings.extensions] + SparseMatrixColoringsCUDAExt = "CUDA" + SparseMatrixColoringsCliqueTreesExt = "CliqueTrees" + SparseMatrixColoringsColorsExt = "Colors" + + [deps.SparseMatrixColorings.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "41852b8679f78c8d8961eeadc8f62cef861a52e3" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.5.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StableRNGs]] +deps = ["Random"] +git-tree-sha1 = "95af145932c2ed859b63329952ce8d633719f091" +uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" +version = "1.0.3" + +[[deps.Static]] +deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools"] +git-tree-sha1 = "f737d444cb0ad07e61b3c1bef8eb91203c321eff" +uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" +version = "1.2.0" + +[[deps.StaticArrayInterface]] +deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Static"] +git-tree-sha1 = "96381d50f1ce85f2663584c8e886a6ca97e60554" +uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" +version = "1.8.0" +weakdeps = ["OffsetArrays", "StaticArrays"] + + [deps.StaticArrayInterface.extensions] + StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" + StaticArrayInterfaceStaticArraysExt = "StaticArrays" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "cbea8a6bd7bed51b1619658dec70035e07b8502f" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.9.14" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.3" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.10.0" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.7.1" + +[[deps.StatsBase]] +deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "2c962245732371acd51700dbb268af311bddd719" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.34.6" + +[[deps.StatsFuns]] +deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.5.0" +weakdeps = ["ChainRulesCore", "InverseFunctions"] + + [deps.StatsFuns.extensions] + StatsFunsChainRulesCoreExt = "ChainRulesCore" + StatsFunsInverseFunctionsExt = "InverseFunctions" + +[[deps.StatsPlots]] +deps = ["AbstractFFTs", "Clustering", "DataStructures", "Distributions", "Interpolations", "KernelDensity", "LinearAlgebra", "MultivariateStats", "NaNMath", "Observables", "Plots", "RecipesBase", "RecipesPipeline", "Reexport", "StatsBase", "TableOperations", "Tables", "Widgets"] +git-tree-sha1 = "3b1dcbf62e469a67f6733ae493401e53d92ff543" +uuid = "f3b207a7-027a-5e70-b257-86293d7955fd" +version = "0.15.7" + +[[deps.StrideArraysCore]] +deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] +git-tree-sha1 = "f35f6ab602df8413a50c4a25ca14de821e8605fb" +uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" +version = "0.5.7" + +[[deps.StringEncodings]] +deps = ["Libiconv_jll"] +git-tree-sha1 = "b765e46ba27ecf6b44faf70df40c57aa3a547dcb" +uuid = "69024149-9ee7-55f6-a4c4-859efe599b68" +version = "0.3.7" + +[[deps.StringManipulation]] +deps = ["PrecompileTools"] +git-tree-sha1 = "725421ae8e530ec29bcbdddbe91ff8053421d023" +uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" +version = "0.4.1" + +[[deps.StructTypes]] +deps = ["Dates", "UUIDs"] +git-tree-sha1 = "159331b30e94d7b11379037feeb9b690950cace8" +uuid = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" +version = "1.11.0" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.2.1+1" + +[[deps.SymbolicIndexingInterface]] +deps = ["Accessors", "ArrayInterface", "PrettyTables", "RuntimeGeneratedFunctions", "StaticArraysCore"] +git-tree-sha1 = "59ca6eddaaa9849e7de9fd1153b6faf0b1db7b80" +uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" +version = "0.3.42" + +[[deps.SymbolicLimits]] +deps = ["SymbolicUtils"] +git-tree-sha1 = "fabf4650afe966a2ba646cabd924c3fd43577fc3" +uuid = "19f23fe9-fdab-4a78-91af-e7b7767979c3" +version = "0.2.2" + +[[deps.SymbolicUtils]] +deps = ["AbstractTrees", "ArrayInterface", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "ExproniconLite", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "TaskLocalValues", "TermInterface", "TimerOutputs", "Unityper", "WeakValueDicts"] +git-tree-sha1 = "fa63e8f55e99aee528951ba26544403b09645979" +uuid = "d1185830-fcd6-423d-90d6-eec64667417b" +version = "3.29.0" + + [deps.SymbolicUtils.extensions] + SymbolicUtilsLabelledArraysExt = "LabelledArrays" + SymbolicUtilsReverseDiffExt = "ReverseDiff" + + [deps.SymbolicUtils.weakdeps] + LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + +[[deps.Symbolics]] +deps = ["ADTypes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "LaTeXStrings", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "OffsetArrays", "PrecompileTools", "Primes", "RecipesBase", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] +git-tree-sha1 = "6eac6fe46d0e0f21baebc87d97dc118827737e05" +uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" +version = "6.48.1" + + [deps.Symbolics.extensions] + SymbolicsD3TreesExt = "D3Trees" + SymbolicsForwardDiffExt = "ForwardDiff" + SymbolicsGroebnerExt = "Groebner" + SymbolicsLuxExt = "Lux" + SymbolicsNemoExt = "Nemo" + SymbolicsPreallocationToolsExt = ["PreallocationTools", "ForwardDiff"] + SymbolicsSymPyExt = "SymPy" + SymbolicsSymPyPythonCallExt = "SymPyPythonCall" + + [deps.Symbolics.weakdeps] + D3Trees = "e3df1716-f71e-5df9-9e2d-98e193103c45" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + Groebner = "0b43b601-686d-58a3-8a1c-6623616c7cd4" + Lux = "b2108857-7c20-44ae-9111-449ecde12c47" + Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a" + PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46" + SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" + SymPyPythonCall = "bc8888f7-b21e-4b7c-a06a-5d9c9496438c" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableOperations]] +deps = ["SentinelArrays", "Tables", "Test"] +git-tree-sha1 = "e383c87cf2a1dc41fa30c093b2a19877c83e1bc1" +uuid = "ab02a1b2-a7df-11e8-156e-fb1833f50b87" +version = "1.2.0" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "f2c1efbc8f3a609aadf318094f8fc5204bdaf344" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.12.1" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TaskLocalValues]] +git-tree-sha1 = "67e469338d9ce74fc578f7db1736a74d93a49eb8" +uuid = "ed4db957-447d-4319-bfb6-7fa9ae7ecf34" +version = "0.1.3" + +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + +[[deps.TermInterface]] +git-tree-sha1 = "d673e0aca9e46a2f63720201f55cc7b3e7169b16" +uuid = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c" +version = "2.0.0" + +[[deps.TerminalLoggers]] +deps = ["LeftChildRightSiblingTrees", "Logging", "Markdown", "Printf", "ProgressLogging", "UUIDs"] +git-tree-sha1 = "f133fab380933d042f6796eda4e130272ba520ca" +uuid = "5d786b92-1e48-4d6f-9151-6b4477ca9bed" +version = "0.1.7" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.TestItems]] +git-tree-sha1 = "42fd9023fef18b9b78c8343a4e2f3813ffbcefcb" +uuid = "1c621080-faea-4a02-84b6-bbd5e436b8fe" +version = "1.0.0" + +[[deps.ThreadingUtilities]] +deps = ["ManualMemory"] +git-tree-sha1 = "d969183d3d244b6c33796b5ed01ab97328f2db85" +uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" +version = "0.5.5" + +[[deps.TimerOutputs]] +deps = ["ExprTools", "Printf"] +git-tree-sha1 = "3748bd928e68c7c346b52125cf41fff0de6937d0" +uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" +version = "0.5.29" + + [deps.TimerOutputs.extensions] + FlameGraphsExt = "FlameGraphs" + + [deps.TimerOutputs.weakdeps] + FlameGraphs = "08572546-2f56-4bcf-ba4e-bab62c3a3f89" + +[[deps.TranscodingStreams]] +git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.11.3" + +[[deps.Tricks]] +git-tree-sha1 = "0fc001395447da85495b7fef1dfae9789fdd6e31" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.11" + +[[deps.TruncatedStacktraces]] +deps = ["InteractiveUtils", "MacroTools", "Preferences"] +git-tree-sha1 = "ea3e54c2bdde39062abf5a9758a23735558705e1" +uuid = "781d530d-4396-4725-bb49-402e4bee1e77" +version = "1.4.0" + +[[deps.URIs]] +git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.6.1" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.UnicodeFun]] +deps = ["REPL"] +git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" +uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" +version = "0.4.1" + +[[deps.Unitful]] +deps = ["Dates", "LinearAlgebra", "Random"] +git-tree-sha1 = "6258d453843c466d84c17a58732dda5deeb8d3af" +uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" +version = "1.24.0" +weakdeps = ["ConstructionBase", "ForwardDiff", "InverseFunctions", "Printf"] + + [deps.Unitful.extensions] + ConstructionBaseUnitfulExt = "ConstructionBase" + ForwardDiffExt = "ForwardDiff" + InverseFunctionsUnitfulExt = "InverseFunctions" + PrintfExt = "Printf" + +[[deps.UnitfulLatexify]] +deps = ["LaTeXStrings", "Latexify", "Unitful"] +git-tree-sha1 = "af305cc62419f9bd61b6644d19170a4d258c7967" +uuid = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" +version = "1.7.0" + +[[deps.Unityper]] +deps = ["ConstructionBase"] +git-tree-sha1 = "25008b734a03736c41e2a7dc314ecb95bd6bbdb0" +uuid = "a7c27f48-0311-42f6-a7f8-2c11e75eb415" +version = "0.1.6" + +[[deps.Unzip]] +git-tree-sha1 = "ca0969166a028236229f63514992fc073799bb78" +uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" +version = "0.2.0" + +[[deps.VersionParsing]] +git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" +uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" +version = "1.3.0" + +[[deps.Vulkan_Loader_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] +git-tree-sha1 = "2f0486047a07670caad3a81a075d2e518acc5c59" +uuid = "a44049a8-05dd-5a78-86c9-5fde0876e88c" +version = "1.3.243+0" + +[[deps.Wayland_jll]] +deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll"] +git-tree-sha1 = "96478df35bbc2f3e1e791bc7a3d0eeee559e60e9" +uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" +version = "1.24.0+0" + +[[deps.WeakValueDicts]] +git-tree-sha1 = "98528c2610a5479f091d470967a25becfd83edd0" +uuid = "897b6980-f191-5a31-bcb0-bf3c4585e0c1" +version = "0.1.0" + +[[deps.Weave]] +deps = ["Base64", "Dates", "Highlights", "JSON", "Markdown", "Mustache", "Pkg", "Printf", "REPL", "RelocatableFolders", "Requires", "Serialization", "YAML"] +git-tree-sha1 = "092217eb5443926d200ae9325f103906efbb68b1" +uuid = "44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9" +version = "0.10.12" + +[[deps.Widgets]] +deps = ["Colors", "Dates", "Observables", "OrderedCollections"] +git-tree-sha1 = "e9aeb174f95385de31e70bd15fa066a505ea82b9" +uuid = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" +version = "0.6.7" + +[[deps.WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "c1a7aa6219628fcd757dede0ca95e245c5cd9511" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "1.0.0" + +[[deps.XZ_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "fee71455b0aaa3440dfdd54a9a36ccef829be7d4" +uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" +version = "5.8.1+0" + +[[deps.Xorg_libICE_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "a3ea76ee3f4facd7a64684f9af25310825ee3668" +uuid = "f67eecfb-183a-506d-b269-f58e52b52d7c" +version = "1.1.2+0" + +[[deps.Xorg_libSM_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libICE_jll"] +git-tree-sha1 = "9c7ad99c629a44f81e7799eb05ec2746abb5d588" +uuid = "c834827a-8449-5923-a945-d239c165b7dd" +version = "1.2.6+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "b5899b25d17bf1889d25906fb9deed5da0c15b3b" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.8.12+0" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "aa1261ebbac3ccc8d16558ae6799524c450ed16b" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.13+0" + +[[deps.Xorg_libXcursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "6c74ca84bbabc18c4547014765d194ff0b4dc9da" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.4+0" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "52858d64353db33a56e13c341d7bf44cd0d7b309" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.6+0" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "a4c0ee07ad36bf8bbce1c3bb52d21fb1e0b987fb" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.7+0" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "9caba99d38404b285db8801d5c45ef4f4f425a6d" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "6.0.1+0" + +[[deps.Xorg_libXi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "a376af5c7ae60d29825164db40787f15c80c7c54" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.8.3+0" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll"] +git-tree-sha1 = "a5bc75478d323358a90dc36766f3c99ba7feb024" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.6+0" + +[[deps.Xorg_libXrandr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "aff463c82a773cb86061bce8d53a0d976854923e" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.5+0" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "7ed9347888fac59a618302ee38216dd0379c480d" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.12+0" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXau_jll", "Xorg_libXdmcp_jll"] +git-tree-sha1 = "bfcaf7ec088eaba362093393fe11aa141fa15422" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.17.1+0" + +[[deps.Xorg_libxkbfile_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "e3150c7400c41e207012b41659591f083f3ef795" +uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" +version = "1.1.3+0" + +[[deps.Xorg_xcb_util_cursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_jll", "Xorg_xcb_util_renderutil_jll"] +git-tree-sha1 = "c5bf2dad6a03dfef57ea0a170a1fe493601603f2" +uuid = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" +version = "0.1.5+0" + +[[deps.Xorg_xcb_util_image_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "f4fc02e384b74418679983a97385644b67e1263b" +uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" +version = "0.4.1+0" + +[[deps.Xorg_xcb_util_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll"] +git-tree-sha1 = "68da27247e7d8d8dafd1fcf0c3654ad6506f5f97" +uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" +version = "0.4.1+0" + +[[deps.Xorg_xcb_util_keysyms_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "44ec54b0e2acd408b0fb361e1e9244c60c9c3dd4" +uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" +version = "0.4.1+0" + +[[deps.Xorg_xcb_util_renderutil_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "5b0263b6d080716a02544c55fdff2c8d7f9a16a0" +uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" +version = "0.3.10+0" + +[[deps.Xorg_xcb_util_wm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "f233c83cad1fa0e70b7771e0e21b061a116f2763" +uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" +version = "0.4.2+0" + +[[deps.Xorg_xkbcomp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "801a858fc9fb90c11ffddee1801bb06a738bda9b" +uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" +version = "1.4.7+0" + +[[deps.Xorg_xkeyboard_config_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "00af7ebdc563c9217ecc67776d1bbf037dbcebf4" +uuid = "33bec58e-1273-512f-9401-5d533626f822" +version = "2.44.0+0" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "a63799ff68005991f9d9491b6e95bd3478d783cb" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.6.0+0" + +[[deps.YAML]] +deps = ["Base64", "Dates", "Printf", "StringEncodings"] +git-tree-sha1 = "2f58ac39f64b41fb812340347525be3b590cce3b" +uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" +version = "0.4.14" + +[[deps.ZMQ]] +deps = ["FileWatching", "PrecompileTools", "Sockets", "ZeroMQ_jll"] +git-tree-sha1 = "2d060e1f014c07561817bf6f3c0eb66b309e04bd" +uuid = "c2297ded-f4af-51ae-bb23-16f91089e4e1" +version = "1.4.1" + +[[deps.ZeroMQ_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "libsodium_jll"] +git-tree-sha1 = "766d90db2817565b667c1cc9cc420d668f2e8dba" +uuid = "8f1865be-045e-5c20-9c9f-bfbfb0764568" +version = "4.3.6+0" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.13+1" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "446b23e73536f84e8037f5dce465e92275f6a308" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.7+1" + +[[deps.eudev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c3b0e6196d50eab0c5ed34021aaa0bb463489510" +uuid = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" +version = "3.2.14+0" + +[[deps.fzf_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b6a34e0e0960190ac2a4363a1bd003504772d631" +uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" +version = "0.61.1+0" + +[[deps.libaom_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "4bba74fa59ab0755167ad24f98800fe5d727175b" +uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" +version = "3.12.1+0" + +[[deps.libass_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "125eedcb0a4a0bba65b657251ce1d27c8714e9d6" +uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" +version = "0.17.4+0" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.11.0+0" + +[[deps.libdecor_jll]] +deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] +git-tree-sha1 = "9bf7903af251d2050b467f76bdbe57ce541f7f4f" +uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" +version = "0.2.2+0" + +[[deps.libevdev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "56d643b57b188d30cccc25e331d416d3d358e557" +uuid = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" +version = "1.13.4+0" + +[[deps.libfdk_aac_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "646634dd19587a56ee2f1199563ec056c5f228df" +uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" +version = "2.0.4+0" + +[[deps.libinput_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "eudev_jll", "libevdev_jll", "mtdev_jll"] +git-tree-sha1 = "91d05d7f4a9f67205bd6cf395e488009fe85b499" +uuid = "36db933b-70db-51c0-b978-0f229ee0e533" +version = "1.28.1+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "07b6a107d926093898e82b3b1db657ebe33134ec" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.50+0" + +[[deps.libsodium_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "011b0a7331b41c25524b64dc42afc9683ee89026" +uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8" +version = "1.0.21+0" + +[[deps.libvorbis_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll"] +git-tree-sha1 = "11e1772e7f3cc987e9d3de991dd4f6b2602663a5" +uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" +version = "1.3.8+0" + +[[deps.mtdev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b4d631fd51f2e9cdd93724ae25b2efc198b059b1" +uuid = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" +version = "1.1.7+0" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.52.0+1" + +[[deps.oneTBB_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "d5a767a3bb77135a99e433afe0eb14cd7f6914c3" +uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" +version = "2022.0.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+2" + +[[deps.x264_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "14cc7083fc6dff3cc44f2bc435ee96d06ed79aa7" +uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" +version = "10164.0.1+0" + +[[deps.x265_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "e7b67590c14d487e734dcb925924c5dc43ec85f3" +uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" +version = "4.1.0+0" + +[[deps.xkbcommon_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "fbf139bce07a534df0e699dbb5f5cc9346f95cc1" +uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" +version = "1.9.2+0" diff --git a/benchmarks/OptimizationCUTEst/Project.toml b/benchmarks/OptimizationCUTEst/Project.toml new file mode 100644 index 000000000..7139c55f4 --- /dev/null +++ b/benchmarks/OptimizationCUTEst/Project.toml @@ -0,0 +1,17 @@ +[deps] +CUTEst = "1b53aba6-35b6-5f92-a507-53c67d53f819" +DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9" +MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" +NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6" +Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba" +OptimizationMOI = "fd9f6733-72f4-499f-8506-86b2bdd0dea1" +OptimizationNLPModels = "064b21be-54cf-11ef-1646-cdfee32b588f" +OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e" +OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1" +Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" +SciMLBenchmarks = "31c91b34-3c75-11e9-0341-95557aab0344" +Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd" diff --git a/benchmarks/OptimizationFrameworks/clnlbeam.jmd b/benchmarks/OptimizationFrameworks/clnlbeam.jmd index 0cb9e0477..9ce036019 100644 --- a/benchmarks/OptimizationFrameworks/clnlbeam.jmd +++ b/benchmarks/OptimizationFrameworks/clnlbeam.jmd @@ -35,16 +35,18 @@ function run_optimization(N::Int, automatic_differentiation) u_offset = 2(N + 1) function objective_fn(x, p) return sum( - 0.5 * h * (x[x_offset+i+1]^2 + x[x_offset+i]^2) + - 0.5 * alpha * h * (cos(x[i+1]) + cos(x[i])) for i in 1:N + 0.5 * h * (x[x_offset + i + 1]^2 + x[x_offset + i]^2) + + 0.5 * alpha * h * (cos(x[i + 1]) + cos(x[i])) for i in 1:N ) end function constraint_fn(res, x, p) for i in 1:N - res[i] = x[x_offset+i+1] - x[x_offset+i] - 0.5 * h * (sin(x[i+1]) + sin(x[i])) + res[i] = x[x_offset + i + 1] - x[x_offset + i] - + 0.5 * h * (sin(x[i + 1]) + sin(x[i])) end for i in 1:N - res[N+i] = x[i+1] - x[i] - 0.5 * h * x[u_offset+i+1] - 0.5 * h * x[u_offset+i] + res[N + i] = x[i + 1] - x[i] - 0.5 * h * x[u_offset + i + 1] - + 0.5 * h * x[u_offset + i] end return end @@ -52,14 +54,14 @@ function run_optimization(N::Int, automatic_differentiation) Optimization.OptimizationFunction( objective_fn, automatic_differentiation; - cons = constraint_fn, + cons = constraint_fn ), zeros(3 * (N + 1)), nothing; lb = vcat(fill(-1.0, N+1), fill(-0.05, N+1), fill(-Inf, N+1)), ub = vcat(fill(1.0, N+1), fill(0.05, N+1), fill(Inf, N+1)), lcons = zeros(2 * N), - ucons = zeros(2 * N), + ucons = zeros(2 * N) ) sol = Optimization.solve(prob, Ipopt.Optimizer(); print_level = 0) Test.@test ≈(sol.objective, 350.0; atol = 1e-6) @@ -96,28 +98,22 @@ function run_jump(N::Int) model = JuMP.Model(Ipopt.Optimizer) JuMP.set_attribute(model, "print_level", 0) JuMP.@variables(model, begin - -1 <= t[1:(N+1)] <= 1 - -0.05 <= x[1:(N+1)] <= 0.05 - u[1:(N+1)] + -1 <= t[1:(N + 1)] <= 1 + -0.05 <= x[1:(N + 1)] <= 0.05 + u[1:(N + 1)] end) - JuMP.@objective( - model, + JuMP.@objective(model, Min, sum( - 0.5 * h * (u[i+1]^2 + u[i]^2) + - 0.5 * alpha * h * (cos(t[i+1]) + cos(t[i])) for i in 1:N - ), - ) - JuMP.@constraint( - model, + 0.5 * h * (u[i + 1]^2 + u[i]^2) + + 0.5 * alpha * h * (cos(t[i + 1]) + cos(t[i])) for i in 1:N + ),) + JuMP.@constraint(model, [i = 1:N], - x[i+1] - x[i] - 0.5 * h * (sin(t[i+1]) + sin(t[i])) == 0, - ) - JuMP.@constraint( - model, + x[i + 1] - x[i] - 0.5 * h * (sin(t[i + 1]) + sin(t[i])) == 0,) + JuMP.@constraint(model, [i = 1:N], - t[i+1] - t[i] - 0.5 * h * u[i+1] - 0.5 * h * u[i] == 0, - ) + t[i + 1] - t[i] - 0.5 * h * u[i + 1] - 0.5 * h * u[i] == 0,) JuMP.optimize!(model) Test.@test ≈(JuMP.objective_value(model), 350.0; atol = 1e-6) Test.@test ≈(JuMP.value.(t), zeros((N + 1)); atol = 1e-6) @@ -133,16 +129,16 @@ end function run_modelingtoolkit(N::Int, use_structural_simplify::Bool = true) h = 1 / N alpha = 350 - MTK.@variables t[1:(N+1)] [bounds = (-1.0, 1.0)] - MTK.@variables x[1:(N+1)] [bounds = (-0.05, 0.05)] - MTK.@variables u[1:(N+1)] + MTK.@variables t[1:(N + 1)] [bounds = (-1.0, 1.0)] + MTK.@variables x[1:(N + 1)] [bounds = (-0.05, 0.05)] + MTK.@variables u[1:(N + 1)] loss = sum( - 0.5 * h * (u[i+1]^2 + u[i]^2) + - 0.5 * alpha * h * (cos(t[i+1]) + cos(t[i])) for i in 1:N + 0.5 * h * (u[i + 1]^2 + u[i]^2) + + 0.5 * alpha * h * (cos(t[i + 1]) + cos(t[i])) for i in 1:N ) cons = vcat( - [x[i+1] - x[i] - 0.5 * h * (sin(t[i+1]) + sin(t[i])) ~ 0 for i in 1:N], - [t[i+1] - t[i] - 0.5 * h * u[i+1] - 0.5 * h * u[i] ~ 0 for i in 1:N], + [x[i + 1] - x[i] - 0.5 * h * (sin(t[i + 1]) + sin(t[i])) ~ 0 for i in 1:N], + [t[i + 1] - t[i] - 0.5 * h * u[i + 1] - 0.5 * h * u[i] ~ 0 for i in 1:N] ) vars = vcat(t, x, u) system = MTK.complete(MTK.OptimizationSystem( @@ -150,7 +146,7 @@ function run_modelingtoolkit(N::Int, use_structural_simplify::Bool = true) vars, []; constraints = cons, - name = :clnlbeam, + name = :clnlbeam )) if use_structural_simplify system = MTK.structural_simplify(system) @@ -181,7 +177,7 @@ end ```julia function run_benchmark(N; time_limit::Float64 = 1.0) - function _elapsed(f::F, n::Int) where {F<:Function} + function _elapsed(f::F, n::Int) where {F <: Function} # We use the minimum of three runs here. We could also use # `return BenchmarkTools.@belapsed \$f(\$n)` but it took much longer to # run. @@ -193,11 +189,12 @@ function run_benchmark(N; time_limit::Float64 = 1.0) run_reverse_diff, run_modelingtoolkit, run_modelingtoolkit_no_simplify, - run_jump, + run_jump ) data = fill(NaN, length(N), length(benchmarks)) for (i, n) in enumerate(N), (j, f) in enumerate(benchmarks) - if i == 1 || data[i-1, j] < time_limit + + if i == 1 || data[i - 1, j] < time_limit @info "Running $f($n)" data[i, j] = _elapsed(f, n) end @@ -208,7 +205,7 @@ function run_benchmark(N; time_limit::Float64 = 1.0) labels = ["Optimization(Enzyme)" "Optimization(ForwardDiff)" "Optimization(ReverseDiff)" "MTK(simplify)" "MTK(no simplify)" "JuMP"], xlabel = "N", ylabel = "Total time [seconds]", - ylims = (0, time_limit), + ylims = (0, time_limit) ) end ``` diff --git a/benchmarks/OptimizationFrameworks/optimal_powerflow.jmd b/benchmarks/OptimizationFrameworks/optimal_powerflow.jmd index b0cc68bfb..e08d17f1d 100644 --- a/benchmarks/OptimizationFrameworks/optimal_powerflow.jmd +++ b/benchmarks/OptimizationFrameworks/optimal_powerflow.jmd @@ -29,63 +29,63 @@ using BenchmarkTools using DataFrames ConcreteStructs.@concrete struct DataRepresentation - data - ref - var_lookup - var_init - var_lb - var_ub - ref_gen_idxs - lookup_pg - lookup_qg - lookup_va - lookup_vm - lookup_lij - lookup_p_lij - lookup_q_lij - cost_arrs - f_bus - t_bus - ref_bus_idxs - ref_buses_idxs - ref_bus_gens - ref_bus_arcs - ref_branch_idxs - ref_arcs_from - ref_arcs_to - p_idxmap - q_idxmap - bus_pd - bus_qd - bus_gs - bus_bs - br_g - br_b - br_tr - br_ti - br_ttm - br_g_fr - br_b_fr - br_g_to - br_b_to + data::Any + ref::Any + var_lookup::Any + var_init::Any + var_lb::Any + var_ub::Any + ref_gen_idxs::Any + lookup_pg::Any + lookup_qg::Any + lookup_va::Any + lookup_vm::Any + lookup_lij::Any + lookup_p_lij::Any + lookup_q_lij::Any + cost_arrs::Any + f_bus::Any + t_bus::Any + ref_bus_idxs::Any + ref_buses_idxs::Any + ref_bus_gens::Any + ref_bus_arcs::Any + ref_branch_idxs::Any + ref_arcs_from::Any + ref_arcs_to::Any + p_idxmap::Any + q_idxmap::Any + bus_pd::Any + bus_qd::Any + bus_gs::Any + bus_bs::Any + br_g::Any + br_b::Any + br_tr::Any + br_ti::Any + br_ttm::Any + br_g_fr::Any + br_b_fr::Any + br_g_to::Any + br_b_to::Any end function load_and_setup_data(file_name) data = PowerModels.parse_file(file_name) - PowerModels.standardize_cost_terms!(data, order=2) + PowerModels.standardize_cost_terms!(data, order = 2) PowerModels.calc_thermal_limits!(data) ref = PowerModels.build_ref(data)[:it][:pm][:nw][0] # Some data munging to type-stable forms - var_lookup = Dict{String,Int}() + var_lookup = Dict{String, Int}() var_init = Float64[] var_lb = Float64[] var_ub = Float64[] var_idx = 1 - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] push!(var_init, 0.0) #va push!(var_lb, -Inf) push!(var_ub, Inf) @@ -99,7 +99,7 @@ function load_and_setup_data(file_name) var_idx += 1 end - for (i,gen) in ref[:gen] + for (i, gen) in ref[:gen] push!(var_init, 0.0) #pg push!(var_lb, gen["pmin"]) push!(var_ub, gen["pmax"]) @@ -113,18 +113,18 @@ function load_and_setup_data(file_name) var_idx += 1 end - for (l,i,j) in ref[:arcs] + for (l, i, j) in ref[:arcs] branch = ref[:branch][l] push!(var_init, 0.0) #p push!(var_lb, -branch["rate_a"]) - push!(var_ub, branch["rate_a"]) + push!(var_ub, branch["rate_a"]) var_lookup["p_$(l)_$(i)_$(j)"] = var_idx var_idx += 1 push!(var_init, 0.0) #q push!(var_lb, -branch["rate_a"]) - push!(var_ub, branch["rate_a"]) + push!(var_ub, branch["rate_a"]) var_lookup["q_$(l)_$(i)_$(j)"] = var_idx var_idx += 1 end @@ -132,36 +132,36 @@ function load_and_setup_data(file_name) @assert var_idx == length(var_init)+1 ref_gen_idxs = [i for i in keys(ref[:gen])] - lookup_pg = Dict{Int,Int}() - lookup_qg = Dict{Int,Int}() - lookup_va = Dict{Int,Int}() - lookup_vm = Dict{Int,Int}() - lookup_lij = Tuple{Int,Int,Int}[] + lookup_pg = Dict{Int, Int}() + lookup_qg = Dict{Int, Int}() + lookup_va = Dict{Int, Int}() + lookup_vm = Dict{Int, Int}() + lookup_lij = Tuple{Int, Int, Int}[] lookup_p_lij = Int[] lookup_q_lij = Int[] - cost_arrs = Dict{Int,Vector{Float64}}() + cost_arrs = Dict{Int, Vector{Float64}}() - for (i,gen) in ref[:gen] + for (i, gen) in ref[:gen] lookup_pg[i] = var_lookup["pg_$(i)"] lookup_qg[i] = var_lookup["qg_$(i)"] cost_arrs[i] = gen["cost"] end - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] lookup_va[i] = var_lookup["va_$(i)"] lookup_vm[i] = var_lookup["vm_$(i)"] end - for (l,i,j) in ref[:arcs] - push!(lookup_lij, (l,i,j)) - push!(lookup_p_lij,var_lookup["p_$(l)_$(i)_$(j)"]) - push!(lookup_q_lij,var_lookup["q_$(l)_$(i)_$(j)"]) + for (l, i, j) in ref[:arcs] + push!(lookup_lij, (l, i, j)) + push!(lookup_p_lij, var_lookup["p_$(l)_$(i)_$(j)"]) + push!(lookup_q_lij, var_lookup["q_$(l)_$(i)_$(j)"]) end - f_bus = Dict{Int,Int}() - t_bus = Dict{Int,Int}() + f_bus = Dict{Int, Int}() + t_bus = Dict{Int, Int}() - for (l,branch) in ref[:branch] + for (l, branch) in ref[:branch] f_bus[l] = branch["f_bus"] t_bus[l] = branch["t_bus"] end @@ -177,13 +177,13 @@ function load_and_setup_data(file_name) p_idxmap = Dict(lookup_lij[i] => lookup_p_lij[i] for i in 1:length(lookup_lij)) q_idxmap = Dict(lookup_lij[i] => lookup_q_lij[i] for i in 1:length(lookup_lij)) - bus_pd = Dict(i => 0.0 for (i,bus) in ref[:bus]) - bus_qd = Dict(i => 0.0 for (i,bus) in ref[:bus]) + bus_pd = Dict(i => 0.0 for (i, bus) in ref[:bus]) + bus_qd = Dict(i => 0.0 for (i, bus) in ref[:bus]) - bus_gs = Dict(i => 0.0 for (i,bus) in ref[:bus]) - bus_bs = Dict(i => 0.0 for (i,bus) in ref[:bus]) + bus_gs = Dict(i => 0.0 for (i, bus) in ref[:bus]) + bus_bs = Dict(i => 0.0 for (i, bus) in ref[:bus]) - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] if length(ref[:bus_loads][i]) > 0 bus_pd[i] = sum(ref[:load][l]["pd"] for l in ref[:bus_loads][i]) bus_qd[i] = sum(ref[:load][l]["qd"] for l in ref[:bus_loads][i]) @@ -195,20 +195,19 @@ function load_and_setup_data(file_name) end end + br_g = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b = Dict(i => 0.0 for (i, branch) in ref[:branch]) - br_g = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b = Dict(i => 0.0 for (i,branch) in ref[:branch]) - - br_tr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_ti = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_ttm = Dict(i => 0.0 for (i,branch) in ref[:branch]) + br_tr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_ti = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_ttm = Dict(i => 0.0 for (i, branch) in ref[:branch]) - br_g_fr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b_fr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_g_to = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b_to = Dict(i => 0.0 for (i,branch) in ref[:branch]) + br_g_fr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b_fr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_g_to = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b_to = Dict(i => 0.0 for (i, branch) in ref[:branch]) - for (i,branch) in ref[:branch] + for (i, branch) in ref[:branch] g, b = PowerModels.calc_branch_y(branch) tr, ti = PowerModels.calc_branch_t(branch) @@ -276,9 +275,32 @@ dataset = load_and_setup_data(file_name); Ensure that all objectives and constraints evaluate to the same value on a feasible point in the same dataset ```julia -test_u0 = [0.062436387733897314, 1.0711076238965598, 0.0, 1.066509799068872, -0.023231313776594726, 1.0879315976617783, -0.033094993289919016, 1.0999999581285527, 0.07121718642320936, 1.094374845084077, 0.4228458440068076, -3.7102746662566277, 1.8046846767604458e-8, -0.44810504067067086, 8.80063717152151, -0.0, 0.8709675496332583, 3.6803022758556523, -0.0, 4.618897246588245, -1.1691336178031877, 1.3748418519024668, 0.9623014391707738, -1.3174990482204871, -2.3850868109149004, 0.1445158405684026, 2.813869610747349, 0.8151138880859179, 1.9869253829584679, 3.768252275480421, 3.9998421778156934, 0.03553108302190666, 1.177155791026922, -1.3025310027752557, -0.9598988325635542, 1.3193604239530325, 2.399997991458022, -0.003103523654225171, -2.7920689620650667, -0.6047898784636468, -1.9771521474512397, -3.7071711426024025, -3.9623014391707136, 0.3313990482205271] +test_u0 = [0.062436387733897314, 1.0711076238965598, 0.0, 1.066509799068872, + -0.023231313776594726, 1.0879315976617783, -0.033094993289919016, + 1.0999999581285527, 0.07121718642320936, 1.094374845084077, 0.4228458440068076, + -3.7102746662566277, 1.8046846767604458e-8, -0.44810504067067086, 8.80063717152151, + -0.0, 0.8709675496332583, 3.6803022758556523, -0.0, 4.618897246588245, + -1.1691336178031877, 1.3748418519024668, 0.9623014391707738, -1.3174990482204871, + -2.3850868109149004, 0.1445158405684026, 2.813869610747349, 0.8151138880859179, + 1.9869253829584679, 3.768252275480421, 3.9998421778156934, 0.03553108302190666, + 1.177155791026922, -1.3025310027752557, -0.9598988325635542, 1.3193604239530325, + 2.399997991458022, -0.003103523654225171, -2.7920689620650667, -0.6047898784636468, + -1.9771521474512397, -3.7071711426024025, -3.9623014391707136, 0.3313990482205271] test_obj = 16236.704322376236 -test_cons = [0.0, 2.5424107263916085e-14, -1.0835776720341528e-13, -6.039613253960852e-14, 0.0, 0.0, 0.0, -1.7075230118734908e-13, -3.9968028886505635e-14, 1.532107773982716e-13, 0.0, 6.661338147750939e-16, -1.7763568394002505e-15, 0.0, 8.881784197001252e-16, 4.440892098500626e-16, 0.0, 4.440892098500626e-16, -1.7763568394002505e-15, -8.881784197001252e-16, -4.440892098500626e-16, 2.220446049250313e-16, 0.0, 1.7763568394002505e-15, 0.0, 6.8833827526759706e-15, -8.992806499463768e-15, 3.9968028886505635e-14, -7.105427357601002e-15, 0.0, 0.0, 7.327471962526033e-15, -7.105427357601002e-15, 2.842170943040401e-14, -7.105427357601002e-15, -0.033094993289919016, 0.00986367951332429, -0.062436387733897314, 0.07121718642320936, 0.008780798689312044, 0.09444850019980408, 3.2570635340201743, 2.661827801892032, 5.709523923775402, 8.58227283683798, 18.147597689108025, 15.999999905294098, 3.0822827695389314, 2.6621176970504, 5.759999990861611, 8.161419886019171, 17.65224849471505, 15.80965802401578] +test_cons = [ + 0.0, 2.5424107263916085e-14, -1.0835776720341528e-13, -6.039613253960852e-14, 0.0, + 0.0, 0.0, -1.7075230118734908e-13, -3.9968028886505635e-14, 1.532107773982716e-13, + 0.0, 6.661338147750939e-16, -1.7763568394002505e-15, 0.0, 8.881784197001252e-16, + 4.440892098500626e-16, 0.0, 4.440892098500626e-16, -1.7763568394002505e-15, + -8.881784197001252e-16, -4.440892098500626e-16, 2.220446049250313e-16, + 0.0, 1.7763568394002505e-15, 0.0, 6.8833827526759706e-15, -8.992806499463768e-15, + 3.9968028886505635e-14, -7.105427357601002e-15, 0.0, 0.0, 7.327471962526033e-15, + -7.105427357601002e-15, 2.842170943040401e-14, -7.105427357601002e-15, + -0.033094993289919016, 0.00986367951332429, -0.062436387733897314, + 0.07121718642320936, 0.008780798689312044, 0.09444850019980408, + 3.2570635340201743, 2.661827801892032, 5.709523923775402, 8.58227283683798, + 18.147597689108025, 15.999999905294098, 3.0822827695389314, 2.6621176970504, + 5.759999990861611, 8.161419886019171, 17.65224849471505, 15.80965802401578] ``` ## Setup and Validations @@ -301,45 +323,45 @@ import Enzyme import ReverseDiff function build_opf_optimization_prob(dataset; adchoice = Optimization.AutoEnzyme()) - (;data, - ref, - var_lookup, - var_init, - var_lb, - var_ub, - ref_gen_idxs, - lookup_pg, - lookup_qg, - lookup_va, - lookup_vm, - lookup_lij, - lookup_p_lij, - lookup_q_lij, - cost_arrs, - f_bus, - t_bus, - ref_bus_idxs, - ref_buses_idxs, - ref_bus_gens, - ref_bus_arcs, - ref_branch_idxs, - ref_arcs_from, - ref_arcs_to, - p_idxmap, - q_idxmap, - bus_pd, - bus_qd, - bus_gs, - bus_bs, - br_g, - br_b, - br_tr, - br_ti, - br_ttm, - br_g_fr, - br_b_fr, - br_g_to, - br_b_to) = dataset + (; data, + ref, + var_lookup, + var_init, + var_lb, + var_ub, + ref_gen_idxs, + lookup_pg, + lookup_qg, + lookup_va, + lookup_vm, + lookup_lij, + lookup_p_lij, + lookup_q_lij, + cost_arrs, + f_bus, + t_bus, + ref_bus_idxs, + ref_buses_idxs, + ref_bus_gens, + ref_bus_arcs, + ref_branch_idxs, + ref_arcs_from, + ref_arcs_to, + p_idxmap, + q_idxmap, + bus_pd, + bus_qd, + bus_gs, + bus_bs, + br_g, + br_b, + br_tr, + br_ti, + br_ttm, + br_g_fr, + br_b_fr, + br_g_to, + br_b_to) = dataset #total_callback_time = 0.0 function opf_objective(x, param) @@ -358,12 +380,12 @@ function build_opf_optimization_prob(dataset; adchoice = Optimization.AutoEnzyme offsetidx = 0 # va_con - for (reti,i) in enumerate(ref_buses_idxs) + for (reti, i) in enumerate(ref_buses_idxs) ret[reti + offsetidx] = x[lookup_va[i]] end offsetidx += length(ref_buses_idxs) - + # @constraint(model, # sum(p[a] for a in ref[:bus_arcs][i]) == # sum(pg[g] for g in ref_bus_gens[i]) - @@ -372,11 +394,11 @@ function build_opf_optimization_prob(dataset; adchoice = Optimization.AutoEnzyme # ) # power_balance_p_con - for (reti,i) in enumerate(ref_bus_idxs) - ret[reti + offsetidx] = sum(x[lookup_pg[j]] for j in ref_bus_gens[i]; init=0.0) - - bus_pd[i] - - bus_gs[i]*x[lookup_vm[i]]^2 - - sum(x[p_idxmap[a]] for a in ref_bus_arcs[i]) + for (reti, i) in enumerate(ref_bus_idxs) + ret[reti + offsetidx] = sum(x[lookup_pg[j]] for j in ref_bus_gens[i]; init = 0.0) - + bus_pd[i] - + bus_gs[i]*x[lookup_vm[i]]^2 - + sum(x[p_idxmap[a]] for a in ref_bus_arcs[i]) end offsetidx += length(ref_bus_idxs) @@ -388,55 +410,55 @@ function build_opf_optimization_prob(dataset; adchoice = Optimization.AutoEnzyme # sum(shunt["bs"] for shunt in bus_shunts)*x[lookup_vm[i]]^2 # ) # power_balance_q_con - for (reti,i) in enumerate(ref_bus_idxs) - ret[reti + offsetidx] = sum(x[lookup_qg[j]] for j in ref_bus_gens[i]; init=0.0) - - bus_qd[i] + - bus_bs[i]*x[lookup_vm[i]]^2 - - sum(x[q_idxmap[a]] for a in ref_bus_arcs[i]) + for (reti, i) in enumerate(ref_bus_idxs) + ret[reti + offsetidx] = sum(x[lookup_qg[j]] for j in ref_bus_gens[i]; init = 0.0) - + bus_qd[i] + + bus_bs[i]*x[lookup_vm[i]]^2 - + sum(x[q_idxmap[a]] for a in ref_bus_arcs[i]) end offsetidx += length(ref_bus_idxs) # @NLconstraint(model, p_fr == (g+g_fr)/ttm*vm_fr^2 + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + (-b*tr-g*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)) ) # power_flow_p_from_con = - for (reti,(l,i,j)) in enumerate(ref_arcs_from) - ret[reti + offsetidx] = (br_g[l]+br_g_fr[l])/br_ttm[l]*x[lookup_vm[f_bus[l]]]^2 + - (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[f_bus[l]]]*x[lookup_vm[t_bus[l]]]*cos(x[lookup_va[f_bus[l]]]-x[lookup_va[t_bus[l]]])) + - (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[f_bus[l]]]*x[lookup_vm[t_bus[l]]]*sin(x[lookup_va[f_bus[l]]]-x[lookup_va[t_bus[l]]])) - - x[p_idxmap[(l,i,j)]] + for (reti, (l, i, j)) in enumerate(ref_arcs_from) + ret[reti + offsetidx] = (br_g[l]+br_g_fr[l])/br_ttm[l]*x[lookup_vm[f_bus[l]]]^2 + + (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[f_bus[l]]]*x[lookup_vm[t_bus[l]]]*cos(x[lookup_va[f_bus[l]]]-x[lookup_va[t_bus[l]]])) + + (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[f_bus[l]]]*x[lookup_vm[t_bus[l]]]*sin(x[lookup_va[f_bus[l]]]-x[lookup_va[t_bus[l]]])) - + x[p_idxmap[(l, i, j)]] end offsetidx += length(ref_arcs_from) # @NLconstraint(model, p_to == (g+g_to)*vm_to^2 + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + (-b*tr+g*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)) ) # power_flow_p_to_con - for (reti,(l,i,j)) in enumerate(ref_arcs_to) - ret[reti + offsetidx] = (br_g[l]+br_g_to[l])*x[lookup_vm[t_bus[l]]]^2 + - (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[t_bus[l]]]*x[lookup_vm[f_bus[l]]]*cos(x[lookup_va[t_bus[l]]]-x[lookup_va[f_bus[l]]])) + - (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[t_bus[l]]]*x[lookup_vm[f_bus[l]]]*sin(x[lookup_va[t_bus[l]]]-x[lookup_va[f_bus[l]]])) - - x[p_idxmap[(l,i,j)]] + for (reti, (l, i, j)) in enumerate(ref_arcs_to) + ret[reti + offsetidx] = (br_g[l]+br_g_to[l])*x[lookup_vm[t_bus[l]]]^2 + + (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[t_bus[l]]]*x[lookup_vm[f_bus[l]]]*cos(x[lookup_va[t_bus[l]]]-x[lookup_va[f_bus[l]]])) + + (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[t_bus[l]]]*x[lookup_vm[f_bus[l]]]*sin(x[lookup_va[t_bus[l]]]-x[lookup_va[f_bus[l]]])) - + x[p_idxmap[(l, i, j)]] end offsetidx += length(ref_arcs_to) # @NLconstraint(model, q_fr == -(b+b_fr)/ttm*vm_fr^2 - (-b*tr-g*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)) ) # power_flow_q_from_con - for (reti,(l,i,j)) in enumerate(ref_arcs_from) - ret[reti + offsetidx] = -(br_b[l]+br_b_fr[l])/br_ttm[l]*x[lookup_vm[f_bus[l]]]^2 - - (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[f_bus[l]]]*x[lookup_vm[t_bus[l]]]*cos(x[lookup_va[f_bus[l]]]-x[lookup_va[t_bus[l]]])) + - (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[f_bus[l]]]*x[lookup_vm[t_bus[l]]]*sin(x[lookup_va[f_bus[l]]]-x[lookup_va[t_bus[l]]])) - - x[q_idxmap[(l,i,j)]] + for (reti, (l, i, j)) in enumerate(ref_arcs_from) + ret[reti + offsetidx] = -(br_b[l]+br_b_fr[l])/br_ttm[l]*x[lookup_vm[f_bus[l]]]^2 - + (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[f_bus[l]]]*x[lookup_vm[t_bus[l]]]*cos(x[lookup_va[f_bus[l]]]-x[lookup_va[t_bus[l]]])) + + (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[f_bus[l]]]*x[lookup_vm[t_bus[l]]]*sin(x[lookup_va[f_bus[l]]]-x[lookup_va[t_bus[l]]])) - + x[q_idxmap[(l, i, j)]] end offsetidx += length(ref_arcs_from) # @NLconstraint(model, q_to == -(b+b_to)*vm_to^2 - (-b*tr+g*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)) ) # power_flow_q_to_con - for (reti,(l,i,j)) in enumerate(ref_arcs_to) - ret[reti + offsetidx] = -(br_b[l]+br_b_to[l])*x[lookup_vm[t_bus[l]]]^2 - - (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[t_bus[l]]]*x[lookup_vm[f_bus[l]]]*cos(x[lookup_va[t_bus[l]]]-x[lookup_va[f_bus[l]]])) + - (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[t_bus[l]]]*x[lookup_vm[f_bus[l]]]*sin(x[lookup_va[t_bus[l]]]-x[lookup_va[f_bus[l]]])) - - x[q_idxmap[(l,i,j)]] + for (reti, (l, i, j)) in enumerate(ref_arcs_to) + ret[reti + offsetidx] = -(br_b[l]+br_b_to[l])*x[lookup_vm[t_bus[l]]]^2 - + (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[t_bus[l]]]*x[lookup_vm[f_bus[l]]]*cos(x[lookup_va[t_bus[l]]]-x[lookup_va[f_bus[l]]])) + + (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(x[lookup_vm[t_bus[l]]]*x[lookup_vm[f_bus[l]]]*sin(x[lookup_va[t_bus[l]]]-x[lookup_va[f_bus[l]]])) - + x[q_idxmap[(l, i, j)]] end offsetidx += length(ref_arcs_to) @@ -444,24 +466,24 @@ function build_opf_optimization_prob(dataset; adchoice = Optimization.AutoEnzyme # @constraint(model, va_fr - va_to <= branch["angmax"]) # @constraint(model, va_fr - va_to >= branch["angmin"]) # power_flow_vad_con - for (reti,(l,i,j)) in enumerate(ref_arcs_from) - ret[reti + offsetidx] = x[lookup_va[f_bus[l]]] - x[lookup_va[t_bus[l]]] + for (reti, (l, i, j)) in enumerate(ref_arcs_from) + ret[reti + offsetidx] = x[lookup_va[f_bus[l]]] - x[lookup_va[t_bus[l]]] end offsetidx += length(ref_arcs_from) # @constraint(model, p_fr^2 + q_fr^2 <= branch["rate_a"]^2) # power_flow_mva_from_con - for (reti,(l,i,j)) in enumerate(ref_arcs_from) - ret[reti + offsetidx] = x[p_idxmap[(l,i,j)]]^2 + x[q_idxmap[(l,i,j)]]^2 + for (reti, (l, i, j)) in enumerate(ref_arcs_from) + ret[reti + offsetidx] = x[p_idxmap[(l, i, j)]]^2 + x[q_idxmap[(l, i, j)]]^2 end offsetidx += length(ref_arcs_from) # @constraint(model, p_to^2 + q_to^2 <= branch["rate_a"]^2) # power_flow_mva_to_con - for (reti,(l,i,j)) in enumerate(ref_arcs_to) - ret[reti + offsetidx] = x[p_idxmap[(l,i,j)]]^2 + x[q_idxmap[(l,i,j)]]^2 + for (reti, (l, i, j)) in enumerate(ref_arcs_to) + ret[reti + offsetidx] = x[p_idxmap[(l, i, j)]]^2 + x[q_idxmap[(l, i, j)]]^2 end offsetidx += length(ref_arcs_to) @@ -474,63 +496,63 @@ function build_opf_optimization_prob(dataset; adchoice = Optimization.AutoEnzyme con_ubs = Float64[] #@constraint(model, va[i] == 0) - for (i,bus) in ref[:ref_buses] + for (i, bus) in ref[:ref_buses] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_balance_p_con - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_balance_q_con - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_p_from_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_p_to_con - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_q_from_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_q_to_con - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_vad_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] branch = ref[:branch][l] push!(con_lbs, branch["angmin"]) push!(con_ubs, branch["angmax"]) end #power_flow_mva_from_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] branch = ref[:branch][l] push!(con_lbs, -Inf) push!(con_ubs, branch["rate_a"]^2) end #power_flow_mva_to_con - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] branch = ref[:branch][l] push!(con_lbs, -Inf) push!(con_ubs, branch["rate_a"]^2) @@ -540,8 +562,9 @@ function build_opf_optimization_prob(dataset; adchoice = Optimization.AutoEnzyme ret = Array{Float64}(undef, length(con_lbs)) model_constraints = length(con_lbs) - optf = Optimization.OptimizationFunction(opf_objective, adchoice; cons=opf_constraints) - prob = Optimization.OptimizationProblem(optf, var_init; lb=var_lb, ub=var_ub, lcons=con_lbs, ucons=con_ubs) + optf = Optimization.OptimizationFunction(opf_objective, adchoice; cons = opf_constraints) + prob = Optimization.OptimizationProblem( + optf, var_init; lb = var_lb, ub = var_ub, lcons = con_lbs, ucons = con_ubs) end function solve_opf_optimization(dataset; adchoice = Optimization.AutoSparseReverseDiff(true)) @@ -553,14 +576,17 @@ function solve_opf_optimization(dataset; adchoice = Optimization.AutoSparseRever @allocated prob.f(prob.u0, nothing) == 0 @allocated prob.f.cons(ret, prob.u0, nothing) == 0 - solve_time_with_compilation = @elapsed sol = Optimization.solve(prob, Ipopt.Optimizer(), print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME) + solve_time_with_compilation = @elapsed sol = Optimization.solve( + prob, Ipopt.Optimizer(), print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME) cost = sol.minimum feasible = (sol.retcode == Optimization.SciMLBase.ReturnCode.Success) #println(sol.u) # solution vector - solve_time_without_compilation = @elapsed sol = Optimization.solve(prob, Ipopt.Optimizer(), print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME) - - return (prob,sol),Dict( + solve_time_without_compilation = @elapsed sol = Optimization.solve( + prob, Ipopt.Optimizer(), print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME) + + return (prob, sol), + Dict( "case" => file_name, "variables" => length(prob.u0), "constraints" => length(prob.lcons), @@ -568,7 +594,7 @@ function solve_opf_optimization(dataset; adchoice = Optimization.AutoSparseRever "cost" => cost, "time_build" => model_build_time, "time_solve" => solve_time_without_compilation, - "time_solve_compilation" => solve_time_with_compilation, + "time_solve_compilation" => solve_time_with_compilation ) end @@ -612,7 +638,7 @@ import SymbolicIndexingInterface using SymbolicIndexingInterface: variable_symbols, all_variable_symbols, getname function build_opf_mtk_prob(dataset) - (;data, ref) = dataset + (; data, ref) = dataset vars = Num[] lb = Float64[] @@ -640,7 +666,9 @@ function build_opf_mtk_prob(dataset) push!(ub, ref[:gen][i]["qmax"]) end vars = vcat(vars, [pg[i] for i in keys(ref[:gen])], [qg[i] for i in keys(ref[:gen])]) - i_inds, j_inds, l_inds = maximum(first.(ref[:arcs])), maximum(getindex.(ref[:arcs], Ref(2))), maximum(last.(ref[:arcs])) + i_inds, j_inds, + l_inds = maximum(first.(ref[:arcs])), maximum(getindex.(ref[:arcs], Ref(2))), + maximum(last.(ref[:arcs])) ModelingToolkit.@variables p[1:i_inds, 1:j_inds, 1:l_inds] ModelingToolkit.@variables q[1:i_inds, 1:j_inds, 1:l_inds] @@ -656,9 +684,10 @@ function build_opf_mtk_prob(dataset) push!(ub, ref[:branch][l]["rate_a"]) end - loss = sum(gen["cost"][1] * pg[i]^2 + gen["cost"][2] * pg[i] + gen["cost"][3] for (i, gen) in ref[:gen]) + loss = sum(gen["cost"][1] * pg[i]^2 + gen["cost"][2] * pg[i] + gen["cost"][3] + for (i, gen) in ref[:gen]) - cons = Array{Union{ModelingToolkit.Equation,ModelingToolkit.Inequality}}([]) + cons = Array{Union{ModelingToolkit.Equation, ModelingToolkit.Inequality}}([]) for (i, bus) in ref[:ref_buses] push!(cons, va[i] ~ 0) end @@ -668,16 +697,17 @@ function build_opf_mtk_prob(dataset) bus_shunts = [ref[:shunt][s] for s in ref[:bus_shunts][i]] push!(cons, sum(p[a...] for a in ref[:bus_arcs][i]) ~ - (sum(pg[g] for g in ref[:bus_gens][i]; init = 0.0)) - - (sum(load["pd"] for load in bus_loads; init = 0.0)) - - sum(shunt["gs"] for shunt in bus_shunts; init = 0.0)*vm[i]^2 + (sum(pg[g] for g in ref[:bus_gens][i]; init = 0.0)) - + (sum(load["pd"] for load in bus_loads; init = 0.0)) - + sum(shunt["gs"] for shunt in bus_shunts; init = 0.0)*vm[i]^2 ) push!(cons, sum(q[a...] for a in ref[:bus_arcs][i]) ~ - (sum(qg[g] for g in ref[:bus_gens][i]; init = 0.0)) - - (sum(load["qd"] for load in bus_loads; init = 0.0)) - + sum(shunt["bs"] for shunt in bus_shunts; init = 0.0)*vm[i]^2 + (sum(qg[g] for g in ref[:bus_gens][i]; init = 0.0)) - + (sum(load["qd"] for load in bus_loads; init = 0.0)) + + + sum(shunt["bs"] for shunt in bus_shunts; init = 0.0)*vm[i]^2 ) end @@ -705,12 +735,28 @@ function build_opf_mtk_prob(dataset) b_to = branch["b_to"] # From side of the branch flow - push!(cons, p_fr ~ (g + g_fr) / ttm * vm_fr^2 + (-g * tr + b * ti) / ttm * (vm_fr * vm_to * cos(va_fr - va_to)) + (-b * tr - g * ti) / ttm * (vm_fr * vm_to * sin(va_fr - va_to))) - push!(cons, q_fr ~ -(b + b_fr) / ttm * vm_fr^2 - (-b * tr - g * ti) / ttm * (vm_fr * vm_to * cos(va_fr - va_to)) + (-g * tr + b * ti) / ttm * (vm_fr * vm_to * sin(va_fr - va_to))) + push!(cons, + p_fr ~ + (g + g_fr) / ttm * vm_fr^2 + + (-g * tr + b * ti) / ttm * (vm_fr * vm_to * cos(va_fr - va_to)) + + (-b * tr - g * ti) / ttm * (vm_fr * vm_to * sin(va_fr - va_to))) + push!(cons, + q_fr ~ + -(b + b_fr) / ttm * vm_fr^2 - + (-b * tr - g * ti) / ttm * (vm_fr * vm_to * cos(va_fr - va_to)) + + (-g * tr + b * ti) / ttm * (vm_fr * vm_to * sin(va_fr - va_to))) # To side of the branch flow - push!(cons, p_to ~ (g + g_to) * vm_to^2 + (-g * tr - b * ti) / ttm * (vm_to * vm_fr * cos(va_to - va_fr)) + (-b * tr + g * ti) / ttm * (vm_to * vm_fr * sin(va_to - va_fr))) - push!(cons, q_to ~ -(b + b_to) * vm_to^2 - (-b * tr + g * ti) / ttm * (vm_to * vm_fr * cos(va_to - va_fr)) + (-g * tr - b * ti) / ttm * (vm_to * vm_fr * sin(va_to - va_fr))) + push!(cons, + p_to ~ + (g + g_to) * vm_to^2 + + (-g * tr - b * ti) / ttm * (vm_to * vm_fr * cos(va_to - va_fr)) + + (-b * tr + g * ti) / ttm * (vm_to * vm_fr * sin(va_to - va_fr))) + push!(cons, + q_to ~ + -(b + b_to) * vm_to^2 - + (-b * tr + g * ti) / ttm * (vm_to * vm_fr * cos(va_to - va_fr)) + + (-g * tr - b * ti) / ttm * (vm_to * vm_fr * sin(va_to - va_fr))) # Voltage angle difference limit push!(cons, va_fr - va_to ≲ branch["angmax"]) @@ -721,7 +767,8 @@ function build_opf_mtk_prob(dataset) push!(cons, p_to^2 + q_to^2 ≲ branch["rate_a"]^2) end - optsys = ModelingToolkit.OptimizationSystem(loss, vars, [], constraints=cons, name=:rosetta) + optsys = ModelingToolkit.OptimizationSystem( + loss, vars, [], constraints = cons, name = :rosetta) optsys = ModelingToolkit.complete(optsys) u0map = [Num(k) => 0.0 for k in collect(unknowns(optsys))] ks = collect(Num.(unknowns(optsys))) @@ -736,7 +783,9 @@ function build_opf_mtk_prob(dataset) for k in collect(unknowns(optsys)) push!(inds, findall(x -> isequal(x, k), vars)[1]) end - prob = Optimization.OptimizationProblem(optsys, Dict(u0map), lb = lb[inds], ub = ub[inds], grad=true, hess=true, cons_j=true, cons_h=true, cons_sparse=true, sparse=true) + prob = Optimization.OptimizationProblem( + optsys, Dict(u0map), lb = lb[inds], ub = ub[inds], grad = true, hess = true, + cons_j = true, cons_h = true, cons_sparse = true, sparse = true) end function solve_opf_mtk(dataset) @@ -744,18 +793,18 @@ function solve_opf_mtk(dataset) # @assert prob.f(prob.u0, nothing) == 0.0 #MTK with simplification doesn't evaluate the same ret = zeros(length(prob.lcons)) - prob.f.cons(ret, prob.u0, nothing, ) + prob.f.cons(ret, prob.u0, nothing) @allocated prob.f(prob.u0, nothing) == 0 @allocated prob.f.cons(ret, prob.u0, nothing) == 0 - solve_time_with_compilation = @elapsed sol = OptimizationMOI.solve(prob, Ipopt.Optimizer()) solve_time_without_compilation = @elapsed sol = OptimizationMOI.solve(prob, Ipopt.Optimizer()) cost = sol.minimum feasible = (sol.retcode == Optimization.SciMLBase.ReturnCode.Success) - return (prob,sol),Dict( + return (prob, sol), + Dict( "case" => file_name, "variables" => length(prob.u0), "constraints" => length(prob.lcons), @@ -763,7 +812,7 @@ function solve_opf_mtk(dataset) "cost" => cost, "time_build" => model_build_time, "time_solve" => solve_time_without_compilation, - "time_solve_compilation" => solve_time_with_compilation, + "time_solve_compilation" => solve_time_with_compilation ) end @@ -799,7 +848,6 @@ function test_mtk_prob(dataset, test_u0) end ``` - ```julia objective, reconstructed_u0, cons_vals, lcons, ucons = test_mtk_prob(dataset, test_u0) ``` @@ -814,20 +862,22 @@ objective, reconstructed_u0, cons_vals, lcons, ucons = test_mtk_prob(dataset, te # is arbitrary during simplification of the symbolic system. swappable_pairs = [ [dataset.var_lookup["pg_1"], dataset.var_lookup["pg_2"]], - [dataset.var_lookup["qg_1"], dataset.var_lookup["qg_2"]], + [dataset.var_lookup["qg_1"], dataset.var_lookup["qg_2"]] ] # Indexes that must match non_swappable_idxs = setdiff(eachindex(reconstructed_u0), reduce(vcat, swappable_pairs)) @assert isapprox(reconstructed_u0[non_swappable_idxs], test_u0[non_swappable_idxs]) for (i, j) in swappable_pairs - @assert isapprox(reconstructed_u0[[i, j]], test_u0[[i, j]]) || isapprox(reconstructed_u0[[j, i]], test_u0[[i, j]]) + @assert isapprox(reconstructed_u0[[i, j]], test_u0[[i, j]]) || + isapprox(reconstructed_u0[[j, i]], test_u0[[i, j]]) end ``` ```julia # Test all constraint values -@assert all(isapprox.(lcons, cons_vals, atol=1e-12) .|| (lcons .<= cons_vals .<= ucons) .|| isapprox.(cons_vals, ucons, atol=1e-12)) +@assert all(isapprox.(lcons, cons_vals, atol = 1e-12) .|| + (lcons .<= cons_vals .<= ucons) .|| isapprox.(cons_vals, ucons, atol = 1e-12)) ``` ```julia @@ -845,44 +895,54 @@ import Ipopt import JuMP function build_opf_jump_prob(dataset) - (;data, ref) = dataset + (; data, ref) = dataset constraints = Any[] model = JuMP.Model(Ipopt.Optimizer) vars = [JuMP.@variable(model, va[i in keys(ref[:bus])]), - JuMP.@variable(model, ref[:bus][i]["vmin"] <= vm[i in keys(ref[:bus])] <= ref[:bus][i]["vmax"], start=1.0), - JuMP.@variable(model, ref[:gen][i]["pmin"] <= pg[i in keys(ref[:gen])] <= ref[:gen][i]["pmax"]), - JuMP.@variable(model, ref[:gen][i]["qmin"] <= qg[i in keys(ref[:gen])] <= ref[:gen][i]["qmax"]), - JuMP.@variable(model, -ref[:branch][l]["rate_a"] <= p[(l,i,j) in ref[:arcs]] <= ref[:branch][l]["rate_a"]), - JuMP.@variable(model, -ref[:branch][l]["rate_a"] <= q[(l,i,j) in ref[:arcs]] <= ref[:branch][l]["rate_a"])] + JuMP.@variable(model, + ref[:bus][i]["vmin"] <= vm[i in keys(ref[:bus])] <= ref[:bus][i]["vmax"], + start=1.0), + JuMP.@variable(model, + ref[:gen][i]["pmin"] <= pg[i in keys(ref[:gen])] <= ref[:gen][i]["pmax"]), + JuMP.@variable(model, + ref[:gen][i]["qmin"] <= qg[i in keys(ref[:gen])] <= ref[:gen][i]["qmax"]), + JuMP.@variable(model, + -ref[:branch][l]["rate_a"] <= p[(l, i, j) in ref[:arcs]] <= + ref[:branch][l]["rate_a"]), + JuMP.@variable(model, + -ref[:branch][l]["rate_a"] <= q[(l, i, j) in ref[:arcs]] <= + ref[:branch][l]["rate_a"])] + + JuMP.@objective(model, Min, + sum(gen["cost"][1]*pg[i]^2 + gen["cost"][2]*pg[i] + gen["cost"][3] + for (i, gen) in ref[:gen])) - JuMP.@objective(model, Min, sum(gen["cost"][1]*pg[i]^2 + gen["cost"][2]*pg[i] + gen["cost"][3] for (i,gen) in ref[:gen])) - - for (i,bus) in ref[:ref_buses] - push!(constraints,JuMP.@constraint(model, va[i] == 0)) + for (i, bus) in ref[:ref_buses] + push!(constraints, JuMP.@constraint(model, va[i] == 0)) end - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] bus_loads = [ref[:load][l] for l in ref[:bus_loads][i]] bus_shunts = [ref[:shunt][s] for s in ref[:bus_shunts][i]] - push!(constraints,JuMP.@constraint(model, - sum(p[a] for a in ref[:bus_arcs][i]) == - sum(pg[g] for g in ref[:bus_gens][i]) - - sum(load["pd"] for load in bus_loads) - - sum(shunt["gs"] for shunt in bus_shunts)*vm[i]^2 - )) + push!(constraints, + JuMP.@constraint(model, + sum(p[a] for a in ref[:bus_arcs][i]) == + sum(pg[g] for g in ref[:bus_gens][i]) - + sum(load["pd"] for load in bus_loads) - + sum(shunt["gs"] for shunt in bus_shunts)*vm[i]^2)) - push!(constraints,JuMP.@constraint(model, - sum(q[a] for a in ref[:bus_arcs][i]) == - sum(qg[g] for g in ref[:bus_gens][i]) - - sum(load["qd"] for load in bus_loads) + - sum(shunt["bs"] for shunt in bus_shunts)*vm[i]^2 - )) + push!(constraints, + JuMP.@constraint(model, + sum(q[a] for a in ref[:bus_arcs][i]) == + sum(qg[g] for g in ref[:bus_gens][i]) - + sum(load["qd"] for load in bus_loads) + + sum(shunt["bs"] for shunt in bus_shunts)*vm[i]^2)) end # Branch power flow physics and limit constraints - for (i,branch) in ref[:branch] + for (i, branch) in ref[:branch] f_idx = (i, branch["f_bus"], branch["t_bus"]) t_idx = (i, branch["t_bus"], branch["f_bus"]) @@ -905,25 +965,43 @@ function build_opf_jump_prob(dataset) b_to = branch["b_to"] # From side of the branch flow - push!(constraints,JuMP.@NLconstraint(model, p_fr == (g+g_fr)/ttm*vm_fr^2 + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + (-b*tr-g*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)) )) - push!(constraints,JuMP.@NLconstraint(model, q_fr == -(b+b_fr)/ttm*vm_fr^2 - (-b*tr-g*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)) )) + push!(constraints, + JuMP.@NLconstraint(model, + p_fr == + (g+g_fr)/ttm*vm_fr^2 + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + + (-b*tr-g*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)))) + push!(constraints, + JuMP.@NLconstraint(model, + q_fr == + -(b+b_fr)/ttm*vm_fr^2 - (-b*tr-g*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)))) # To side of the branch flow - push!(constraints,JuMP.@NLconstraint(model, p_to == (g+g_to)*vm_to^2 + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + (-b*tr+g*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)) )) - push!(constraints,JuMP.@NLconstraint(model, q_to == -(b+b_to)*vm_to^2 - (-b*tr+g*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)) )) + push!(constraints, + JuMP.@NLconstraint(model, + p_to == + (g+g_to)*vm_to^2 + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + + (-b*tr+g*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)))) + push!(constraints, + JuMP.@NLconstraint(model, + q_to == + -(b+b_to)*vm_to^2 - (-b*tr+g*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)))) # Voltage angle difference limit - push!(constraints,JuMP.@constraint(model, branch["angmin"] <= va_fr - va_to <= branch["angmax"])) + push!(constraints, JuMP.@constraint(model, + branch["angmin"] <= va_fr - va_to <= branch["angmax"])) # Apparent power limit, from side and to side - push!(constraints,JuMP.@constraint(model, p_fr^2 + q_fr^2 <= branch["rate_a"]^2)) - push!(constraints,JuMP.@constraint(model, p_to^2 + q_to^2 <= branch["rate_a"]^2)) + push!(constraints, JuMP.@constraint(model, p_fr^2 + q_fr^2 <= branch["rate_a"]^2)) + push!(constraints, JuMP.@constraint(model, p_to^2 + q_to^2 <= branch["rate_a"]^2)) end model_variables = JuMP.num_variables(model) # for consistency with other solvers, skip the variable bounds in the constraint count - non_nl_constraints = sum(JuMP.num_constraints(model, ft, st) for (ft, st) in JuMP.list_of_constraint_types(model) if ft != JuMP.VariableRef) + non_nl_constraints = sum(JuMP.num_constraints(model, ft, st) + for (ft, st) in JuMP.list_of_constraint_types(model) if ft != JuMP.VariableRef) model_constraints = JuMP.num_nonlinear_constraints(model) + non_nl_constraints model, vars, constraints @@ -941,17 +1019,18 @@ function solve_opf_jump(dataset) feasible = (JuMP.termination_status(model) == JuMP.LOCALLY_SOLVED) nlp_block = JuMP.MOI.get(model, JuMP.MOI.NLPBlock()) - total_callback_time = - nlp_block.evaluator.eval_objective_timer + - nlp_block.evaluator.eval_objective_gradient_timer + - nlp_block.evaluator.eval_constraint_timer + - nlp_block.evaluator.eval_constraint_jacobian_timer + - nlp_block.evaluator.eval_hessian_lagrangian_timer + total_callback_time = nlp_block.evaluator.eval_objective_timer + + nlp_block.evaluator.eval_objective_gradient_timer + + nlp_block.evaluator.eval_constraint_timer + + nlp_block.evaluator.eval_constraint_jacobian_timer + + nlp_block.evaluator.eval_hessian_lagrangian_timer model_variables = JuMP.num_variables(model) - non_nl_constraints = sum(JuMP.num_constraints(model, ft, st) for (ft, st) in JuMP.list_of_constraint_types(model) if ft != JuMP.VariableRef) + non_nl_constraints = sum(JuMP.num_constraints(model, ft, st) + for (ft, st) in JuMP.list_of_constraint_types(model) if ft != JuMP.VariableRef) model_constraints = JuMP.num_nonlinear_constraints(model) + non_nl_constraints - - return model, Dict( + + return model, + Dict( "case" => file_name, "variables" => model_variables, "constraints" => model_constraints, @@ -959,37 +1038,37 @@ function solve_opf_jump(dataset) "cost" => cost, "time_build" => model_build_time, "time_solve" => solve_time_without_compilation, - "time_solve_compilation" => solve_time_with_compilation, + "time_solve_compilation" => solve_time_with_compilation ) end function test_jump_prob(dataset, test_u0) - model, vars, constraints = build_opf_jump_prob(dataset) + model, vars, constraints = build_opf_jump_prob(dataset) (; - lookup_pg, - lookup_qg, - lookup_va, - lookup_vm, - lookup_lij, - lookup_p_lij, - lookup_q_lij) = dataset + lookup_pg, + lookup_qg, + lookup_va, + lookup_vm, + lookup_lij, + lookup_p_lij, + lookup_q_lij) = dataset f = JuMP.objective_function(model) - flatvars = reduce(vcat,[reduce(vcat,vars[i]) for i in 1:length(vars)]) + flatvars = reduce(vcat, [reduce(vcat, vars[i]) for i in 1:length(vars)]) point = Dict() for v in flatvars varname, varint = split(JuMP.name(v), "[") idx = if varint[1] == '(' varint = (parse(Int, varint[2]), parse(Int, varint[5]), parse(Int, varint[8])) if varname == "p" - lookup_p_lij[findfirst(x->x==varint,lookup_lij)] + lookup_p_lij[findfirst(x->x==varint, lookup_lij)] elseif varname == "q" - lookup_q_lij[findfirst(x->x==varint,lookup_lij)] + lookup_q_lij[findfirst(x->x==varint, lookup_lij)] else error("Invalid $varname, $varint") end else - varint = parse(Int, varint[1:end-1]) + varint = parse(Int, varint[1:(end - 1)]) if varname == "va" lookup_va[varint] elseif varname == "pg" @@ -1049,15 +1128,15 @@ import ADNLPModels import NLPModelsIpopt function build_opf_nlpmodels_prob(dataset) - (;data, ref) = dataset + (; data, ref) = dataset - bus_pd = Dict(i => 0.0 for (i,bus) in ref[:bus]) - bus_qd = Dict(i => 0.0 for (i,bus) in ref[:bus]) + bus_pd = Dict(i => 0.0 for (i, bus) in ref[:bus]) + bus_qd = Dict(i => 0.0 for (i, bus) in ref[:bus]) - bus_gs = Dict(i => 0.0 for (i,bus) in ref[:bus]) - bus_bs = Dict(i => 0.0 for (i,bus) in ref[:bus]) + bus_gs = Dict(i => 0.0 for (i, bus) in ref[:bus]) + bus_bs = Dict(i => 0.0 for (i, bus) in ref[:bus]) - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] if length(ref[:bus_loads][i]) > 0 bus_pd[i] = sum(ref[:load][l]["pd"] for l in ref[:bus_loads][i]) bus_qd[i] = sum(ref[:load][l]["qd"] for l in ref[:bus_loads][i]) @@ -1069,20 +1148,19 @@ function build_opf_nlpmodels_prob(dataset) end end + br_g = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b = Dict(i => 0.0 for (i, branch) in ref[:branch]) - br_g = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b = Dict(i => 0.0 for (i,branch) in ref[:branch]) + br_tr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_ti = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_ttm = Dict(i => 0.0 for (i, branch) in ref[:branch]) - br_tr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_ti = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_ttm = Dict(i => 0.0 for (i,branch) in ref[:branch]) + br_g_fr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b_fr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_g_to = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b_to = Dict(i => 0.0 for (i, branch) in ref[:branch]) - br_g_fr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b_fr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_g_to = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b_to = Dict(i => 0.0 for (i,branch) in ref[:branch]) - - for (i,branch) in ref[:branch] + for (i, branch) in ref[:branch] g, b = PowerModels.calc_branch_y(branch) tr, ti = PowerModels.calc_branch_t(branch) @@ -1099,14 +1177,14 @@ function build_opf_nlpmodels_prob(dataset) br_b_to[i] = branch["b_to"] end - var_lookup = Dict{String,Int}() + var_lookup = Dict{String, Int}() var_init = Float64[] var_lb = Float64[] var_ub = Float64[] var_idx = 1 - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] push!(var_init, 0.0) #va push!(var_lb, -Inf) push!(var_ub, Inf) @@ -1120,7 +1198,7 @@ function build_opf_nlpmodels_prob(dataset) var_idx += 1 end - for (i,gen) in ref[:gen] + for (i, gen) in ref[:gen] push!(var_init, 0.0) #pg push!(var_lb, gen["pmin"]) push!(var_ub, gen["pmax"]) @@ -1134,18 +1212,18 @@ function build_opf_nlpmodels_prob(dataset) var_idx += 1 end - for (l,i,j) in ref[:arcs] + for (l, i, j) in ref[:arcs] branch = ref[:branch][l] push!(var_init, 0.0) #p push!(var_lb, -branch["rate_a"]) - push!(var_ub, branch["rate_a"]) + push!(var_ub, branch["rate_a"]) var_lookup["p_$(l)_$(i)_$(j)"] = var_idx var_idx += 1 push!(var_init, 0.0) #q push!(var_lb, -branch["rate_a"]) - push!(var_ub, branch["rate_a"]) + push!(var_ub, branch["rate_a"]) var_lookup["q_$(l)_$(i)_$(j)"] = var_idx var_idx += 1 end @@ -1155,7 +1233,7 @@ function build_opf_nlpmodels_prob(dataset) function opf_objective(x) #start = time() cost = 0.0 - for (i,gen) in ref[:gen] + for (i, gen) in ref[:gen] pg = x[var_lookup["pg_$(i)"]] cost += gen["cost"][1]*pg^2 + gen["cost"][2]*pg + gen["cost"][3] end @@ -1166,24 +1244,23 @@ function build_opf_nlpmodels_prob(dataset) function opf_constraints!(cx, x) #start = time() - va = Dict(i => x[var_lookup["va_$(i)"]] for (i,bus) in ref[:bus]) - vm = Dict(i => x[var_lookup["vm_$(i)"]] for (i,bus) in ref[:bus]) + va = Dict(i => x[var_lookup["va_$(i)"]] for (i, bus) in ref[:bus]) + vm = Dict(i => x[var_lookup["vm_$(i)"]] for (i, bus) in ref[:bus]) - pg = Dict(i => x[var_lookup["pg_$(i)"]] for (i,gen) in ref[:gen]) - qg = Dict(i => x[var_lookup["qg_$(i)"]] for (i,gen) in ref[:gen]) + pg = Dict(i => x[var_lookup["pg_$(i)"]] for (i, gen) in ref[:gen]) + qg = Dict(i => x[var_lookup["qg_$(i)"]] for (i, gen) in ref[:gen]) - p = Dict((l,i,j) => x[var_lookup["p_$(l)_$(i)_$(j)"]] for (l,i,j) in ref[:arcs]) - q = Dict((l,i,j) => x[var_lookup["q_$(l)_$(i)_$(j)"]] for (l,i,j) in ref[:arcs]) - - vm_fr = Dict(l => vm[branch["f_bus"]] for (l,branch) in ref[:branch]) - vm_to = Dict(l => vm[branch["t_bus"]] for (l,branch) in ref[:branch]) - va_fr = Dict(l => va[branch["f_bus"]] for (l,branch) in ref[:branch]) - va_to = Dict(l => va[branch["t_bus"]] for (l,branch) in ref[:branch]) + p = Dict((l, i, j) => x[var_lookup["p_$(l)_$(i)_$(j)"]] for (l, i, j) in ref[:arcs]) + q = Dict((l, i, j) => x[var_lookup["q_$(l)_$(i)_$(j)"]] for (l, i, j) in ref[:arcs]) + vm_fr = Dict(l => vm[branch["f_bus"]] for (l, branch) in ref[:branch]) + vm_to = Dict(l => vm[branch["t_bus"]] for (l, branch) in ref[:branch]) + va_fr = Dict(l => va[branch["f_bus"]] for (l, branch) in ref[:branch]) + va_to = Dict(l => va[branch["t_bus"]] for (l, branch) in ref[:branch]) # va_con = [va[i] for (i,bus) in ref[:ref_buses]] k = 0 - for (i,bus) in ref[:ref_buses] + for (i, bus) in ref[:ref_buses] k += 1 cx[k] = va[i] end @@ -1196,7 +1273,8 @@ function build_opf_nlpmodels_prob(dataset) # ) for (i, bus) in ref[:bus] k += 1 - cx[k] = sum(pg[j] for j in ref[:bus_gens][i]; init=0.0) - bus_pd[i] - bus_gs[i]*vm[i]^2 - sum(p[a] for a in ref[:bus_arcs][i]) + cx[k] = sum(pg[j] for j in ref[:bus_gens][i]; init = 0.0) - bus_pd[i] - + bus_gs[i]*vm[i]^2 - sum(p[a] for a in ref[:bus_arcs][i]) end # @constraint(model, @@ -1207,63 +1285,63 @@ function build_opf_nlpmodels_prob(dataset) # ) for (i, bus) in ref[:bus] k += 1 - cx[k] = sum(qg[j] for j in ref[:bus_gens][i]; init=0.0) - bus_qd[i] + bus_bs[i]*vm[i]^2 - sum(q[a] for a in ref[:bus_arcs][i]) + cx[k] = sum(qg[j] for j in ref[:bus_gens][i]; init = 0.0) - bus_qd[i] + + bus_bs[i]*vm[i]^2 - sum(q[a] for a in ref[:bus_arcs][i]) end - # @NLconstraint(model, p_fr == (g+g_fr)/ttm*vm_fr^2 + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + (-b*tr-g*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)) ) - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] k += 1 cx[k] = (br_g[l]+br_g_fr[l])/br_ttm[l]*vm_fr[l]^2 + - (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*cos(va_fr[l]-va_to[l])) + - (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*sin(va_fr[l]-va_to[l])) - - p[(l,i,j)] + (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*cos(va_fr[l]-va_to[l])) + + (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*sin(va_fr[l]-va_to[l])) - + p[(l, i, j)] end # @NLconstraint(model, p_to == (g+g_to)*vm_to^2 + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + (-b*tr+g*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)) ) - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] k += 1 cx[k] = (br_g[l]+br_g_to[l])*vm_to[l]^2 + - (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*cos(va_to[l]-va_fr[l])) + - (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*sin(va_to[l]-va_fr[l])) - - p[(l,i,j)] + (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*cos(va_to[l]-va_fr[l])) + + (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*sin(va_to[l]-va_fr[l])) - + p[(l, i, j)] end # @NLconstraint(model, q_fr == -(b+b_fr)/ttm*vm_fr^2 - (-b*tr-g*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)) ) - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] k += 1 cx[k] = -(br_b[l]+br_b_fr[l])/br_ttm[l]*vm_fr[l]^2 - - (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*cos(va_fr[l]-va_to[l])) + - (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*sin(va_fr[l]-va_to[l])) - - q[(l,i,j)] + (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*cos(va_fr[l]-va_to[l])) + + (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*sin(va_fr[l]-va_to[l])) - + q[(l, i, j)] end # @NLconstraint(model, q_to == -(b+b_to)*vm_to^2 - (-b*tr+g*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)) ) - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] k += 1 cx[k] = -(br_b[l]+br_b_to[l])*vm_to[l]^2 - - (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*cos(va_to[l]-va_fr[l])) + - (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*sin(va_to[l]-va_fr[l])) - - q[(l,i,j)] + (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*cos(va_to[l]-va_fr[l])) + + (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*sin(va_to[l]-va_fr[l])) - + q[(l, i, j)] end # @constraint(model, va_fr - va_to <= branch["angmax"]) # @constraint(model, va_fr - va_to >= branch["angmin"]) - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] k += 1 cx[k] = va_fr[l] - va_to[l] end # @constraint(model, p_fr^2 + q_fr^2 <= branch["rate_a"]^2) - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] k += 1 - cx[k] = p[(l,i,j)]^2 + q[(l,i,j)]^2 + cx[k] = p[(l, i, j)]^2 + q[(l, i, j)]^2 end # @constraint(model, p_to^2 + q_to^2 <= branch["rate_a"]^2) - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] k += 1 - cx[k] = p[(l,i,j)]^2 + q[(l,i,j)]^2 + cx[k] = p[(l, i, j)]^2 + q[(l, i, j)]^2 end #total_callback_time += time() - start @@ -1274,63 +1352,63 @@ function build_opf_nlpmodels_prob(dataset) con_ubs = Float64[] #@constraint(model, va[i] == 0) - for (i,bus) in ref[:ref_buses] + for (i, bus) in ref[:ref_buses] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_balance_p_con - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_balance_q_con - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_p_from_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_p_to_con - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_q_from_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_q_to_con - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_vad_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] branch = ref[:branch][l] push!(con_lbs, branch["angmin"]) push!(con_ubs, branch["angmax"]) end #power_flow_mva_from_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] branch = ref[:branch][l] push!(con_lbs, -Inf) push!(con_ubs, branch["rate_a"]^2) end #power_flow_mva_to_con - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] branch = ref[:branch][l] push!(con_lbs, -Inf) push!(con_ubs, branch["rate_a"]^2) @@ -1354,20 +1432,24 @@ function build_opf_nlpmodels_prob(dataset) hessian_residual_backend = ADNLPModels.ForwardDiffADHessian ) =# - nlp = ADNLPModels.ADNLPModel!(opf_objective, var_init, var_lb, var_ub, opf_constraints!, con_lbs, con_ubs, backend = :optimized) + nlp = ADNLPModels.ADNLPModel!(opf_objective, var_init, var_lb, var_ub, + opf_constraints!, con_lbs, con_ubs, backend = :optimized) end function solve_opf_nlpmodels(dataset) model_build_time = @elapsed nlp = build_opf_nlpmodels_prob(dataset) - solve_time_with_compilation = @elapsed output = NLPModelsIpopt.ipopt(nlp, print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME) - solve_time_without_compilation = @elapsed output = NLPModelsIpopt.ipopt(nlp, print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME) + solve_time_with_compilation = @elapsed output = NLPModelsIpopt.ipopt( + nlp, print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME) + solve_time_without_compilation = @elapsed output = NLPModelsIpopt.ipopt( + nlp, print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME) cost = output.objective - feasible = (output.primal_feas <= 1e-6) + feasible = (output.primal_feas <= 1e-6) model_variables = nlp.meta.nvar model_constraints = nlp.meta.ncon - return (nlp, output), Dict( + return (nlp, output), + Dict( "case" => file_name, "variables" => model_variables, "constraints" => model_constraints, @@ -1375,7 +1457,7 @@ function solve_opf_nlpmodels(dataset) "cost" => cost, "time_build" => model_build_time, "time_solve" => solve_time_without_compilation, - "time_solve_compilation" => solve_time_with_compilation, + "time_solve_compilation" => solve_time_with_compilation ) end @@ -1410,18 +1492,18 @@ import Nonconvex Nonconvex.@load Ipopt function build_opf_nonconvex_prob(dataset) - (;data, ref) = dataset + (; data, ref) = dataset time_model_start = time() model = Nonconvex.DictModel() - bus_pd = Dict(i => 0.0 for (i,bus) in ref[:bus]) - bus_qd = Dict(i => 0.0 for (i,bus) in ref[:bus]) + bus_pd = Dict(i => 0.0 for (i, bus) in ref[:bus]) + bus_qd = Dict(i => 0.0 for (i, bus) in ref[:bus]) - bus_gs = Dict(i => 0.0 for (i,bus) in ref[:bus]) - bus_bs = Dict(i => 0.0 for (i,bus) in ref[:bus]) + bus_gs = Dict(i => 0.0 for (i, bus) in ref[:bus]) + bus_bs = Dict(i => 0.0 for (i, bus) in ref[:bus]) - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] if length(ref[:bus_loads][i]) > 0 bus_pd[i] = sum(ref[:load][l]["pd"] for l in ref[:bus_loads][i]) bus_qd[i] = sum(ref[:load][l]["qd"] for l in ref[:bus_loads][i]) @@ -1433,24 +1515,23 @@ function build_opf_nonconvex_prob(dataset) end end + br_g = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b = Dict(i => 0.0 for (i, branch) in ref[:branch]) - br_g = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b = Dict(i => 0.0 for (i,branch) in ref[:branch]) - - br_tr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_ti = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_ttm = Dict(i => 0.0 for (i,branch) in ref[:branch]) + br_tr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_ti = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_ttm = Dict(i => 0.0 for (i, branch) in ref[:branch]) - br_g_fr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b_fr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_g_to = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b_to = Dict(i => 0.0 for (i,branch) in ref[:branch]) + br_g_fr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b_fr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_g_to = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b_to = Dict(i => 0.0 for (i, branch) in ref[:branch]) - br_rate_a = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_angmin = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_angmax = Dict(i => 0.0 for (i,branch) in ref[:branch]) + br_rate_a = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_angmin = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_angmax = Dict(i => 0.0 for (i, branch) in ref[:branch]) - for (i,branch) in ref[:branch] + for (i, branch) in ref[:branch] g, b = PowerModels.calc_branch_y(branch) tr, ti = PowerModels.calc_branch_t(branch) @@ -1471,28 +1552,26 @@ function build_opf_nonconvex_prob(dataset) br_angmax[i] = branch["angmax"] end - - for (i,bus) in ref[:bus] - addvar!(model, "va_$(i)", -Inf, Inf, init=0.0) #va - addvar!(model, "vm_$(i)", bus["vmin"], bus["vmax"], init=1.0) #vm + for (i, bus) in ref[:bus] + addvar!(model, "va_$(i)", -Inf, Inf, init = 0.0) #va + addvar!(model, "vm_$(i)", bus["vmin"], bus["vmax"], init = 1.0) #vm end - for (i,gen) in ref[:gen] - addvar!(model, "pg_$(i)", gen["pmin"], gen["pmax"], init=0.0) #pg - addvar!(model, "qg_$(i)", gen["qmin"], gen["qmax"], init=0.0) #qg + for (i, gen) in ref[:gen] + addvar!(model, "pg_$(i)", gen["pmin"], gen["pmax"], init = 0.0) #pg + addvar!(model, "qg_$(i)", gen["qmin"], gen["qmax"], init = 0.0) #qg end - for (l,i,j) in ref[:arcs] + for (l, i, j) in ref[:arcs] branch = ref[:branch][l] - addvar!(model, "p_$(l)_$(i)_$(j)", -branch["rate_a"], branch["rate_a"], init=0.0) #p - addvar!(model, "q_$(l)_$(i)_$(j)", -branch["rate_a"], branch["rate_a"], init=0.0) #q + addvar!(model, "p_$(l)_$(i)_$(j)", -branch["rate_a"], branch["rate_a"], init = 0.0) #p + addvar!(model, "q_$(l)_$(i)_$(j)", -branch["rate_a"], branch["rate_a"], init = 0.0) #q end - # JuMP.@objective(model, Min, sum(gen["cost"][1]*pg[i]^2 + gen["cost"][2]*pg[i] + gen["cost"][3] for (i,gen) in ref[:gen])) function opf_objective(x::OrderedDict) cost = 0.0 - for (i,gen) in ref[:gen] + for (i, gen) in ref[:gen] pg = x["pg_$(i)"] cost += gen["cost"][1]*pg^2 + gen["cost"][2]*pg + gen["cost"][3] end @@ -1504,8 +1583,8 @@ function build_opf_nonconvex_prob(dataset) function const_ref_bus(x::OrderedDict, i) return x["va_$(i)"] end - for (i,bus) in ref[:ref_buses] - add_eq_constraint!(model, x -> const_ref_bus(x,i)) + for (i, bus) in ref[:ref_buses] + add_eq_constraint!(model, x -> const_ref_bus(x, i)) end # @constraint(model, @@ -1516,7 +1595,7 @@ function build_opf_nonconvex_prob(dataset) # ) function const_power_balance_p(x::OrderedDict, b) balance = - bus_pd[b] - bus_gs[b]*x["vm_$(b)"]^2 - for (l,i,j) in ref[:bus_arcs][b] + for (l, i, j) in ref[:bus_arcs][b] balance -= x["p_$(l)_$(i)_$(j)"] end for j in ref[:bus_gens][b] @@ -1533,7 +1612,7 @@ function build_opf_nonconvex_prob(dataset) # ) function const_power_balance_q(x::OrderedDict, b) balance = - bus_qd[b] + bus_bs[b]*x["vm_$(b)"]^2 - for (l,i,j) in ref[:bus_arcs][b] + for (l, i, j) in ref[:bus_arcs][b] balance -= x["q_$(l)_$(i)_$(j)"] end for j in ref[:bus_gens][b] @@ -1542,66 +1621,65 @@ function build_opf_nonconvex_prob(dataset) return balance end - for (i,bus) in ref[:bus] - add_eq_constraint!(model, x -> const_power_balance_p(x,i)) - add_eq_constraint!(model, x -> const_power_balance_q(x,i)) + for (i, bus) in ref[:bus] + add_eq_constraint!(model, x -> const_power_balance_p(x, i)) + add_eq_constraint!(model, x -> const_power_balance_q(x, i)) end - # @NLconstraint(model, p_fr == (g+g_fr)/ttm*vm_fr^2 + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + (-b*tr-g*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)) ) - function const_flow_p_from(x::OrderedDict,l,i,j) + function const_flow_p_from(x::OrderedDict, l, i, j) return (br_g[l]+br_g_fr[l])/br_ttm[l]*x["vm_$(i)"]^2 + - (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(x["vm_$(i)"]*x["vm_$(j)"]*cos(x["va_$(i)"]-x["va_$(j)"])) + - (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(x["vm_$(i)"]*x["vm_$(j)"]*sin(x["va_$(i)"]-x["va_$(j)"])) - - x["p_$(l)_$(i)_$(j)"] + (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(x["vm_$(i)"]*x["vm_$(j)"]*cos(x["va_$(i)"]-x["va_$(j)"])) + + (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(x["vm_$(i)"]*x["vm_$(j)"]*sin(x["va_$(i)"]-x["va_$(j)"])) - + x["p_$(l)_$(i)_$(j)"] end # @NLconstraint(model, q_fr == -(b+b_fr)/ttm*vm_fr^2 - (-b*tr-g*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)) ) - function const_flow_q_from(x::OrderedDict,l,i,j) + function const_flow_q_from(x::OrderedDict, l, i, j) return -(br_b[l]+br_b_fr[l])/br_ttm[l]*x["vm_$(i)"]^2 - - (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(x["vm_$(i)"]*x["vm_$(j)"]*cos(x["va_$(i)"]-x["va_$(j)"])) + - (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(x["vm_$(i)"]*x["vm_$(j)"]*sin(x["va_$(i)"]-x["va_$(j)"])) - - x["q_$(l)_$(i)_$(j)"] + (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(x["vm_$(i)"]*x["vm_$(j)"]*cos(x["va_$(i)"]-x["va_$(j)"])) + + (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(x["vm_$(i)"]*x["vm_$(j)"]*sin(x["va_$(i)"]-x["va_$(j)"])) - + x["q_$(l)_$(i)_$(j)"] end # @NLconstraint(model, p_to == (g+g_to)*vm_to^2 + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + (-b*tr+g*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)) ) - function const_flow_p_to(x::OrderedDict,l,i,j) + function const_flow_p_to(x::OrderedDict, l, i, j) return (br_g[l]+br_g_to[l])*x["vm_$(j)"]^2 + - (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(x["vm_$(j)"]*x["vm_$(i)"]*cos(x["va_$(j)"]-x["va_$(i)"])) + - (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(x["vm_$(j)"]*x["vm_$(i)"]*sin(x["va_$(j)"]-x["va_$(i)"])) - - x["p_$(l)_$(j)_$(i)"] + (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(x["vm_$(j)"]*x["vm_$(i)"]*cos(x["va_$(j)"]-x["va_$(i)"])) + + (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(x["vm_$(j)"]*x["vm_$(i)"]*sin(x["va_$(j)"]-x["va_$(i)"])) - + x["p_$(l)_$(j)_$(i)"] end # @NLconstraint(model, q_to == -(b+b_to)*vm_to^2 - (-b*tr+g*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)) ) - function const_flow_q_to(x::OrderedDict,l,i,j) - return -(br_b[l]+br_b_to[l])*x["vm_$(j)"]^2 - - (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(x["vm_$(j)"]*x["vm_$(i)"]*cos(x["va_$(j)"]-x["va_$(i)"])) + - (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(x["vm_$(j)"]*x["vm_$(i)"]*sin(x["va_$(j)"]-x["va_$(i)"])) - - x["q_$(l)_$(j)_$(i)"] + function const_flow_q_to(x::OrderedDict, l, i, j) + return -(br_b[l]+br_b_to[l])*x["vm_$(j)"]^2 - + (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(x["vm_$(j)"]*x["vm_$(i)"]*cos(x["va_$(j)"]-x["va_$(i)"])) + + (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(x["vm_$(j)"]*x["vm_$(i)"]*sin(x["va_$(j)"]-x["va_$(i)"])) - + x["q_$(l)_$(j)_$(i)"] end - function const_thermal_limit(x::OrderedDict,l,i,j) - return x["p_$(l)_$(i)_$(j)"]^2 + x["q_$(l)_$(i)_$(j)"]^2 - br_rate_a[l]^2 + function const_thermal_limit(x::OrderedDict, l, i, j) + return x["p_$(l)_$(i)_$(j)"]^2 + x["q_$(l)_$(i)_$(j)"]^2 - br_rate_a[l]^2 end - function const_voltage_angle_difference_lb(x::OrderedDict,l,i,j) - return br_angmin[l] - x["va_$(i)"] + x["va_$(j)"] + function const_voltage_angle_difference_lb(x::OrderedDict, l, i, j) + return br_angmin[l] - x["va_$(i)"] + x["va_$(j)"] end - function const_voltage_angle_difference_ub(x::OrderedDict,l,i,j) - return x["va_$(i)"] - x["va_$(j)"] - br_angmax[l] + function const_voltage_angle_difference_ub(x::OrderedDict, l, i, j) + return x["va_$(i)"] - x["va_$(j)"] - br_angmax[l] end - for (l,i,j) in ref[:arcs_from] - add_eq_constraint!(model, x -> const_flow_p_from(x,l,i,j)) - add_eq_constraint!(model, x -> const_flow_q_from(x,l,i,j)) + for (l, i, j) in ref[:arcs_from] + add_eq_constraint!(model, x -> const_flow_p_from(x, l, i, j)) + add_eq_constraint!(model, x -> const_flow_q_from(x, l, i, j)) - add_eq_constraint!(model, x -> const_flow_p_to(x,l,i,j)) - add_eq_constraint!(model, x -> const_flow_q_to(x,l,i,j)) + add_eq_constraint!(model, x -> const_flow_p_to(x, l, i, j)) + add_eq_constraint!(model, x -> const_flow_q_to(x, l, i, j)) - add_ineq_constraint!(model, x -> const_thermal_limit(x,l,i,j)) - add_ineq_constraint!(model, x -> const_thermal_limit(x,l,j,i)) + add_ineq_constraint!(model, x -> const_thermal_limit(x, l, i, j)) + add_ineq_constraint!(model, x -> const_thermal_limit(x, l, j, i)) - add_ineq_constraint!(model, x -> const_voltage_angle_difference_lb(x,l,i,j)) - add_ineq_constraint!(model, x -> const_voltage_angle_difference_ub(x,l,i,j)) + add_ineq_constraint!(model, x -> const_voltage_angle_difference_lb(x, l, i, j)) + add_ineq_constraint!(model, x -> const_voltage_angle_difference_ub(x, l, i, j)) end model end @@ -1613,14 +1691,16 @@ function solve_opf_nonconvex(dataset) model, IpoptAlg(), NonconvexCore.getinit(model); - options = IpoptOptions(; first_order=false, symbolic=false, sparse=true, print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME), + options = IpoptOptions(; first_order = false, symbolic = false, sparse = true, + print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME) ) solve_time_without_compilation = @elapsed result = Nonconvex.optimize( model, IpoptAlg(), NonconvexCore.getinit(model); - options = IpoptOptions(; first_order=false, symbolic=false, sparse=true, print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME), + options = IpoptOptions(; first_order = false, symbolic = false, sparse = true, + print_level = PRINT_LEVEL, max_cpu_time = MAX_CPU_TIME) ) cost = result.minimum @@ -1629,7 +1709,8 @@ function solve_opf_nonconvex(dataset) model_variables = Nonconvex.NonconvexCore.getnvars(model) model_constraints = Nonconvex.NonconvexCore.getnconstraints(model) - return (model, result), Dict( + return (model, result), + Dict( "case" => file_name, "variables" => model_variables, "constraints" => model_constraints, @@ -1637,20 +1718,20 @@ function solve_opf_nonconvex(dataset) "cost" => cost, "time_build" => model_build_time, "time_solve" => solve_time_without_compilation, - "time_solve_compilation" => solve_time_with_compilation, + "time_solve_compilation" => solve_time_with_compilation ) end function test_nonconvex_prob(dataset, test_u0) model = build_opf_nonconvex_prob(dataset) - (; - lookup_pg, - lookup_qg, - lookup_va, - lookup_vm, - lookup_lij, - lookup_p_lij, - lookup_q_lij) = dataset + (; + lookup_pg, + lookup_qg, + lookup_va, + lookup_vm, + lookup_lij, + lookup_p_lij, + lookup_q_lij) = dataset point = Dict() for v in keys(model.init) @@ -1659,9 +1740,9 @@ function test_nonconvex_prob(dataset, test_u0) varint = parse.(Int, varsplit[2:end]) idx = if varname == "p" - lookup_p_lij[findfirst(x->x==Tuple(varint),lookup_lij)] + lookup_p_lij[findfirst(x->x==Tuple(varint), lookup_lij)] elseif varname == "q" - lookup_q_lij[findfirst(x->x==Tuple(varint),lookup_lij)] + lookup_q_lij[findfirst(x->x==Tuple(varint), lookup_lij)] elseif varname == "va" lookup_va[varint[1]] elseif varname == "pg" @@ -1675,7 +1756,7 @@ function test_nonconvex_prob(dataset, test_u0) end point[v] = test_u0[idx] end - u0 = OrderedDict(keys(model.init) .=> getindex.((point,),keys(model.init))) + u0 = OrderedDict(keys(model.init) .=> getindex.((point,), keys(model.init))) obj = model.objective(u0) cons = vcat(model.eq_constraints(u0), model.ineq_constraints(u0)) obj, cons @@ -1712,15 +1793,15 @@ Currently does not converge to a feasible point, root cause in unclear import Optim function build_opf_optim_prob(dataset) - (;data, ref) = dataset + (; data, ref) = dataset - bus_pd = Dict(i => 0.0 for (i,bus) in ref[:bus]) - bus_qd = Dict(i => 0.0 for (i,bus) in ref[:bus]) + bus_pd = Dict(i => 0.0 for (i, bus) in ref[:bus]) + bus_qd = Dict(i => 0.0 for (i, bus) in ref[:bus]) - bus_gs = Dict(i => 0.0 for (i,bus) in ref[:bus]) - bus_bs = Dict(i => 0.0 for (i,bus) in ref[:bus]) + bus_gs = Dict(i => 0.0 for (i, bus) in ref[:bus]) + bus_bs = Dict(i => 0.0 for (i, bus) in ref[:bus]) - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] if length(ref[:bus_loads][i]) > 0 bus_pd[i] = sum(ref[:load][l]["pd"] for l in ref[:bus_loads][i]) bus_qd[i] = sum(ref[:load][l]["qd"] for l in ref[:bus_loads][i]) @@ -1732,20 +1813,19 @@ function build_opf_optim_prob(dataset) end end + br_g = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b = Dict(i => 0.0 for (i, branch) in ref[:branch]) - br_g = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b = Dict(i => 0.0 for (i,branch) in ref[:branch]) - - br_tr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_ti = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_ttm = Dict(i => 0.0 for (i,branch) in ref[:branch]) + br_tr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_ti = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_ttm = Dict(i => 0.0 for (i, branch) in ref[:branch]) - br_g_fr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b_fr = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_g_to = Dict(i => 0.0 for (i,branch) in ref[:branch]) - br_b_to = Dict(i => 0.0 for (i,branch) in ref[:branch]) + br_g_fr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b_fr = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_g_to = Dict(i => 0.0 for (i, branch) in ref[:branch]) + br_b_to = Dict(i => 0.0 for (i, branch) in ref[:branch]) - for (i,branch) in ref[:branch] + for (i, branch) in ref[:branch] g, b = PowerModels.calc_branch_y(branch) tr, ti = PowerModels.calc_branch_t(branch) @@ -1762,14 +1842,14 @@ function build_opf_optim_prob(dataset) br_b_to[i] = branch["b_to"] end - var_lookup = Dict{String,Int}() + var_lookup = Dict{String, Int}() var_init = Float64[] var_lb = Float64[] var_ub = Float64[] var_idx = 1 - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] push!(var_init, 0.0) #va push!(var_lb, -Inf) push!(var_ub, Inf) @@ -1783,7 +1863,7 @@ function build_opf_optim_prob(dataset) var_idx += 1 end - for (i,gen) in ref[:gen] + for (i, gen) in ref[:gen] #push!(var_init, 0.0) #pg push!(var_init, (gen["pmax"]+gen["pmin"])/2) # non-standard start push!(var_lb, gen["pmin"]) @@ -1799,18 +1879,18 @@ function build_opf_optim_prob(dataset) var_idx += 1 end - for (l,i,j) in ref[:arcs] + for (l, i, j) in ref[:arcs] branch = ref[:branch][l] push!(var_init, 0.0) #p push!(var_lb, -branch["rate_a"]) - push!(var_ub, branch["rate_a"]) + push!(var_ub, branch["rate_a"]) var_lookup["p_$(l)_$(i)_$(j)"] = var_idx var_idx += 1 push!(var_init, 0.0) #q push!(var_lb, -branch["rate_a"]) - push!(var_ub, branch["rate_a"]) + push!(var_ub, branch["rate_a"]) var_lookup["q_$(l)_$(i)_$(j)"] = var_idx var_idx += 1 end @@ -1820,7 +1900,7 @@ function build_opf_optim_prob(dataset) function opf_objective(x) #start = time() cost = 0.0 - for (i,gen) in ref[:gen] + for (i, gen) in ref[:gen] pg = x[var_lookup["pg_$(i)"]] cost += gen["cost"][1]*pg^2 + gen["cost"][2]*pg + gen["cost"][3] end @@ -1828,24 +1908,23 @@ function build_opf_optim_prob(dataset) return cost end - function opf_constraints(c,x) + function opf_constraints(c, x) #start = time() - va = Dict(i => x[var_lookup["va_$(i)"]] for (i,bus) in ref[:bus]) - vm = Dict(i => x[var_lookup["vm_$(i)"]] for (i,bus) in ref[:bus]) - - pg = Dict(i => x[var_lookup["pg_$(i)"]] for (i,gen) in ref[:gen]) - qg = Dict(i => x[var_lookup["qg_$(i)"]] for (i,gen) in ref[:gen]) + va = Dict(i => x[var_lookup["va_$(i)"]] for (i, bus) in ref[:bus]) + vm = Dict(i => x[var_lookup["vm_$(i)"]] for (i, bus) in ref[:bus]) - p = Dict((l,i,j) => x[var_lookup["p_$(l)_$(i)_$(j)"]] for (l,i,j) in ref[:arcs]) - q = Dict((l,i,j) => x[var_lookup["q_$(l)_$(i)_$(j)"]] for (l,i,j) in ref[:arcs]) + pg = Dict(i => x[var_lookup["pg_$(i)"]] for (i, gen) in ref[:gen]) + qg = Dict(i => x[var_lookup["qg_$(i)"]] for (i, gen) in ref[:gen]) - vm_fr = Dict(l => vm[branch["f_bus"]] for (l,branch) in ref[:branch]) - vm_to = Dict(l => vm[branch["t_bus"]] for (l,branch) in ref[:branch]) - va_fr = Dict(l => va[branch["f_bus"]] for (l,branch) in ref[:branch]) - va_to = Dict(l => va[branch["t_bus"]] for (l,branch) in ref[:branch]) + p = Dict((l, i, j) => x[var_lookup["p_$(l)_$(i)_$(j)"]] for (l, i, j) in ref[:arcs]) + q = Dict((l, i, j) => x[var_lookup["q_$(l)_$(i)_$(j)"]] for (l, i, j) in ref[:arcs]) + vm_fr = Dict(l => vm[branch["f_bus"]] for (l, branch) in ref[:branch]) + vm_to = Dict(l => vm[branch["t_bus"]] for (l, branch) in ref[:branch]) + va_fr = Dict(l => va[branch["f_bus"]] for (l, branch) in ref[:branch]) + va_to = Dict(l => va[branch["t_bus"]] for (l, branch) in ref[:branch]) - va_con = [va[i] for (i,bus) in ref[:ref_buses]] + va_con = [va[i] for (i, bus) in ref[:ref_buses]] # @constraint(model, # sum(p[a] for a in ref[:bus_arcs][i]) == @@ -1853,13 +1932,11 @@ function build_opf_optim_prob(dataset) # sum(load["pd"] for load in bus_loads) - # sum(shunt["gs"] for shunt in bus_shunts)*vm[i]^2 # ) - power_balance_p_con = [ - sum(pg[j] for j in ref[:bus_gens][i]; init=0.0) - - bus_pd[i] - - bus_gs[i]*vm[i]^2 - - sum(p[a] for a in ref[:bus_arcs][i]) - for (i,bus) in ref[:bus] - ] + power_balance_p_con = [sum(pg[j] for j in ref[:bus_gens][i]; init = 0.0) - + bus_pd[i] - + bus_gs[i]*vm[i]^2 - + sum(p[a] for a in ref[:bus_arcs][i]) + for (i, bus) in ref[:bus]] # @constraint(model, # sum(q[a] for a in ref[:bus_arcs][i]) == @@ -1867,69 +1944,52 @@ function build_opf_optim_prob(dataset) # sum(load["qd"] for load in bus_loads) + # sum(shunt["bs"] for shunt in bus_shunts)*vm[i]^2 # ) - power_balance_q_con = [ - sum(qg[j] for j in ref[:bus_gens][i]; init=0.0) - - bus_qd[i] + - bus_bs[i]*vm[i]^2 - - sum(q[a] for a in ref[:bus_arcs][i]) - for (i,bus) in ref[:bus] - ] - + power_balance_q_con = [sum(qg[j] for j in ref[:bus_gens][i]; init = 0.0) - + bus_qd[i] + + bus_bs[i]*vm[i]^2 - + sum(q[a] for a in ref[:bus_arcs][i]) + for (i, bus) in ref[:bus]] # @NLconstraint(model, p_fr == (g+g_fr)/ttm*vm_fr^2 + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + (-b*tr-g*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)) ) - power_flow_p_from_con = [ - (br_g[l]+br_g_fr[l])/br_ttm[l]*vm_fr[l]^2 + - (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*cos(va_fr[l]-va_to[l])) + - (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*sin(va_fr[l]-va_to[l])) - - p[(l,i,j)] - for (l,i,j) in ref[:arcs_from] - ] + power_flow_p_from_con = [(br_g[l]+br_g_fr[l])/br_ttm[l]*vm_fr[l]^2 + + (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*cos(va_fr[l]-va_to[l])) + + (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*sin(va_fr[l]-va_to[l])) - + p[(l, i, j)] + for (l, i, j) in ref[:arcs_from]] # @NLconstraint(model, p_to == (g+g_to)*vm_to^2 + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + (-b*tr+g*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)) ) - power_flow_p_to_con = [ - (br_g[l]+br_g_to[l])*vm_to[l]^2 + - (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*cos(va_to[l]-va_fr[l])) + - (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*sin(va_to[l]-va_fr[l])) - - p[(l,i,j)] - for (l,i,j) in ref[:arcs_to] - ] + power_flow_p_to_con = [(br_g[l]+br_g_to[l])*vm_to[l]^2 + + (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*cos(va_to[l]-va_fr[l])) + + (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*sin(va_to[l]-va_fr[l])) - + p[(l, i, j)] + for (l, i, j) in ref[:arcs_to]] # @NLconstraint(model, q_fr == -(b+b_fr)/ttm*vm_fr^2 - (-b*tr-g*ti)/ttm*(vm_fr*vm_to*cos(va_fr-va_to)) + (-g*tr+b*ti)/ttm*(vm_fr*vm_to*sin(va_fr-va_to)) ) - power_flow_q_from_con = [ - -(br_b[l]+br_b_fr[l])/br_ttm[l]*vm_fr[l]^2 - - (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*cos(va_fr[l]-va_to[l])) + - (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*sin(va_fr[l]-va_to[l])) - - q[(l,i,j)] - for (l,i,j) in ref[:arcs_from] - ] + power_flow_q_from_con = [-(br_b[l]+br_b_fr[l])/br_ttm[l]*vm_fr[l]^2 - + (-br_b[l]*br_tr[l]-br_g[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*cos(va_fr[l]-va_to[l])) + + (-br_g[l]*br_tr[l]+br_b[l]*br_ti[l])/br_ttm[l]*(vm_fr[l]*vm_to[l]*sin(va_fr[l]-va_to[l])) - + q[(l, i, j)] + for (l, i, j) in ref[:arcs_from]] # @NLconstraint(model, q_to == -(b+b_to)*vm_to^2 - (-b*tr+g*ti)/ttm*(vm_to*vm_fr*cos(va_to-va_fr)) + (-g*tr-b*ti)/ttm*(vm_to*vm_fr*sin(va_to-va_fr)) ) - power_flow_q_to_con = [ - -(br_b[l]+br_b_to[l])*vm_to[l]^2 - - (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*cos(va_to[l]-va_fr[l])) + - (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*sin(va_to[l]-va_fr[l])) - - q[(l,i,j)] - for (l,i,j) in ref[:arcs_to] - ] + power_flow_q_to_con = [-(br_b[l]+br_b_to[l])*vm_to[l]^2 - + (-br_b[l]*br_tr[l]+br_g[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*cos(va_to[l]-va_fr[l])) + + (-br_g[l]*br_tr[l]-br_b[l]*br_ti[l])/br_ttm[l]*(vm_to[l]*vm_fr[l]*sin(va_to[l]-va_fr[l])) - + q[(l, i, j)] + for (l, i, j) in ref[:arcs_to]] # @constraint(model, va_fr - va_to <= branch["angmax"]) # @constraint(model, va_fr - va_to >= branch["angmin"]) - power_flow_vad_con = [ - va_fr[l] - va_to[l] - for (l,i,j) in ref[:arcs_from] - ] + power_flow_vad_con = [va_fr[l] - va_to[l] + for (l, i, j) in ref[:arcs_from]] # @constraint(model, p_fr^2 + q_fr^2 <= branch["rate_a"]^2) - power_flow_mva_from_con = [ - p[(l,i,j)]^2 + q[(l,i,j)]^2 - for (l,i,j) in ref[:arcs_from] - ] + power_flow_mva_from_con = [p[(l, i, j)]^2 + q[(l, i, j)]^2 + for (l, i, j) in ref[:arcs_from]] # @constraint(model, p_to^2 + q_to^2 <= branch["rate_a"]^2) - power_flow_mva_to_con = [ - p[(l,i,j)]^2 + q[(l,i,j)]^2 - for (l,i,j) in ref[:arcs_to] - ] + power_flow_mva_to_con = [p[(l, i, j)]^2 + q[(l, i, j)]^2 + for (l, i, j) in ref[:arcs_to]] c .= [ va_con..., @@ -1941,7 +2001,7 @@ function build_opf_optim_prob(dataset) power_flow_q_to_con..., power_flow_vad_con..., power_flow_mva_from_con..., - power_flow_mva_to_con..., + power_flow_mva_to_con... ] #total_callback_time += time() - start return c @@ -1951,14 +2011,13 @@ function build_opf_optim_prob(dataset) con_ubs = Float64[] #@constraint(model, va[i] == 0) - for (i,bus) in ref[:ref_buses] + for (i, bus) in ref[:ref_buses] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end - #power_balance_p_con - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] push!(con_lbs, 0.0) push!(con_ubs, 0.0) #push!(con_lbs, -Inf) @@ -1966,70 +2025,73 @@ function build_opf_optim_prob(dataset) end #power_balance_q_con - for (i,bus) in ref[:bus] + for (i, bus) in ref[:bus] push!(con_lbs, 0.0) push!(con_ubs, 0.0) #push!(con_lbs, -Inf) #push!(con_ubs, Inf) end - #power_flow_p_from_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_p_to_con - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_q_from_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_q_to_con - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] push!(con_lbs, 0.0) push!(con_ubs, 0.0) end #power_flow_vad_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] branch = ref[:branch][l] push!(con_lbs, branch["angmin"]) push!(con_ubs, branch["angmax"]) end #power_flow_mva_from_con - for (l,i,j) in ref[:arcs_from] + for (l, i, j) in ref[:arcs_from] branch = ref[:branch][l] push!(con_lbs, -Inf) push!(con_ubs, branch["rate_a"]^2) end #power_flow_mva_to_con - for (l,i,j) in ref[:arcs_to] + for (l, i, j) in ref[:arcs_to] branch = ref[:branch][l] push!(con_lbs, -Inf) push!(con_ubs, branch["rate_a"]^2) end df = Optim.TwiceDifferentiable(opf_objective, var_init) - dfc = Optim.TwiceDifferentiableConstraints(opf_constraints, var_lb, var_ub, con_lbs, con_ubs) + dfc = Optim.TwiceDifferentiableConstraints( + opf_constraints, var_lb, var_ub, con_lbs, con_ubs) df, dfc, var_init, con_lbs, con_ubs end function solve_opf_optim(dataset) - model_build_time = @elapsed df, dfc, var_init, con_lbs, con_ubs = build_opf_optim_prob(dataset) + model_build_time = @elapsed df, dfc, var_init, con_lbs, + con_ubs = build_opf_optim_prob(dataset) - options = Optim.Options(show_trace=PRINT_LEVEL != 0,time_limit=MAX_CPU_TIME) - solve_time_with_compilation = @elapsed res = Optim.optimize(df, dfc, var_init, Optim.IPNewton(), options) - solve_time_without_compilation = @elapsed res = Optim.optimize(df, dfc, var_init, Optim.IPNewton(), options) + options = Optim.Options(show_trace = PRINT_LEVEL != 0, time_limit = MAX_CPU_TIME) + solve_time_with_compilation = @elapsed res = Optim.optimize( + df, dfc, var_init, Optim.IPNewton(), options) + solve_time_without_compilation = @elapsed res = Optim.optimize( + df, dfc, var_init, Optim.IPNewton(), options) sol = res.minimizer cost = res.minimum @@ -2037,13 +2099,14 @@ function solve_opf_optim(dataset) # NOTE: confirmed these constraint violations can be eliminated # if a better starting point is used sol_eval = dfc.c!(zeros(dfc.bounds.nc), sol) - vio_lb = [max(v,0) for v in (con_lbs .- sol_eval)] - vio_ub = [max(v,0) for v in (sol_eval .- con_ubs)] + vio_lb = [max(v, 0) for v in (con_lbs .- sol_eval)] + vio_ub = [max(v, 0) for v in (sol_eval .- con_ubs)] const_vio = vio_lb .+ vio_ub constraint_tol = 1e-6 feasible = (sum(const_vio) <= constraint_tol) - return (res,), Dict( + return (res,), + Dict( "case" => file_name, "variables" => length(var_init), "constraints" => dfc.bounds.nc, @@ -2051,7 +2114,7 @@ function solve_opf_optim(dataset) "cost" => cost, "time_build" => model_build_time, "time_solve" => solve_time_without_compilation, - "time_solve_compilation" => solve_time_with_compilation, + "time_solve_compilation" => solve_time_with_compilation ) end @@ -2330,7 +2393,6 @@ res using DataFrames, PrettyTables function multidata_multisolver_benchmark(dataset_files; sizelimit = SIZE_LIMIT) - cases = String[] vars = Int[] cons = Int[] @@ -2375,10 +2437,10 @@ function multidata_multisolver_benchmark(dataset_files; sizelimit = SIZE_LIMIT) @info "Variable size over global limit. Skipping for now" continue end - + @info "Running Optimization.jl" model, res = solve_opf_optimization(dataset) - push!(cases, split(file,"/")[end]) + push!(cases, split(file, "/")[end]) push!(vars, res["variables"]) push!(cons, res["constraints"]) push!(optimization_time, res["time_solve"]) @@ -2393,7 +2455,6 @@ function multidata_multisolver_benchmark(dataset_files; sizelimit = SIZE_LIMIT) push!(mtk_time_compilation, res["time_solve_compilation"]) push!(mtk_cost, res["cost"]) - @info "Running JuMP.jl" model, res = solve_opf_jump(dataset) push!(jump_time, res["time_solve"]) @@ -2407,7 +2468,7 @@ function multidata_multisolver_benchmark(dataset_files; sizelimit = SIZE_LIMIT) push!(nlpmodels_time_modelbuild, res["time_build"]) push!(nlpmodels_time_compilation, res["time_solve_compilation"]) push!(nlpmodels_cost, res["cost"]) - + #= @info "Running Nonconvex.jl" model, res = solve_opf_nonconvex(dataset) @@ -2416,7 +2477,7 @@ function multidata_multisolver_benchmark(dataset_files; sizelimit = SIZE_LIMIT) push!(nonconvex_time_compilation, res["time_solve_compilation"]) push!(nonconvex_cost, res["cost"]) =# - + if length(prob.u0) > 400 @info "Running Optim.jl" model, res = solve_opf_optim(dataset) @@ -2433,19 +2494,26 @@ function multidata_multisolver_benchmark(dataset_files; sizelimit = SIZE_LIMIT) push!(optim_cost, res["cost"]) end end - DataFrame(:case => cases, :vars => vars, :cons => cons, - :optimization => optimization_time, :optimization_modelbuild => optimization_time_modelbuild, :optimization_wcompilation => optimization_time_compilation, :optimization_cost => optimization_cost, - :mtk => mtk_time, :mtk_time_modelbuild => mtk_time_modelbuild, :mtk_time_wcompilation => mtk_time_compilation, :mtk_cost => mtk_cost, - :jump => jump_time, :jump_modelbuild => jump_time_modelbuild, :jump_wcompilation => jump_time_compilation, :jump_cost => jump_cost, - :nlpmodels => nlpmodels_time, :nlpmodels_modelbuild => nlpmodels_time_modelbuild, :nlpmodels_wcompilation => nlpmodels_time_compilation, :nlpmodels_cost => nlpmodels_cost, - #:nonconvex => nonconvex_time, :nonconvex_modelbuild => nonconvex_time_modelbuild, :nonconvex_wcompilation => nonconvex_time_compilation, :nonconvex_cost => nonconvex_cost, - :optim => optim_time, :optim_modelbuild => optim_time_modelbuild, :optim_wcompilation => optim_time_compilation, :optim_cost => optim_cost) + DataFrame(:case => cases, :vars => vars, :cons => cons, + :optimization => optimization_time, :optimization_modelbuild => optimization_time_modelbuild, + :optimization_wcompilation => optimization_time_compilation, + :optimization_cost => optimization_cost, + :mtk => mtk_time, :mtk_time_modelbuild => mtk_time_modelbuild, + :mtk_time_wcompilation => mtk_time_compilation, :mtk_cost => mtk_cost, + :jump => jump_time, :jump_modelbuild => jump_time_modelbuild, + :jump_wcompilation => jump_time_compilation, :jump_cost => jump_cost, + :nlpmodels => nlpmodels_time, :nlpmodels_modelbuild => nlpmodels_time_modelbuild, + :nlpmodels_wcompilation => nlpmodels_time_compilation, + :nlpmodels_cost => nlpmodels_cost, + #:nonconvex => nonconvex_time, :nonconvex_modelbuild => nonconvex_time_modelbuild, :nonconvex_wcompilation => nonconvex_time_compilation, :nonconvex_cost => nonconvex_cost, + :optim => optim_time, :optim_modelbuild => optim_time_modelbuild, + :optim_wcompilation => optim_time_compilation, :optim_cost => optim_cost) end test_datasets = [ "../../benchmarks/OptimizationFrameworks/opf_data/pglib_opf_case3_lmbd.m", "../../benchmarks/OptimizationFrameworks/opf_data/pglib_opf_case5_pjm.m" - ] +] ``` ```julia; wrap = false @@ -2469,7 +2537,7 @@ tmpdir = Base.Filesystem.mktempdir() LibGit2.clone("https://github.com/power-grid-lib/pglib-opf", tmpdir) benchmarkfiles = readdir(tmpdir) benchmarkfiles = benchmarkfiles[endswith(".m").(benchmarkfiles)] -benchmark_datasets = joinpath.((tmpdir,),benchmarkfiles) +benchmark_datasets = joinpath.((tmpdir,), benchmarkfiles) ``` ```julia; wrap = false @@ -2489,5 +2557,5 @@ Text(String(take!(io))) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/PINNErrorsVsTime/allen_cahn_et.jmd b/benchmarks/PINNErrorsVsTime/allen_cahn_et.jmd index 75bdd2b7b..6b594b956 100644 --- a/benchmarks/PINNErrorsVsTime/allen_cahn_et.jmd +++ b/benchmarks/PINNErrorsVsTime/allen_cahn_et.jmd @@ -33,7 +33,6 @@ function allen_cahn(strategy, minimizer, maxIters) Dxx3 = Differential(x3)^2 Dxx4 = Differential(x4)^2 - # Discretization tmax = 1.0 x1width = 1.0 @@ -66,11 +65,12 @@ function allen_cahn(strategy, minimizer, maxIters) x4s = 0.0:dx4:x4width # Operators - Δu = Dxx1(u(t, x1, x2, x3, x4)) + Dxx2(u(t, x1, x2, x3, x4)) + Dxx3(u(t, x1, x2, x3, x4)) + Dxx4(u(t, x1, x2, x3, x4)) # Laplacian - + Δu = Dxx1(u(t, x1, x2, x3, x4)) + Dxx2(u(t, x1, x2, x3, x4)) + + Dxx3(u(t, x1, x2, x3, x4)) + Dxx4(u(t, x1, x2, x3, x4)) # Laplacian # Equation - eq = Dt(u(t, x1, x2, x3, x4)) - Δu - u(t, x1, x2, x3, x4) + u(t, x1, x2, x3, x4) * u(t, x1, x2, x3, x4) * u(t, x1, x2, x3, x4) ~ 0 #ALLEN CAHN EQUATION + eq = Dt(u(t, x1, x2, x3, x4)) - Δu - u(t, x1, x2, x3, x4) + + u(t, x1, x2, x3, x4) * u(t, x1, x2, x3, x4) * u(t, x1, x2, x3, x4) ~ 0 #ALLEN CAHN EQUATION initialCondition = 1 / (2 + 0.4 * (x1 * x1 + x2 * x2 + x3 * x3 + x4 * x4)) # see PNAS paper @@ -125,7 +125,7 @@ function allen_cahn(strategy, minimizer, maxIters) timeCounter = 0.0 startTime = time_ns() #Fix initial time (t=0) before starting the training - res = Optimization.solve(prob, minimizer, callback=cb_, maxiters=maxIters) + res = Optimization.solve(prob, minimizer, callback = cb_, maxiters = maxIters) phi = discretization.phi @@ -134,35 +134,39 @@ function allen_cahn(strategy, minimizer, maxIters) # Model prediction domain = [ts, x1s, x2s, x3s, x4s] - u_predict = [reshape([first(phi([t, x1, x2, x3, x4], res.minimizer)) for x1 in x1s for x2 in x2s for x3 in x3s for x4 in x4s], (length(x1s), length(x2s), length(x3s), length(x4s))) for t in ts] #matrix of model's prediction + u_predict = [reshape( + [first(phi([t, x1, x2, x3, x4], res.minimizer)) for x1 in x1s + for x2 in x2s for x3 in x3s for x4 in x4s], + (length(x1s), length(x2s), length(x3s), length(x4s))) for t in ts] #matrix of model's prediction return [error, params, domain, times, losses] end ``` ```julia -maxIters = [(1,1,1,1,1,1,1000),(1,1,1,1,300,300,300)] #iters for ADAM/LBFGS +maxIters = [(1, 1, 1, 1, 1, 1, 1000), (1, 1, 1, 1, 300, 300, 300)] #iters for ADAM/LBFGS # maxIters = [(1,1,1,1,1,1,10),(1,1,1,3,3,3,3)] #iters for ADAM/LBFGS -strategies = [NeuralPDE.QuadratureTraining(quadrature_alg = CubaCuhre(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLh(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLp(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - NeuralPDE.GridTraining(0.2), - NeuralPDE.StochasticTraining(400 ; bcs_points= 50), - NeuralPDE.QuasiRandomTraining(400 ; bcs_points= 50)] +strategies = [ + NeuralPDE.QuadratureTraining(quadrature_alg = CubaCuhre(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLh(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLp(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + NeuralPDE.GridTraining(0.2), + NeuralPDE.StochasticTraining(400; bcs_points = 50), + NeuralPDE.QuasiRandomTraining(400; bcs_points = 50)] strategies_short_name = ["CubaCuhre", - "CubatureJLh", - "CubatureJLp", - "GridTraining", - "StochasticTraining", - "QuasiRandomTraining"] + "CubatureJLh", + "CubatureJLp", + "GridTraining", + "StochasticTraining", + "QuasiRandomTraining"] -minimizers = [Optimisers.ADAM(0.005),BFGS()] -minimizers_short_name = ["ADAM","BFGS"] +minimizers = [Optimisers.ADAM(0.005), BFGS()] +minimizers_short_name = ["ADAM", "BFGS"] # Run models -error_res = Dict() +error_res = Dict() domains = Dict() params_res = Dict() #to use same params for the next run times = Dict() @@ -174,15 +178,15 @@ losses_res = Dict() ```julia ## Convergence -for min =1:length(minimizers) # minimizer - for strat=1:length(strategies) # strategy - # println(string(strategies_short_name[strat], " ", minimizers_short_name[min])) - res = allen_cahn(strategies[strat], minimizers[min], maxIters[min][strat]) - push!(error_res, string(strat,min) => res[1]) - push!(params_res, string(strat,min) => res[2]) - push!(domains, string(strat,min) => res[3]) - push!(times, string(strat,min) => res[4]) - push!(losses_res, string(strat,min) => res[5]) +for min in 1:length(minimizers) # minimizer + for strat in 1:length(strategies) # strategy + # println(string(strategies_short_name[strat], " ", minimizers_short_name[min])) + res = allen_cahn(strategies[strat], minimizers[min], maxIters[min][strat]) + push!(error_res, string(strat, min) => res[1]) + push!(params_res, string(strat, min) => res[2]) + push!(domains, string(strat, min) => res[3]) + push!(times, string(strat, min) => res[4]) + push!(losses_res, string(strat, min) => res[5]) end end ``` @@ -192,24 +196,37 @@ end ```julia print("\n Plotting error vs times") #Plotting the first strategy with the first minimizer out from the loop to initialize the canvas -current_label = string(strategies_short_name[1], " + " , minimizers_short_name[1]) -error = Plots.plot(times["11"], error_res["11"], xaxis=:log10, yaxis=:log10, label = current_label, legend=:outerright)#, xlims = (0,10))#legend = true)#, size=(1200,700)) -plot!(error, times["21"], error_res["21"], xaxis=:log10, yaxis=:log10, label = string(strategies_short_name[2], " + " , minimizers_short_name[1])) -plot!(error, times["31"], error_res["31"], xaxis=:log10, yaxis=:log10, label = string(strategies_short_name[3], " + " , minimizers_short_name[1])) -plot!(error, times["41"], error_res["41"], xaxis=:log10, yaxis=:log10, label = string(strategies_short_name[4], " + " , minimizers_short_name[1])) -plot!(error, times["51"], error_res["51"], xaxis=:log10, yaxis=:log10, label = string(strategies_short_name[5], " + " , minimizers_short_name[1])) -plot!(error, times["61"], error_res["61"], xaxis=:log10, yaxis=:log10, label = string(strategies_short_name[6], " + " , minimizers_short_name[1])) - - -plot!(error, times["12"], error_res["12"], xaxis=:log10, yaxis=:log10, label = string(strategies_short_name[1], " + " , minimizers_short_name[2])) -plot!(error, times["22"], error_res["22"], xaxis=:log10, yaxis=:log10, label = string(strategies_short_name[2], " + " , minimizers_short_name[2])) -plot!(error, times["32"], error_res["32"], xaxis=:log10, yaxis=:log10, label = string(strategies_short_name[3], " + " , minimizers_short_name[2])) -plot!(error, times["42"], error_res["42"], xaxis=:log10, yaxis=:log10, label = string(strategies_short_name[4], " + " , minimizers_short_name[2])) -plot!(error, times["52"], error_res["52"], xaxis=:log10, yaxis=:log10, label = string(strategies_short_name[5], " + " , minimizers_short_name[2])) -plot!(error, times["62"], error_res["62"], xaxis=:log10, yaxis=:log10, title = string("Allen Cahn convergence ADAM/LBFGS"), ylabel = "log(error)",xlabel="log(t)", label = string(strategies_short_name[6], " + " , minimizers_short_name[2])) +current_label = string(strategies_short_name[1], " + ", minimizers_short_name[1]) +error = Plots.plot(times["11"], error_res["11"], xaxis = :log10, + yaxis = :log10, label = current_label, legend = :outerright)#, xlims = (0,10))#legend = true)#, size=(1200,700)) +plot!(error, times["21"], error_res["21"], xaxis = :log10, yaxis = :log10, + label = string(strategies_short_name[2], " + ", minimizers_short_name[1])) +plot!(error, times["31"], error_res["31"], xaxis = :log10, yaxis = :log10, + label = string(strategies_short_name[3], " + ", minimizers_short_name[1])) +plot!(error, times["41"], error_res["41"], xaxis = :log10, yaxis = :log10, + label = string(strategies_short_name[4], " + ", minimizers_short_name[1])) +plot!(error, times["51"], error_res["51"], xaxis = :log10, yaxis = :log10, + label = string(strategies_short_name[5], " + ", minimizers_short_name[1])) +plot!(error, times["61"], error_res["61"], xaxis = :log10, yaxis = :log10, + label = string(strategies_short_name[6], " + ", minimizers_short_name[1])) + +plot!(error, times["12"], error_res["12"], xaxis = :log10, yaxis = :log10, + label = string(strategies_short_name[1], " + ", minimizers_short_name[2])) +plot!(error, times["22"], error_res["22"], xaxis = :log10, yaxis = :log10, + label = string(strategies_short_name[2], " + ", minimizers_short_name[2])) +plot!(error, times["32"], error_res["32"], xaxis = :log10, yaxis = :log10, + label = string(strategies_short_name[3], " + ", minimizers_short_name[2])) +plot!(error, times["42"], error_res["42"], xaxis = :log10, yaxis = :log10, + label = string(strategies_short_name[4], " + ", minimizers_short_name[2])) +plot!(error, times["52"], error_res["52"], xaxis = :log10, yaxis = :log10, + label = string(strategies_short_name[5], " + ", minimizers_short_name[2])) +plot!(error, times["62"], error_res["62"], xaxis = :log10, + yaxis = :log10, title = string("Allen Cahn convergence ADAM/LBFGS"), + ylabel = "log(error)", xlabel = "log(t)", + label = string(strategies_short_name[6], " + ", minimizers_short_name[2])) ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/PINNErrorsVsTime/diffusion_et.jmd b/benchmarks/PINNErrorsVsTime/diffusion_et.jmd index be69d258c..e5bd03245 100644 --- a/benchmarks/PINNErrorsVsTime/diffusion_et.jmd +++ b/benchmarks/PINNErrorsVsTime/diffusion_et.jmd @@ -31,47 +31,50 @@ function diffusion(strategy, minimizer, maxIters) Dt = Differential(t) Dxx = Differential(x)^2 - eq = Dt(u(x,t)) - Dxx(u(x,t)) ~ -exp(-t) * (sin(pi * x) - pi^2 * sin(pi * x)) + eq = Dt(u(x, t)) - Dxx(u(x, t)) ~ -exp(-t) * (sin(pi * x) - pi^2 * sin(pi * x)) - bcs = [u(x,0) ~ sin(pi*x), - u(-1,t) ~ 0., - u(1,t) ~ 0.] + bcs = [u(x, 0) ~ sin(pi*x), + u(-1, t) ~ 0.0, + u(1, t) ~ 0.0] - domains = [x ∈ Interval(-1.0,1.0), - t ∈ Interval(0.0,1.0)] + domains = [x ∈ Interval(-1.0, 1.0), + t ∈ Interval(0.0, 1.0)] - dx = 0.2; dt = 0.1 - xs,ts = [infimum(domain.domain):dx/10:supremum(domain.domain) for (dx,domain) in zip([dx,dt],domains)] + dx = 0.2; + dt = 0.1 + xs, + ts = [infimum(domain.domain):(dx / 10):supremum(domain.domain) + for (dx, domain) in zip([dx, dt], domains)] - indvars = [x,t] - depvars = [u(x,t)] + indvars = [x, t] + depvars = [u(x, t)] - chain = Lux.Chain(Lux.Dense(2,10,tanh),Lux.Dense(10,10,tanh),Lux.Dense(10,1)) + chain = Lux.Chain(Lux.Dense(2, 10, tanh), Lux.Dense(10, 10, tanh), Lux.Dense(10, 1)) losses = [] error = [] times = [] - dx_err = [0.2,0.1] + dx_err = [0.2, 0.1] error_strategy = GridTraining(dx_err) - discretization_ = PhysicsInformedNN(chain,error_strategy) + discretization_ = PhysicsInformedNN(chain, error_strategy) @named pde_system_ = PDESystem(eq, bcs, domains, indvars, depvars) prob_ = discretize(pde_system_, discretization_) function loss_function_(θ, p) - params = θ.u + params = θ.u return prob_.f.f(params, nothing) end - - cb_ = function (p,l) + + cb_ = function (p, l) deltaT_s = time_ns() #Start a clock when the callback begins, this will evaluate questo misurerà anche il calcolo degli uniform error ctime = time_ns() - startTime - timeCounter #This variable is the time to use for the time benchmark plot append!(times, ctime/10^9) #Conversion nanosec to seconds append!(losses, l) - loss_ = loss_function_(p,nothing) + loss_ = loss_function_(p, nothing) append!(error, loss_) timeCounter = timeCounter + time_ns() - deltaT_s #timeCounter sums all delays due to the callback functions of the previous iterations @@ -79,63 +82,61 @@ function diffusion(strategy, minimizer, maxIters) return false end - discretization = PhysicsInformedNN(chain,strategy) - - @named pde_system = PDESystem(eq,bcs,domains,indvars,depvars) - prob = discretize(pde_system,discretization) + discretization = PhysicsInformedNN(chain, strategy) + @named pde_system = PDESystem(eq, bcs, domains, indvars, depvars) + prob = discretize(pde_system, discretization) timeCounter = 0.0 startTime = time_ns() #Fix initial time (t=0) before starting the training - res = Optimization.solve(prob, minimizer; callback=cb_, maxiters=maxIters) + res = Optimization.solve(prob, minimizer; callback = cb_, maxiters = maxIters) phi = discretization.phi params = res.minimizer # Model prediction - domain = [x,t] + domain = [x, t] - u_predict = reshape([first(phi([x,t],res.minimizer)) for x in xs for t in ts],(length(xs),length(ts))) + u_predict = reshape([first(phi([x, t], res.minimizer)) for x in xs for t in ts], ( + length(xs), length(ts))) return [error, params, domain, times, u_predict, losses] end ``` ```julia -maxIters = [(5000,5000,5000,5000,5000),(300,300,300,300,300)] #iters for ADAM/LBFGS +maxIters = [(5000, 5000, 5000, 5000, 5000), (300, 300, 300, 300, 300)] #iters for ADAM/LBFGS # maxIters = [(5,5,5,5,5,5),(3,3,3,3,3,3)] #iters for ADAM/LBFGS strategies = [ NeuralPDE.GridTraining([0.2, 0.1]), - NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLh(), reltol = 1e-4, abstol=1e-5, maxiters=1100), - NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLp(), reltol = 1e-4, abstol=1e-5, maxiters=1100), - NeuralPDE.StochasticTraining(400 ; bcs_points= 50), - NeuralPDE.QuasiRandomTraining(400 ; bcs_points= 50) + NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLh(), reltol = 1e-4, abstol = 1e-5, maxiters = 1100), + NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLp(), reltol = 1e-4, abstol = 1e-5, maxiters = 1100), + NeuralPDE.StochasticTraining(400; bcs_points = 50), + NeuralPDE.QuasiRandomTraining(400; bcs_points = 50) ] strategies_short_name = [#"CubaCuhre", - #"HCubatureJL", - "CubatureJLh", - "CubatureJLp", - #"CubaVegas", - #"CubaSUAVE"] - "GridTraining", - "StochasticTraining", - "QuasiRandomTraining"] + #"HCubatureJL", + "CubatureJLh", + "CubatureJLp", + #"CubaVegas", + #"CubaSUAVE"] + "GridTraining", + "StochasticTraining", + "QuasiRandomTraining"] minimizers = [Optimisers.ADAM(0.001), - #BFGS()] - LBFGS()] - + #BFGS()] + LBFGS()] minimizers_short_name = ["ADAM", - "LBFGS"] - # "BFGS"] - + "LBFGS"] +# "BFGS"] # Run models -error_res = Dict() +error_res = Dict() domains = Dict() params_res = Dict() #to use same params for the next run times = Dict() @@ -149,38 +150,49 @@ losses_res = Dict() print("Starting run") ## Convergence -for min =1:length(minimizers) # minimizer - for strat=1:length(strategies) # strategy - # println(string(strategies_short_name[strat], " ", minimizers_short_name[min])) - res = diffusion(strategies[strat], minimizers[min], maxIters[min][strat]) - push!(error_res, string(strat,min) => res[1]) - push!(params_res, string(strat,min) => res[2]) - push!(domains, string(strat,min) => res[3]) - push!(times, string(strat,min) => res[4]) - push!(prediction, string(strat,min) => res[5]) - push!(losses_res, string(strat,min) => res[6]) - end +for min in 1:length(minimizers) # minimizer + for strat in 1:length(strategies) # strategy + # println(string(strategies_short_name[strat], " ", minimizers_short_name[min])) + res = diffusion(strategies[strat], minimizers[min], maxIters[min][strat]) + push!(error_res, string(strat, min) => res[1]) + push!(params_res, string(strat, min) => res[2]) + push!(domains, string(strat, min) => res[3]) + push!(times, string(strat, min) => res[4]) + push!(prediction, string(strat, min) => res[5]) + push!(losses_res, string(strat, min) => res[6]) + end end ``` ## Results ```julia -current_label = string(strategies_short_name[1], " + " , minimizers_short_name[1]) -error = Plots.plot(times["11"], error_res["11"], yaxis=:log10, label = current_label) -plot!(error, times["21"], error_res["21"], yaxis=:log10, label = string(strategies_short_name[2], " + " , minimizers_short_name[1])) -plot!(error, times["31"], error_res["31"], yaxis=:log10, label = string(strategies_short_name[3], " + " , minimizers_short_name[1])) -plot!(error, times["41"], error_res["41"], yaxis=:log10, label = string(strategies_short_name[4], " + " , minimizers_short_name[1])) -plot!(error, times["51"], error_res["51"], yaxis=:log10, label = string(strategies_short_name[5], " + " , minimizers_short_name[1])) - -plot!(error, times["12"], error_res["12"], yaxis=:log10, label = string(strategies_short_name[1], " + " , minimizers_short_name[2])) -plot!(error, times["22"], error_res["22"], yaxis=:log10, label = string(strategies_short_name[2], " + " , minimizers_short_name[2])) -plot!(error, times["32"], error_res["32"], yaxis=:log10, label = string(strategies_short_name[3], " + " , minimizers_short_name[2])) -plot!(error, times["42"], error_res["42"], yaxis=:log10, label = string(strategies_short_name[4], " + " , minimizers_short_name[2])) -plot!(error, times["52"], error_res["52"], yaxis=:log10, title = string("Diffusion convergence ADAM/LBFGS"), ylabel = "log(error)", xlabel = "t", label = string(strategies_short_name[5], " + " , minimizers_short_name[2])) +current_label = string(strategies_short_name[1], " + ", minimizers_short_name[1]) +error = Plots.plot(times["11"], error_res["11"], yaxis = :log10, label = current_label) +plot!(error, times["21"], error_res["21"], yaxis = :log10, + label = string(strategies_short_name[2], " + ", minimizers_short_name[1])) +plot!(error, times["31"], error_res["31"], yaxis = :log10, + label = string(strategies_short_name[3], " + ", minimizers_short_name[1])) +plot!(error, times["41"], error_res["41"], yaxis = :log10, + label = string(strategies_short_name[4], " + ", minimizers_short_name[1])) +plot!(error, times["51"], error_res["51"], yaxis = :log10, + label = string(strategies_short_name[5], " + ", minimizers_short_name[1])) + +plot!(error, times["12"], error_res["12"], yaxis = :log10, + label = string(strategies_short_name[1], " + ", minimizers_short_name[2])) +plot!(error, times["22"], error_res["22"], yaxis = :log10, + label = string(strategies_short_name[2], " + ", minimizers_short_name[2])) +plot!(error, times["32"], error_res["32"], yaxis = :log10, + label = string(strategies_short_name[3], " + ", minimizers_short_name[2])) +plot!(error, times["42"], error_res["42"], yaxis = :log10, + label = string(strategies_short_name[4], " + ", minimizers_short_name[2])) +plot!(error, times["52"], error_res["52"], yaxis = :log10, + title = string("Diffusion convergence ADAM/LBFGS"), + ylabel = "log(error)", xlabel = "t", + label = string(strategies_short_name[5], " + ", minimizers_short_name[2])) ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/PINNErrorsVsTime/hamilton_jacobi_et.jmd b/benchmarks/PINNErrorsVsTime/hamilton_jacobi_et.jmd index f34c09030..a5fa1cd35 100644 --- a/benchmarks/PINNErrorsVsTime/hamilton_jacobi_et.jmd +++ b/benchmarks/PINNErrorsVsTime/hamilton_jacobi_et.jmd @@ -73,8 +73,10 @@ function hamilton_jacobi(strategy, minimizer, maxIters) λ = 1.0f0 # Operators - Δu = Dxx1(u(t, x1, x2, x3, x4)) + Dxx2(u(t, x1, x2, x3, x4)) + Dxx3(u(t, x1, x2, x3, x4)) + Dxx4(u(t, x1, x2, x3, x4)) # Laplacian - ∇u = [Dx1(u(t, x1, x2, x3, x4)), Dx2(u(t, x1, x2, x3, x4)), Dx3(u(t, x1, x2, x3, x4)), Dx4(u(t, x1, x2, x3, x4))] + Δu = Dxx1(u(t, x1, x2, x3, x4)) + Dxx2(u(t, x1, x2, x3, x4)) + + Dxx3(u(t, x1, x2, x3, x4)) + Dxx4(u(t, x1, x2, x3, x4)) # Laplacian + ∇u = [Dx1(u(t, x1, x2, x3, x4)), Dx2(u(t, x1, x2, x3, x4)), + Dx3(u(t, x1, x2, x3, x4)), Dx4(u(t, x1, x2, x3, x4))] # Equation eq = Dt(u(t, x1, x2, x3, x4)) + Δu - λ * sum(∇u .^ 2) ~ 0 #HAMILTON-JACOBI-BELLMAN EQUATION @@ -138,7 +140,7 @@ function hamilton_jacobi(strategy, minimizer, maxIters) timeCounter = 0.0 startTime = time_ns() #Fix initial time (t=0) before starting the training - res = Optimization.solve(prob, minimizer, callback=cb_, maxiters=maxIters) + res = Optimization.solve(prob, minimizer, callback = cb_, maxiters = maxIters) phi = discretization.phi @@ -147,43 +149,45 @@ function hamilton_jacobi(strategy, minimizer, maxIters) # Model prediction domain = [ts, x1s, x2s, x3s, x4s] - u_predict = [reshape([first(phi([t, x1, x2, x3, x4], res.minimizer)) for x1 in x1s for x2 in x2s for x3 in x3s for x4 in x4s], (length(x1s), length(x2s), length(x3s), length(x4s))) for t in ts] #matrix of model's prediction + u_predict = [reshape( + [first(phi([t, x1, x2, x3, x4], res.minimizer)) for x1 in x1s + for x2 in x2s for x3 in x3s for x4 in x4s], + (length(x1s), length(x2s), length(x3s), length(x4s))) for t in ts] #matrix of model's prediction return [error, params, domain, times, losses] end -maxIters = [(1,1,1,1000,1000,1000,1000),(1,1,1,300,300,300,300)] #iters for ADAM/LBFGS +maxIters = [(1, 1, 1, 1000, 1000, 1000, 1000), (1, 1, 1, 300, 300, 300, 300)] #iters for ADAM/LBFGS # maxIters = [(1,1,1,1,1,2,2),(1,1,1,3,3,3,3)] #iters for ADAM/LBFGS -strategies = [NeuralPDE.QuadratureTraining(quadrature_alg = CubaCuhre(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - #NeuralPDE.QuadratureTraining(quadrature_alg = HCubatureJL(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100, batch = 0), - NeuralPDE.GridTraining(0.1), - NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLh(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLp(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - NeuralPDE.GridTraining(0.2), - NeuralPDE.StochasticTraining(400 ; bcs_points= 50), - NeuralPDE.QuasiRandomTraining(400 ; bcs_points= 50)] +strategies = [ + NeuralPDE.QuadratureTraining(quadrature_alg = CubaCuhre(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + #NeuralPDE.QuadratureTraining(quadrature_alg = HCubatureJL(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100, batch = 0), + NeuralPDE.GridTraining(0.1), + NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLh(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLp(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + NeuralPDE.GridTraining(0.2), + NeuralPDE.StochasticTraining(400; bcs_points = 50), + NeuralPDE.QuasiRandomTraining(400; bcs_points = 50)] strategies_short_name = ["CubaCuhre", - "HCubatureJL", - "CubatureJLh", - "CubatureJLp", - "GridTraining", - "StochasticTraining", - "QuasiRandomTraining"] + "HCubatureJL", + "CubatureJLh", + "CubatureJLp", + "GridTraining", + "StochasticTraining", + "QuasiRandomTraining"] minimizers = [Optimisers.ADAM(0.005), - #BFGS()] - LBFGS()] - + #BFGS()] + LBFGS()] minimizers_short_name = ["ADAM", - "LBFGS"] - #"BFGS"] - + "LBFGS"] +#"BFGS"] # Run models -error_res = Dict() +error_res = Dict() domains = Dict() params_res = Dict() #to use same params for the next run times = Dict() @@ -196,42 +200,55 @@ losses_res = Dict() print("Starting run") ## Convergence -for min =1:length(minimizers) # minimizer - for strat=1:length(strategies) # strategy - # println(string(strategies_short_name[strat], " ", minimizers_short_name[min])) - res = hamilton_jacobi(strategies[strat], minimizers[min], maxIters[min][strat]) - push!(error_res, string(strat,min) => res[1]) - push!(params_res, string(strat,min) => res[2]) - push!(domains, string(strat,min) => res[3]) - push!(times, string(strat,min) => res[4]) - push!(losses_res, string(strat,min) => res[5]) - end +for min in 1:length(minimizers) # minimizer + for strat in 1:length(strategies) # strategy + # println(string(strategies_short_name[strat], " ", minimizers_short_name[min])) + res = hamilton_jacobi(strategies[strat], minimizers[min], maxIters[min][strat]) + push!(error_res, string(strat, min) => res[1]) + push!(params_res, string(strat, min) => res[2]) + push!(domains, string(strat, min) => res[3]) + push!(times, string(strat, min) => res[4]) + push!(losses_res, string(strat, min) => res[5]) + end end ``` - ```julia #Plotting the first strategy with the first minimizer out from the loop to initialize the canvas -current_label = string(strategies_short_name[1], " + " , minimizers_short_name[1]) -error = Plots.plot(times["11"], error_res["11"], yaxis=:log10, label = current_label)#, xlims = (0,10))#legend = true)#, size=(1200,700)) -plot!(error, times["21"], error_res["21"], yaxis=:log10, label = string(strategies_short_name[2], " + " , minimizers_short_name[1])) -plot!(error, times["31"], error_res["31"], yaxis=:log10, label = string(strategies_short_name[3], " + " , minimizers_short_name[1])) -plot!(error, times["41"], error_res["41"], yaxis=:log10, label = string(strategies_short_name[4], " + " , minimizers_short_name[1])) -plot!(error, times["51"], error_res["51"], yaxis=:log10, label = string(strategies_short_name[5], " + " , minimizers_short_name[1])) -plot!(error, times["61"], error_res["61"], yaxis=:log10, label = string(strategies_short_name[6], " + " , minimizers_short_name[1])) -plot!(error, times["71"], error_res["71"], yaxis=:log10, label = string(strategies_short_name[7], " + " , minimizers_short_name[1])) - - -plot!(error, times["12"], error_res["12"], yaxis=:log10, label = string(strategies_short_name[1], " + " , minimizers_short_name[2])) -plot!(error, times["22"], error_res["22"], yaxis=:log10, label = string(strategies_short_name[2], " + " , minimizers_short_name[2])) -plot!(error, times["32"], error_res["32"], yaxis=:log10, label = string(strategies_short_name[3], " + " , minimizers_short_name[2])) -plot!(error, times["42"], error_res["42"], yaxis=:log10, label = string(strategies_short_name[4], " + " , minimizers_short_name[2])) -plot!(error, times["52"], error_res["52"], yaxis=:log10, label = string(strategies_short_name[5], " + " , minimizers_short_name[2])) -plot!(error, times["62"], error_res["62"], yaxis=:log10, label = string(strategies_short_name[6], " + " , minimizers_short_name[2])) -plot!(error, times["72"], error_res["72"], yaxis=:log10, title = string("Hamilton Jacobi convergence ADAM/LBFGS"), ylabel = "log(error)",xlabel = "t", label = string(strategies_short_name[7], " + " , minimizers_short_name[2])) +current_label = string(strategies_short_name[1], " + ", minimizers_short_name[1]) +error = Plots.plot(times["11"], error_res["11"], yaxis = :log10, label = current_label)#, xlims = (0,10))#legend = true)#, size=(1200,700)) +plot!(error, times["21"], error_res["21"], yaxis = :log10, + label = string(strategies_short_name[2], " + ", minimizers_short_name[1])) +plot!(error, times["31"], error_res["31"], yaxis = :log10, + label = string(strategies_short_name[3], " + ", minimizers_short_name[1])) +plot!(error, times["41"], error_res["41"], yaxis = :log10, + label = string(strategies_short_name[4], " + ", minimizers_short_name[1])) +plot!(error, times["51"], error_res["51"], yaxis = :log10, + label = string(strategies_short_name[5], " + ", minimizers_short_name[1])) +plot!(error, times["61"], error_res["61"], yaxis = :log10, + label = string(strategies_short_name[6], " + ", minimizers_short_name[1])) +plot!(error, times["71"], error_res["71"], yaxis = :log10, + label = string(strategies_short_name[7], " + ", minimizers_short_name[1])) + +plot!(error, times["12"], error_res["12"], yaxis = :log10, + label = string(strategies_short_name[1], " + ", minimizers_short_name[2])) +plot!(error, times["22"], error_res["22"], yaxis = :log10, + label = string(strategies_short_name[2], " + ", minimizers_short_name[2])) +plot!(error, times["32"], error_res["32"], yaxis = :log10, + label = string(strategies_short_name[3], " + ", minimizers_short_name[2])) +plot!(error, times["42"], error_res["42"], yaxis = :log10, + label = string(strategies_short_name[4], " + ", minimizers_short_name[2])) +plot!(error, times["52"], error_res["52"], yaxis = :log10, + label = string(strategies_short_name[5], " + ", minimizers_short_name[2])) +plot!(error, times["62"], error_res["62"], yaxis = :log10, + label = string(strategies_short_name[6], " + ", minimizers_short_name[2])) +plot!(error, times["72"], error_res["72"], yaxis = :log10, + title = string("Hamilton Jacobi convergence ADAM/LBFGS"), + ylabel = "log(error)", xlabel = "t", + label = string(strategies_short_name[7], " + ", minimizers_short_name[2])) ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/PINNErrorsVsTime/level_set_et.jmd b/benchmarks/PINNErrorsVsTime/level_set_et.jmd index d4a342aa5..c55f19867 100644 --- a/benchmarks/PINNErrorsVsTime/level_set_et.jmd +++ b/benchmarks/PINNErrorsVsTime/level_set_et.jmd @@ -46,7 +46,6 @@ function level_set(strategy, minimizer, maxIters) dy = ywidth / yMeshNum dt = tmax / tMeshNum - domains = [t ∈ Interval(0.0, tmax), x ∈ Interval(0.0, xwidth), y ∈ Interval(0.0, ywidth)] @@ -78,7 +77,6 @@ function level_set(strategy, minimizer, maxIters) bcs = [u(0, x, y) ~ initialCondition] #from literature - ## NEURAL NETWORK n = 10 #neuron number @@ -134,7 +132,7 @@ function level_set(strategy, minimizer, maxIters) timeCounter = 0.0 startTime = time_ns() #Fix initial time (t=0) before starting the training - res = Optimization.solve(prob, minimizer, callback=cb_, maxiters=maxIters) + res = Optimization.solve(prob, minimizer, callback = cb_, maxiters = maxIters) phi = discretization.phi @@ -143,46 +141,46 @@ function level_set(strategy, minimizer, maxIters) # Model prediction domain = [ts, xs, ys] - u_predict = [reshape([first(phi([t, x, y], res.minimizer)) for x in xs for y in ys], (length(xs), length(ys))) for t in ts] #matrix of model's prediction + u_predict = [reshape([first(phi([t, x, y], res.minimizer)) for x in xs for y in ys], + (length(xs), length(ys))) for t in ts] #matrix of model's prediction return [error, params, domain, times, losses] #add numeric solution end #level_set(NeuralPDE.QuadratureTraining(algorithm = CubaCuhre(), reltol = 1e-8, abstol = 1e-8, maxiters = 100), ADAM(0.01), 500) -maxIters = [(1,1,1,1000,1000,1000,1000),(1,1,1,500,500,500,500)] #iters for ADAM/LBFGS +maxIters = [(1, 1, 1, 1000, 1000, 1000, 1000), (1, 1, 1, 500, 500, 500, 500)] #iters for ADAM/LBFGS # maxIters = [(1,1,1,2,2,2,2),(1,1,1,2,2,2,2)] #iters for ADAM/LBFGS -strategies = [NeuralPDE.QuadratureTraining(quadrature_alg = CubaCuhre(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - #NeuralPDE.QuadratureTraining(quadrature_alg = HCubatureJL(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100, batch = 0), - NeuralPDE.GridTraining(0.1), - NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLh(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLp(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - NeuralPDE.GridTraining(0.1), - NeuralPDE.StochasticTraining(400 ; bcs_points= 50), - NeuralPDE.QuasiRandomTraining(400 ; bcs_points= 50)] +strategies = [ + NeuralPDE.QuadratureTraining(quadrature_alg = CubaCuhre(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + #NeuralPDE.QuadratureTraining(quadrature_alg = HCubatureJL(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100, batch = 0), + NeuralPDE.GridTraining(0.1), + NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLh(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLp(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + NeuralPDE.GridTraining(0.1), + NeuralPDE.StochasticTraining(400; bcs_points = 50), + NeuralPDE.QuasiRandomTraining(400; bcs_points = 50)] strategies_short_name = ["CubaCuhre", - "HCubatureJL", - "CubatureJLh", - "CubatureJLp", - "GridTraining", - "StochasticTraining", - "QuasiRandomTraining"] + "HCubatureJL", + "CubatureJLh", + "CubatureJLp", + "GridTraining", + "StochasticTraining", + "QuasiRandomTraining"] minimizers = [Optimisers.ADAM(0.005), - #BFGS()] - LBFGS()] - + #BFGS()] + LBFGS()] minimizers_short_name = ["ADAM", - "LBFGS"] - # "BFGS"] - + "LBFGS"] +# "BFGS"] # Run models -prediction_res = Dict() -error_res = Dict() +prediction_res = Dict() +error_res = Dict() domains = Dict() params_res = Dict() #to use same params for the next run times = Dict() @@ -193,16 +191,16 @@ losses_res = Dict() ```julia ## Convergence -for min =1:length(minimizers) # minimizer - for strat=1:length(strategies) # strategy - # println(string(strategies_short_name[strat], " ", minimizers_short_name[min])) - res = level_set(strategies[strat], minimizers[min], maxIters[min][strat]) - push!(error_res, string(strat,min) => res[1]) - push!(params_res, string(strat,min) => res[2]) - push!(domains, string(strat,min) => res[3]) - push!(times, string(strat,min) => res[4]) - push!(losses_res, string(strat,min) => res[5]) - end +for min in 1:length(minimizers) # minimizer + for strat in 1:length(strategies) # strategy + # println(string(strategies_short_name[strat], " ", minimizers_short_name[min])) + res = level_set(strategies[strat], minimizers[min], maxIters[min][strat]) + push!(error_res, string(strat, min) => res[1]) + push!(params_res, string(strat, min) => res[2]) + push!(domains, string(strat, min) => res[3]) + push!(times, string(strat, min) => res[4]) + push!(losses_res, string(strat, min) => res[5]) + end end ``` @@ -210,26 +208,40 @@ end ```julia #Plotting the first strategy with the first minimizer out from the loop to initialize the canvas -current_label = string(strategies_short_name[1], " + " , minimizers_short_name[1]) -error = Plots.plot(times["11"], error_res["11"], yaxis=:log10, label = current_label)# xlims = (0,10))#legend = true)#, size=(1200,700)) -plot!(error, times["21"], error_res["21"], yaxis=:log10, label = string(strategies_short_name[2], " + " , minimizers_short_name[1])) -plot!(error, times["31"], error_res["31"], yaxis=:log10, label = string(strategies_short_name[3], " + " , minimizers_short_name[1])) -plot!(error, times["41"], error_res["41"], yaxis=:log10, label = string(strategies_short_name[4], " + " , minimizers_short_name[1])) -plot!(error, times["51"], error_res["51"], yaxis=:log10, label = string(strategies_short_name[5], " + " , minimizers_short_name[1])) -plot!(error, times["61"], error_res["61"], yaxis=:log10, label = string(strategies_short_name[6], " + " , minimizers_short_name[1])) -plot!(error, times["71"], error_res["71"], yaxis=:log10, label = string(strategies_short_name[7], " + " , minimizers_short_name[1])) - - -plot!(error, times["12"], error_res["12"], yaxis=:log10, label = string(strategies_short_name[1], " + " , minimizers_short_name[2])) -plot!(error, times["22"], error_res["22"], yaxis=:log10, label = string(strategies_short_name[2], " + " , minimizers_short_name[2])) -plot!(error, times["32"], error_res["32"], yaxis=:log10, label = string(strategies_short_name[3], " + " , minimizers_short_name[2])) -plot!(error, times["42"], error_res["42"], yaxis=:log10, label = string(strategies_short_name[4], " + " , minimizers_short_name[2])) -plot!(error, times["52"], error_res["52"], yaxis=:log10, label = string(strategies_short_name[5], " + " , minimizers_short_name[2])) -plot!(error, times["62"], error_res["62"], yaxis=:log10, label = string(strategies_short_name[6], " + " , minimizers_short_name[2])) -plot!(error, times["72"], error_res["72"], yaxis=:log10, title = string("Level Set convergence ADAM/LBFGS"), ylabel = "log(error)", xlabel = "t", label = string(strategies_short_name[7], " + " , minimizers_short_name[2])) +current_label = string(strategies_short_name[1], " + ", minimizers_short_name[1]) +error = Plots.plot(times["11"], error_res["11"], yaxis = :log10, label = current_label)# xlims = (0,10))#legend = true)#, size=(1200,700)) +plot!(error, times["21"], error_res["21"], yaxis = :log10, + label = string(strategies_short_name[2], " + ", minimizers_short_name[1])) +plot!(error, times["31"], error_res["31"], yaxis = :log10, + label = string(strategies_short_name[3], " + ", minimizers_short_name[1])) +plot!(error, times["41"], error_res["41"], yaxis = :log10, + label = string(strategies_short_name[4], " + ", minimizers_short_name[1])) +plot!(error, times["51"], error_res["51"], yaxis = :log10, + label = string(strategies_short_name[5], " + ", minimizers_short_name[1])) +plot!(error, times["61"], error_res["61"], yaxis = :log10, + label = string(strategies_short_name[6], " + ", minimizers_short_name[1])) +plot!(error, times["71"], error_res["71"], yaxis = :log10, + label = string(strategies_short_name[7], " + ", minimizers_short_name[1])) + +plot!(error, times["12"], error_res["12"], yaxis = :log10, + label = string(strategies_short_name[1], " + ", minimizers_short_name[2])) +plot!(error, times["22"], error_res["22"], yaxis = :log10, + label = string(strategies_short_name[2], " + ", minimizers_short_name[2])) +plot!(error, times["32"], error_res["32"], yaxis = :log10, + label = string(strategies_short_name[3], " + ", minimizers_short_name[2])) +plot!(error, times["42"], error_res["42"], yaxis = :log10, + label = string(strategies_short_name[4], " + ", minimizers_short_name[2])) +plot!(error, times["52"], error_res["52"], yaxis = :log10, + label = string(strategies_short_name[5], " + ", minimizers_short_name[2])) +plot!(error, times["62"], error_res["62"], yaxis = :log10, + label = string(strategies_short_name[6], " + ", minimizers_short_name[2])) +plot!(error, times["72"], error_res["72"], yaxis = :log10, + title = string("Level Set convergence ADAM/LBFGS"), + ylabel = "log(error)", xlabel = "t", + label = string(strategies_short_name[7], " + ", minimizers_short_name[2])) ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/PINNErrorsVsTime/nernst_planck_et.jmd b/benchmarks/PINNErrorsVsTime/nernst_planck_et.jmd index ff49be147..05eed8b9e 100644 --- a/benchmarks/PINNErrorsVsTime/nernst_planck_et.jmd +++ b/benchmarks/PINNErrorsVsTime/nernst_planck_et.jmd @@ -37,33 +37,32 @@ function nernst_planck(strategy, minimizer, maxIters) Dyy = Differential(y)^2 Dzz = Differential(z)^2 - ## DOMAINS AND OPERATORS # Discretization - xwidth = 1.0 - ywidth = 1.0 - zwidth = 1.0 - tmax = 1.0 - xMeshNum = 10 - yMeshNum = 10 - zMeshNum = 10 - tMeshNum = 10 - - dx = xwidth/xMeshNum - dy = ywidth/yMeshNum - dz = zwidth/zMeshNum - dt = tmax/tMeshNum - - domains = [t ∈ Interval(0.0,tmax), - x ∈ Interval(0.0,xwidth), - y ∈ Interval(0.0,ywidth), - z ∈ Interval(0.0,zwidth)] - - xs = 0.0 : dx : xwidth - ys = 0.0 : dy : ywidth - zs = 0.0 : dz : zwidth - ts = 0.0 : dt : tmax + xwidth = 1.0 + ywidth = 1.0 + zwidth = 1.0 + tmax = 1.0 + xMeshNum = 10 + yMeshNum = 10 + zMeshNum = 10 + tMeshNum = 10 + + dx = xwidth/xMeshNum + dy = ywidth/yMeshNum + dz = zwidth/zMeshNum + dt = tmax/tMeshNum + + domains = [t ∈ Interval(0.0, tmax), + x ∈ Interval(0.0, xwidth), + y ∈ Interval(0.0, ywidth), + z ∈ Interval(0.0, zwidth)] + + xs = 0.0:dx:xwidth + ys = 0.0:dy:ywidth + zs = 0.0:dz:zwidth + ts = 0.0:dt:tmax # Constants D = 1 #dummy @@ -72,22 +71,22 @@ function nernst_planck(strategy, minimizer, maxIters) uz = 10 #dummy # Operators - div = - D*(Dxx(c(t,x,y,z)) + Dyy(c(t,x,y,z)) + Dzz(c(t,x,y,z))) + - (ux*Dx(c(t,x,y,z)) + uy*Dy(c(t,x,y,z)) + uz*Dz(c(t,x,y,z))) + div = - D*(Dxx(c(t, x, y, z)) + Dyy(c(t, x, y, z)) + Dzz(c(t, x, y, z))) + + (ux*Dx(c(t, x, y, z)) + uy*Dy(c(t, x, y, z)) + uz*Dz(c(t, x, y, z))) # Equation - eq = Dt(c(t,x,y,z)) + div ~ 0 #NERNST-PLANCK EQUATION + eq = Dt(c(t, x, y, z)) + div ~ 0 #NERNST-PLANCK EQUATION # Boundary conditions - bcs = [c(0,x,y,z) ~ 0] + bcs = [c(0, x, y, z) ~ 0] ## NEURAL NETWORK n = 16 #neuron number - chain = Lux.Chain(Lux.Dense(4,n,tanh),Lux.Dense(n,n,tanh),Lux.Dense(n,1)) #Neural network from OptimizationFlux library + chain = Lux.Chain(Lux.Dense(4, n, tanh), Lux.Dense(n, n, tanh), Lux.Dense(n, 1)) #Neural network from OptimizationFlux library - indvars = [t,x,y,z] #independent variables - depvars = [c(t,x,y,z)] #dependent (target) variable + indvars = [t, x, y, z] #independent variables + depvars = [c(t, x, y, z)] #dependent (target) variable dim = length(domains) @@ -112,15 +111,15 @@ function nernst_planck(strategy, minimizer, maxIters) try deltaT_s = time_ns() ctime = time_ns() - startTime - timeCounter - + push!(times, ctime / 1e9) push!(losses, l) - + # Extract parameters for loss calculation params = p.u loss_ = loss_function_(p, nothing) push!(error, loss_) - + timeCounter += time_ns() - deltaT_s return false catch e @@ -131,60 +130,58 @@ function nernst_planck(strategy, minimizer, maxIters) @named pde_system = PDESystem(eq, bcs, domains, indvars, depvars) - discretization = NeuralPDE.PhysicsInformedNN(chain,strategy) - prob = NeuralPDE.discretize(pde_system,discretization) + discretization = NeuralPDE.PhysicsInformedNN(chain, strategy) + prob = NeuralPDE.discretize(pde_system, discretization) timeCounter = 0.0 startTime = time_ns() #Fix initial time (t=0) before starting the training - res = Optimization.solve(prob, minimizer, callback = cb_, maxiters=maxIters) + res = Optimization.solve(prob, minimizer, callback = cb_, maxiters = maxIters) phi = discretization.phi params = res.minimizer - # Model prediction domain = [ts, xs, ys, zs] - u_predict = [reshape([phi([t,x,y,z],res.minimizer) for x in xs for y in ys for z in zs], - (length(xs),length(ys),length(zs))) for t in ts] - + u_predict = [reshape( + [phi([t, x, y, z], res.minimizer) for x in xs for y in ys for z in zs], + (length(xs), length(ys), length(zs))) for t in ts] return [error, params, domain, times] end -maxIters = [(1,1,1,1000,1000,1000,1000),(1,1,1,300,300,300,300)] #iters for ADAM/LBFGS +maxIters = [(1, 1, 1, 1000, 1000, 1000, 1000), (1, 1, 1, 300, 300, 300, 300)] #iters for ADAM/LBFGS # maxIters = [(1,1,1,10,10,10,10),(1,1,1,3,3,3,3)] #iters for ADAM/LBFGS -strategies = [NeuralPDE.QuadratureTraining(quadrature_alg = CubaCuhre(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - #NeuralPDE.QuadratureTraining(quadrature_alg = HCubatureJL(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100, batch = 0), - NeuralPDE.GridTraining(0.1), - NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLh(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLp(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), - NeuralPDE.GridTraining(0.2), - NeuralPDE.StochasticTraining(400 ; bcs_points= 50), - NeuralPDE.QuasiRandomTraining(400 ; bcs_points= 50)] +strategies = [ + NeuralPDE.QuadratureTraining(quadrature_alg = CubaCuhre(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + #NeuralPDE.QuadratureTraining(quadrature_alg = HCubatureJL(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100, batch = 0), + NeuralPDE.GridTraining(0.1), + NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLh(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + NeuralPDE.QuadratureTraining(quadrature_alg = CubatureJLp(), reltol = 1e-4, abstol = 1e-4, maxiters = 1100), + NeuralPDE.GridTraining(0.2), + NeuralPDE.StochasticTraining(400; bcs_points = 50), + NeuralPDE.QuasiRandomTraining(400; bcs_points = 50)] strategies_short_name = ["CubaCuhre", - "HCubatureJL", - "CubatureJLh", - "CubatureJLp", - "GridTraining", - "StochasticTraining", - "QuasiRandomTraining"] + "HCubatureJL", + "CubatureJLh", + "CubatureJLp", + "GridTraining", + "StochasticTraining", + "QuasiRandomTraining"] minimizers = [Optimisers.ADAM(0.005), - #BFGS()] - LBFGS()] - + #BFGS()] + LBFGS()] minimizers_short_name = ["ADAM", - "LBFGS"] - # "BFGS"] - + "LBFGS"] +# "BFGS"] # Run models -error_res = Dict() +error_res = Dict() domains = Dict() params_res = Dict() times = Dict() @@ -195,15 +192,15 @@ times = Dict() ```julia ## Convergence -for strat=1:length(strategies) # strategy - for min =1:length(minimizers) # minimizer - # println(string(strategies_short_name[strat], " ", minimizers_short_name[min])) - res = nernst_planck(strategies[strat], minimizers[min], maxIters[min][strat]) - push!(error_res, string(strat,min) => res[1]) - push!(params_res, string(strat,min) => res[2]) - push!(domains, string(strat,min) => res[3]) - push!(times, string(strat,min) => res[4]) - end +for strat in 1:length(strategies) # strategy + for min in 1:length(minimizers) # minimizer + # println(string(strategies_short_name[strat], " ", minimizers_short_name[min])) + res = nernst_planck(strategies[strat], minimizers[min], maxIters[min][strat]) + push!(error_res, string(strat, min) => res[1]) + push!(params_res, string(strat, min) => res[2]) + push!(domains, string(strat, min) => res[3]) + push!(times, string(strat, min) => res[4]) + end end ``` @@ -211,26 +208,40 @@ end ```julia #Plotting the first strategy with the first minimizer out from the loop to initialize the canvas -current_label = string(strategies_short_name[1], " + " , minimizers_short_name[1]) -error = Plots.plot(times["11"], error_res["11"], yaxis=:log10, label = current_label)#, xlims = (0,10))#legend = true)#, size=(1200,700)) -plot!(error, times["21"], error_res["21"], yaxis=:log10, label = string(strategies_short_name[2], " + " , minimizers_short_name[1])) -plot!(error, times["31"], error_res["31"], yaxis=:log10, label = string(strategies_short_name[3], " + " , minimizers_short_name[1])) -plot!(error, times["41"], error_res["41"], yaxis=:log10, label = string(strategies_short_name[4], " + " , minimizers_short_name[1])) -plot!(error, times["51"], error_res["51"], yaxis=:log10, label = string(strategies_short_name[5], " + " , minimizers_short_name[1])) -plot!(error, times["61"], error_res["61"], yaxis=:log10, label = string(strategies_short_name[6], " + " , minimizers_short_name[1])) -plot!(error, times["71"], error_res["71"], yaxis=:log10, label = string(strategies_short_name[7], " + " , minimizers_short_name[1])) - - -plot!(error, times["12"], error_res["12"], yaxis=:log10, label = string(strategies_short_name[1], " + " , minimizers_short_name[2])) -plot!(error, times["22"], error_res["22"], yaxis=:log10, label = string(strategies_short_name[2], " + " , minimizers_short_name[2])) -plot!(error, times["32"], error_res["32"], yaxis=:log10, label = string(strategies_short_name[3], " + " , minimizers_short_name[2])) -plot!(error, times["42"], error_res["42"], yaxis=:log10, label = string(strategies_short_name[4], " + " , minimizers_short_name[2])) -plot!(error, times["52"], error_res["52"], yaxis=:log10, label = string(strategies_short_name[5], " + " , minimizers_short_name[2])) -plot!(error, times["62"], error_res["62"], yaxis=:log10, label = string(strategies_short_name[6], " + " , minimizers_short_name[2])) -plot!(error, times["72"], error_res["72"], yaxis=:log10, title = string("Nernst Planck convergence ADAM/LBFGS"), ylabel = "log(error)", xlabel = "t",label = string(strategies_short_name[7], " + " , minimizers_short_name[2])) +current_label = string(strategies_short_name[1], " + ", minimizers_short_name[1]) +error = Plots.plot(times["11"], error_res["11"], yaxis = :log10, label = current_label)#, xlims = (0,10))#legend = true)#, size=(1200,700)) +plot!(error, times["21"], error_res["21"], yaxis = :log10, + label = string(strategies_short_name[2], " + ", minimizers_short_name[1])) +plot!(error, times["31"], error_res["31"], yaxis = :log10, + label = string(strategies_short_name[3], " + ", minimizers_short_name[1])) +plot!(error, times["41"], error_res["41"], yaxis = :log10, + label = string(strategies_short_name[4], " + ", minimizers_short_name[1])) +plot!(error, times["51"], error_res["51"], yaxis = :log10, + label = string(strategies_short_name[5], " + ", minimizers_short_name[1])) +plot!(error, times["61"], error_res["61"], yaxis = :log10, + label = string(strategies_short_name[6], " + ", minimizers_short_name[1])) +plot!(error, times["71"], error_res["71"], yaxis = :log10, + label = string(strategies_short_name[7], " + ", minimizers_short_name[1])) + +plot!(error, times["12"], error_res["12"], yaxis = :log10, + label = string(strategies_short_name[1], " + ", minimizers_short_name[2])) +plot!(error, times["22"], error_res["22"], yaxis = :log10, + label = string(strategies_short_name[2], " + ", minimizers_short_name[2])) +plot!(error, times["32"], error_res["32"], yaxis = :log10, + label = string(strategies_short_name[3], " + ", minimizers_short_name[2])) +plot!(error, times["42"], error_res["42"], yaxis = :log10, + label = string(strategies_short_name[4], " + ", minimizers_short_name[2])) +plot!(error, times["52"], error_res["52"], yaxis = :log10, + label = string(strategies_short_name[5], " + ", minimizers_short_name[2])) +plot!(error, times["62"], error_res["62"], yaxis = :log10, + label = string(strategies_short_name[6], " + ", minimizers_short_name[2])) +plot!(error, times["72"], error_res["72"], yaxis = :log10, + title = string("Nernst Planck convergence ADAM/LBFGS"), + ylabel = "log(error)", xlabel = "t", + label = string(strategies_short_name[7], " + ", minimizers_short_name[2])) ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/PINNOptimizers/1d_diffusion.jmd b/benchmarks/PINNOptimizers/1d_diffusion.jmd index d0ed28eba..530a91a25 100644 --- a/benchmarks/PINNOptimizers/1d_diffusion.jmd +++ b/benchmarks/PINNOptimizers/1d_diffusion.jmd @@ -26,36 +26,36 @@ function solve(opt) Dt = Differential(t) Dxx = Differential(x)^2 - eq = Dt(u(x,t)) - Dxx(u(x,t)) ~ -exp(-t) * (sin(pi * x) - pi^2 * sin(pi * x)) + eq = Dt(u(x, t)) - Dxx(u(x, t)) ~ -exp(-t) * (sin(pi * x) - pi^2 * sin(pi * x)) - bcs = [u(x,0) ~ sin(pi*x), - u(-1,t) ~ 0., - u(1,t) ~ 0.] + bcs = [u(x, 0) ~ sin(pi*x), + u(-1, t) ~ 0.0, + u(1, t) ~ 0.0] - domains = [x ∈ Interval(-1.0,1.0), - t ∈ Interval(0.0,1.0)] + domains = [x ∈ Interval(-1.0, 1.0), + t ∈ Interval(0.0, 1.0)] - chain = Lux.Chain(Lux.Dense(2,18,tanh),Lux.Dense(18,18,tanh),Lux.Dense(18,1)) + chain = Lux.Chain(Lux.Dense(2, 18, tanh), Lux.Dense(18, 18, tanh), Lux.Dense(18, 1)) - discretization = PhysicsInformedNN(chain,strategy) + discretization = PhysicsInformedNN(chain, strategy) indvars = [x, t] #physically independent variables - depvars = [u(x,t)] #dependent (target) variable + depvars = [u(x, t)] #dependent (target) variable loss = [] initial_time = nothing times = [] - cb_ = function (p,l) + cb_ = function (p, l) if initial_time == nothing initial_time = time() end push!(times, time() - initial_time) #println("Current loss for $opt is: $l") push!(loss, l) - # println(l ) - # println(time() - initial_time) + # println(l ) + # println(time() - initial_time) return false end @@ -63,11 +63,11 @@ function solve(opt) prob = discretize(pde_system, discretization) if opt == "both" - res = Optimization.solve(prob, ADAM(); callback = cb_, maxiters=50) - prob = remake(prob,u0=res.minimizer) - res = Optimization.solve(prob, BFGS(); callback = cb_, maxiters=150) + res = Optimization.solve(prob, ADAM(); callback = cb_, maxiters = 50) + prob = remake(prob, u0 = res.minimizer) + res = Optimization.solve(prob, BFGS(); callback = cb_, maxiters = 150) else - res = Optimization.solve(prob, opt; callback = cb_, maxiters=200) + res = Optimization.solve(prob, opt; callback = cb_, maxiters = 200) end times[1] = 0.01 @@ -104,18 +104,33 @@ loss_9, times_9 = solve("both") ## Results ```julia -p = plot([times_1, times_2, times_3, times_4, times_5, times_6, times_7, times_8, times_9], [loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9],xlabel="time (s)", ylabel="loss", xscale=:log10, yscale=:log10, labels=["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], legend=:bottomleft, linecolor=["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) +p = plot([times_1, times_2, times_3, times_4, times_5, times_6, times_7, times_8, times_9], + [loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9], + xlabel = "time (s)", + ylabel = "loss", + xscale = :log10, + yscale = :log10, + labels = ["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], + legend = :bottomleft, + linecolor = ["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) ``` ```julia -p = plot([loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9], xlabel="iterations", ylabel="loss", yscale=:log10, labels=["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], legend=:bottomleft, linecolor=["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) +p = plot([loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9], + xlabel = "iterations", + ylabel = "loss", + yscale = :log10, + labels = ["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], + legend = :bottomleft, + linecolor = ["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) ``` ```julia -@show loss_1[end], loss_2[end], loss_3[end], loss_4[end], loss_5[end], loss_6[end], loss_7[end], loss_8[end], loss_9[end] +@show loss_1[end], loss_2[end], loss_3[end], loss_4[end], loss_5[end], +loss_6[end], loss_7[end], loss_8[end], loss_9[end] ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/PINNOptimizers/1d_poisson_nernst_planck.jmd b/benchmarks/PINNOptimizers/1d_poisson_nernst_planck.jmd index e2a13d8b0..22a4d511b 100644 --- a/benchmarks/PINNOptimizers/1d_poisson_nernst_planck.jmd +++ b/benchmarks/PINNOptimizers/1d_poisson_nernst_planck.jmd @@ -48,11 +48,11 @@ Na_cathode = 2.0 * Na_0 # non-dim Cl_anode = 1.37 * Cl_0 # non-dim Cl_cathode = 0.0 # non-dim -Pe_Na = x_ref^2 / ( t_ref * D_Na ) # non-dim -Pe_Cl = x_ref^2 / ( t_ref * D_Cl ) # non-dim +Pe_Na = x_ref^2 / (t_ref * D_Na) # non-dim +Pe_Cl = x_ref^2 / (t_ref * D_Cl) # non-dim -M_Na = x_ref^2 / ( t_ref * Phi_ref * u_Na ) # non-dim -M_Cl = x_ref^2 / ( t_ref * Phi_ref * u_Cl ) # non-dim +M_Na = x_ref^2 / (t_ref * Phi_ref * u_Na) # non-dim +M_Cl = x_ref^2 / (t_ref * Phi_ref * u_Cl) # non-dim Po_1 = (epsilon * Phi_ref) / (F * x_ref * C_ref) # non-dim @@ -63,62 +63,64 @@ dx = 0.01 # non-dim function solve(opt) strategy = QuadratureTraining() - @parameters t,x - @variables Phi(..),Na(..),Cl(..) + @parameters t, x + @variables Phi(..), Na(..), Cl(..) Dt = Differential(t) Dx = Differential(x) Dxx = Differential(x)^2 eqs = [ - ( Dxx(Phi(t,x)) ~ ( 1.0 / Po_1 ) * - ( z_Na * Na(t,x) + z_Cl * Cl(t,x) ) ) - , - ( Dt(Na(t,x)) ~ ( 1.0 / Pe_Na ) * Dxx(Na(t,x)) - + z_Na / ( abs(z_Na) * M_Na ) - * ( Dx(Na(t,x)) * Dx(Phi(t,x)) + Na(t,x) * Dxx(Phi(t,x)) ) ) - , - ( Dt(Cl(t,x)) ~ ( 1.0 / Pe_Cl ) * Dxx(Cl(t,x)) - + z_Cl / ( abs(z_Cl) * M_Cl ) - * ( Dx(Cl(t,x)) * Dx(Phi(t,x)) + Cl(t,x) * Dxx(Phi(t,x)) ) ) - ] + (Dxx(Phi(t, x)) ~ (1.0 / Po_1) * + (z_Na * Na(t, x) + z_Cl * Cl(t, x))), + (Dt(Na(t, x)) ~ + (1.0 / Pe_Na) * Dxx(Na(t, x)) + + + z_Na / (abs(z_Na) * M_Na) + * + (Dx(Na(t, x)) * Dx(Phi(t, x)) + Na(t, x) * Dxx(Phi(t, x)))), + (Dt(Cl(t, x)) ~ + (1.0 / Pe_Cl) * Dxx(Cl(t, x)) + + + z_Cl / (abs(z_Cl) * M_Cl) + * + (Dx(Cl(t, x)) * Dx(Phi(t, x)) + Cl(t, x) * Dxx(Phi(t, x)))) + ] bcs = [ - Phi(t,0.0) ~ Phi_0, - Phi(t,x_max) ~ 0.0 - , - Na(0.0,x) ~ Na_0, - Na(t,0.0) ~ Na_anode, - Na(t,x_max) ~ Na_cathode - , - Cl(0.0,x) ~ Cl_0, - Cl(t,0.0) ~ Cl_anode, - Cl(t,x_max) ~ Cl_cathode - ] + Phi(t, 0.0) ~ Phi_0, + Phi(t, x_max) ~ 0.0, + Na(0.0, x) ~ Na_0, + Na(t, 0.0) ~ Na_anode, + Na(t, x_max) ~ Na_cathode, + Cl(0.0, x) ~ Cl_0, + Cl(t, 0.0) ~ Cl_anode, + Cl(t, x_max) ~ Cl_cathode + ] # Space and time domains ################################################### domains = [ - t ∈ Interval(0.0, t_max), - x ∈ Interval(0.0, x_max) - ] + t ∈ Interval(0.0, t_max), + x ∈ Interval(0.0, x_max) + ] # Neural network, Discretization ########################################### dim = length(domains) output = length(eqs) neurons = 16 - chain1 = Lux.Chain( Lux.Dense(dim, neurons, tanh), - Lux.Dense(neurons, neurons, tanh), - Lux.Dense(neurons, neurons, tanh), - Lux.Dense(neurons, 1)) - chain2 = Lux.Chain( Lux.Dense(dim, neurons, tanh), - Lux.Dense(neurons, neurons, tanh), - Lux.Dense(neurons, neurons, tanh), - Lux.Dense(neurons, 1)) - chain3 = Lux.Chain( Lux.Dense(dim, neurons, tanh), - Lux.Dense(neurons, neurons, tanh), - Lux.Dense(neurons, neurons, tanh), - Lux.Dense(neurons, 1)) + chain1 = Lux.Chain(Lux.Dense(dim, neurons, tanh), + Lux.Dense(neurons, neurons, tanh), + Lux.Dense(neurons, neurons, tanh), + Lux.Dense(neurons, 1)) + chain2 = Lux.Chain(Lux.Dense(dim, neurons, tanh), + Lux.Dense(neurons, neurons, tanh), + Lux.Dense(neurons, neurons, tanh), + Lux.Dense(neurons, 1)) + chain3 = Lux.Chain(Lux.Dense(dim, neurons, tanh), + Lux.Dense(neurons, neurons, tanh), + Lux.Dense(neurons, neurons, tanh), + Lux.Dense(neurons, 1)) discretization = PhysicsInformedNN([chain1, chain2, chain3], strategy) @@ -130,7 +132,7 @@ function solve(opt) times = [] - cb = function (p,l) + cb = function (p, l) if initial_time == 0 initial_time = time() end @@ -144,11 +146,11 @@ function solve(opt) prob = discretize(pde_system, discretization) if opt == "both" - res = Optimization.solve(prob, ADAM(); callback = cb, maxiters=50) - prob = remake(prob,u0=res.minimizer) - res = Optimization.solve(prob, BFGS(); callback = cb, maxiters=150) + res = Optimization.solve(prob, ADAM(); callback = cb, maxiters = 50) + prob = remake(prob, u0 = res.minimizer) + res = Optimization.solve(prob, BFGS(); callback = cb, maxiters = 150) else - res = Optimization.solve(prob, opt; callback = cb, maxiters=200) + res = Optimization.solve(prob, opt; callback = cb, maxiters = 200) end times[1] = 0.001 @@ -185,18 +187,33 @@ loss_9, times_9 = solve("both") ## Results ```julia -p = plot([times_1, times_2, times_3, times_4, times_5, times_6, times_7, times_8, times_9], [loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9],xlabel="time (s)", ylabel="loss", xscale=:log10, yscale=:log10, labels=["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], legend=:bottomleft, linecolor=["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) +p = plot([times_1, times_2, times_3, times_4, times_5, times_6, times_7, times_8, times_9], + [loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9], + xlabel = "time (s)", + ylabel = "loss", + xscale = :log10, + yscale = :log10, + labels = ["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], + legend = :bottomleft, + linecolor = ["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) ``` ```julia -p = plot([loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9[2:end]], xlabel="iterations", ylabel="loss", yscale=:log10, labels=["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], legend=:bottomleft, linecolor=["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) +p = plot([loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9[2:end]], + xlabel = "iterations", + ylabel = "loss", + yscale = :log10, + labels = ["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], + legend = :bottomleft, + linecolor = ["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) ``` ```julia -@show loss_1[end], loss_2[end], loss_3[end], loss_4[end], loss_5[end], loss_6[end], loss_7[end], loss_8[end], loss_9[end] +@show loss_1[end], loss_2[end], loss_3[end], loss_4[end], loss_5[end], +loss_6[end], loss_7[end], loss_8[end], loss_9[end] ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/PINNOptimizers/allen_cahn.jmd b/benchmarks/PINNOptimizers/allen_cahn.jmd index ab5bd3360..965034eb0 100644 --- a/benchmarks/PINNOptimizers/allen_cahn.jmd +++ b/benchmarks/PINNOptimizers/allen_cahn.jmd @@ -21,8 +21,8 @@ import ModelingToolkit: Interval, infimum, supremum function solve(opt) strategy = QuadratureTraining() - @parameters t x1 x2 x3 x4 - @variables u(..) + @parameters t x1 x2 x3 x4 + @variables u(..) Dt = Differential(t) @@ -31,57 +31,57 @@ function solve(opt) Dxx3 = Differential(x3)^2 Dxx4 = Differential(x4)^2 - # Discretization - tmax = 1.0 - x1width = 1.0 - x2width = 1.0 - x3width = 1.0 - x4width = 1.0 - - tMeshNum = 10 - x1MeshNum = 10 - x2MeshNum = 10 - x3MeshNum = 10 - x4MeshNum = 10 - - dt = tmax/tMeshNum - dx1 = x1width/x1MeshNum - dx2 = x2width/x2MeshNum - dx3 = x3width/x3MeshNum - dx4 = x4width/x4MeshNum - - domains = [t ∈ Interval(0.0,tmax), - x1 ∈ Interval(0.0,x1width), - x2 ∈ Interval(0.0,x2width), - x3 ∈ Interval(0.0,x3width), - x4 ∈ Interval(0.0,x4width)] - - ts = 0.0 : dt : tmax - x1s = 0.0 : dx1 : x1width - x2s = 0.0 : dx2 : x2width - x3s = 0.0 : dx3 : x3width - x4s = 0.0 : dx4 : x4width + tmax = 1.0 + x1width = 1.0 + x2width = 1.0 + x3width = 1.0 + x4width = 1.0 + + tMeshNum = 10 + x1MeshNum = 10 + x2MeshNum = 10 + x3MeshNum = 10 + x4MeshNum = 10 + + dt = tmax/tMeshNum + dx1 = x1width/x1MeshNum + dx2 = x2width/x2MeshNum + dx3 = x3width/x3MeshNum + dx4 = x4width/x4MeshNum + + domains = [t ∈ Interval(0.0, tmax), + x1 ∈ Interval(0.0, x1width), + x2 ∈ Interval(0.0, x2width), + x3 ∈ Interval(0.0, x3width), + x4 ∈ Interval(0.0, x4width)] + + ts = 0.0:dt:tmax + x1s = 0.0:dx1:x1width + x2s = 0.0:dx2:x2width + x3s = 0.0:dx3:x3width + x4s = 0.0:dx4:x4width # Operators - Δu = Dxx1(u(t,x1,x2,x3,x4)) + Dxx2(u(t,x1,x2,x3,x4)) + Dxx3(u(t,x1,x2,x3,x4)) + Dxx4(u(t,x1,x2,x3,x4)) # Laplacian - + Δu = Dxx1(u(t, x1, x2, x3, x4)) + Dxx2(u(t, x1, x2, x3, x4)) + + Dxx3(u(t, x1, x2, x3, x4)) + Dxx4(u(t, x1, x2, x3, x4)) # Laplacian # Equation - eq = Dt(u(t,x1,x2,x3,x4)) - Δu - u(t,x1,x2,x3,x4) + u(t,x1,x2,x3,x4)*u(t,x1,x2,x3,x4)*u(t,x1,x2,x3,x4) ~ 0 #ALLEN CAHN EQUATION + eq = Dt(u(t, x1, x2, x3, x4)) - Δu - u(t, x1, x2, x3, x4) + + u(t, x1, x2, x3, x4)*u(t, x1, x2, x3, x4)*u(t, x1, x2, x3, x4) ~ 0 #ALLEN CAHN EQUATION - initialCondition = 1/(2 + 0.4 * (x1*x1 + x2*x2 + x3*x3 + x4*x4)) # see PNAS paper + initialCondition = 1/(2 + 0.4 * (x1*x1 + x2*x2 + x3*x3 + x4*x4)) # see PNAS paper - bcs = [u(0,x1,x2,x3,x4) ~ initialCondition] #from literature + bcs = [u(0, x1, x2, x3, x4) ~ initialCondition] #from literature ## NEURAL NETWORK n = 20 #neuron number - chain = Lux.Chain(Lux.Dense(5,n,tanh),Lux.Dense(n,n,tanh),Lux.Dense(n,1)) #Neural network from OptimizationFlux library + chain = Lux.Chain(Lux.Dense(5, n, tanh), Lux.Dense(n, n, tanh), Lux.Dense(n, 1)) #Neural network from OptimizationFlux library discretization = PhysicsInformedNN(chain, strategy) - indvars = [t,x1,x2,x3,x4] #physically independent variables + indvars = [t, x1, x2, x3, x4] #physically independent variables depvars = [u] #dependent (target) variable loss = [] @@ -89,7 +89,7 @@ function solve(opt) times = [] - cb = function (p,l) + cb = function (p, l) if initial_time == 0 initial_time = time() end @@ -103,11 +103,11 @@ function solve(opt) prob = discretize(pde_system, discretization) if opt == "both" - res = Optimization.solve(prob, ADAM(); callback = cb, maxiters=50) - prob = remake(prob,u0=res.minimizer) - res = Optimization.solve(prob, BFGS(); callback = cb, maxiters=150) + res = Optimization.solve(prob, ADAM(); callback = cb, maxiters = 50) + prob = remake(prob, u0 = res.minimizer) + res = Optimization.solve(prob, BFGS(); callback = cb, maxiters = 150) else - res = Optimization.solve(prob, opt; callback = cb, maxiters=200) + res = Optimization.solve(prob, opt; callback = cb, maxiters = 200) end times[1] = 0.001 @@ -144,18 +144,33 @@ loss_9, times_9 = solve("both") ## Results ```julia -p = plot([times_1, times_2, times_3, times_4, times_5, times_6, times_7, times_8, times_9], [loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9],xlabel="time (s)", ylabel="loss", xscale=:log10, yscale=:log10, labels=["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], legend=:bottomleft, linecolor=["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) +p = plot([times_1, times_2, times_3, times_4, times_5, times_6, times_7, times_8, times_9], + [loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9], + xlabel = "time (s)", + ylabel = "loss", + xscale = :log10, + yscale = :log10, + labels = ["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], + legend = :bottomleft, + linecolor = ["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) ``` ```julia -p = plot([loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9[2:end]], xlabel="iterations", ylabel="loss", yscale=:log10, labels=["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], legend=:bottomleft, linecolor=["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) +p = plot([loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9[2:end]], + xlabel = "iterations", + ylabel = "loss", + yscale = :log10, + labels = ["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], + legend = :bottomleft, + linecolor = ["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) ``` ```julia -@show loss_1[end], loss_2[end], loss_3[end], loss_4[end], loss_5[end], loss_6[end], loss_7[end], loss_8[end], loss_9[end] +@show loss_1[end], loss_2[end], loss_3[end], loss_4[end], loss_5[end], +loss_6[end], loss_7[end], loss_8[end], loss_9[end] ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/PINNOptimizers/burgers_equation.jmd b/benchmarks/PINNOptimizers/burgers_equation.jmd index ebecbfcae..4e04b2c43 100644 --- a/benchmarks/PINNOptimizers/burgers_equation.jmd +++ b/benchmarks/PINNOptimizers/burgers_equation.jmd @@ -28,11 +28,15 @@ dt = dx * nu t_max = dt * nt # Analytic function -analytic_sol_func(t, x) = -2*nu*(-(-8*t + 2*x)*exp(-(-4*t + x)^2/(4*nu*(t + 1)))/ - (4*nu*(t + 1)) - (-8*t + 2*x - 12.5663706143592)* - exp(-(-4*t + x - 6.28318530717959)^2/(4*nu*(t + 1)))/ - (4*nu*(t + 1)))/(exp(-(-4*t + x - 6.28318530717959)^2/ - (4*nu*(t + 1))) + exp(-(-4*t + x)^2/(4*nu*(t + 1)))) + 4 +function analytic_sol_func(t, x) + -2*nu*(-(-8*t + 2*x)*exp(-(-4*t + x)^2/(4*nu*(t + 1))) / + (4*nu*(t + 1)) - + (-8*t + 2*x - 12.5663706143592) * + exp(-(-4*t + x - 6.28318530717959)^2/(4*nu*(t + 1))) / + (4*nu*(t + + 1)))/(exp(-(-4*t + x - 6.28318530717959)^2 / + (4*nu*(t + 1))) + exp(-(-4*t + x)^2/(4*nu*(t + 1)))) + 4 +end ``` ```julia @@ -46,10 +50,10 @@ function burgers(strategy, minimizer) eq = Dt(u(x, t)) + u(x, t) * Dx(u(x, t)) ~ nu * Dxx(u(x, t)) bcs = [u(x, 0.0) ~ analytic_sol_func(x, 0.0), - u(0.0, t) ~ u(x_max, t)] + u(0.0, t) ~ u(x_max, t)] domains = [x ∈ Interval(0.0, x_max), - t ∈ Interval(0.0, t_max)] + t ∈ Interval(0.0, t_max)] chain = Lux.Chain(Lux.Dense(2, 16, tanh), Lux.Dense(16, 16, tanh), Lux.Dense(16, 1)) discretization = PhysicsInformedNN(chain, strategy) @@ -95,11 +99,11 @@ function burgers(strategy, minimizer) startTime = time_ns() # Fix initial time (t=0) before starting the training if minimizer == "both" - res = Optimization.solve(prob, ADAM(); callback=cb, maxiters=5) - prob = remake(prob, u0=res.minimizer) - res = Optimization.solve(prob, BFGS(); callback=cb, maxiters=15) + res = Optimization.solve(prob, ADAM(); callback = cb, maxiters = 5) + prob = remake(prob, u0 = res.minimizer) + res = Optimization.solve(prob, BFGS(); callback = cb, maxiters = 15) else - res = Optimization.solve(prob, minimizer; callback=cb, maxiters=500) + res = Optimization.solve(prob, minimizer; callback = cb, maxiters = 500) end phi = discretization.phi @@ -110,7 +114,6 @@ function burgers(strategy, minimizer) end ``` - ## Solve ```julia @@ -122,44 +125,42 @@ strategies = [NeuralPDE.QuadratureTraining()] strategies_short_name = ["QuadratureTraining"] minimizers = [Optimisers.ADAM(), - Optimisers.ADAM(0.000005), - Optimisers.ADAM(0.0005), - Optimisers.RMSProp(), - Optimisers.RMSProp(0.00005), - Optimisers.RMSProp(0.05), - OptimizationOptimJL.BFGS(), - OptimizationOptimJL.LBFGS()] - + Optimisers.ADAM(0.000005), + Optimisers.ADAM(0.0005), + Optimisers.RMSProp(), + Optimisers.RMSProp(0.00005), + Optimisers.RMSProp(0.05), + OptimizationOptimJL.BFGS(), + OptimizationOptimJL.LBFGS()] minimizers_short_name = ["ADAM", - "ADAM(0.000005)", - "ADAM(0.0005)", - "RMS", - "RMS(0.00005)", - "RMS(0.05)", - "BFGS", - "LBFGS"] + "ADAM(0.000005)", + "ADAM(0.0005)", + "RMS", + "RMS(0.00005)", + "RMS(0.05)", + "BFGS", + "LBFGS"] ``` ```julia # Run models -error_res = Dict() +error_res = Dict() params_res = Dict() times = Dict() losses_res = Dict() print("Starting run \n") - for min in 1:length(minimizers) # minimizer - for strat in 1:length(strategies) # strategy - #println(string(strategies_short_name[1], " ", minimizers_short_name[min])) - res = burgers(strategies[strat], minimizers[min]) - push!(error_res, string(strat,min) => res[1]) - push!(params_res, string(strat,min) => res[2]) - push!(times, string(strat,min) => res[3]) - push!(losses_res, string(strat,min) => res[4]) - end + for strat in 1:length(strategies) # strategy + #println(string(strategies_short_name[1], " ", minimizers_short_name[min])) + res = burgers(strategies[strat], minimizers[min]) + push!(error_res, string(strat, min) => res[1]) + push!(params_res, string(strat, min) => res[2]) + push!(times, string(strat, min) => res[3]) + push!(losses_res, string(strat, min) => res[4]) + end end ``` @@ -167,14 +168,23 @@ end ```julia #PLOT ERROR VS ITER: to compare to compare between minimizers, keeping the same strategy (easily adjustable to compare between strategies) -error_iter = Plots.plot(1:length(error_res["11"]), error_res["11"], yaxis=:log10, title = string("Burger error vs iter"), ylabel = "Error", label = string(minimizers_short_name[1]), ylims = (0.0001,1)) -plot!(error_iter, 1:length(error_res["12"]), error_res["12"], yaxis=:log10, label = string(minimizers_short_name[2])) -plot!(error_iter, 1:length(error_res["13"]), error_res["13"], yaxis=:log10, label = string(minimizers_short_name[3])) -plot!(error_iter, 1:length(error_res["14"]), error_res["14"], yaxis=:log10, label = string(minimizers_short_name[4])) -plot!(error_iter, 1:length(error_res["15"]), error_res["15"], yaxis=:log10, label = string(minimizers_short_name[5])) -plot!(error_iter, 1:length(error_res["16"]), error_res["16"], yaxis=:log10, label = string(minimizers_short_name[6])) -plot!(error_iter, 1:length(error_res["17"]), error_res["17"], yaxis=:log10, label = string(minimizers_short_name[7])) -plot!(error_iter, 1:length(error_res["18"]), error_res["18"], yaxis=:log10, label = string(minimizers_short_name[8])) +error_iter = Plots.plot(1:length(error_res["11"]), error_res["11"], yaxis = :log10, + title = string("Burger error vs iter"), ylabel = "Error", + label = string(minimizers_short_name[1]), ylims = (0.0001, 1)) +plot!(error_iter, 1:length(error_res["12"]), error_res["12"], + yaxis = :log10, label = string(minimizers_short_name[2])) +plot!(error_iter, 1:length(error_res["13"]), error_res["13"], + yaxis = :log10, label = string(minimizers_short_name[3])) +plot!(error_iter, 1:length(error_res["14"]), error_res["14"], + yaxis = :log10, label = string(minimizers_short_name[4])) +plot!(error_iter, 1:length(error_res["15"]), error_res["15"], + yaxis = :log10, label = string(minimizers_short_name[5])) +plot!(error_iter, 1:length(error_res["16"]), error_res["16"], + yaxis = :log10, label = string(minimizers_short_name[6])) +plot!(error_iter, 1:length(error_res["17"]), error_res["17"], + yaxis = :log10, label = string(minimizers_short_name[7])) +plot!(error_iter, 1:length(error_res["18"]), error_res["18"], + yaxis = :log10, label = string(minimizers_short_name[8])) Plots.plot(error_iter) ``` @@ -192,14 +202,23 @@ Plots.plot(error_iter) ```julia #PLOT ERROR VS TIME: to compare to compare between minimizers, keeping the same strategy -error_time = plot(times["11"], error_res["11"], yaxis=:log10, label = string(minimizers_short_name[1]),title = string("Burger error vs time"), ylabel = "Error", size = (1500,500)) -plot!(error_time, times["12"], error_res["12"], yaxis=:log10, label = string(minimizers_short_name[2])) -plot!(error_time, times["13"], error_res["13"], yaxis=:log10, label = string(minimizers_short_name[3])) -plot!(error_time, times["14"], error_res["14"], yaxis=:log10, label = string(minimizers_short_name[4])) -plot!(error_time, times["15"], error_res["15"], yaxis=:log10, label = string(minimizers_short_name[5])) -plot!(error_time, times["16"], error_res["16"], yaxis=:log10, label = string(minimizers_short_name[6])) -plot!(error_time, times["17"], error_res["17"], yaxis=:log10, label = string(minimizers_short_name[7])) -plot!(error_time, times["18"], error_res["18"], yaxis=:log10, label = string(minimizers_short_name[7])) +error_time = plot( + times["11"], error_res["11"], yaxis = :log10, label = string(minimizers_short_name[1]), + title = string("Burger error vs time"), ylabel = "Error", size = (1500, 500)) +plot!(error_time, times["12"], error_res["12"], yaxis = :log10, + label = string(minimizers_short_name[2])) +plot!(error_time, times["13"], error_res["13"], yaxis = :log10, + label = string(minimizers_short_name[3])) +plot!(error_time, times["14"], error_res["14"], yaxis = :log10, + label = string(minimizers_short_name[4])) +plot!(error_time, times["15"], error_res["15"], yaxis = :log10, + label = string(minimizers_short_name[5])) +plot!(error_time, times["16"], error_res["16"], yaxis = :log10, + label = string(minimizers_short_name[6])) +plot!(error_time, times["17"], error_res["17"], yaxis = :log10, + label = string(minimizers_short_name[7])) +plot!(error_time, times["18"], error_res["18"], yaxis = :log10, + label = string(minimizers_short_name[7])) Plots.plot(error_time) ``` @@ -217,5 +236,5 @@ Plots.plot(error_time) ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/PINNOptimizers/hamilton_jacobi.jmd b/benchmarks/PINNOptimizers/hamilton_jacobi.jmd index 9970e225e..4b5d89aa8 100644 --- a/benchmarks/PINNOptimizers/hamilton_jacobi.jmd +++ b/benchmarks/PINNOptimizers/hamilton_jacobi.jmd @@ -22,8 +22,8 @@ function solve(opt) strategy = QuadratureTraining() ## DECLARATIONS - @parameters t x1 x2 x3 x4 - @variables u(..) + @parameters t x1 x2 x3 x4 + @variables u(..) Dt = Differential(t) @@ -37,59 +37,60 @@ function solve(opt) Dxx3 = Differential(x3)^2 Dxx4 = Differential(x4)^2 - # Discretization - tmax = 1.0 - x1width = 1.0 - x2width = 1.0 - x3width = 1.0 - x4width = 1.0 - - tMeshNum = 10 - x1MeshNum = 10 - x2MeshNum = 10 - x3MeshNum = 10 - x4MeshNum = 10 - - dt = tmax/tMeshNum - dx1 = x1width/x1MeshNum - dx2 = x2width/x2MeshNum - dx3 = x3width/x3MeshNum - dx4 = x4width/x4MeshNum - - domains = [t ∈ Interval(0.0,tmax), - x1 ∈ Interval(0.0,x1width), - x2 ∈ Interval(0.0,x2width), - x3 ∈ Interval(0.0,x3width), - x4 ∈ Interval(0.0,x4width)] - - ts = 0.0 : dt : tmax - x1s = 0.0 : dx1 : x1width - x2s = 0.0 : dx2 : x2width - x3s = 0.0 : dx3 : x3width - x4s = 0.0 : dx4 : x4width + tmax = 1.0 + x1width = 1.0 + x2width = 1.0 + x3width = 1.0 + x4width = 1.0 + + tMeshNum = 10 + x1MeshNum = 10 + x2MeshNum = 10 + x3MeshNum = 10 + x4MeshNum = 10 + + dt = tmax/tMeshNum + dx1 = x1width/x1MeshNum + dx2 = x2width/x2MeshNum + dx3 = x3width/x3MeshNum + dx4 = x4width/x4MeshNum + + domains = [t ∈ Interval(0.0, tmax), + x1 ∈ Interval(0.0, x1width), + x2 ∈ Interval(0.0, x2width), + x3 ∈ Interval(0.0, x3width), + x4 ∈ Interval(0.0, x4width)] + + ts = 0.0:dt:tmax + x1s = 0.0:dx1:x1width + x2s = 0.0:dx2:x2width + x3s = 0.0:dx3:x3width + x4s = 0.0:dx4:x4width λ = 1.0f0 # Operators - Δu = Dxx1(u(t,x1,x2,x3,x4)) + Dxx2(u(t,x1,x2,x3,x4)) + Dxx3(u(t,x1,x2,x3,x4)) + Dxx4(u(t,x1,x2,x3,x4)) # Laplacian - ∇u = [Dx1(u(t,x1,x2,x3,x4)), Dx2(u(t,x1,x2,x3,x4)),Dx3(u(t,x1,x2,x3,x4)),Dx4(u(t,x1,x2,x3,x4))] + Δu = Dxx1(u(t, x1, x2, x3, x4)) + Dxx2(u(t, x1, x2, x3, x4)) + + Dxx3(u(t, x1, x2, x3, x4)) + Dxx4(u(t, x1, x2, x3, x4)) # Laplacian + ∇u = [Dx1(u(t, x1, x2, x3, x4)), Dx2(u(t, x1, x2, x3, x4)), + Dx3(u(t, x1, x2, x3, x4)), Dx4(u(t, x1, x2, x3, x4))] # Equation - eq = Dt(u(t,x1,x2,x3,x4)) + Δu - λ*sum(∇u.^2) ~ 0 #HAMILTON-JACOBI-BELLMAN EQUATION + eq = Dt(u(t, x1, x2, x3, x4)) + Δu - λ*sum(∇u .^ 2) ~ 0 #HAMILTON-JACOBI-BELLMAN EQUATION - terminalCondition = log((1 + x1*x1 + x2*x2 + x3*x3 + x4*x4)/2) # see PNAS paper + terminalCondition = log((1 + x1*x1 + x2*x2 + x3*x3 + x4*x4)/2) # see PNAS paper - bcs = [u(tmax,x1,x2,x3,x4) ~ terminalCondition] #PNAS paper again + bcs = [u(tmax, x1, x2, x3, x4) ~ terminalCondition] #PNAS paper again ## NEURAL NETWORK n = 20 #neuron number - chain = Lux.Chain(Lux.Dense(5,n,tanh),Lux.Dense(n,n,tanh),Lux.Dense(n,1)) #Neural network from OptimizationFlux library + chain = Lux.Chain(Lux.Dense(5, n, tanh), Lux.Dense(n, n, tanh), Lux.Dense(n, 1)) #Neural network from OptimizationFlux library discretization = PhysicsInformedNN(chain, strategy) - indvars = [t,x1,x2,x3,x4] #physically independent variables + indvars = [t, x1, x2, x3, x4] #physically independent variables depvars = [u] #dependent (target) variable loss = [] @@ -97,7 +98,7 @@ function solve(opt) times = [] - cb = function (p,l) + cb = function (p, l) if initial_time == 0 initial_time = time() end @@ -111,11 +112,11 @@ function solve(opt) prob = discretize(pde_system, discretization) if opt == "both" - res = Optimization.solve(prob, ADAM(); callback = cb, maxiters=50) - prob = remake(prob,u0=res.minimizer) - res = Optimization.solve(prob, BFGS(); callback = cb, maxiters=150) + res = Optimization.solve(prob, ADAM(); callback = cb, maxiters = 50) + prob = remake(prob, u0 = res.minimizer) + res = Optimization.solve(prob, BFGS(); callback = cb, maxiters = 150) else - res = Optimization.solve(prob, opt; callback = cb, maxiters=200) + res = Optimization.solve(prob, opt; callback = cb, maxiters = 200) end times[1] = 0.001 @@ -152,18 +153,33 @@ loss_9, times_9 = solve("both") ## Results ```julia -p = plot([times_1, times_2, times_3, times_4, times_5, times_6, times_7, times_8, times_9], [loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9],xlabel="time (s)", ylabel="loss", xscale=:log10, yscale=:log10, labels=["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], legend=:bottomleft, linecolor=["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) +p = plot([times_1, times_2, times_3, times_4, times_5, times_6, times_7, times_8, times_9], + [loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9], + xlabel = "time (s)", + ylabel = "loss", + xscale = :log10, + yscale = :log10, + labels = ["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], + legend = :bottomleft, + linecolor = ["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) ``` ```julia -p = plot([loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9], xlabel="iterations", ylabel="loss", yscale=:log10, labels=["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], legend=:bottomleft, linecolor=["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) +p = plot([loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9], + xlabel = "iterations", + ylabel = "loss", + yscale = :log10, + labels = ["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], + legend = :bottomleft, + linecolor = ["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) ``` ```julia -@show loss_1[end], loss_2[end], loss_3[end], loss_4[end], loss_5[end], loss_6[end], loss_7[end], loss_8[end], loss_9[end] +@show loss_1[end], loss_2[end], loss_3[end], loss_4[end], loss_5[end], +loss_6[end], loss_7[end], loss_8[end], loss_9[end] ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/PINNOptimizers/poisson.jmd b/benchmarks/PINNOptimizers/poisson.jmd index 26f6adb3e..0239e7bca 100644 --- a/benchmarks/PINNOptimizers/poisson.jmd +++ b/benchmarks/PINNOptimizers/poisson.jmd @@ -27,30 +27,30 @@ function solve(opt) Dyy = Differential(y)^2 # 2D PDE - eq = Dxx(u(x,y)) + Dyy(u(x,y)) ~ -sin(pi*x)*sin(pi*y) + eq = Dxx(u(x, y)) + Dyy(u(x, y)) ~ -sin(pi*x)*sin(pi*y) # Boundary conditions - bcs = [u(0,y) ~ 0.f0, u(1,y) ~ -sin(pi*1)*sin(pi*y), - u(x,0) ~ 0.f0, u(x,1) ~ -sin(pi*x)*sin(pi*1)] + bcs = [u(0, y) ~ 0.0f0, u(1, y) ~ -sin(pi*1)*sin(pi*y), + u(x, 0) ~ 0.0f0, u(x, 1) ~ -sin(pi*x)*sin(pi*1)] # Space and time domains - domains = [x ∈ Interval(0.0,1.0), - y ∈ Interval(0.0,1.0)] + domains = [x ∈ Interval(0.0, 1.0), + y ∈ Interval(0.0, 1.0)] # Neural network dim = 2 # number of dimensions - chain = Lux.Chain(Lux.Dense(dim,16,tanh),Lux.Dense(16,16,tanh),Lux.Dense(16,1)) + chain = Lux.Chain(Lux.Dense(dim, 16, tanh), Lux.Dense(16, 16, tanh), Lux.Dense(16, 1)) - discretization = PhysicsInformedNN(chain,strategy) + discretization = PhysicsInformedNN(chain, strategy) indvars = [x, y] #physically independent variables - depvars = [u(x,y)] #dependent (target) variable + depvars = [u(x, y)] #dependent (target) variable loss = [] initial_time = nothing times = [] - cb = function (p,l) + cb = function (p, l) if initial_time == nothing initial_time = time() end @@ -64,11 +64,11 @@ function solve(opt) prob = discretize(pde_system, discretization) if opt == "both" - res = Optimization.solve(prob, ADAM(); callback = cb, maxiters=50) - prob = remake(prob,u0=res.minimizer) - res = Optimization.solve(prob, BFGS(); callback = cb, maxiters=150) + res = Optimization.solve(prob, ADAM(); callback = cb, maxiters = 50) + prob = remake(prob, u0 = res.minimizer) + res = Optimization.solve(prob, BFGS(); callback = cb, maxiters = 150) else - res = Optimization.solve(prob, opt; callback = cb, maxiters=200) + res = Optimization.solve(prob, opt; callback = cb, maxiters = 200) end times[1] = 0.001 @@ -105,18 +105,33 @@ loss_9, times_9 = solve("both") ## Results ```julia -p = plot([times_1, times_2, times_3, times_4, times_5, times_6, times_7, times_8, times_9], [loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9],xlabel="time (s)", ylabel="loss", xscale=:log10, yscale=:log10, labels=["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], legend=:bottomleft, linecolor=["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) +p = plot([times_1, times_2, times_3, times_4, times_5, times_6, times_7, times_8, times_9], + [loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9], + xlabel = "time (s)", + ylabel = "loss", + xscale = :log10, + yscale = :log10, + labels = ["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], + legend = :bottomleft, + linecolor = ["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) ``` ```julia -p = plot([loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9], xlabel="iterations", ylabel="loss", yscale=:log10, labels=["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], legend=:bottomleft, linecolor=["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) +p = plot([loss_1, loss_2, loss_3, loss_4, loss_5, loss_6, loss_7, loss_8, loss_9], + xlabel = "iterations", + ylabel = "loss", + yscale = :log10, + labels = ["ADAM(0.001)" "ADAM(0.005)" "ADAM(0.05)" "RMSProp(0.001)" "RMSProp(0.005)" "RMSProp(0.05)" "BFGS()" "LBFGS()" "ADAM + BFGS"], + legend = :bottomleft, + linecolor = ["#2660A4" "#4CD0F4" "#FEC32F" "#F763CD" "#44BD79" "#831894" "#A6ED18" "#980000" "#FF912B"]) ``` ```julia -@show loss_1[end], loss_2[end], loss_3[end], loss_4[end], loss_5[end], loss_6[end], loss_7[end], loss_8[end], loss_9[end] +@show loss_1[end], loss_2[end], loss_3[end], loss_4[end], loss_5[end], +loss_6[end], loss_7[end], loss_8[end], loss_9[end] ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/ParameterEstimation/FitzHughNagumoParameterEstimation.jmd b/benchmarks/ParameterEstimation/FitzHughNagumoParameterEstimation.jmd index 3f1c8dcb0..6541d5544 100644 --- a/benchmarks/ParameterEstimation/FitzHughNagumoParameterEstimation.jmd +++ b/benchmarks/ParameterEstimation/FitzHughNagumoParameterEstimation.jmd @@ -7,16 +7,18 @@ author: Vaibhav Dixit, Chris Rackauckas ```julia using ParameterizedFunctions, OrdinaryDiffEq, DiffEqParamEstim, Optimization -using OptimizationBBO, OptimizationNLopt, ForwardDiff, Plots, BenchmarkTools +using OptimizationBBO, OptimizationNLopt, ForwardDiff, Plots, BenchmarkTools using ModelingToolkit: t_nounits as t, D_nounits as D -gr(fmt=:png) +gr(fmt = :png) ``` ```julia -loc_bounds = Tuple{Float64,Float64}[(0, 1), (0, 1), (0, 1), (0, 1)] -glo_bounds = Tuple{Float64,Float64}[(0, 5), (0, 5), (0, 5), (0, 5)] -loc_init = [0.5,0.5,0.5,0.5] -glo_init = [2.5,2.5,2.5,2.5] +loc_bounds = Tuple{Float64, Float64}[(0, 1), (0, 1), ( + 0, 1), (0, 1)] +glo_bounds = Tuple{Float64, Float64}[(0, 5), (0, 5), ( + 0, 5), (0, 5)] +loc_init = [0.5, 0.5, 0.5, 0.5] +glo_init = [2.5, 2.5, 2.5, 2.5] ``` ```julia @@ -41,19 +43,19 @@ end ``` ```julia -p = [0.7,0.8,0.08,0.5] # Parameters used to construct the dataset +p = [0.7, 0.8, 0.08, 0.5] # Parameters used to construct the dataset r0 = [1.0; 1.0] # initial value tspan = (0.0, 30.0) # sample of 3000 observations over the (0,30) timespan -prob = ODEProblem(fitz, r0, tspan,p) +prob = ODEProblem(fitz, r0, tspan, p) tspan2 = (0.0, 3.0) # sample of 300 observations with a timestep of 0.01 -prob_short = ODEProblem(fitz, r0, tspan2,p) +prob_short = ODEProblem(fitz, r0, tspan2, p) ``` ```julia dt = 30.0/3000 tf = 30.0 tinterval = 0:dt:tf -time_points = collect(tinterval) +time_points = collect(tinterval) ``` ```julia @@ -67,9 +69,9 @@ t_short = collect(tinterval_short) ```julia #Generate Data -data_sol_short = solve(prob_short,Vern9(),saveat=t_short,reltol=1e-9,abstol=1e-9) +data_sol_short = solve(prob_short, Vern9(), saveat = t_short, reltol = 1e-9, abstol = 1e-9) data_short = convert(Array, data_sol_short) # This operation produces column major dataset obs as columns, equations as rows -data_sol = solve(prob,Vern9(),saveat=time_points,reltol=1e-9,abstol=1e-9) +data_sol = solve(prob, Vern9(), saveat = time_points, reltol = 1e-9, abstol = 1e-9) data = convert(Array, data_sol) ``` @@ -90,21 +92,23 @@ plot(data_sol) ## Local Solution from the short data set ```julia -obj_short = build_loss_objective(prob_short,Tsit5(),L2Loss(t_short,data_short),tstops=t_short) +obj_short = build_loss_objective(prob_short, Tsit5(), L2Loss(t_short, data_short), tstops = t_short) optprob = OptimizationProblem(obj_short, glo_init, lb = first.(glo_bounds), ub = last.(glo_bounds)) @btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(), maxiters = 7e3) # Lower tolerance could lead to smaller fitness (more accuracy) ``` ```julia -obj_short = build_loss_objective(prob_short,Tsit5(),L2Loss(t_short,data_short),tstops=t_short,reltol=1e-9) +obj_short = build_loss_objective( + prob_short, Tsit5(), L2Loss(t_short, data_short), tstops = t_short, reltol = 1e-9) optprob = OptimizationProblem(obj_short, glo_init, lb = first.(glo_bounds), ub = last.(glo_bounds)) @btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(), maxiters = 7e3) # Change in tolerance makes it worse ``` ```julia -obj_short = build_loss_objective(prob_short,Vern9(),L2Loss(t_short,data_short),tstops=t_short,reltol=1e-9,abstol=1e-9) +obj_short = build_loss_objective(prob_short, Vern9(), L2Loss(t_short, data_short), + tstops = t_short, reltol = 1e-9, abstol = 1e-9) optprob = OptimizationProblem(obj_short, glo_init, lb = first.(glo_bounds), ub = last.(glo_bounds)) @btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(), maxiters = 7e3) # using the moe accurate Vern9() reduces the fitness marginally and leads to some increase in time taken @@ -115,7 +119,8 @@ optprob = OptimizationProblem(obj_short, glo_init, lb = first.(glo_bounds), ub = #### Global Optimisation ```julia -obj_short = build_loss_objective(prob_short,Vern9(),L2Loss(t_short,data_short),tstops=t_short,reltol=1e-9,abstol=1e-9) +obj_short = build_loss_objective(prob_short, Vern9(), L2Loss(t_short, data_short), + tstops = t_short, reltol = 1e-9, abstol = 1e-9) ``` ```julia @@ -142,7 +147,8 @@ opt = Opt(:GN_ESCH, 4) Now local optimization algorithms are used to check the global ones, these use the local constraints, different initial values and time step ```julia -obj_short = build_loss_objective(prob_short,Vern9(),L2Loss(t_short,data_short),Optimization.AutoForwardDiff(),tstops=t_short,reltol=1e-9,abstol=1e-9) +obj_short = build_loss_objective(prob_short, Vern9(), L2Loss(t_short, data_short), + Optimization.AutoForwardDiff(), tstops = t_short, reltol = 1e-9, abstol = 1e-9) optprob = OptimizationProblem(obj_short, loc_init, lb = first.(loc_bounds), ub = last.(loc_bounds)) ``` @@ -190,9 +196,10 @@ opt = Opt(:LD_MMA, 4) Vern9 solver with reltol=1e-9 and abstol=1e-9 is used and the dataset is increased to 3000 observations per variable with the same integration time step of 0.01. - ```julia -obj = build_loss_objective(prob,Vern9(),L2Loss(time_points,data),Optimization.AutoForwardDiff(),tstops=time_points,reltol=1e-9,abstol=1e-9) +obj = build_loss_objective( + prob, Vern9(), L2Loss(time_points, data), Optimization.AutoForwardDiff(), + tstops = time_points, reltol = 1e-9, abstol = 1e-9) optprob = OptimizationProblem(obj, glo_init, lb = first.(glo_bounds), ub = last.(glo_bounds)) @btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(), maxiters = 4e3) ``` @@ -243,5 +250,5 @@ It is observed that lower tolerance lead to higher accuracy but too low toleranc ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/ParameterEstimation/LorenzParameterEstimation.jmd b/benchmarks/ParameterEstimation/LorenzParameterEstimation.jmd index 9f37f64a6..1d8eb0bb6 100644 --- a/benchmarks/ParameterEstimation/LorenzParameterEstimation.jmd +++ b/benchmarks/ParameterEstimation/LorenzParameterEstimation.jmd @@ -11,51 +11,53 @@ Note: If data is generated with a fixed time step method and then is tested agai using ParameterizedFunctions, OrdinaryDiffEq, DiffEqParamEstim, Optimization using OptimizationBBO, OptimizationNLopt, Plots, ForwardDiff, BenchmarkTools using ModelingToolkit: t_nounits as t, D_nounits as D -gr(fmt=:png) +gr(fmt = :png) ``` ```julia -Xiang2015Bounds = Tuple{Float64, Float64}[(9, 11), (20, 30), (2, 3)] # for local optimizations -xlow_bounds = [9.0,20.0,2.0] -xhigh_bounds = [11.0,30.0,3.0] -LooserBounds = Tuple{Float64, Float64}[(0, 22), (0, 60), (0, 6)] # for global optimization +Xiang2015Bounds = Tuple{Float64, Float64}[(9, 11), (20, 30), ( + 2, 3)] # for local optimizations +xlow_bounds = [9.0, 20.0, 2.0] +xhigh_bounds = [11.0, 30.0, 3.0] +LooserBounds = Tuple{Float64, Float64}[(0, 22), (0, 60), ( + 0, 6)] # for global optimization GloIniPar = [0.0, 0.5, 0.1] # for global optimizations LocIniPar = [9.0, 20.0, 2.0] # for local optimization ``` ```julia @mtkmodel LorenzExample begin - @parameters begin - σ = 10.0 # Parameter: Prandtl number - ρ = 28.0 # Parameter: Rayleigh number - β = 8/3 # Parameter: Geometric factor - end - @variables begin - x(t) = 1.0 # Initial condition for x - y(t) = 1.0 # Initial condition for y - z(t) = 1.0 # Initial condition for z - end - @equations begin - D(x) ~ σ * (y - x) - D(y) ~ x * (ρ - z) - y - D(z) ~ x * y - β * z - end + @parameters begin + σ = 10.0 # Parameter: Prandtl number + ρ = 28.0 # Parameter: Rayleigh number + β = 8/3 # Parameter: Geometric factor + end + @variables begin + x(t) = 1.0 # Initial condition for x + y(t) = 1.0 # Initial condition for y + z(t) = 1.0 # Initial condition for z + end + @equations begin + D(x) ~ σ * (y - x) + D(y) ~ x * (ρ - z) - y + D(z) ~ x * y - β * z + end end - + @mtkbuild g1 = LorenzExample() -p = [10.0,28.0,2.66] # Parameters used to construct the dataset +p = [10.0, 28.0, 2.66] # Parameters used to construct the dataset r0 = [1.0; 0.0; 0.0] #[-11.8,-5.1,37.5] PODES Initial values of the system in space # [0.1, 0.0, 0.0] tspan = (0.0, 30.0) # PODES sample of 3000 observations over the (0,30) timespan -prob = ODEProblem(g1, r0, tspan,p) +prob = ODEProblem(g1, r0, tspan, p) tspan2 = (0.0, 3.0) # Xiang test sample of 300 observations with a timestep of 0.01 -prob_short = ODEProblem(g1, r0, tspan2,p) +prob_short = ODEProblem(g1, r0, tspan2, p) ``` ```julia dt = 30.0/3000 tf = 30.0 tinterval = 0:dt:tf -time_points = collect(tinterval) +time_points = collect(tinterval) ``` ```julia @@ -69,57 +71,61 @@ t_short = collect(tinterval_short) ```julia # Generate Data -data_sol_short = solve(prob_short,Vern9(),saveat=t_short,reltol=1e-9,abstol=1e-9) +data_sol_short = solve(prob_short, Vern9(), saveat = t_short, reltol = 1e-9, abstol = 1e-9) data_short = convert(Array, data_sol_short) # This operation produces column major dataset obs as columns, equations as rows -data_sol = solve(prob,Vern9(),saveat=time_points,reltol=1e-9,abstol=1e-9) +data_sol = solve(prob, Vern9(), saveat = time_points, reltol = 1e-9, abstol = 1e-9) data = convert(Array, data_sol) ``` Plot the data ```julia -plot(data_sol_short,vars=(1,2,3)) # the short solution -plot(data_sol,vars=(1,2,3)) # the longer solution -interpolation_sol = solve(prob,Vern7(),saveat=t,reltol=1e-12,abstol=1e-12) -plot(interpolation_sol,vars=(1,2,3)) +plot(data_sol_short, vars = (1, 2, 3)) # the short solution +plot(data_sol, vars = (1, 2, 3)) # the longer solution +interpolation_sol = solve(prob, Vern7(), saveat = t, reltol = 1e-12, abstol = 1e-12) +plot(interpolation_sol, vars = (1, 2, 3)) ``` ```julia -xyzt = plot(data_sol_short, plotdensity=10000,lw=1.5) -xy = plot(data_sol_short, plotdensity=10000, vars=(1,2)) -xz = plot(data_sol_short, plotdensity=10000, vars=(1,3)) -yz = plot(data_sol_short, plotdensity=10000, vars=(2,3)) -xyz = plot(data_sol_short, plotdensity=10000, vars=(1,2,3)) -plot(plot(xyzt,xyz),plot(xy, xz, yz, layout=(1,3),w=1), layout=(2,1), size=(800,600)) +xyzt = plot(data_sol_short, plotdensity = 10000, lw = 1.5) +xy = plot(data_sol_short, plotdensity = 10000, vars = (1, 2)) +xz = plot(data_sol_short, plotdensity = 10000, vars = (1, 3)) +yz = plot(data_sol_short, plotdensity = 10000, vars = (2, 3)) +xyz = plot(data_sol_short, plotdensity = 10000, vars = (1, 2, 3)) +plot(plot(xyzt, xyz), plot(xy, xz, yz, layout = (1, 3), w = 1), layout = (2, 1), size = ( + 800, 600)) ``` ```julia -xyzt = plot(data_sol, plotdensity=10000,lw=1.5) -xy = plot(data_sol, plotdensity=10000, vars=(1,2)) -xz = plot(data_sol, plotdensity=10000, vars=(1,3)) -yz = plot(data_sol, plotdensity=10000, vars=(2,3)) -xyz = plot(data_sol, plotdensity=10000, vars=(1,2,3)) -plot(plot(xyzt,xyz),plot(xy, xz, yz, layout=(1,3),w=1), layout=(2,1), size=(800,600)) +xyzt = plot(data_sol, plotdensity = 10000, lw = 1.5) +xy = plot(data_sol, plotdensity = 10000, vars = (1, 2)) +xz = plot(data_sol, plotdensity = 10000, vars = (1, 3)) +yz = plot(data_sol, plotdensity = 10000, vars = (2, 3)) +xyz = plot(data_sol, plotdensity = 10000, vars = (1, 2, 3)) +plot(plot(xyzt, xyz), plot(xy, xz, yz, layout = (1, 3), w = 1), layout = (2, 1), size = ( + 800, 600)) ``` ## Find a local solution for the three parameters from a short data set ```julia -obj_short = build_loss_objective(prob_short,Tsit5(),L2Loss(t_short,data_short),tstops=t_short) +obj_short = build_loss_objective(prob_short, Tsit5(), L2Loss(t_short, data_short), tstops = t_short) optprob = OptimizationProblem(obj_short, LocIniPar, lb = xlow_bounds, ub = xhigh_bounds) @btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(), maxiters = 7e3) # Tolernace is still too high to get close enough ``` ```julia -obj_short = build_loss_objective(prob_short,Tsit5(),L2Loss(t_short,data_short),tstops=t_short,reltol=1e-9) +obj_short = build_loss_objective( + prob_short, Tsit5(), L2Loss(t_short, data_short), tstops = t_short, reltol = 1e-9) optprob = OptimizationProblem(obj_short, LocIniPar, lb = xlow_bounds, ub = xhigh_bounds) @btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(), maxiters = 7e3) # With the tolerance lower, it achieves the correct solution in 3.5 seconds. ``` ```julia -obj_short = build_loss_objective(prob_short,Vern9(),L2Loss(t_short,data_short),tstops=t_short,reltol=1e-9,abstol=1e-9) +obj_short = build_loss_objective(prob_short, Vern9(), L2Loss(t_short, data_short), + tstops = t_short, reltol = 1e-9, abstol = 1e-9) optprob = OptimizationProblem(obj_short, LocIniPar, lb = xlow_bounds, ub = xhigh_bounds) @btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(), maxiters = 7e3) # With the more accurate solver Vern9 in the solution of the ODE, the convergence is less efficient! @@ -132,7 +138,8 @@ optprob = OptimizationProblem(obj_short, LocIniPar, lb = xlow_bounds, ub = xhigh First, the global optimization algorithms ```julia -obj_short = build_loss_objective(prob_short,Vern9(),L2Loss(t_short,data_short),Optimization.AutoForwardDiff(),tstops=t_short,reltol=1e-9,abstol=1e-9) +obj_short = build_loss_objective(prob_short, Vern9(), L2Loss(t_short, data_short), + Optimization.AutoForwardDiff(), tstops = t_short, reltol = 1e-9, abstol = 1e-9) ``` ```julia @@ -209,7 +216,6 @@ opt = Opt(:LD_TNEWTON_PRECOND_RESTART, 3) @btime res1 = solve(optprob, opt, maxiters = 10000, xtol_rel = 1e-12) ``` - ## Now let's solve the longer version for a global solution Notice from the plotting above that this ODE problem is chaotic and tends to diverge over time. In the longer version of parameter estimation, the dataset is increased to 3000 observations per variable with the same integration time step of 0.01. @@ -217,7 +223,8 @@ Vern9 solver with reltol=1e-9 and abstol=1e-9 has been established to be accurat ```julia # BB with Vern9 converges very slowly. The final values are within the NarrowBounds. -obj = build_loss_objective(prob,Vern9(),L2Loss(time_points,data),tstops=time_points,reltol=1e-9,abstol=1e-9) +obj = build_loss_objective(prob, Vern9(), L2Loss(time_points, data), + tstops = time_points, reltol = 1e-9, abstol = 1e-9) optprob = OptimizationProblem(obj, GloIniPar, lb = first.(LooserBounds), ub = last.(LooserBounds)) @btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(); maxiters = 4e3) # Default adaptive_de_rand_1_bin_radiuslimited 33 sec [10.2183, 24.6711, 2.28969] #@btime res1 = bboptimize(obj;SearchRange = LooserBounds, Method = :adaptive_de_rand_1_bin, MaxSteps = 4e3) # Method 32 sec [13.2222, 25.8589, 2.56176] @@ -279,20 +286,15 @@ minimum(root) # Conclusion: + 1. As expected the Lorenz system is extremely sensitive to initial space values. Starting the integration from `r0 = [0.1,0.0,0.0]` produces convergence with the short sample of 300 observations. This can be achieved by all the global optimizers as well as most of the local optimizers. Instead starting from `r0= [-11.8,-5.1,37.5]`, as in PODES, with the shorter sample shrinks the number of successful algorithms to 3: `BBO`, `:GN_CRS2_LM `and `:LD_SLSQP`. For the longer sample, all the algorithms fail. - 1) As expected the Lorenz system is extremely sensitive to initial space values. Starting the integration from `r0 = [0.1,0.0,0.0]` produces convergence with the short sample of 300 observations. This can be achieved by all the global optimizers as well as most of the local optimizers. Instead starting from `r0= [-11.8,-5.1,37.5]`, as in PODES, with the shorter sample shrinks the number of successful algorithms to 3: `BBO`, `:GN_CRS2_LM `and `:LD_SLSQP`. For the longer sample, all the algorithms fail. - - 2) When trying to hit the real data, having a low enough tolerance on the numerical solution is key. If the numerical solution is too rough, then we can never actually hone in on the true parameters since even with the true parameters we will erroneously induce numerical error. Maybe this could be adaptive? - - 3) Excessively low tolerance in the numerical solution is inefficient and delays the convergence of the estimation. - - 4) The estimation method and the global versus local optimization make a huge difference in the timings. Here, BBO always find the correct solution for a global optimization setup. For local optimization, most methods in NLopt, like :LN_BOBYQA, solve the problem in <0.05 seconds. This is an algorithm that can scale a local optimization but we are aiming to scale a global optimization. - - 5) QuadDIRECT performs very well on the shorter problem but doesn't give very great results for the longer in the Lorenz case, more can be read about the algorithm [here](https://github.com/timholy/QuadDIRECT.jl). - - 6) Fitting shorter timespans is easier... maybe this can lead to determining a minimal sample size for the optimizers and the estimator to succeed. + 2. When trying to hit the real data, having a low enough tolerance on the numerical solution is key. If the numerical solution is too rough, then we can never actually hone in on the true parameters since even with the true parameters we will erroneously induce numerical error. Maybe this could be adaptive? + 3. Excessively low tolerance in the numerical solution is inefficient and delays the convergence of the estimation. + 4. The estimation method and the global versus local optimization make a huge difference in the timings. Here, BBO always find the correct solution for a global optimization setup. For local optimization, most methods in NLopt, like :LN_BOBYQA, solve the problem in <0.05 seconds. This is an algorithm that can scale a local optimization but we are aiming to scale a global optimization. + 5. QuadDIRECT performs very well on the shorter problem but doesn't give very great results for the longer in the Lorenz case, more can be read about the algorithm [here](https://github.com/timholy/QuadDIRECT.jl). + 6. Fitting shorter timespans is easier... maybe this can lead to determining a minimal sample size for the optimizers and the estimator to succeed. ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/ParameterEstimation/LotkaVolterraParameterEstimation.jmd b/benchmarks/ParameterEstimation/LotkaVolterraParameterEstimation.jmd index 176c3cbb9..cd53fd6bf 100644 --- a/benchmarks/ParameterEstimation/LotkaVolterraParameterEstimation.jmd +++ b/benchmarks/ParameterEstimation/LotkaVolterraParameterEstimation.jmd @@ -9,14 +9,16 @@ author: Vaibhav Dixit, Chris Rackauckas using ParameterizedFunctions, OrdinaryDiffEq, DiffEqParamEstim, Optimization, ForwardDiff using OptimizationBBO, OptimizationNLopt, Plots, RecursiveArrayTools, BenchmarkTools using ModelingToolkit: t_nounits as t, D_nounits as D -gr(fmt=:png) +gr(fmt = :png) ``` ```julia -loc_bounds = Tuple{Float64, Float64}[(0, 5), (0, 5), (0, 5), (0, 5)] -glo_bounds = Tuple{Float64, Float64}[(0, 10), (0, 10), (0, 10), (0, 10)] -loc_init = [1,0.5,3.5,1.5] -glo_init = [5.0,5.0,5.0,5.0] +loc_bounds = Tuple{Float64, Float64}[(0, 5), (0, 5), ( + 0, 5), (0, 5)] +glo_bounds = Tuple{Float64, Float64}[(0, 10), (0, 10), ( + 0, 10), (0, 10)] +loc_init = [1, 0.5, 3.5, 1.5] +glo_init = [5.0, 5.0, 5.0, 5.0] ``` ```julia @@ -42,20 +44,20 @@ end ``` ```julia -u0 = [1.0,1.0] #initial values -tspan = (0.0,10.0) -p = [1.5,1.0,3.0,1,0] #parameters used, these need to be estimated from the data +u0 = [1.0, 1.0] #initial values +tspan = (0.0, 10.0) +p = [1.5, 1.0, 3.0, 1, 0] #parameters used, these need to be estimated from the data tspan = (0.0, 30.0) # sample of 3000 observations over the (0,30) timespan -prob = ODEProblem(f, u0, tspan,p) +prob = ODEProblem(f, u0, tspan, p) tspan2 = (0.0, 3.0) # sample of 3000 observations over the (0,30) timespan -prob_short = ODEProblem(f, u0, tspan2,p) +prob_short = ODEProblem(f, u0, tspan2, p) ``` ```julia dt = 30.0/3000 tf = 30.0 tinterval = 0:dt:tf -time_points = collect(tinterval) +time_points = collect(tinterval) ``` ```julia @@ -69,9 +71,9 @@ t_short = collect(tinterval_short) ```julia #Generate Data -data_sol_short = solve(prob_short,Tsit5(),saveat=t_short,reltol=1e-9,abstol=1e-9) +data_sol_short = solve(prob_short, Tsit5(), saveat = t_short, reltol = 1e-9, abstol = 1e-9) data_short = convert(Array, data_sol_short) -data_sol = solve(prob,Tsit5(),saveat=time_points,reltol=1e-9,abstol=1e-9) +data_sol = solve(prob, Tsit5(), saveat = time_points, reltol = 1e-9, abstol = 1e-9) data = convert(Array, data_sol) ``` @@ -92,21 +94,23 @@ p2 = plot(data_sol) ### Local Solution from the short data set ```julia -obj_short = build_loss_objective(prob_short,Tsit5(),L2Loss(t_short,data_short),tstops=t_short) +obj_short = build_loss_objective(prob_short, Tsit5(), L2Loss(t_short, data_short), tstops = t_short) optprob = OptimizationProblem(obj_short, loc_init, lb = first.(loc_bounds), ub = last.(loc_bounds)) @btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(); maxiters = 7e3) # Lower tolerance could lead to smaller fitness (more accuracy) ``` ```julia -obj_short = build_loss_objective(prob_short,Tsit5(),L2Loss(t_short,data_short),tstops=t_short,reltol=1e-9) +obj_short = build_loss_objective( + prob_short, Tsit5(), L2Loss(t_short, data_short), tstops = t_short, reltol = 1e-9) optprob = OptimizationProblem(obj_short, loc_init, lb = first.(loc_bounds), ub = last.(loc_bounds)) @btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(); maxiters = 7e3) # Change in tolerance makes it worse ``` ```julia -obj_short = build_loss_objective(prob_short,Vern9(),L2Loss(t_short,data_short),tstops=t_short,reltol=1e-9,abstol=1e-9) +obj_short = build_loss_objective(prob_short, Vern9(), L2Loss(t_short, data_short), + tstops = t_short, reltol = 1e-9, abstol = 1e-9) optprob = OptimizationProblem(obj_short, loc_init, lb = first.(loc_bounds), ub = last.(loc_bounds)) @btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(); maxiters = 7e3) # using the moe accurate Vern9() reduces the fitness marginally and leads to some increase in time taken @@ -117,7 +121,8 @@ optprob = OptimizationProblem(obj_short, loc_init, lb = first.(loc_bounds), ub = #### Global Optimisation first ```julia -obj_short = build_loss_objective(prob_short,Vern9(),L2Loss(t_short,data_short), Optimization.AutoForwardDiff(), tstops=t_short,reltol=1e-9,abstol=1e-9) +obj_short = build_loss_objective(prob_short, Vern9(), L2Loss(t_short, data_short), + Optimization.AutoForwardDiff(), tstops = t_short, reltol = 1e-9, abstol = 1e-9) optprob = OptimizationProblem(obj_short, glo_init, lb = first.(glo_bounds), ub = last.(glo_bounds)) ``` @@ -198,8 +203,9 @@ Vern9 solver with reltol=1e-9 and abstol=1e-9 is used and the dataset is increas ```julia t_concrete = collect(0.0:dt:tf) -obj = build_loss_objective(prob,Vern9(),L2Loss(t_concrete,data),tstops=t_concrete,reltol=1e-9,abstol=1e-9) -optprob = OptimizationProblem(obj, glo_init, lb =first.(glo_bounds), ub = last.(glo_bounds)) +obj = build_loss_objective(prob, Vern9(), L2Loss(t_concrete, data), + tstops = t_concrete, reltol = 1e-9, abstol = 1e-9) +optprob = OptimizationProblem(obj, glo_init, lb = first.(glo_bounds), ub = last.(glo_bounds)) ``` ```julia @@ -229,7 +235,8 @@ opt = Opt(:GN_ESCH, 4) ## Local problem ```julia -obj = build_loss_objective(prob,Vern9(),L2Loss(t,data),Optimization.AutoForwardDiff(),tstops=t,reltol=1e-9,abstol=1e-9) +obj = build_loss_objective(prob, Vern9(), L2Loss(t, data), Optimization.AutoForwardDiff(), + tstops = t, reltol = 1e-9, abstol = 1e-9) optprob = OptimizationProblem(obj_short, loc_init, lb = first.(loc_bounds), ub = last.(loc_bounds)) ``` @@ -256,5 +263,5 @@ In general we observe that lower tolerance lead to higher accuracy but too low t ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/SimpleHandwrittenPDE/Manifest.toml b/benchmarks/SimpleHandwrittenPDE/Manifest.toml index 211b61baa..45faffceb 100644 --- a/benchmarks/SimpleHandwrittenPDE/Manifest.toml +++ b/benchmarks/SimpleHandwrittenPDE/Manifest.toml @@ -1,19 +1,19 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.1" +julia_version = "1.10.10" manifest_format = "2.0" -project_hash = "f525cc990457ba8862f03bbdc865a92251324e1e" +project_hash = "ed974a7a662e51b1521b02ca6a2b78592e347892" [[deps.ADTypes]] -git-tree-sha1 = "a4c8e0f8c09d4aa708289c1a5fc23e2d1970017a" +git-tree-sha1 = "7927b9af540ee964cc5d1b73293f1eb0b761a3a1" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "0.2.1" +version = "1.16.0" +weakdeps = ["ChainRulesCore", "ConstructionBase", "EnzymeCore"] -[[deps.AbstractAlgebra]] -deps = ["GroupsCore", "InteractiveUtils", "LinearAlgebra", "MacroTools", "Preferences", "Random", "RandomExtensions", "SparseArrays", "Test"] -git-tree-sha1 = "41b45260ad00b666558c16f7cd9db0e8af408ea1" -uuid = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" -version = "0.31.1" + [deps.ADTypes.extensions] + ADTypesChainRulesCoreExt = "ChainRulesCore" + ADTypesConstructionBaseExt = "ConstructionBase" + ADTypesEnzymeCoreExt = "EnzymeCore" [[deps.AbstractFFTs]] deps = ["LinearAlgebra"] @@ -26,84 +26,72 @@ weakdeps = ["ChainRulesCore", "Test"] AbstractFFTsChainRulesCoreExt = "ChainRulesCore" AbstractFFTsTestExt = "Test" -[[deps.AbstractTrees]] -git-tree-sha1 = "faa260e4cb5aba097a73fab382dd4b5819d8ec8c" -uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" -version = "0.4.4" +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"] +git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.42" + + [deps.Accessors.extensions] + AxisKeysExt = "AxisKeys" + IntervalSetsExt = "IntervalSets" + LinearAlgebraExt = "LinearAlgebra" + StaticArraysExt = "StaticArrays" + StructArraysExt = "StructArrays" + TestExt = "Test" + UnitfulExt = "Unitful" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "76289dc51920fdc6e0013c872ba9551d54961c24" +git-tree-sha1 = "f7817e2e585aa6d924fd714df1e2a84be7896c60" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "3.6.2" -weakdeps = ["StaticArrays"] +version = "4.3.0" +weakdeps = ["SparseArrays", "StaticArrays"] [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" AdaptStaticArraysExt = "StaticArrays" -[[deps.ApproxFun]] -deps = ["AbstractFFTs", "ApproxFunBase", "ApproxFunFourier", "ApproxFunOrthogonalPolynomials", "ApproxFunSingularities", "Calculus", "DomainSets", "FastTransforms", "LinearAlgebra", "RecipesBase", "Reexport", "SpecialFunctions", "StaticArrays"] -git-tree-sha1 = "eba77cc445bf6e39e3ae63904a1001a97aad66e8" -uuid = "28f2ccd6-bb30-5033-b560-165f7b14dc2f" -version = "0.13.23" -weakdeps = ["DualNumbers"] - - [deps.ApproxFun.extensions] - ApproxFunDualNumbersExt = "DualNumbers" - -[[deps.ApproxFunBase]] -deps = ["AbstractFFTs", "BandedMatrices", "BlockArrays", "BlockBandedMatrices", "Calculus", "Combinatorics", "DSP", "DomainSets", "DualNumbers", "FFTW", "FillArrays", "InfiniteArrays", "IntervalSets", "LazyArrays", "LinearAlgebra", "LowRankMatrices", "SparseArrays", "SpecialFunctions", "StaticArrays", "Statistics"] -git-tree-sha1 = "0040e8cbee9492cfc74d3da3ea6fb92f05404db3" -uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05" -version = "0.9.12" - -[[deps.ApproxFunFourier]] -deps = ["AbstractFFTs", "ApproxFunBase", "BandedMatrices", "DomainSets", "FFTW", "FastTransforms", "InfiniteArrays", "IntervalSets", "LinearAlgebra", "Reexport", "StaticArrays"] -git-tree-sha1 = "872f236d5a0c6dd69c41517ab2471a6755aeacf4" -uuid = "59844689-9c9d-51bf-9583-5b794ec66d30" -version = "0.3.23" - -[[deps.ApproxFunOrthogonalPolynomials]] -deps = ["ApproxFunBase", "BandedMatrices", "BlockArrays", "BlockBandedMatrices", "DomainSets", "FastGaussQuadrature", "FastTransforms", "FillArrays", "HalfIntegers", "IntervalSets", "LinearAlgebra", "OddEvenIntegers", "Reexport", "SpecialFunctions", "StaticArrays"] -git-tree-sha1 = "71219dd7a6ea7086f081eb2f99b238f70cb50189" -uuid = "b70543e2-c0d9-56b8-a290-0d4d6d4de211" -version = "0.6.45" -weakdeps = ["Static"] - - [deps.ApproxFunOrthogonalPolynomials.extensions] - ApproxFunOrthogonalPolynomialsStaticExt = "Static" - -[[deps.ApproxFunSingularities]] -deps = ["ApproxFunBase", "ApproxFunOrthogonalPolynomials", "DomainSets", "HalfIntegers", "IntervalSets", "LinearAlgebra", "OddEvenIntegers", "Reexport", "SpecialFunctions"] -git-tree-sha1 = "3b0033b1d67dd7a9c05d51932e5c6b30946fb89a" -uuid = "f8fcb915-6b99-5be2-b79a-d6dbef8e6e7e" -version = "0.3.16" -weakdeps = ["StaticArrays"] +[[deps.AliasTables]] +deps = ["PtrArrays", "Random"] +git-tree-sha1 = "9876e1e164b144ca45e9e3198d0b689cadfed9ff" +uuid = "66dad0bd-aa9a-41b7-9441-69ab47430ed8" +version = "1.1.3" - [deps.ApproxFunSingularities.extensions] - ApproxFunSingularitiesStaticArraysExt = "StaticArrays" +[[deps.ArgCheck]] +git-tree-sha1 = "f9e9a66c9b7be1ad7372bbd9b062d9230c30c5ce" +uuid = "dce04be8-c92d-5529-be00-80e4d2c0e197" +version = "2.5.0" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" version = "1.1.1" -[[deps.ArnoldiMethod]] -deps = ["LinearAlgebra", "Random", "StaticArrays"] -git-tree-sha1 = "62e51b39331de8911e4a7ff6f5aaf38a5f4cc0ae" -uuid = "ec485272-7323-5ecc-a04f-4719b315124d" -version = "0.2.0" - [[deps.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "f83ec24f76d4c8f525099b2ac475fc098138ec31" +deps = ["Adapt", "LinearAlgebra"] +git-tree-sha1 = "9606d7832795cbef89e06a550475be300364a8aa" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.4.11" +version = "7.19.0" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceCUDSSExt = "CUDSS" + ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" + ArrayInterfaceChainRulesExt = "ChainRules" ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceReverseDiffExt = "ReverseDiff" + ArrayInterfaceSparseArraysExt = "SparseArrays" ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" ArrayInterfaceTrackerExt = "Tracker" @@ -111,21 +99,20 @@ version = "7.4.11" BandedMatrices = "aae01518-5342-5314-be14-df237901396f" BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" -[[deps.ArrayInterfaceCore]] -deps = ["LinearAlgebra", "SnoopPrecompile", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "e5f08b5689b1aad068e01751889f2f615c7db36d" -uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" -version = "0.1.29" - [[deps.ArrayLayouts]] -deps = ["FillArrays", "LinearAlgebra"] -git-tree-sha1 = "dcda7e0ac618210eabf43751d5cafde100dd539b" +deps = ["FillArrays", "LinearAlgebra", "StaticArrays"] +git-tree-sha1 = "120e392af69350960b1d3b89d41dcc1d66543858" uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" -version = "1.3.0" +version = "1.11.2" weakdeps = ["SparseArrays"] [deps.ArrayLayouts.extensions] @@ -134,127 +121,156 @@ weakdeps = ["SparseArrays"] [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -[[deps.AxisAlgorithms]] -deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] -git-tree-sha1 = "66771c8d21c8ff5e3a93379480a2307ac36863f7" -uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" -version = "1.0.1" +[[deps.AutoHashEquals]] +git-tree-sha1 = "4ec6b48702dacc5994a835c1189831755e4e76ef" +uuid = "15f4f7f2-30c1-5605-9d31-71845cf9641f" +version = "2.2.0" [[deps.BandedMatrices]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "PrecompileTools"] -git-tree-sha1 = "0b816941273b5b162be122a6c94d706e3b3125ca" +git-tree-sha1 = "e35c672b239c5105f597963c33e740eeb46cf0ab" uuid = "aae01518-5342-5314-be14-df237901396f" -version = "0.17.38" -weakdeps = ["SparseArrays"] +version = "1.9.4" [deps.BandedMatrices.extensions] BandedMatricesSparseArraysExt = "SparseArrays" + CliqueTreesExt = "CliqueTrees" + + [deps.BandedMatrices.weakdeps] + CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -[[deps.Bijections]] -git-tree-sha1 = "fe4f8c5ee7f76f2198d5c2a06d3961c249cce7bd" -uuid = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04" -version = "0.1.4" +[[deps.Bessels]] +git-tree-sha1 = "4435559dc39793d53a9e3d278e185e920b4619ef" +uuid = "0e736298-9ec6-45e8-9647-e4fc86a2fe38" +version = "0.2.8" [[deps.BitFlags]] -git-tree-sha1 = "43b1a4a8f797c1cddadf60499a8a077d4af2cd2d" +git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" -version = "0.1.7" +version = "0.1.9" [[deps.BitTwiddlingConvenienceFunctions]] deps = ["Static"] -git-tree-sha1 = "0c5f81f47bbbcf4aea7b2959135713459170798b" +git-tree-sha1 = "f21cfd4950cb9f0587d5067e69405ad2acd27b87" uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" -version = "0.1.5" +version = "0.1.6" [[deps.BlockArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "54cd829dd26330c42e1cf9df68470dd4df602c61" +git-tree-sha1 = "291532989f81db780e435452ccb2a5f902ff665f" uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "0.16.38" +version = "1.7.0" +weakdeps = ["Adapt", "BandedMatrices"] + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" [[deps.BlockBandedMatrices]] deps = ["ArrayLayouts", "BandedMatrices", "BlockArrays", "FillArrays", "LinearAlgebra", "MatrixFactorizations"] -git-tree-sha1 = "ee30b97bcee87889485293721b38c7f102bdd371" +git-tree-sha1 = "4eef2d2793002ef8221fe561cc822eb252afa72f" uuid = "ffab5731-97b5-5995-9138-79e8c1846df0" -version = "0.12.5" +version = "0.13.4" weakdeps = ["SparseArrays"] [deps.BlockBandedMatrices.extensions] BlockBandedMatricesSparseArraysExt = "SparseArrays" +[[deps.BracketingNonlinearSolve]] +deps = ["CommonSolve", "ConcreteStructs", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "a9014924595b7a2c1dd14aac516e38fa10ada656" +uuid = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e" +version = "1.3.0" +weakdeps = ["ChainRulesCore", "ForwardDiff"] + + [deps.BracketingNonlinearSolve.extensions] + BracketingNonlinearSolveChainRulesCoreExt = ["ChainRulesCore", "ForwardDiff"] + BracketingNonlinearSolveForwardDiffExt = "ForwardDiff" + [[deps.Bzip2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1b96ea4a01afe0ea4090c5c8039690672dd13f2e" uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" -version = "1.0.8+0" +version = "1.0.9+0" [[deps.CEnum]] -git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90" +git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.4.2" +version = "0.5.0" [[deps.CPUSummary]] deps = ["CpuId", "IfElse", "PrecompileTools", "Static"] -git-tree-sha1 = "89e0654ed8c7aebad6d5ad235d6242c2d737a928" +git-tree-sha1 = "5a97e67919535d6841172016c9530fd69494e5ec" uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" -version = "0.2.3" - -[[deps.CSTParser]] -deps = ["Tokenize"] -git-tree-sha1 = "3ddd48d200eb8ddf9cb3e0189fc059fd49b97c1f" -uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f" -version = "3.3.6" +version = "0.2.6" [[deps.Cairo_jll]] -deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.16.1+1" - -[[deps.Calculus]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" -uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" -version = "0.5.1" +version = "1.18.5+0" [[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "e30f2f4e20f7f186dc36529910beaedc60cfa644" +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "06ee8d1aa558d2833aa799f6f0b31b30cada405f" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.16.0" +version = "1.25.2" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.ClassicalOrthogonalPolynomials]] +deps = ["ArrayLayouts", "BandedMatrices", "BlockArrays", "BlockBandedMatrices", "ContinuumArrays", "DomainSets", "FFTW", "FastGaussQuadrature", "FastTransforms", "FillArrays", "HypergeometricFunctions", "InfiniteArrays", "InfiniteLinearAlgebra", "IntervalSets", "LazyArrays", "LazyBandedMatrices", "LinearAlgebra", "QuasiArrays", "RecurrenceRelationshipArrays", "RecurrenceRelationships", "SpecialFunctions"] +git-tree-sha1 = "8829f73e9f99a1427f62d179210245f009378778" +uuid = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd" +version = "0.15.3" + + [deps.ClassicalOrthogonalPolynomials.extensions] + ClassicalOrthogonalPolynomialsMutableArithmeticsExt = "MutableArithmetics" + + [deps.ClassicalOrthogonalPolynomials.weakdeps] + MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" [[deps.CloseOpenIntervals]] deps = ["Static", "StaticArrayInterface"] -git-tree-sha1 = "70232f82ffaab9dc52585e0dd043b5e0c6b714f1" +git-tree-sha1 = "05ba0d07cd4fd8b7a39541e31a7b0254704ea581" uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" -version = "0.1.12" +version = "0.1.13" [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] -git-tree-sha1 = "02aa26a4cf76381be7f66e020a3eddeb27b0a092" +git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" uuid = "944b1d66-785c-5afd-91f1-9de20f533193" -version = "0.7.2" +version = "0.7.8" [[deps.ColorSchemes]] deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] -git-tree-sha1 = "d9a8f86737b665e15a9641ecbac64deef9ce6724" +git-tree-sha1 = "a656525c8b46aa6a1c76891552ed5381bb32ae7b" uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" -version = "3.23.0" +version = "3.30.0" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +git-tree-sha1 = "67e11ee83a43eb71ddc950302c53bf33f0690dfe" uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.11.4" +version = "0.12.1" + + [deps.ColorTypes.extensions] + StyledStringsExt = "StyledStrings" + + [deps.ColorTypes.weakdeps] + StyledStrings = "f489334b-da3d-4c2e-b8f0-e476e12c162b" [[deps.ColorVectorSpace]] deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] -git-tree-sha1 = "a1f44953f2382ebb937d60dafbe2deea4bd23249" +git-tree-sha1 = "8b3b6f87ce8f65a2b4f857528fd8d70086cd72b1" uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" -version = "0.10.0" +version = "0.11.0" weakdeps = ["SpecialFunctions"] [deps.ColorVectorSpace.extensions] @@ -262,20 +278,9 @@ weakdeps = ["SpecialFunctions"] [[deps.Colors]] deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "fc08e5930ee9a4e03f84bfb5211cb54e7769758a" +git-tree-sha1 = "37ea44092930b1811e666c3bc38065d7d87fcc74" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.12.10" - -[[deps.Combinatorics]] -git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" -uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -version = "1.0.2" - -[[deps.CommonMark]] -deps = ["Crayons", "JSON", "PrecompileTools", "URIs"] -git-tree-sha1 = "532c4185d3c9037c0237546d817858b23cf9e071" -uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" -version = "0.8.12" +version = "0.13.1" [[deps.CommonSolve]] git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" @@ -283,16 +288,21 @@ uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" version = "0.2.4" [[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" +version = "0.3.1" + +[[deps.CommonWorldInvalidations]] +git-tree-sha1 = "ae52d1c52048455e85a387fbee9be553ec2b68d0" +uuid = "f70d9fcc-98c5-4d4a-abd7-e4cdeebd8ca8" +version = "1.0.0" [[deps.Compat]] -deps = ["UUIDs"] -git-tree-sha1 = "e460f044ca8b99be31d35fe54fc33a5c33dd8ed7" +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "0037835448781bb46feb39866934e243886d756a" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.9.0" +version = "4.18.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -301,40 +311,68 @@ weakdeps = ["Dates", "LinearAlgebra"] [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.2+0" +version = "1.1.1+0" [[deps.CompositeTypes]] -git-tree-sha1 = "02d2316b7ffceff992f3096ae48c7829a8aa0638" +git-tree-sha1 = "bce26c3dab336582805503bed209faab1c279768" uuid = "b152e2b5-7a66-4b01-a709-34e65c35f657" -version = "0.1.3" +version = "0.1.4" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConcreteStructs]] +git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" +uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" +version = "0.2.3" [[deps.ConcurrentUtilities]] deps = ["Serialization", "Sockets"] -git-tree-sha1 = "5372dbbf8f0bdb8c700db5367132925c0771ef7e" +git-tree-sha1 = "d9d26935a0bcffc87d2613ce14c527c99fc543fd" uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.2.1" +version = "2.5.0" [[deps.Conda]] deps = ["Downloads", "JSON", "VersionParsing"] -git-tree-sha1 = "8c86e48c0db1564a1d49548d3515ced5d604c408" +git-tree-sha1 = "b19db3927f0db4151cb86d073689f2428e524576" uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" -version = "1.9.1" +version = "1.10.2" [[deps.ConstructionBase]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "fe2838a593b5f776e1597e086dcd47560d94e816" +git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.3" -weakdeps = ["IntervalSets", "StaticArrays"] +version = "1.6.0" +weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] [deps.ConstructionBase.extensions] ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" ConstructionBaseStaticArraysExt = "StaticArrays" +[[deps.ContinuumArrays]] +deps = ["AbstractFFTs", "ArrayLayouts", "BandedMatrices", "BlockArrays", "DomainSets", "FillArrays", "InfiniteArrays", "Infinities", "IntervalSets", "LazyArrays", "LinearAlgebra", "QuasiArrays", "StaticArrays"] +git-tree-sha1 = "003c9419d0f7d59f2a1a02fcae95272b655aa2a0" +uuid = "7ae1f121-cc2c-504b-ac30-9b923412ae5c" +version = "0.19.3" + + [deps.ContinuumArrays.extensions] + ContinuumArraysMakieExt = "Makie" + ContinuumArraysRecipesBaseExt = "RecipesBase" + + [deps.ContinuumArrays.weakdeps] + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" + [[deps.Contour]] -git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" +git-tree-sha1 = "439e35b0b36e2e5881738abc8857bd92ad6ff9a8" uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" -version = "0.6.2" +version = "0.6.3" [[deps.CpuId]] deps = ["Markdown"] @@ -348,21 +386,25 @@ uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" version = "4.1.1" [[deps.DSP]] -deps = ["Compat", "FFTW", "IterTools", "LinearAlgebra", "Polynomials", "Random", "Reexport", "SpecialFunctions", "Statistics"] -git-tree-sha1 = "da8b06f89fce9996443010ef92572b193f8dca1f" +deps = ["Bessels", "FFTW", "IterTools", "LinearAlgebra", "Polynomials", "Random", "Reexport", "SpecialFunctions", "Statistics"] +git-tree-sha1 = "5989debfc3b38f736e69724818210c67ffee4352" uuid = "717857b8-e6f2-59f4-9121-6e50c889abd2" -version = "0.7.8" +version = "0.8.4" +weakdeps = ["OffsetArrays"] + + [deps.DSP.extensions] + OffsetArraysExt = "OffsetArrays" [[deps.DataAPI]] -git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c" +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.15.0" +version = "1.16.0" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "3dbd312d370723b6bb43ba9d02fc36abade4518d" +git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.15" +version = "0.18.22" [[deps.DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -373,6 +415,12 @@ version = "1.0.0" deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +[[deps.Dbus_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "473e9afc9cf30814eb67ffa5f2db7df82c3ad9fd" +uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" +version = "1.16.2+0" + [[deps.DelimitedFiles]] deps = ["Mmap"] git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" @@ -380,51 +428,56 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" version = "1.9.1" [[deps.DiffEqBase]] -deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] -git-tree-sha1 = "df8638dbfa03d1b336c410e23a9dfbf89cb53937" +deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "6f8f25122389ba34e491bdfe143ae16fda37cad3" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.128.2" +version = "6.180.0" [deps.DiffEqBase.extensions] + DiffEqBaseCUDAExt = "CUDA" + DiffEqBaseChainRulesCoreExt = "ChainRulesCore" DiffEqBaseDistributionsExt = "Distributions" + DiffEqBaseEnzymeExt = ["ChainRulesCore", "Enzyme"] + DiffEqBaseForwardDiffExt = ["ForwardDiff"] + DiffEqBaseGTPSAExt = "GTPSA" DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" DiffEqBaseMPIExt = "MPI" DiffEqBaseMeasurementsExt = "Measurements" DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseMooncakeExt = "Mooncake" DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseSparseArraysExt = "SparseArrays" DiffEqBaseTrackerExt = "Tracker" DiffEqBaseUnitfulExt = "Unitful" - DiffEqBaseZygoteExt = "Zygote" [deps.DiffEqBase.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.DiffEqCallbacks]] -deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "LinearAlgebra", "Markdown", "NLsolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "9c7d3a84264d935f6981504388b202a770113faa" -uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" -version = "2.29.1" -weakdeps = ["OrdinaryDiffEq", "Sundials"] [[deps.DiffEqDevTools]] -deps = ["DiffEqBase", "DiffEqNoiseProcess", "Distributed", "LinearAlgebra", "Logging", "NLsolve", "RecipesBase", "RecursiveArrayTools", "RootedTrees", "SciMLBase", "Statistics"] -git-tree-sha1 = "9fe41ca501ce654f1876735206816dca7fcd2c88" +deps = ["DiffEqBase", "DiffEqNoiseProcess", "Distributed", "LinearAlgebra", "Logging", "NLsolve", "RecipesBase", "RecursiveArrayTools", "RootedTrees", "SciMLBase", "Statistics", "StructArrays"] +git-tree-sha1 = "53aa030c02c786270542debbb577b53f6383796b" uuid = "f3b72e0c-5b89-59e1-b016-84e28bfd966d" -version = "2.35.0" +version = "2.48.0" [[deps.DiffEqNoiseProcess]] -deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "Requires", "ResettableStacks", "SciMLBase", "StaticArraysCore", "Statistics"] -git-tree-sha1 = "6b02e9c9d0d4cacf2b20f36c33710b8b415c5194" +deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "ResettableStacks", "SciMLBase", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "516d553f5deee7c55b2945b5edf05b6542837887" uuid = "77a26b50-5914-5dd7-bc55-306e6241c503" -version = "5.18.0" +version = "5.24.1" [deps.DiffEqNoiseProcess.extensions] DiffEqNoiseProcessReverseDiffExt = "ReverseDiff" @@ -444,14 +497,65 @@ git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" version = "1.15.1" +[[deps.DifferentiationInterface]] +deps = ["ADTypes", "LinearAlgebra"] +git-tree-sha1 = "f620da805b82bec64ab4d5f881c7592c82dbc08a" +uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" +version = "0.7.3" + + [deps.DifferentiationInterface.extensions] + DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" + DifferentiationInterfaceDiffractorExt = "Diffractor" + DifferentiationInterfaceEnzymeExt = ["EnzymeCore", "Enzyme"] + DifferentiationInterfaceFastDifferentiationExt = "FastDifferentiation" + DifferentiationInterfaceFiniteDiffExt = "FiniteDiff" + DifferentiationInterfaceFiniteDifferencesExt = "FiniteDifferences" + DifferentiationInterfaceForwardDiffExt = ["ForwardDiff", "DiffResults"] + DifferentiationInterfaceGPUArraysCoreExt = "GPUArraysCore" + DifferentiationInterfaceGTPSAExt = "GTPSA" + DifferentiationInterfaceMooncakeExt = "Mooncake" + DifferentiationInterfacePolyesterForwardDiffExt = ["PolyesterForwardDiff", "ForwardDiff", "DiffResults"] + DifferentiationInterfaceReverseDiffExt = ["ReverseDiff", "DiffResults"] + DifferentiationInterfaceSparseArraysExt = "SparseArrays" + DifferentiationInterfaceSparseConnectivityTracerExt = "SparseConnectivityTracer" + DifferentiationInterfaceSparseMatrixColoringsExt = "SparseMatrixColorings" + DifferentiationInterfaceStaticArraysExt = "StaticArrays" + DifferentiationInterfaceSymbolicsExt = "Symbolics" + DifferentiationInterfaceTrackerExt = "Tracker" + DifferentiationInterfaceZygoteExt = ["Zygote", "ForwardDiff"] + + [deps.DifferentiationInterface.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" + Diffractor = "9f5e2b26-1114-432f-b630-d3fe2085c51c" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + FastDifferentiation = "eb9bf01b-bf85-4b60-bf87-ee5de06c00be" + FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" + FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" + SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + [[deps.Distances]] deps = ["LinearAlgebra", "Statistics", "StatsAPI"] -git-tree-sha1 = "b6def76ffad15143924a2199f72a5cd883a2e8a9" +git-tree-sha1 = "c7e3a542b999843086e2f29dac96a618c105be1d" uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -version = "0.10.9" -weakdeps = ["SparseArrays"] +version = "0.10.12" +weakdeps = ["ChainRulesCore", "SparseArrays"] [deps.Distances.extensions] + DistancesChainRulesCoreExt = "ChainRulesCore" DistancesSparseArraysExt = "SparseArrays" [[deps.Distributed]] @@ -459,105 +563,126 @@ deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] -deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns", "Test"] -git-tree-sha1 = "938fe2981db009f531b6332e31c58e9584a2f9bd" +deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] +git-tree-sha1 = "3e6d038b77f22791b8e3472b7c633acea1ecac06" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.100" +version = "0.25.120" [deps.Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" DistributionsDensityInterfaceExt = "DensityInterface" + DistributionsTestExt = "Test" [deps.Distributions.weakdeps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.3" +version = "0.9.5" [[deps.DomainSets]] -deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "Random", "StaticArrays", "Statistics"] -git-tree-sha1 = "51b4b84d33ec5e0955b55ff4b748b99ce2c3faa9" +deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "StaticArrays"] +git-tree-sha1 = "c249d86e97a7e8398ce2068dce4c078a1c3464de" uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" -version = "0.6.7" +version = "0.7.16" + + [deps.DomainSets.extensions] + DomainSetsMakieExt = "Makie" + DomainSetsRandomExt = "Random" + + [deps.DomainSets.weakdeps] + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" version = "1.6.0" -[[deps.DualNumbers]] -deps = ["Calculus", "NaNMath", "SpecialFunctions"] -git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" -uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" -version = "0.6.8" - -[[deps.DynamicPolynomials]] -deps = ["Future", "LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Pkg", "Reexport", "Test"] -git-tree-sha1 = "9b05a8bc04d7a9a9c7e9ee3b0fdf1584857b65dc" -uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07" -version = "0.5.2" - [[deps.EnumX]] -git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" +git-tree-sha1 = "bddad79635af6aec424f53ed8aad5d7555dc6f00" uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" -version = "1.0.4" +version = "1.0.5" + +[[deps.EnzymeCore]] +git-tree-sha1 = "8272a687bca7b5c601c0c24fc0c71bff10aafdfd" +uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" +version = "0.8.12" +weakdeps = ["Adapt"] + + [deps.EnzymeCore.extensions] + AdaptExt = "Adapt" + +[[deps.EpollShim_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8a4be429317c42cfae6a7fc03c31bad1970c310d" +uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" +version = "0.0.20230411+1" [[deps.ExceptionUnwrapping]] deps = ["Test"] -git-tree-sha1 = "e90caa41f5a86296e014e148ee061bd6c3edec96" +git-tree-sha1 = "d36f682e590a83d63d1c7dbd287573764682d12a" uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" -version = "0.1.9" +version = "0.1.11" [[deps.Expat_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c" +git-tree-sha1 = "d55dffd9ae73ff72f1c0482454dcf2ec6c6c4a63" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" -version = "2.5.0+0" +version = "2.6.5+0" [[deps.ExponentialUtilities]] -deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "Printf", "SnoopPrecompile", "SparseArrays", "libblastrampoline_jll"] -git-tree-sha1 = "fb7dbef7d2631e2d02c49e2750f7447648b0ec9b" +deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "PrecompileTools", "Printf", "SparseArrays", "libblastrampoline_jll"] +git-tree-sha1 = "cae251c76f353e32d32d76fae2fea655eab652af" uuid = "d4d017d3-3776-5f7e-afef-a10c40355c18" -version = "1.24.0" +version = "1.27.0" +weakdeps = ["StaticArrays"] + + [deps.ExponentialUtilities.extensions] + ExponentialUtilitiesStaticArraysExt = "StaticArrays" [[deps.ExprTools]] git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" version = "0.1.10" +[[deps.ExproniconLite]] +git-tree-sha1 = "c13f0b150373771b0fdc1713c97860f8df12e6c2" +uuid = "55351af7-c7e9-48d6-89ff-24e801d99491" +version = "0.10.14" + [[deps.FFMPEG]] deps = ["FFMPEG_jll"] -git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +git-tree-sha1 = "83dc665d0312b41367b7263e8a4d172eac1897f4" uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" -version = "0.4.1" +version = "0.4.4" [[deps.FFMPEG_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] -git-tree-sha1 = "74faea50c1d007c85837327f6775bea60b5492dd" +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "3a948313e7a41eb1db7a1e733e6335f17b4ab3c4" uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" -version = "4.4.2+2" +version = "7.1.1+0" [[deps.FFTW]] deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] -git-tree-sha1 = "b4fbdd20c889804969571cc589900803edda16b7" +git-tree-sha1 = "797762812ed063b9b94f6cc7742bc8883bb5e69e" uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" -version = "1.7.1" +version = "1.9.0" [[deps.FFTW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6d6219a004b8cf1e0b4dbe27a2860b8e04eba0be" uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" -version = "3.3.10+0" +version = "3.3.11+0" [[deps.FastBroadcast]] deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] -git-tree-sha1 = "aa9925a229d45fe3018715238956766fa21804d1" +git-tree-sha1 = "ab1b34570bcdf272899062e1a56285a53ecaae08" uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" -version = "0.2.6" +version = "0.3.5" [[deps.FastClosures]] git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" @@ -566,77 +691,95 @@ version = "0.3.2" [[deps.FastGaussQuadrature]] deps = ["LinearAlgebra", "SpecialFunctions", "StaticArrays"] -git-tree-sha1 = "0f478d8bad6f52573fb7658a263af61f3d96e43a" +git-tree-sha1 = "fd923962364b645f3719855c88f7074413a6ad92" uuid = "442a2c76-b920-505d-bb47-c5924d526838" -version = "0.5.1" +version = "1.0.2" -[[deps.FastLapackInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "b12f05108e405dadcc2aff0008db7f831374e051" -uuid = "29a986be-02c6-4525-aec4-84b980013641" -version = "2.0.0" +[[deps.FastPower]] +git-tree-sha1 = "5f7afd4b1a3969dc34d692da2ed856047325b06e" +uuid = "a4df4552-cc26-4903-aec0-212e50a0e84b" +version = "1.1.3" + + [deps.FastPower.extensions] + FastPowerEnzymeExt = "Enzyme" + FastPowerForwardDiffExt = "ForwardDiff" + FastPowerMeasurementsExt = "Measurements" + FastPowerMonteCarloMeasurementsExt = "MonteCarloMeasurements" + FastPowerMooncakeExt = "Mooncake" + FastPowerReverseDiffExt = "ReverseDiff" + FastPowerTrackerExt = "Tracker" + + [deps.FastPower.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" [[deps.FastTransforms]] -deps = ["AbstractFFTs", "FFTW", "FastGaussQuadrature", "FastTransforms_jll", "FillArrays", "GenericFFT", "Libdl", "LinearAlgebra", "Reexport", "SpecialFunctions", "Test", "ToeplitzMatrices"] -git-tree-sha1 = "245348c4919a8b2f9b899733748bb987c9fc4827" +deps = ["AbstractFFTs", "ArrayLayouts", "BandedMatrices", "FFTW", "FastGaussQuadrature", "FastTransforms_jll", "FillArrays", "GenericFFT", "LazyArrays", "Libdl", "LinearAlgebra", "RecurrenceRelationships", "SpecialFunctions", "ToeplitzMatrices"] +git-tree-sha1 = "b41969ccec1379b33967c9b720a250d4687cfc2d" uuid = "057dd010-8810-581a-b7be-e3fc3b93f78c" -version = "0.15.7" +version = "0.17.0" [[deps.FastTransforms_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "FFTW_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl", "MPFR_jll", "OpenBLAS_jll", "Pkg"] -git-tree-sha1 = "8cec4285578b83cec4f5aa13a13a4963595846df" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "FFTW_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl", "MPFR_jll", "OpenBLAS_jll"] +git-tree-sha1 = "efb41482692019ed03e0de67b9e48e88c0504e7d" uuid = "34b6f7d7-08f9-5794-9e10-3819e4c7e49a" -version = "0.6.2+0" +version = "0.6.3+0" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FillArrays]] -deps = ["LinearAlgebra", "Random"] -git-tree-sha1 = "a20eaa3ad64254c61eeb5f230d9306e937405434" +deps = ["LinearAlgebra"] +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.6.1" -weakdeps = ["SparseArrays", "Statistics"] +version = "1.13.0" +weakdeps = ["PDMats", "SparseArrays", "Statistics"] [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" FillArraysSparseArraysExt = "SparseArrays" FillArraysStatisticsExt = "Statistics" [[deps.FiniteDiff]] -deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] -git-tree-sha1 = "c6e4a1fbe73b31a3dea94b1da449503b8830c306" +deps = ["ArrayInterface", "LinearAlgebra", "Setfield"] +git-tree-sha1 = "f089ab1f834470c525562030c8cfde4025d5e915" uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.21.1" -weakdeps = ["BandedMatrices", "BlockBandedMatrices", "StaticArrays"] +version = "2.27.0" +weakdeps = ["BandedMatrices", "BlockBandedMatrices", "SparseArrays", "StaticArrays"] [deps.FiniteDiff.extensions] FiniteDiffBandedMatricesExt = "BandedMatrices" FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" + FiniteDiffSparseArraysExt = "SparseArrays" FiniteDiffStaticArraysExt = "StaticArrays" [[deps.FixedPointNumbers]] deps = ["Statistics"] -git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.4" +version = "0.8.5" [[deps.Fontconfig_jll]] -deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] +git-tree-sha1 = "301b5d5d731a0654825f1f2e906990f7141a106b" uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" -version = "2.13.93+0" +version = "2.16.0+0" -[[deps.Formatting]] -deps = ["Printf"] -git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" -uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" -version = "0.4.2" +[[deps.Format]] +git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" +uuid = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8" +version = "1.3.7" [[deps.ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" +git-tree-sha1 = "910febccb28d493032495b7009dce7d7f7aee554" uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.36" +version = "1.0.1" weakdeps = ["StaticArrays"] [deps.ForwardDiff.extensions] @@ -644,15 +787,15 @@ weakdeps = ["StaticArrays"] [[deps.FreeType2_jll]] deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "d8db6a5a2fe1381c1ea4ef2cab7c69c2de7f9ea0" +git-tree-sha1 = "2c5512e11c791d1baed2049c5652441b28fc6a31" uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" -version = "2.13.1+0" +version = "2.13.4+0" [[deps.FriBidi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "7a214fdac5ed5f59a22c2d9a885a16da1c74bbc7" uuid = "559328eb-81f9-559d-9380-de523a88c83c" -version = "1.0.10+0" +version = "1.0.17+0" [[deps.FunctionWrappers]] git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" @@ -670,144 +813,116 @@ deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" [[deps.GLFW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] -git-tree-sha1 = "d972031d28c8c8d9d7b41a536ad7bb0c2579caca" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] +git-tree-sha1 = "fcb0584ff34e25155876418979d4c8971243bb89" uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -version = "3.3.8+0" +version = "3.4.0+2" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.2.1+2" +version = "6.2.1+6" [[deps.GPUArraysCore]] deps = ["Adapt"] -git-tree-sha1 = "2d6ca471a6c7b536127afccfa7564b5b39227fe0" +git-tree-sha1 = "83cf05ab16a73219e5f6bd1bdfa9848fa24ac627" uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.1.5" +version = "0.2.0" [[deps.GR]] -deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Preferences", "Printf", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "UUIDs", "p7zip_jll"] -git-tree-sha1 = "d73afa4a2bb9de56077242d98cf763074ab9a970" +deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] +git-tree-sha1 = "1828eb7275491981fa5f1752a5e126e8f26f8741" uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -version = "0.72.9" +version = "0.73.17" [[deps.GR_jll]] deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "1596bab77f4f073a14c62424283e7ebff3072eca" +git-tree-sha1 = "27299071cc29e409488ada41ec7643e0ab19091f" uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" -version = "0.72.9+1" +version = "0.73.17+0" [[deps.GenericFFT]] -deps = ["AbstractFFTs", "FFTW", "LinearAlgebra", "Reexport", "Test"] -git-tree-sha1 = "9f2f92c39a57c1b7e697844cee7cd286f7c12411" +deps = ["AbstractFFTs", "FFTW", "LinearAlgebra", "Reexport"] +git-tree-sha1 = "1bc01f2ea9a0226a60723794ff86b8017739f5d9" uuid = "a8297547-1b15-4a5a-a998-a2ac5f1cef28" -version = "0.1.4" +version = "0.1.6" [[deps.GenericSchur]] deps = ["LinearAlgebra", "Printf"] -git-tree-sha1 = "fb69b2a645fa69ba5f474af09221b9308b160ce6" +git-tree-sha1 = "f88e0ba1f6b42121a7c1dfe93a9687d8e164c91b" uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" -version = "0.5.3" +version = "0.5.5" -[[deps.Gettext_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" -uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" -version = "0.21.0+0" +[[deps.GettextRuntime_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll"] +git-tree-sha1 = "45288942190db7c5f760f59c04495064eedf9340" +uuid = "b0724c58-0f36-5564-988d-3bb0596ebc4a" +version = "0.22.4+0" [[deps.Git]] -deps = ["Git_jll"] -git-tree-sha1 = "51764e6c2e84c37055e846c516e9015b4a291c7d" +deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"] +git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c" uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" -version = "1.3.0" +version = "1.4.0" [[deps.Git_jll]] deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "d8be4aab0f4e043cc40984e9097417307cce4c03" +git-tree-sha1 = "cb151153e40ad40a6dbf984fcd767e1d266fcc9c" uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" -version = "2.36.1+2" +version = "2.50.1+0" [[deps.Glib_jll]] -deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Pkg", "Zlib_jll"] -git-tree-sha1 = "d3b3624125c1474292d0d8ed0f65554ac37ddb23" +deps = ["Artifacts", "GettextRuntime_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "35fbd0cefb04a516104b8e183ce0df11b70a3f1a" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.74.0+2" - -[[deps.Glob]] -git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" -uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" -version = "1.3.1" +version = "2.84.3+0" [[deps.Graphite2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8a6dbda1fd736d60cc477d99f2e7a042acfa46e8" uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" -version = "1.3.14+0" - -[[deps.Graphs]] -deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "1cf1d7dcb4bc32d7b4a5add4232db3750c27ecb4" -uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.8.0" +version = "1.3.15+0" [[deps.Grisu]] git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" version = "1.0.2" -[[deps.Groebner]] -deps = ["AbstractAlgebra", "Combinatorics", "Logging", "MultivariatePolynomials", "Primes", "Random", "SIMD", "SnoopPrecompile"] -git-tree-sha1 = "17c81e8dd04cc8f70bccf8c50aa2d39f5ff2a3ec" -uuid = "0b43b601-686d-58a3-8a1c-6623616c7cd4" -version = "0.4.2" - -[[deps.GroupsCore]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "9e1a5e9f3b81ad6a5c613d181664a0efc6fe6dd7" -uuid = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120" -version = "0.4.0" - [[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "cb56ccdd481c0dd7f975ad2b3b62d9eda088f7e2" +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "ed5e9c58612c4e081aecdb6e1a479e18462e041e" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.9.14" - -[[deps.HalfIntegers]] -git-tree-sha1 = "1cfb497b72e1e8ab2256334dee1aaad43fa279ad" -uuid = "f0d1745a-41c9-11e9-1dd9-e5d34d218721" -version = "1.5.1" +version = "1.10.17" [[deps.HarfBuzz_jll]] -deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] -git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] +git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813" uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" -version = "2.8.1+1" +version = "8.5.1+0" [[deps.Highlights]] deps = ["DocStringExtensions", "InteractiveUtils", "REPL"] -git-tree-sha1 = "0341077e8a6b9fc1c2ea5edc1e93a956d2aec0c7" +git-tree-sha1 = "9e13b8d8b1367d9692a90ea4711b4278e4755c32" uuid = "eafb193a-b7ab-5a9e-9068-77385905fa72" -version = "0.5.2" +version = "0.5.3" [[deps.HostCPUFeatures]] deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "eb8fed28f4994600e29beef49744639d985a04b2" +git-tree-sha1 = "8e070b599339d622e9a081d17230d74a5c473293" uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.16" +version = "0.1.17" [[deps.HypergeometricFunctions]] -deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "f218fe3736ddf977e0e772bc9a586b2383da2685" +deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] +git-tree-sha1 = "68c173f4f449de5b438ee67ed0c9c748dc31a2ec" uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.23" +version = "0.3.28" [[deps.IJulia]] -deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Libdl", "Logging", "Markdown", "MbedTLS", "Pkg", "Printf", "REPL", "Random", "SoftGlobalScope", "Test", "UUIDs", "ZMQ"] -git-tree-sha1 = "47ac8cc196b81001a711f4b2c12c97372338f00c" +deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Logging", "Markdown", "Pkg", "Printf", "REPL", "Random", "SHA", "SoftGlobalScope", "UUIDs", "ZMQ"] +git-tree-sha1 = "016d15e5d186b2dd59ff96e05cb13eea542b54f6" uuid = "7073ff75-c697-5162-941a-fcdaad2a7d2a" -version = "1.24.2" +version = "1.29.2" [[deps.IfElse]] git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" @@ -816,65 +931,69 @@ version = "0.1.1" [[deps.InfiniteArrays]] deps = ["ArrayLayouts", "FillArrays", "Infinities", "LazyArrays", "LinearAlgebra"] -git-tree-sha1 = "cdf72ddf0403f204c14749ce438fafc5b64c47ea" +git-tree-sha1 = "c691bb4e60abe42f76fba8083dd50122e97bbd7b" uuid = "4858937d-0d70-526a-a4dd-2d5cb5dd786c" -version = "0.13.1" -weakdeps = ["DSP", "Statistics"] +version = "0.15.6" +weakdeps = ["BandedMatrices", "BlockArrays", "BlockBandedMatrices", "DSP", "Statistics"] [deps.InfiniteArrays.extensions] + InfiniteArraysBandedMatricesExt = "BandedMatrices" + InfiniteArraysBlockArraysExt = "BlockArrays" + InfiniteArraysBlockBandedMatricesExt = "BlockBandedMatrices" InfiniteArraysDSPExt = "DSP" InfiniteArraysStatisticsExt = "Statistics" +[[deps.InfiniteLinearAlgebra]] +deps = ["ArrayLayouts", "BandedMatrices", "BlockArrays", "BlockBandedMatrices", "FillArrays", "InfiniteArrays", "Infinities", "LazyArrays", "LazyBandedMatrices", "LinearAlgebra", "MatrixFactorizations", "SemiseparableMatrices"] +git-tree-sha1 = "d5f3f15051bde4b0a77774d71a1d19ac0d82f69e" +uuid = "cde9dba0-b1de-11e9-2c62-0bab9446c55c" +version = "0.10.0" + [[deps.Infinities]] -git-tree-sha1 = "83fc1771340f16ec9da174ba39c83efc605251db" +git-tree-sha1 = "437cd9b81b649574582507d8b9ca3ffc981f2fc2" uuid = "e1ba4f0e-776d-440f-acd9-e1d2e9742647" -version = "0.1.7" - -[[deps.Inflate]] -git-tree-sha1 = "5cd07aab533df5170988219191dfad0519391428" -uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.3" - -[[deps.IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" +version = "0.1.11" [[deps.IntelOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "ad37c091f7d7daf900963171600d7c1c5c3ede32" +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "ec1debd61c300961f98064cfb21287613ad7f303" uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2023.2.0+0" +version = "2025.2.0+0" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -[[deps.Interpolations]] -deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] -git-tree-sha1 = "721ec2cf720536ad005cb38f50dbba7b02419a15" -uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" -version = "0.14.7" - [[deps.IntervalSets]] -deps = ["Dates", "Random"] -git-tree-sha1 = "8e59ea773deee525c99a8018409f64f19fb719e6" +git-tree-sha1 = "5fbb102dcb8b1a858111ae81d56682376130517d" uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.7" -weakdeps = ["Statistics"] +version = "0.7.11" +weakdeps = ["Random", "RecipesBase", "Statistics"] [deps.IntervalSets.extensions] + IntervalSetsRandomExt = "Random" + IntervalSetsRecipesBaseExt = "RecipesBase" IntervalSetsStatisticsExt = "Statistics" +[[deps.InverseFunctions]] +git-tree-sha1 = "a779299d77cd080bf77b97535acecd73e1c5e5cb" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.17" +weakdeps = ["Dates", "Test"] + + [deps.InverseFunctions.extensions] + InverseFunctionsDatesExt = "Dates" + InverseFunctionsTestExt = "Test" + [[deps.IrrationalConstants]] -git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" +git-tree-sha1 = "e2222959fbc6c19554dc15174c81bf7bf3aa691c" uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.2" +version = "0.2.4" [[deps.IterTools]] -git-tree-sha1 = "4ced6667f9974fc5c5943fa5e2ef1ca43ea9e450" +git-tree-sha1 = "42d5f897009e7ff2cf88db414a389e5ed1bdd023" uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" -version = "1.8.0" +version = "1.10.0" [[deps.IteratorInterfaceExtensions]] git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" @@ -882,16 +1001,16 @@ uuid = "82899510-4779-5014-852e-03e436cf321d" version = "1.0.0" [[deps.JLFzf]] -deps = ["Pipe", "REPL", "Random", "fzf_jll"] -git-tree-sha1 = "f377670cda23b6b7c1c0b3893e37451c5c1a2185" +deps = ["REPL", "Random", "fzf_jll"] +git-tree-sha1 = "82f7acdc599b65e0f8ccd270ffa1467c21cb647b" uuid = "1019f520-868f-41f5-a6de-eb00f4b6a39c" -version = "0.1.5" +version = "0.1.11" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" +version = "1.7.1" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] @@ -899,63 +1018,47 @@ git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" version = "0.21.4" +[[deps.Jieko]] +deps = ["ExproniconLite"] +git-tree-sha1 = "2f05ed29618da60c06a87e9c033982d4f71d0b6c" +uuid = "ae98c720-c025-4a4a-838c-29b094483192" +version = "0.2.1" + [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6f2675ef130a300a112286de91973805fcc5ffbc" +git-tree-sha1 = "eac1206917768cb54957c65a615460d87b455fc1" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "2.1.91+0" - -[[deps.JuliaFormatter]] -deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "Pkg", "PrecompileTools", "Tokenize"] -git-tree-sha1 = "680fb31c8b8e2cf482f48e55d8fa01ccc4469e04" -uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" -version = "1.0.35" - -[[deps.JumpProcesses]] -deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "StaticArrays", "TreeViews", "UnPack"] -git-tree-sha1 = "61068b4df1e434c26ff8b876fbaf2be3e3e44d27" -uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" -version = "9.7.3" -weakdeps = ["FastBroadcast"] - - [deps.JumpProcesses.extensions] - JumpProcessFastBroadcastExt = "FastBroadcast" - -[[deps.KLU]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] -git-tree-sha1 = "764164ed65c30738750965d55652db9c94c59bfe" -uuid = "ef3ab10e-7fda-4108-b977-705223b18434" -version = "0.4.0" +version = "3.1.1+0" [[deps.Krylov]] deps = ["LinearAlgebra", "Printf", "SparseArrays"] -git-tree-sha1 = "17e462054b42dcdda73e9a9ba0c67754170c88ae" +git-tree-sha1 = "b94257a1a8737099ca40bc7271a8b374033473ed" uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" -version = "0.9.4" +version = "0.10.1" [[deps.LAME_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "059aabebaa7c82ccb853dd4a0ee9d17796f7e1bc" uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" -version = "3.100.1+0" +version = "3.100.3+0" [[deps.LERC_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "aaafe88dccbd957a8d82f7d05be9b69172e0cee3" uuid = "88015f11-f218-50d7-93a8-a6af411a945d" -version = "3.0.0+1" +version = "4.0.1+0" [[deps.LLVMOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "f689897ccbe049adb19a065c495e75f372ecd42b" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "eb62a3deb62fc6d8822c0c4bef73e4412419c5d8" uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "15.0.4+0" +version = "18.1.8+0" [[deps.LSODA]] deps = ["Compat", "DiffEqBase", "LSODA_jll", "LinearAlgebra", "Parameters", "Printf", "SciMLBase"] -git-tree-sha1 = "96a6ff0be7ebda67e35af1e6937a68141dd59e70" +git-tree-sha1 = "49c00ced68a8033b30fb1009b8dea7871aa9e928" uuid = "7f56f5a3-f504-529b-bc02-0b1fe5e64312" -version = "0.7.4" +version = "0.7.5" [[deps.LSODA_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -964,176 +1067,199 @@ uuid = "aae0fff6-70f8-51e1-979a-8150c7cc74bd" version = "0.1.2+0" [[deps.LZO_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1c602b1127f4751facb671441ca72715cc95938a" uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" -version = "2.10.1+0" +version = "2.10.3+0" [[deps.LaTeXStrings]] -git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.0" - -[[deps.LabelledArrays]] -deps = ["ArrayInterface", "ChainRulesCore", "ForwardDiff", "LinearAlgebra", "MacroTools", "PreallocationTools", "RecursiveArrayTools", "StaticArrays"] -git-tree-sha1 = "cd04158424635efd05ff38d5f55843397b7416a9" -uuid = "2ee39098-c373-598a-b85f-a56591580800" -version = "1.14.0" - -[[deps.LambertW]] -git-tree-sha1 = "c5ffc834de5d61d00d2b0e18c96267cffc21f648" -uuid = "984bce1d-4616-540c-a9ee-88d1112d94c9" -version = "0.4.6" +version = "1.4.0" [[deps.Latexify]] -deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Printf", "Requires"] -git-tree-sha1 = "f428ae552340899a935973270b8d98e5a31c49fe" +deps = ["Format", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] +git-tree-sha1 = "4f34eaabe49ecb3fb0d58d6015e32fd31a733199" uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.1" +version = "0.16.8" [deps.Latexify.extensions] DataFramesExt = "DataFrames" + SparseArraysExt = "SparseArrays" SymEngineExt = "SymEngine" + TectonicExt = "tectonic_jll" [deps.Latexify.weakdeps] DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" + tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" [[deps.LayoutPointers]] deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "88b8f66b604da079a627b6fb2860d3704a6729a1" +git-tree-sha1 = "a9eaadb366f5493a5654e843864c13d8b107548c" uuid = "10f19ff3-798f-405d-979b-55457f8fc047" -version = "0.1.14" - -[[deps.Lazy]] -deps = ["MacroTools"] -git-tree-sha1 = "1370f8202dac30758f3c345f9909b97f53d87d3f" -uuid = "50d2b5c4-7a5e-59d5-8109-a42b560f39c0" -version = "0.15.1" +version = "0.1.17" [[deps.LazyArrays]] -deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "MatrixFactorizations", "SparseArrays"] -git-tree-sha1 = "45700994c91a14c40b8e4f2e3ce7fc9716b0c7c8" +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "SparseArrays"] +git-tree-sha1 = "76627adb8c542c6b73f68d4bfd0aa71c9893a079" uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02" -version = "1.6.1" -weakdeps = ["StaticArrays"] +version = "2.6.2" +weakdeps = ["BandedMatrices", "BlockArrays", "BlockBandedMatrices", "StaticArrays"] [deps.LazyArrays.extensions] + LazyArraysBandedMatricesExt = "BandedMatrices" + LazyArraysBlockArraysExt = "BlockArrays" + LazyArraysBlockBandedMatricesExt = "BlockBandedMatrices" LazyArraysStaticArraysExt = "StaticArrays" [[deps.LazyArtifacts]] deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" +[[deps.LazyBandedMatrices]] +deps = ["ArrayLayouts", "BandedMatrices", "BlockArrays", "BlockBandedMatrices", "FillArrays", "LazyArrays", "LinearAlgebra", "MatrixFactorizations", "SparseArrays", "StaticArrays"] +git-tree-sha1 = "6b05ecffd8c3244adb7267b905042eca7dade647" +uuid = "d7e5e226-e90b-4449-9968-0f923699bf6f" +version = "0.11.4" +weakdeps = ["InfiniteArrays"] + + [deps.LazyBandedMatrices.extensions] + LazyBandedMatricesInfiniteArraysExt = "InfiniteArrays" + [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" [[deps.Libffi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" -version = "3.2.2+1" - -[[deps.Libgcrypt_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] -git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" -uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.8.7+0" +version = "3.4.7+0" [[deps.Libglvnd_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] -git-tree-sha1 = "6f73d1dd803986947b2c750138528a999a6c7733" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "d36c21b9e7c172a44a10484125024495e2625ac0" uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" -version = "1.6.0+0" - -[[deps.Libgpg_error_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" -uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.42.0+0" +version = "1.7.1+1" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" +git-tree-sha1 = "be484f5c92fad0bd8acfef35fe017900b0b73809" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" -version = "1.17.0+0" +version = "1.18.0+0" [[deps.Libmount_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "a31572773ac1b745e0343fe5e2c8ddda7a37e997" uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -version = "2.35.0+0" +version = "2.41.0+0" [[deps.Libtiff_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] -git-tree-sha1 = "2da088d113af58221c52828a80378e16be7d037a" +git-tree-sha1 = "4ab7581296671007fc33f07a721631b8855f4b1d" uuid = "89763e89-9b03-5906-acba-b20f662cd828" -version = "4.5.1+1" +version = "4.7.1+0" [[deps.Libuuid_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "321ccef73a96ba828cd51f2ab5b9f917fa73945a" uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -version = "2.36.0+0" +version = "2.41.0+0" + +[[deps.LineSearch]] +deps = ["ADTypes", "CommonSolve", "ConcreteStructs", "FastClosures", "LinearAlgebra", "MaybeInplace", "SciMLBase", "SciMLJacobianOperators", "StaticArraysCore"] +git-tree-sha1 = "97d502765cc5cf3a722120f50da03c2474efce04" +uuid = "87fe0de2-c867-4266-b59a-2f0a94fc965b" +version = "0.1.4" +weakdeps = ["LineSearches"] + + [deps.LineSearch.extensions] + LineSearchLineSearchesExt = "LineSearches" [[deps.LineSearches]] deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] -git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" +git-tree-sha1 = "4adee99b7262ad2a1a4bbbc59d993d24e55ea96f" uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" -version = "7.2.0" +version = "7.4.0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LinearSolve]] -deps = ["ArrayInterface", "DocStringExtensions", "EnumX", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"] -git-tree-sha1 = "69cbd612e6e67ba2f8121bc8725bc9d04d803599" +deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "StaticArraysCore", "UnPack"] +git-tree-sha1 = "d768ff40cc3fe42581708696b24ee65dccc9c6ba" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "2.5.1" +version = "3.24.0" [deps.LinearSolve.extensions] + LinearSolveBandedMatricesExt = "BandedMatrices" + LinearSolveBlockDiagonalsExt = "BlockDiagonals" LinearSolveCUDAExt = "CUDA" + LinearSolveCUDSSExt = "CUDSS" + LinearSolveEnzymeExt = "EnzymeCore" + LinearSolveFastAlmostBandedMatricesExt = "FastAlmostBandedMatrices" + LinearSolveFastLapackInterfaceExt = "FastLapackInterface" + LinearSolveForwardDiffExt = "ForwardDiff" LinearSolveHYPREExt = "HYPRE" LinearSolveIterativeSolversExt = "IterativeSolvers" + LinearSolveKernelAbstractionsExt = "KernelAbstractions" LinearSolveKrylovKitExt = "KrylovKit" - LinearSolveMKLExt = "MKL_jll" LinearSolveMetalExt = "Metal" - LinearSolvePardisoExt = "Pardiso" + LinearSolvePardisoExt = ["Pardiso", "SparseArrays"] + LinearSolveRecursiveFactorizationExt = "RecursiveFactorization" + LinearSolveSparseArraysExt = "SparseArrays" + LinearSolveSparspakExt = ["SparseArrays", "Sparspak"] [deps.LinearSolve.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + FastAlmostBandedMatrices = "9d29842c-ecb8-4973-b1e9-a27b1157504e" + FastLapackInterface = "29a986be-02c6-4525-aec4-84b980013641" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" - MKL_jll = "856f044c-d86e-5d09-b602-aeab76dc8ba7" Metal = "dde4c033-4e86-420c-a63e-0dd931031962" Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" + RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Sparspak = "e56a9233-b9d6-4f03-8d0f-1825330902ac" [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa" +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.26" +version = "0.3.29" [deps.LogExpFunctions.extensions] LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" @@ -1150,52 +1276,36 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] -git-tree-sha1 = "0d097476b6c381ab7906460ef1ef1638fbce1d91" +git-tree-sha1 = "f02b56007b064fbfddb4c9cd60161b6dd0f40df3" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.0.2" +version = "1.1.0" [[deps.LoopVectorization]] -deps = ["ArrayInterface", "ArrayInterfaceCore", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] -git-tree-sha1 = "c88a4afe1703d731b1c4fdf4e3c7e77e3b176ea2" +deps = ["ArrayInterface", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] +git-tree-sha1 = "e5afce7eaf5b5ca0d444bcb4dc4fd78c54cbbac0" uuid = "bdcacae8-1622-11e9-2a5c-532679323890" -version = "0.12.165" +version = "0.12.172" weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] [deps.LoopVectorization.extensions] ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] SpecialFunctionsExt = "SpecialFunctions" -[[deps.LowRankMatrices]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "44c5a4f2669a78c7947de06985da1eadacd1b085" -uuid = "e65ccdef-c354-471a-8090-89bec1c20ec3" -version = "1.0.0" -weakdeps = ["FillArrays"] - - [deps.LowRankMatrices.extensions] - LowRankMatricesFillArraysExt = "FillArrays" - [[deps.MKL_jll]] -deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] -git-tree-sha1 = "eb006abbd7041c28e0d16260e50a24f8f9104913" +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] +git-tree-sha1 = "282cadc186e7b2ae0eeadbd7a4dffed4196ae2aa" uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2023.2.0+0" - -[[deps.MLStyle]] -git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" -uuid = "d8e11817-5142-5d16-987a-aa16d5891078" -version = "0.4.17" +version = "2025.2.0+0" [[deps.MPFR_jll]] deps = ["Artifacts", "GMP_jll", "Libdl"] uuid = "3a97d323-0669-5f0c-9066-3539efd106a3" -version = "4.1.1+4" +version = "4.2.0+1" [[deps.MacroTools]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "9ee1618cbf5240e6d4e0371d6f24065083f60c48" +git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.11" +version = "0.5.16" [[deps.ManualMemory]] git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" @@ -1208,85 +1318,75 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" [[deps.MatrixFactorizations]] deps = ["ArrayLayouts", "LinearAlgebra", "Printf", "Random"] -git-tree-sha1 = "78f6e33434939b0ac9ba1df81e6d005ee85a7396" +git-tree-sha1 = "16a726dba99685d9e94c8d0a8f655383121fc608" uuid = "a3b82374-2e81-5b9e-98ce-41277c0e4c87" -version = "2.1.0" +version = "3.0.1" +weakdeps = ["BandedMatrices"] + + [deps.MatrixFactorizations.extensions] + MatrixFactorizationsBandedMatricesExt = "BandedMatrices" + +[[deps.MaybeInplace]] +deps = ["ArrayInterface", "LinearAlgebra", "MacroTools"] +git-tree-sha1 = "54e2fdc38130c05b42be423e90da3bade29b74bd" +uuid = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb" +version = "0.1.4" +weakdeps = ["SparseArrays"] + + [deps.MaybeInplace.extensions] + MaybeInplaceSparseArraysExt = "SparseArrays" [[deps.MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"] -git-tree-sha1 = "03a9b9718f5682ecb107ac9f7308991db4ce395b" +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] +git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.1.7" +version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+0" +version = "2.28.2+1" [[deps.Measures]] git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" version = "0.3.2" -[[deps.MethodOfLines]] -deps = ["Combinatorics", "DiffEqBase", "DomainSets", "IfElse", "Interpolations", "Latexify", "LinearAlgebra", "ModelingToolkit", "OrdinaryDiffEq", "PDEBase", "SciMLBase", "StaticArrays", "SymbolicUtils", "Symbolics", "TermInterface"] -git-tree-sha1 = "8622e18479e5e686956410112920ed53ea7e5251" -uuid = "94925ecb-adb7-4558-8ed8-f975c56a0bf4" -version = "0.9.5" - [[deps.Missings]] deps = ["DataAPI"] -git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" +git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.1.0" +version = "1.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" -[[deps.ModelingToolkit]] -deps = ["AbstractTrees", "ArrayInterface", "Combinatorics", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffRules", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "ForwardDiff", "FunctionWrappersWrappers", "Graphs", "IfElse", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "LabelledArrays", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "MacroTools", "NaNMath", "OrdinaryDiffEq", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] -git-tree-sha1 = "2c385bd3b5b8bb09f4c447ff56cd801cd4e1c4cf" -uuid = "961ee093-0014-501f-94e3-6117800e7a78" -version = "8.66.0" - - [deps.ModelingToolkit.extensions] - MTKDeepDiffsExt = "DeepDiffs" - - [deps.ModelingToolkit.weakdeps] - DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6" +[[deps.Moshi]] +deps = ["ExproniconLite", "Jieko"] +git-tree-sha1 = "53f817d3e84537d84545e0ad749e483412dd6b2a" +uuid = "2e0e35c7-a2e4-4343-998d-7ef72827ed2d" +version = "0.3.7" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" +version = "2023.1.10" [[deps.MuladdMacro]] git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" version = "0.2.4" -[[deps.MultivariatePolynomials]] -deps = ["ChainRulesCore", "DataStructures", "LinearAlgebra", "MutableArithmetics"] -git-tree-sha1 = "f9978f23952b52b8d958b72f8b5368f84254dc02" -uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" -version = "0.5.1" - [[deps.Mustache]] deps = ["Printf", "Tables"] -git-tree-sha1 = "821e918c170ead5298ff84bffee41dd28929a681" +git-tree-sha1 = "3cbd5dda543bc59f2e482607ccf84b633724fc32" uuid = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70" -version = "1.0.17" - -[[deps.MutableArithmetics]] -deps = ["LinearAlgebra", "SparseArrays", "Test"] -git-tree-sha1 = "5879579adbd9bc3017fe63c766371aace1a1d641" -uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" -version = "1.3.1" +version = "1.0.21" [[deps.NLSolversBase]] -deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] -git-tree-sha1 = "a0b464d183da839699f4c79e7606d9d186ec172c" +deps = ["ADTypes", "DifferentiationInterface", "Distributed", "FiniteDiff", "ForwardDiff"] +git-tree-sha1 = "25a6638571a902ecfb1ae2a18fc1575f86b1d4df" uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" -version = "7.8.3" +version = "7.10.0" [[deps.NLsolve]] deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] @@ -1296,129 +1396,370 @@ version = "4.5.1" [[deps.NaNMath]] deps = ["OpenLibm_jll"] -git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.0.2" +version = "1.1.3" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" [[deps.NonlinearSolve]] -deps = ["ArrayInterface", "DiffEqBase", "EnumX", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "LinearSolve", "PrecompileTools", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseDiffTools", "StaticArraysCore", "UnPack"] -git-tree-sha1 = "ee53089df81a6bdf3c06c17cf674e90931b10a73" +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseMatrixColorings", "StaticArraysCore", "SymbolicIndexingInterface"] +git-tree-sha1 = "d2ec18c1e4eccbb70b64be2435fc3b06fbcdc0a1" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "1.10.0" +version = "4.10.0" + + [deps.NonlinearSolve.extensions] + NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" + NonlinearSolveFixedPointAccelerationExt = "FixedPointAcceleration" + NonlinearSolveLeastSquaresOptimExt = "LeastSquaresOptim" + NonlinearSolveMINPACKExt = "MINPACK" + NonlinearSolveNLSolversExt = "NLSolvers" + NonlinearSolveNLsolveExt = ["NLsolve", "LineSearches"] + NonlinearSolvePETScExt = ["PETSc", "MPI"] + NonlinearSolveSIAMFANLEquationsExt = "SIAMFANLEquations" + NonlinearSolveSpeedMappingExt = "SpeedMapping" + NonlinearSolveSundialsExt = "Sundials" + + [deps.NonlinearSolve.weakdeps] + FastLevenbergMarquardt = "7a0df574-e128-4d35-8cbd-3d84502bf7ce" + FixedPointAcceleration = "817d07cb-a79a-5c30-9a31-890123675176" + LeastSquaresOptim = "0fc2ff8b-aaa3-5acd-a817-1944a5e08891" + LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" + MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + NLSolvers = "337daf1e-9722-11e9-073e-8b9effe078ba" + NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" + PETSc = "ace2c81b-2b5f-4b1e-a30d-d662738edfe0" + SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4" + SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412" + Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" + +[[deps.NonlinearSolveBase]] +deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "Compat", "ConcreteStructs", "DifferentiationInterface", "EnzymeCore", "FastClosures", "LinearAlgebra", "Markdown", "MaybeInplace", "Preferences", "Printf", "RecursiveArrayTools", "SciMLBase", "SciMLJacobianOperators", "SciMLOperators", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] +git-tree-sha1 = "ee395563ae6ffaecbdf86d430440fddc779253a4" +uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" +version = "1.13.0" +weakdeps = ["BandedMatrices", "DiffEqBase", "ForwardDiff", "LineSearch", "LinearSolve", "SparseArrays", "SparseMatrixColorings"] + + [deps.NonlinearSolveBase.extensions] + NonlinearSolveBaseBandedMatricesExt = "BandedMatrices" + NonlinearSolveBaseDiffEqBaseExt = "DiffEqBase" + NonlinearSolveBaseForwardDiffExt = "ForwardDiff" + NonlinearSolveBaseLineSearchExt = "LineSearch" + NonlinearSolveBaseLinearSolveExt = "LinearSolve" + NonlinearSolveBaseSparseArraysExt = "SparseArrays" + NonlinearSolveBaseSparseMatrixColoringsExt = "SparseMatrixColorings" + +[[deps.NonlinearSolveFirstOrder]] +deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLJacobianOperators", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "65101a20b135616a13625ae6f84b052ef5780363" +uuid = "5959db7a-ea39-4486-b5fe-2dd0bf03d60d" +version = "1.6.0" -[[deps.ODEInterface]] -deps = ["Dates", "Libdl", "LinearAlgebra", "Markdown", "ODEInterface_jll", "Unicode"] -git-tree-sha1 = "5dfb3d7199de97cfdc81f1971a2727e628ff472b" -uuid = "54ca160b-1b9f-5127-a996-1867f4bc2a2c" -version = "0.5.0" +[[deps.NonlinearSolveQuasiNewton]] +deps = ["ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLOperators", "StaticArraysCore"] +git-tree-sha1 = "3e04c917d4e3cd48b2a5091b6f76c720bb3f7362" +uuid = "9a2c21bd-3a47-402d-9113-8faf9a0ee114" +version = "1.7.0" +weakdeps = ["ForwardDiff"] -[[deps.ODEInterfaceDiffEq]] -deps = ["Compat", "DataStructures", "DiffEqBase", "FunctionWrappers", "LinearAlgebra", "ODEInterface", "Reexport", "SciMLBase"] -git-tree-sha1 = "f5a5c4acdcfea8b49fa2cd9ac496dda0e89c701a" -uuid = "09606e27-ecf5-54fc-bb29-004bd9f985bf" -version = "3.13.2" - -[[deps.ODEInterface_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "3021aa85a1cd566a533635246b7ed31a29c72c93" -uuid = "c771fb93-2439-5ece-a3b3-58fecce82101" -version = "0.0.1+0" - -[[deps.OddEvenIntegers]] -deps = ["HalfIntegers"] -git-tree-sha1 = "e8a235f5a1a6d52597a6ea34a354199e28b1827f" -uuid = "8d37c425-f37a-4ca2-9b9d-a61bc06559d2" -version = "0.1.10" + [deps.NonlinearSolveQuasiNewton.extensions] + NonlinearSolveQuasiNewtonForwardDiffExt = "ForwardDiff" + +[[deps.NonlinearSolveSpectralMethods]] +deps = ["CommonSolve", "ConcreteStructs", "DiffEqBase", "LineSearch", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "3398222199e4b9ca0b5840907fb509f28f1a2fdc" +uuid = "26075421-4e9a-44e1-8bd1-420ed7ad02b2" +version = "1.2.0" +weakdeps = ["ForwardDiff"] + + [deps.NonlinearSolveSpectralMethods.extensions] + NonlinearSolveSpectralMethodsForwardDiffExt = "ForwardDiff" [[deps.OffsetArrays]] -deps = ["Adapt"] -git-tree-sha1 = "2ac17d29c523ce1cd38e27785a7d23024853a4bb" +git-tree-sha1 = "117432e406b5c023f665fa73dc26e79ec3630151" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.12.10" +version = "1.17.0" +weakdeps = ["Adapt"] + + [deps.OffsetArrays.extensions] + OffsetArraysAdaptExt = "Adapt" [[deps.Ogg_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b6aa4566bb7ae78498a5e68943863fa8b5231b59" uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" -version = "1.3.5+1" +version = "1.3.6+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+4" +version = "0.3.23+4" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.5+0" + +[[deps.OpenSSH_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"] +git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800" +uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b" +version = "10.0.1+0" [[deps.OpenSSL]] deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "51901a49222b09e3743c65b8847687ae5fc78eb2" +git-tree-sha1 = "f1a7e086c677df53e064e0fdd2c9d0b0833e3f6e" uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.4.1" +version = "1.5.0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "bbb5c2115d63c2f1451cb70e5ef75e8fe4707019" +git-tree-sha1 = "87510f7292a2b21aeff97912b0898f9553cc5c2c" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "1.1.22+0" +version = "3.5.1+0" [[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.5+0" +version = "0.5.6+0" [[deps.Optim]] -deps = ["Compat", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] -git-tree-sha1 = "963b004d15216f8129f6c0f7d187efa136570be0" +deps = ["Compat", "EnumX", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] +git-tree-sha1 = "61942645c38dd2b5b78e2082c9b51ab315315d10" uuid = "429524aa-4258-5aef-a3af-852621145aeb" -version = "1.7.7" +version = "1.13.2" + + [deps.Optim.extensions] + OptimMOIExt = "MathOptInterface" + + [deps.Optim.weakdeps] + MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee" [[deps.Opus_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c392fc5dd032381919e3b22dd32d6443760ce7ea" uuid = "91d4177d-7536-5919-b921-800302f37372" -version = "1.3.2+0" +version = "1.5.2+0" [[deps.OrderedCollections]] -git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3" +git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.2" +version = "1.8.1" [[deps.OrdinaryDiffEq]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "IfElse", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "LoopVectorization", "MacroTools", "MuladdMacro", "NLsolve", "NonlinearSolve", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLNLSolve", "SciMLOperators", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "ba3ed480f991b846cf9a8118d3370d9752e7166d" +deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FillArrays", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "MacroTools", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqDefault", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqExplicitRK", "OrdinaryDiffEqExponentialRK", "OrdinaryDiffEqExtrapolation", "OrdinaryDiffEqFIRK", "OrdinaryDiffEqFeagin", "OrdinaryDiffEqFunctionMap", "OrdinaryDiffEqHighOrderRK", "OrdinaryDiffEqIMEXMultistep", "OrdinaryDiffEqLinear", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqNordsieck", "OrdinaryDiffEqPDIRK", "OrdinaryDiffEqPRK", "OrdinaryDiffEqQPRK", "OrdinaryDiffEqRKN", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqSSPRK", "OrdinaryDiffEqStabilizedIRK", "OrdinaryDiffEqStabilizedRK", "OrdinaryDiffEqSymplecticRK", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "Static", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] +git-tree-sha1 = "55c21fdb4626037cdbcb04fec3afa192345a24de" uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.55.0" +version = "6.101.0" + +[[deps.OrdinaryDiffEqAdamsBashforthMoulton]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqLowOrderRK", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "82f78099ecf4e0fa53545811318520d87e7fe0b8" +uuid = "89bda076-bce5-4f1c-845f-551c83cdda9a" +version = "1.2.0" + +[[deps.OrdinaryDiffEqBDF]] +deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqSDIRK", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "StaticArrays", "TruncatedStacktraces"] +git-tree-sha1 = "b0bbc6541ea4a27974bd67e0a10b26211cb95e58" +uuid = "6ad6398a-0878-4a85-9266-38940aa047c8" +version = "1.7.0" + +[[deps.OrdinaryDiffEqCore]] +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "FastBroadcast", "FastClosures", "FastPower", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleUnPack", "Static", "StaticArrayInterface", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "1bd20b621e8dee5f2d170ae31631bf573ab77eec" +uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" +version = "1.26.2" + + [deps.OrdinaryDiffEqCore.extensions] + OrdinaryDiffEqCoreEnzymeCoreExt = "EnzymeCore" + OrdinaryDiffEqCoreMooncakeExt = "Mooncake" + + [deps.OrdinaryDiffEqCore.weakdeps] + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + +[[deps.OrdinaryDiffEqDefault]] +deps = ["ADTypes", "DiffEqBase", "EnumX", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "PrecompileTools", "Preferences", "Reexport"] +git-tree-sha1 = "7e2f4ec76ebac709401064fd2cf73ad993d1e694" +uuid = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" +version = "1.5.0" + +[[deps.OrdinaryDiffEqDifferentiation]] +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqCore", "SciMLBase", "SciMLOperators", "SparseArrays", "SparseMatrixColorings", "StaticArrayInterface", "StaticArrays"] +git-tree-sha1 = "382a4bf7795eee0298221c37099db770be524bab" +uuid = "4302a76b-040a-498a-8c04-15b101fed76b" +version = "1.10.1" + +[[deps.OrdinaryDiffEqExplicitRK]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "TruncatedStacktraces"] +git-tree-sha1 = "4dbce3f9e6974567082ce5176e21aab0224a69e9" +uuid = "9286f039-9fbf-40e8-bf65-aa933bdc4db0" +version = "1.1.0" + +[[deps.OrdinaryDiffEqExponentialRK]] +deps = ["ADTypes", "DiffEqBase", "ExponentialUtilities", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "RecursiveArrayTools", "Reexport", "SciMLBase"] +git-tree-sha1 = "585f73f10a1b444654d739853a9328d1bb7fce6b" +uuid = "e0540318-69ee-4070-8777-9e2de6de23de" +version = "1.5.0" + +[[deps.OrdinaryDiffEqExtrapolation]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "FastPower", "LinearSolve", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "Polyester", "RecursiveArrayTools", "Reexport"] +git-tree-sha1 = "80a636aac325c546b04e3bf20f0c80eaa0173dd4" +uuid = "becaefa8-8ca2-5cf9-886d-c06f3d2bd2c4" +version = "1.5.0" + +[[deps.OrdinaryDiffEqFIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "FastGaussQuadrature", "FastPower", "LinearAlgebra", "LinearSolve", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Polyester", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "d7cbd84ba96a91e765fc20d2c3b3b1702c15eeed" +uuid = "5960d6e9-dd7a-4743-88e7-cf307b64f125" +version = "1.13.0" + +[[deps.OrdinaryDiffEqFeagin]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "a7cc74d3433db98e59dc3d58bc28174c6c290adf" +uuid = "101fe9f7-ebb6-4678-b671-3a81e7194747" +version = "1.1.0" + +[[deps.OrdinaryDiffEqFunctionMap]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static"] +git-tree-sha1 = "a4cb67794464352b69331c903cfa91a40e9a79ac" +uuid = "d3585ca7-f5d3-4ba6-8057-292ed1abd90f" +version = "1.2.0" + +[[deps.OrdinaryDiffEqHighOrderRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "3466ac9ba5121c700a17e1d5ba42757405d636d4" +uuid = "d28bc4f8-55e1-4f49-af69-84c1a99f0f58" +version = "1.2.0" + +[[deps.OrdinaryDiffEqIMEXMultistep]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Reexport"] +git-tree-sha1 = "f2e7decd8b8b92a13e9d48f87780fdfecbc85708" +uuid = "9f002381-b378-40b7-97a6-27a27c83f129" +version = "1.4.0" + +[[deps.OrdinaryDiffEqLinear]] +deps = ["DiffEqBase", "ExponentialUtilities", "LinearAlgebra", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "940cef72ec8799d869ff1ba3dcf47cf7758e51cf" +uuid = "521117fe-8c41-49f8-b3b6-30780b3f0fb5" +version = "1.3.0" + +[[deps.OrdinaryDiffEqLowOrderRK]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static"] +git-tree-sha1 = "2b7a3ef765c5e3e9d8eee6031da143a0b1c0805c" +uuid = "1344f307-1e59-4825-a18e-ace9aa3fa4c6" +version = "1.3.0" + +[[deps.OrdinaryDiffEqLowStorageRK]] +deps = ["Adapt", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "StaticArrays"] +git-tree-sha1 = "52ec7081e65291fa5c19749312df0818db2fa1bc" +uuid = "b0944070-b475-4768-8dec-fb6eb410534d" +version = "1.3.0" + +[[deps.OrdinaryDiffEqNonlinearSolve]] +deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "FastClosures", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "PreallocationTools", "RecursiveArrayTools", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "StaticArrays"] +git-tree-sha1 = "e98aa2f8da8386bc26daeb7c9b161bc351ea6a77" +uuid = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" +version = "1.11.0" + +[[deps.OrdinaryDiffEqNordsieck]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqTsit5", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "ef44754f10e0dfb9bb55ded382afed44cd94ab57" +uuid = "c9986a66-5c92-4813-8696-a7ec84c806c8" +version = "1.1.0" + +[[deps.OrdinaryDiffEqPDIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Polyester", "Reexport", "StaticArrays"] +git-tree-sha1 = "ab9897e4bc8e3cf8e15f1cf61dbdd15d6a2341d7" +uuid = "5dd0a6cf-3d4b-4314-aa06-06d4e299bc89" +version = "1.3.1" + +[[deps.OrdinaryDiffEqPRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "Reexport"] +git-tree-sha1 = "da525d277962a1b76102c79f30cb0c31e13fe5b9" +uuid = "5b33eab2-c0f1-4480-b2c3-94bc1e80bda1" +version = "1.1.0" + +[[deps.OrdinaryDiffEqQPRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "332f9d17d0229218f66a73492162267359ba85e9" +uuid = "04162be5-8125-4266-98ed-640baecc6514" +version = "1.1.0" + +[[deps.OrdinaryDiffEqRKN]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport"] +git-tree-sha1 = "6548bff67665b13a60abfb33e95fcf7ae08d186d" +uuid = "af6ede74-add8-4cfd-b1df-9a4dbb109d7a" +version = "1.2.0" + +[[deps.OrdinaryDiffEqRosenbrock]] +deps = ["ADTypes", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "a2f83c9b6e977c8dc5f37e0b448ad64f17c3a9c1" +uuid = "43230ef6-c299-4910-a778-202eb28ce4ce" +version = "1.12.0" + +[[deps.OrdinaryDiffEqSDIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "RecursiveArrayTools", "Reexport", "SciMLBase", "TruncatedStacktraces"] +git-tree-sha1 = "62327171ae40737b7874d4bdf70e0a213d60086a" +uuid = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" +version = "1.4.0" + +[[deps.OrdinaryDiffEqSSPRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "StaticArrays"] +git-tree-sha1 = "651756c030df7a1d49ad484288937f8c398e8a08" +uuid = "669c94d9-1f4b-4b64-b377-1aa079aa2388" +version = "1.3.0" + +[[deps.OrdinaryDiffEqStabilizedIRK]] +deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "RecursiveArrayTools", "Reexport", "StaticArrays"] +git-tree-sha1 = "111c23b68ad644b47e38242af920d5805c7bedb1" +uuid = "e3e12d00-db14-5390-b879-ac3dd2ef6296" +version = "1.3.0" + +[[deps.OrdinaryDiffEqStabilizedRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "StaticArrays"] +git-tree-sha1 = "8b54bcaf8634548bd13c0bd9a0522f15e5438b67" +uuid = "358294b1-0aab-51c3-aafe-ad5ab194a2ad" +version = "1.2.0" + +[[deps.OrdinaryDiffEqSymplecticRK]] +deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport"] +git-tree-sha1 = "0d3e0527149d7ece68850c51de67e99bc4477b1b" +uuid = "fa646aed-7ef9-47eb-84c4-9443fc8cbfa8" +version = "1.4.0" + +[[deps.OrdinaryDiffEqTsit5]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "TruncatedStacktraces"] +git-tree-sha1 = "d0b069075f4a5e54b29e412419e5a733a83e6240" +uuid = "b1df2697-797e-41e3-8120-5422d3b24e4a" +version = "1.2.0" + +[[deps.OrdinaryDiffEqVerner]] +deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "TruncatedStacktraces"] +git-tree-sha1 = "91f0a004785791c8c538d34a67c19cf3f7776e85" +uuid = "79d7bb75-1356-48c1-b8c0-6832512096c2" +version = "1.3.0" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.42.0+0" - -[[deps.PDEBase]] -deps = ["DomainSets", "ModelingToolkit", "SciMLBase", "SymbolicUtils", "Symbolics"] -git-tree-sha1 = "f58e4f2a32559a88d52990b8ca286cbd57ddc8d0" -uuid = "a7812802-0625-4b9e-961c-d332478797e5" -version = "0.1.4" +version = "10.42.0+1" [[deps.PDMats]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "67eae2738d63117a196f497d7db789821bce61d1" +git-tree-sha1 = "f07c06228a1c670ae4c87d1276b92c7c597fdda0" uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.17" +version = "0.11.35" -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "f9b1e033c2b1205cf30fd119f4e50881316c1923" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.1" -weakdeps = ["Requires", "TOML"] +[[deps.Pango_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "275a9a6d85dc86c24d03d1837a0010226a96f540" +uuid = "36c8627f-9965-5494-a995-c6b170f724f3" +version = "1.56.3+0" [[deps.Parameters]] deps = ["OrderedCollections", "UnPack"] @@ -1428,43 +1769,38 @@ version = "0.12.3" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "716e24b21538abc91f6205fd1d8363f39b442851" +git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.7.2" - -[[deps.Pipe]] -git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" -uuid = "b98c9c47-44ae-5843-9183-064241ee97a0" -version = "1.3.0" +version = "2.8.3" [[deps.Pixman_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] -git-tree-sha1 = "64779bc4c9784fee475689a1752ef4d5747c5e87" +git-tree-sha1 = "db76b1ecd5e9715f3d043cec13b2ec93ce015d53" uuid = "30392449-352a-5448-841d-b1acce4e97dc" -version = "0.42.2+0" +version = "0.44.2+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.0" +version = "1.10.0" [[deps.PlotThemes]] deps = ["PlotUtils", "Statistics"] -git-tree-sha1 = "1f03a2d339f42dca4a4da149c7e15e9b896ad899" +git-tree-sha1 = "41031ef3a1be6f5bbbf3e8073f210556daeae5ca" uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" -version = "3.1.0" +version = "3.3.0" [[deps.PlotUtils]] -deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "Statistics"] -git-tree-sha1 = "f92e1315dadf8c46561fb9396e525f7200cdc227" +deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "StableRNGs", "Statistics"] +git-tree-sha1 = "3ca9a356cd2e113c420f2c13bea19f8d3fb1cb18" uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" -version = "1.3.5" +version = "1.4.3" [[deps.Plots]] -deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Preferences", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "ccee59c6e48e6f2edf8a5b64dc817b6729f99eb5" +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] +git-tree-sha1 = "3db9167c618b290a05d4345ca70de6d95304a32a" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.39.0" +version = "1.40.17" [deps.Plots.extensions] FileIOExt = "FileIO" @@ -1481,37 +1817,45 @@ version = "1.39.0" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.PoissonRandom]] -deps = ["Random"] -git-tree-sha1 = "a0f1159c33f846aa77c3f30ebbc69795e5327152" +deps = ["LogExpFunctions", "Random"] +git-tree-sha1 = "bb178012780b34046c6d1600a315d8dbee89d83d" uuid = "e409e4f3-bfea-5376-8464-e040bb5c01ab" -version = "0.4.4" +version = "0.4.5" [[deps.Polyester]] -deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] -git-tree-sha1 = "3d811babe092a6e7b130beee84998fe7663348b6" +deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] +git-tree-sha1 = "6f7cd22a802094d239824c57d94c8e2d0f7cfc7d" uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" -version = "0.7.5" +version = "0.7.18" [[deps.PolyesterWeave]] deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] -git-tree-sha1 = "240d7170f5ffdb285f9427b92333c3463bf65bf6" +git-tree-sha1 = "645bed98cd47f72f67316fd42fc47dee771aefcd" uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" -version = "0.2.1" +version = "0.2.2" + +[[deps.PolynomialBases]] +deps = ["ArgCheck", "AutoHashEquals", "FFTW", "FastGaussQuadrature", "LinearAlgebra", "Requires", "SimpleUnPack", "SpecialFunctions"] +git-tree-sha1 = "d04bec789dce5ff61e8f128b6aee0eda09a3855f" +uuid = "c74db56a-226d-5e98-8bb0-a6049094aeea" +version = "0.4.25" [[deps.Polynomials]] -deps = ["LinearAlgebra", "RecipesBase"] -git-tree-sha1 = "3aa2bb4982e575acd7583f01531f241af077b163" +deps = ["LinearAlgebra", "OrderedCollections", "RecipesBase", "Requires", "Setfield", "SparseArrays"] +git-tree-sha1 = "972089912ba299fba87671b025cd0da74f5f54f7" uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45" -version = "3.2.13" +version = "4.1.0" [deps.Polynomials.extensions] PolynomialsChainRulesCoreExt = "ChainRulesCore" - PolynomialsMakieCoreExt = "MakieCore" + PolynomialsFFTWExt = "FFTW" + PolynomialsMakieExt = "Makie" PolynomialsMutableArithmeticsExt = "MutableArithmetics" [deps.Polynomials.weakdeps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - MakieCore = "20f20a25-4f0e-4fdf-b5d1-57303727442b" + FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" MutableArithmetics = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" [[deps.PositiveFactorizations]] @@ -1521,86 +1865,111 @@ uuid = "85a6dd25-e78a-55b7-8502-1745935b8125" version = "0.2.4" [[deps.PreallocationTools]] -deps = ["Adapt", "ArrayInterface", "ForwardDiff", "Requires"] -git-tree-sha1 = "f739b1b3cc7b9949af3b35089931f2b58c289163" +deps = ["Adapt", "ArrayInterface", "ForwardDiff"] +git-tree-sha1 = "2cc315bb7f6e4d59081bad744cdb911d6374fc7f" uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -version = "0.4.12" +version = "0.4.29" [deps.PreallocationTools.extensions] PreallocationToolsReverseDiffExt = "ReverseDiff" + PreallocationToolsSparseConnectivityTracerExt = "SparseConnectivityTracer" [deps.PreallocationTools.weakdeps] ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" [[deps.PrecompileTools]] deps = ["Preferences"] -git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f" +git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f" uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.0" +version = "1.2.1" [[deps.Preferences]] deps = ["TOML"] -git-tree-sha1 = "7eb1686b4f04b82f96ed7a4ea5890a4f0c7a09f1" +git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6" uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.0" +version = "1.4.3" -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "4c9f306e5d6603ae203c2000dd460d81a5251489" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.4" +[[deps.PrettyTables]] +deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] +git-tree-sha1 = "1101cd475833706e4d0e7b122218257178f48f34" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "2.4.0" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +[[deps.PtrArrays]] +git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" +uuid = "43287f4e-b6f4-7ad1-bb20-aadabca52c3d" +version = "1.3.0" + [[deps.Qt6Base_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "xkbcommon_jll"] -git-tree-sha1 = "364898e8f13f7eaaceec55fd3d08680498c0aa6e" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] +git-tree-sha1 = "eb38d376097f47316fe089fc62cb7c6d85383a52" uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" -version = "6.4.2+3" +version = "6.8.2+1" + +[[deps.Qt6Declarative_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6ShaderTools_jll"] +git-tree-sha1 = "da7adf145cce0d44e892626e647f9dcbe9cb3e10" +uuid = "629bc702-f1f5-5709-abd5-49b8460ea067" +version = "6.8.2+1" + +[[deps.Qt6ShaderTools_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll"] +git-tree-sha1 = "9eca9fc3fe515d619ce004c83c31ffd3f85c7ccf" +uuid = "ce943373-25bb-56aa-8eca-768745ed7b5a" +version = "6.8.2+1" + +[[deps.Qt6Wayland_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6Declarative_jll"] +git-tree-sha1 = "e1d5e16d0f65762396f9ca4644a5f4ddab8d452b" +uuid = "e99dba38-086e-5de3-a5b1-6e4c66e897c3" +version = "6.8.2+1" [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "6ec7ac8412e83d57e313393220879ede1740f9ee" +git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.8.2" +version = "2.11.2" + + [deps.QuadGK.extensions] + QuadGKEnzymeExt = "Enzyme" + + [deps.QuadGK.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + +[[deps.QuasiArrays]] +deps = ["ArrayLayouts", "DomainSets", "FillArrays", "LazyArrays", "LinearAlgebra", "StaticArrays"] +git-tree-sha1 = "2f063d651e23c3e5029d439e136bfa298475ec39" +uuid = "c4ea9172-b204-11e9-377d-29865faadc5c" +version = "0.12.0" +weakdeps = ["SparseArrays"] + + [deps.QuasiArrays.extensions] + QuasiArraysSparseArraysExt = "SparseArrays" [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.Random123]] deps = ["Random", "RandomNumbers"] -git-tree-sha1 = "552f30e847641591ba3f39fd1bed559b9deb0ef3" +git-tree-sha1 = "dbe5fd0b334694e905cb9fda73cd8554333c46e2" uuid = "74087812-796a-5b5d-8853-05524746bad3" -version = "1.6.1" - -[[deps.RandomExtensions]] -deps = ["Random", "SparseArrays"] -git-tree-sha1 = "062986376ce6d394b23d5d90f01d81426113a3c9" -uuid = "fb686558-2515-59ef-acaa-46db3789a887" -version = "0.4.3" +version = "1.7.1" [[deps.RandomNumbers]] -deps = ["Random", "Requires"] -git-tree-sha1 = "043da614cc7e95c703498a491e2c21f58a2b8111" +deps = ["Random"] +git-tree-sha1 = "c6ec94d2aaba1ab2ff983052cf6a606ca5985902" uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" -version = "1.5.3" - -[[deps.Ratios]] -deps = ["Requires"] -git-tree-sha1 = "1342a47bf3260ee108163042310d26f2be5ec90b" -uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" -version = "0.4.5" -weakdeps = ["FixedPointNumbers"] - - [deps.Ratios.extensions] - RatiosFixedPointNumbersExt = "FixedPointNumbers" +version = "1.6.0" [[deps.RecipesBase]] deps = ["PrecompileTools"] @@ -1614,28 +1983,53 @@ git-tree-sha1 = "45cf9fd0ca5839d06ef333c8201714e888486342" uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" version = "0.6.12" +[[deps.RecurrenceRelationshipArrays]] +deps = ["ArrayLayouts", "BandedMatrices", "FillArrays", "InfiniteArrays", "LazyArrays", "LinearAlgebra", "RecurrenceRelationships"] +git-tree-sha1 = "e73ec1eec60deea31b7282cd0e09cf19d07b56bf" +uuid = "b889d2dc-af3c-4820-88a8-238fa91d3518" +version = "0.1.3" + +[[deps.RecurrenceRelationships]] +git-tree-sha1 = "aa0b5958764e974a6e8d52f5b2daf51b26ede1a2" +uuid = "807425ed-42ea-44d6-a357-6771516d7b2c" +version = "0.2.0" +weakdeps = ["FillArrays", "LazyArrays", "LinearAlgebra"] + + [deps.RecurrenceRelationships.extensions] + RecurrenceRelationshipsFillArraysExt = "FillArrays" + RecurrenceRelationshipsLazyArraysExt = "LazyArrays" + RecurrenceRelationshipsLinearAlgebraExt = "LinearAlgebra" + [[deps.RecursiveArrayTools]] -deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "Requires", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "7ed35fb5f831aaf09c2d7c8736d44667a1afdcb0" +deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "f8726bd5a8b7f5f5d3f6c0ce4793454a599b5243" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "2.38.7" +version = "3.36.0" [deps.RecursiveArrayTools.extensions] + RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" + RecursiveArrayToolsForwardDiffExt = "ForwardDiff" + RecursiveArrayToolsKernelAbstractionsExt = "KernelAbstractions" RecursiveArrayToolsMeasurementsExt = "Measurements" + RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" + RecursiveArrayToolsReverseDiffExt = ["ReverseDiff", "Zygote"] + RecursiveArrayToolsSparseArraysExt = ["SparseArrays"] + RecursiveArrayToolsStructArraysExt = "StructArrays" RecursiveArrayToolsTrackerExt = "Tracker" RecursiveArrayToolsZygoteExt = "Zygote" [deps.RecursiveArrayTools.weakdeps] + FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" -[[deps.RecursiveFactorization]] -deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "PrecompileTools", "StrideArraysCore", "TriangularSolve"] -git-tree-sha1 = "2b6d4a40339aa02655b1743f4cd7c03109f520c1" -uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" -version = "0.2.20" - [[deps.Reexport]] git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" uuid = "189a3867-3050-52da-a836-e630ba90ab69" @@ -1643,15 +2037,15 @@ version = "1.2.2" [[deps.RelocatableFolders]] deps = ["SHA", "Scratch"] -git-tree-sha1 = "90bc7a7c96410424509e4263e277e43250c05691" +git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" -version = "1.0.0" +version = "1.0.1" [[deps.Requires]] deps = ["UUIDs"] -git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.0" +version = "1.3.1" [[deps.ResettableStacks]] deps = ["StaticArrays"] @@ -1661,21 +2055,21 @@ version = "1.1.1" [[deps.Rmath]] deps = ["Random", "Rmath_jll"] -git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" +git-tree-sha1 = "852bd0f55565a9e973fcfee83a84413270224dc4" uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -version = "0.7.1" +version = "0.8.0" [[deps.Rmath_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "6ed52fdd3382cf21947b15e8870ac0ddbff736da" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "58cdd8fb2201a6267e1db87ff148dd6c1dbd8ad8" uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.4.0+0" +version = "0.5.1+0" [[deps.RootedTrees]] -deps = ["Latexify", "LinearAlgebra", "Preferences", "RecipesBase", "Requires"] -git-tree-sha1 = "dc172b0f145b0921a25b9cd48a56559f72170f10" +deps = ["LaTeXStrings", "Latexify", "LinearAlgebra", "Preferences", "RecipesBase", "Requires"] +git-tree-sha1 = "c0c464d3063e46e4128d21fd677ca575ace44fdc" uuid = "47965b36-3f3e-11e9-0dcf-4570dfd42a8c" -version = "2.19.2" +version = "2.23.1" weakdeps = ["Plots"] [deps.RootedTrees.extensions] @@ -1683,20 +2077,14 @@ weakdeps = ["Plots"] [[deps.RuntimeGeneratedFunctions]] deps = ["ExprTools", "SHA", "Serialization"] -git-tree-sha1 = "6aacc5eefe8415f47b3e34214c1d79d2674a0ba2" +git-tree-sha1 = "86a8a8b783481e1ea6b9c91dd949cb32191f8ab4" uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" -version = "0.5.12" +version = "0.5.15" [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" -[[deps.SIMD]] -deps = ["PrecompileTools"] -git-tree-sha1 = "0e270732477b9e551d884e6b07e23bb2ec947790" -uuid = "fdea26ae-647d-5447-a871-4b548cad5224" -version = "3.4.5" - [[deps.SIMDTypes]] git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" uuid = "94e857df-77ce-4151-89e5-788b33177be4" @@ -1704,20 +2092,35 @@ version = "0.1.0" [[deps.SLEEFPirates]] deps = ["IfElse", "Static", "VectorizationBase"] -git-tree-sha1 = "4b8586aece42bee682399c4c4aee95446aa5cd19" +git-tree-sha1 = "456f610ca2fbd1c14f5fcf31c6bfadc55e7d66e0" uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" -version = "0.6.39" +version = "0.6.43" [[deps.SciMLBase]] -deps = ["ADTypes", "ArrayInterface", "ChainRulesCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces", "ZygoteRules"] -git-tree-sha1 = "a1e295a85fd6fae9a7b2072dd4577001210f512d" +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] +git-tree-sha1 = "1c7fd50df465f0684f04f3a63736eac01999c659" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "1.95.0" +version = "2.107.0" [deps.SciMLBase.extensions] - ZygoteExt = "Zygote" + SciMLBaseChainRulesCoreExt = "ChainRulesCore" + SciMLBaseMLStyleExt = "MLStyle" + SciMLBaseMakieExt = "Makie" + SciMLBasePartialFunctionsExt = "PartialFunctions" + SciMLBasePyCallExt = "PyCall" + SciMLBasePythonCallExt = "PythonCall" + SciMLBaseRCallExt = "RCall" + SciMLBaseZygoteExt = ["Zygote", "ChainRulesCore"] [deps.SciMLBase.weakdeps] + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078" + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" + PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" + PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" + RCall = "6f49c342-dc21-5d91-9882-a32aef131414" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [[deps.SciMLBenchmarks]] @@ -1726,36 +2129,49 @@ git-tree-sha1 = "f4076dd5a103010d48bb6c4e50c5526f6622fa96" uuid = "31c91b34-3c75-11e9-0341-95557aab0344" version = "0.1.3" -[[deps.SciMLNLSolve]] -deps = ["DiffEqBase", "LineSearches", "NLsolve", "Reexport", "SciMLBase"] -git-tree-sha1 = "9dfc8e9e3d58c0c74f1a821c762b5349da13eccf" -uuid = "e9a6253c-8580-4d32-9898-8661bb511710" +[[deps.SciMLJacobianOperators]] +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DifferentiationInterface", "FastClosures", "LinearAlgebra", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "3414071e3458f3065de7fa5aed55283b236b4907" +uuid = "19f34311-ddf3-4b8b-af20-060888a46c0e" version = "0.1.8" [[deps.SciMLOperators]] -deps = ["ArrayInterface", "DocStringExtensions", "Lazy", "LinearAlgebra", "Setfield", "SparseArrays", "StaticArraysCore", "Tricks"] -git-tree-sha1 = "65c2e6ced6f62ea796af251eb292a0e131a3613b" +deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools"] +git-tree-sha1 = "7d3a1519dc4d433a6b20035eaff20bde8be77c66" uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "0.3.6" +version = "1.4.0" +weakdeps = ["SparseArrays", "StaticArraysCore"] + + [deps.SciMLOperators.extensions] + SciMLOperatorsSparseArraysExt = "SparseArrays" + SciMLOperatorsStaticArraysCoreExt = "StaticArraysCore" + +[[deps.SciMLStructures]] +deps = ["ArrayInterface"] +git-tree-sha1 = "566c4ed301ccb2a44cbd5a27da5f885e0ed1d5df" +uuid = "53ae85a6-f571-4167-b2af-e1d143709226" +version = "1.7.0" [[deps.Scratch]] deps = ["Dates"] -git-tree-sha1 = "30449ee12237627992a99d5e30ae63e4d78cd24a" +git-tree-sha1 = "9b81b8393e50b7d4e6d0a9f14e192294d3b7c109" uuid = "6c6a2e73-6563-6170-7368-637461726353" -version = "1.2.0" +version = "1.3.0" + +[[deps.SemiseparableMatrices]] +deps = ["ArrayLayouts", "BandedMatrices", "BlockBandedMatrices", "LazyArrays", "LinearAlgebra", "MatrixFactorizations"] +git-tree-sha1 = "8e0d84d11d183c550084f6da61a4d613ff99da1f" +uuid = "f8ebbe35-cbfb-4060-bf7f-b10e4670cf57" +version = "0.4.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" [[deps.Setfield]] deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] -git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" +git-tree-sha1 = "c5391c6ace3bc430ca630251d02ea9687169ca68" uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" -version = "1.1.1" - -[[deps.SharedArrays]] -deps = ["Distributed", "Mmap", "Random", "Serialization"] -uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" +version = "1.1.2" [[deps.Showoff]] deps = ["Dates", "Grisu"] @@ -1764,39 +2180,33 @@ uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" version = "1.0.3" [[deps.SimpleBufferStream]] -git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +git-tree-sha1 = "f305871d2f381d21527c770d4788c06c097c9bc1" uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" -version = "1.1.0" +version = "1.2.0" [[deps.SimpleNonlinearSolve]] -deps = ["ArrayInterface", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Reexport", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "20aa9831d654bab67ed561e78917047143ecb9bf" +deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "Setfield", "StaticArraysCore"] +git-tree-sha1 = "09d986e27a606f172c5b6cffbd8b8b2f10bf1c75" uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" -version = "0.1.19" +version = "2.7.0" [deps.SimpleNonlinearSolve.extensions] - SimpleNonlinearSolveNNlibExt = "NNlib" + SimpleNonlinearSolveChainRulesCoreExt = "ChainRulesCore" + SimpleNonlinearSolveDiffEqBaseExt = "DiffEqBase" + SimpleNonlinearSolveReverseDiffExt = "ReverseDiff" + SimpleNonlinearSolveTrackerExt = "Tracker" [deps.SimpleNonlinearSolve.weakdeps] - NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" - -[[deps.SimpleTraits]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" -uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" -version = "0.9.4" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" [[deps.SimpleUnPack]] git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" version = "1.1.0" -[[deps.SnoopPrecompile]] -deps = ["Preferences"] -git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.3" - [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" @@ -1808,57 +2218,58 @@ version = "1.1.0" [[deps.SortingAlgorithms]] deps = ["DataStructures"] -git-tree-sha1 = "c60ec5c62180f27efea3ba2908480f8055e17cee" +git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085" uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.1.1" +version = "1.2.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" -[[deps.SparseDiffTools]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "UnPack", "VertexSafeGraphs"] -git-tree-sha1 = "b3eb6747277d9919f5527ad9053f6d2fb1166516" -uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" -version = "2.5.1" - - [deps.SparseDiffTools.extensions] - SparseDiffToolsEnzymeExt = "Enzyme" - SparseDiffToolsSymbolicsExt = "Symbolics" - SparseDiffToolsZygoteExt = "Zygote" +[[deps.SparseMatrixColorings]] +deps = ["ADTypes", "DocStringExtensions", "LinearAlgebra", "PrecompileTools", "Random", "SparseArrays"] +git-tree-sha1 = "9de43e0b9b976f1019bf7a879a686c4514520078" +uuid = "0a514795-09f3-496d-8182-132a7b665d35" +version = "0.4.21" - [deps.SparseDiffTools.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + [deps.SparseMatrixColorings.extensions] + SparseMatrixColoringsCUDAExt = "CUDA" + SparseMatrixColoringsCliqueTreesExt = "CliqueTrees" + SparseMatrixColoringsColorsExt = "Colors" -[[deps.Sparspak]] -deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] -git-tree-sha1 = "342cf4b449c299d8d1ceaf00b7a49f4fbc7940e7" -uuid = "e56a9233-b9d6-4f03-8d0f-1825330902ac" -version = "0.3.9" + [deps.SparseMatrixColorings.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" +git-tree-sha1 = "41852b8679f78c8d8961eeadc8f62cef861a52e3" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.3.1" +version = "2.5.1" weakdeps = ["ChainRulesCore"] [deps.SpecialFunctions.extensions] SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" +[[deps.StableRNGs]] +deps = ["Random"] +git-tree-sha1 = "95af145932c2ed859b63329952ce8d633719f091" +uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" +version = "1.0.3" + [[deps.Static]] -deps = ["IfElse"] -git-tree-sha1 = "f295e0a1da4ca425659c57441bcb59abb035a4bc" +deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools"] +git-tree-sha1 = "f737d444cb0ad07e61b3c1bef8eb91203c321eff" uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "0.8.8" +version = "1.2.0" [[deps.StaticArrayInterface]] -deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Requires", "SparseArrays", "Static", "SuiteSparse"] -git-tree-sha1 = "03fec6800a986d191f64f5c0996b59ed526eda25" +deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Static"] +git-tree-sha1 = "96381d50f1ce85f2663584c8e886a6ca97e60554" uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" -version = "1.4.1" +version = "1.8.0" weakdeps = ["OffsetArrays", "StaticArrays"] [deps.StaticArrayInterface.extensions] @@ -1866,56 +2277,54 @@ weakdeps = ["OffsetArrays", "StaticArrays"] StaticArrayInterfaceStaticArraysExt = "StaticArrays" [[deps.StaticArrays]] -deps = ["LinearAlgebra", "Random", "StaticArraysCore"] -git-tree-sha1 = "9cabadf6e7cd2349b6cf49f1915ad2028d65e881" +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "cbea8a6bd7bed51b1619658dec70035e07b8502f" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.6.2" -weakdeps = ["Statistics"] +version = "1.9.14" +weakdeps = ["ChainRulesCore", "Statistics"] [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] -git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" +git-tree-sha1 = "192954ef1208c7019899fbf8049e717f92959682" uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.2" +version = "1.4.3" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.9.0" +version = "1.10.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] -git-tree-sha1 = "45a7769a04a3cf80da1c1c7c60caf932e6f4c9f7" +git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.6.0" +version = "1.7.1" [[deps.StatsBase]] -deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "75ebe04c5bed70b91614d684259b661c9e6274a4" +deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "b81c5035922cc89c2d9523afc6c54be512411466" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.0" +version = "0.34.5" [[deps.StatsFuns]] deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a" +git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.3.0" +version = "1.5.0" +weakdeps = ["ChainRulesCore", "InverseFunctions"] [deps.StatsFuns.extensions] StatsFunsChainRulesCoreExt = "ChainRulesCore" StatsFunsInverseFunctionsExt = "InverseFunctions" - [deps.StatsFuns.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - [[deps.StrideArraysCore]] -deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] -git-tree-sha1 = "f02eb61eb5c97b48c153861c72fbbfdddc607e06" +deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] +git-tree-sha1 = "f35f6ab602df8413a50c4a25ca14de821e8605fb" uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" -version = "0.4.17" +version = "0.5.7" [[deps.StringEncodings]] deps = ["Libiconv_jll"] @@ -1923,50 +2332,79 @@ git-tree-sha1 = "b765e46ba27ecf6b44faf70df40c57aa3a547dcb" uuid = "69024149-9ee7-55f6-a4c4-859efe599b68" version = "0.3.7" +[[deps.StringManipulation]] +deps = ["PrecompileTools"] +git-tree-sha1 = "725421ae8e530ec29bcbdddbe91ff8053421d023" +uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" +version = "0.4.1" + +[[deps.StructArrays]] +deps = ["ConstructionBase", "DataAPI", "Tables"] +git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.7.1" + + [deps.StructArrays.extensions] + StructArraysAdaptExt = "Adapt" + StructArraysGPUArraysCoreExt = ["GPUArraysCore", "KernelAbstractions"] + StructArraysLinearAlgebraExt = "LinearAlgebra" + StructArraysSparseArraysExt = "SparseArrays" + StructArraysStaticArraysExt = "StaticArrays" + + [deps.StructArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + [[deps.SuiteSparse]] deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+6" +version = "7.2.1+1" + +[[deps.SummationByPartsOperators]] +deps = ["ArgCheck", "AutoHashEquals", "FFTW", "InteractiveUtils", "LinearAlgebra", "LoopVectorization", "MuladdMacro", "PolynomialBases", "PrecompileTools", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SimpleUnPack", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Unrolled"] +git-tree-sha1 = "85c82b92d94264d5376bebf96226bea5ca4e2716" +uuid = "9f78cca6-572e-554e-b819-917d2f1cf240" +version = "0.5.81" + + [deps.SummationByPartsOperators.extensions] + SummationByPartsOperatorsBandedMatricesExt = "BandedMatrices" + SummationByPartsOperatorsDiffEqCallbacksExt = "DiffEqCallbacks" + SummationByPartsOperatorsForwardDiffExt = "ForwardDiff" + SummationByPartsOperatorsOptimForwardDiffExt = ["Optim", "ForwardDiff"] + SummationByPartsOperatorsStructArraysExt = "StructArrays" + + [deps.SummationByPartsOperators.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + Optim = "429524aa-4258-5aef-a3af-852621145aeb" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" [[deps.Sundials]] deps = ["CEnum", "DataStructures", "DiffEqBase", "Libdl", "LinearAlgebra", "Logging", "PrecompileTools", "Reexport", "SciMLBase", "SparseArrays", "Sundials_jll"] -git-tree-sha1 = "4931f9013c53128337ce8df54a2d38c79fe58d4c" +git-tree-sha1 = "7c7a7ee705724b3c80d5451ac49779db36c6f758" uuid = "c3572dad-4567-51f8-b174-8c6c989267f4" -version = "4.19.3" +version = "4.28.0" [[deps.Sundials_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "OpenBLAS_jll", "Pkg", "SuiteSparse_jll"] -git-tree-sha1 = "04777432d74ec5bc91ca047c9e0e0fd7f81acdb6" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "SuiteSparse_jll", "libblastrampoline_jll"] +git-tree-sha1 = "ba4d38faeb62de7ef47155ed321dce40a549c305" uuid = "fb77eaff-e24c-56d4-86b1-d163f2edb164" -version = "5.2.1+0" +version = "5.2.2+0" [[deps.SymbolicIndexingInterface]] -deps = ["DocStringExtensions"] -git-tree-sha1 = "f8ab052bfcbdb9b48fad2c80c873aa0d0344dfe5" +deps = ["Accessors", "ArrayInterface", "PrettyTables", "RuntimeGeneratedFunctions", "StaticArraysCore"] +git-tree-sha1 = "59ca6eddaaa9849e7de9fd1153b6faf0b1db7b80" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.2.2" - -[[deps.SymbolicUtils]] -deps = ["AbstractTrees", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "IfElse", "LabelledArrays", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "TimerOutputs", "Unityper"] -git-tree-sha1 = "9704a1d0ecbbf5d65700418dcf1bb4c680c790bb" -uuid = "d1185830-fcd6-423d-90d6-eec64667417b" -version = "1.2.0" - -[[deps.Symbolics]] -deps = ["ArrayInterface", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "Groebner", "IfElse", "LaTeXStrings", "LambertW", "Latexify", "Libdl", "LinearAlgebra", "MacroTools", "Markdown", "NaNMath", "RecipesBase", "Reexport", "Requires", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicUtils", "TreeViews"] -git-tree-sha1 = "f1d43a0dbb553890195e49fb599ea51d0e97a5ef" -uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" -version = "5.5.1" - - [deps.Symbolics.extensions] - SymbolicsSymPyExt = "SymPy" - - [deps.Symbolics.weakdeps] - SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" +version = "0.3.42" [[deps.TOML]] deps = ["Dates"] @@ -1980,10 +2418,10 @@ uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" version = "1.0.1" [[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] -git-tree-sha1 = "1544b926975372da01227b382066ab70e574a3ec" +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "f2c1efbc8f3a609aadf318094f8fc5204bdaf344" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.10.1" +version = "1.12.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] @@ -1996,64 +2434,42 @@ git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" version = "0.1.1" -[[deps.TermInterface]] -git-tree-sha1 = "3939db0ce564b5fda6e9f9edcb4dabe0a1a0cc5f" -uuid = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c" -version = "0.3.3" - [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[deps.ThreadingUtilities]] deps = ["ManualMemory"] -git-tree-sha1 = "eda08f7e9818eb53661b3deb74e3159460dfbc27" +git-tree-sha1 = "d969183d3d244b6c33796b5ed01ab97328f2db85" uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" -version = "0.5.2" +version = "0.5.5" [[deps.TimerOutputs]] deps = ["ExprTools", "Printf"] -git-tree-sha1 = "f548a9e9c490030e545f72074a41edfd0e5bcdd7" +git-tree-sha1 = "3748bd928e68c7c346b52125cf41fff0de6937d0" uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -version = "0.5.23" +version = "0.5.29" + + [deps.TimerOutputs.extensions] + FlameGraphsExt = "FlameGraphs" + + [deps.TimerOutputs.weakdeps] + FlameGraphs = "08572546-2f56-4bcf-ba4e-bab62c3a3f89" [[deps.ToeplitzMatrices]] deps = ["AbstractFFTs", "DSP", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "a097662c0fd28143bb714e4527ac2dcb7520212e" +git-tree-sha1 = "338d725bd62115be4ba7ffa891d85654e0bfb1a1" uuid = "c751599d-da0a-543b-9d20-d0a503d91d24" -version = "0.8.2" +version = "0.8.5" weakdeps = ["StatsBase"] [deps.ToeplitzMatrices.extensions] ToeplitzMatricesStatsBaseExt = "StatsBase" -[[deps.Tokenize]] -git-tree-sha1 = "90538bf898832b6ebd900fa40f223e695970e3a5" -uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624" -version = "0.5.25" - [[deps.TranscodingStreams]] -deps = ["Random", "Test"] -git-tree-sha1 = "9a6ae7ed916312b41236fcef7e0af564ef934769" +git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.9.13" - -[[deps.TreeViews]] -deps = ["Test"] -git-tree-sha1 = "8d0d7a3fe2f30d6a7f833a5f19f7c7a5b396eae6" -uuid = "a2a6695c-b41b-5b7d-aed9-dbfdeacea5d7" -version = "0.3.0" - -[[deps.TriangularSolve]] -deps = ["CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "LoopVectorization", "Polyester", "Static", "VectorizationBase"] -git-tree-sha1 = "31eedbc0b6d07c08a700e26d31298ac27ef330eb" -uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" -version = "0.1.19" - -[[deps.Tricks]] -git-tree-sha1 = "aadb748be58b492045b4f56166b5188aa63ce549" -uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.7" +version = "0.11.3" [[deps.TruncatedStacktraces]] deps = ["InteractiveUtils", "MacroTools", "Preferences"] @@ -2062,9 +2478,9 @@ uuid = "781d530d-4396-4725-bb49-402e4bee1e77" version = "1.4.0" [[deps.URIs]] -git-tree-sha1 = "b7a5e99f24892b6824a954199a45e9ffcc1c70f0" +git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.5.0" +version = "1.6.1" [[deps.UUIDs]] deps = ["Random", "SHA"] @@ -2086,28 +2502,27 @@ version = "0.4.1" [[deps.Unitful]] deps = ["Dates", "LinearAlgebra", "Random"] -git-tree-sha1 = "a72d22c7e13fe2de562feda8645aa134712a87ee" +git-tree-sha1 = "6258d453843c466d84c17a58732dda5deeb8d3af" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.17.0" +version = "1.24.0" +weakdeps = ["ConstructionBase", "ForwardDiff", "InverseFunctions", "Printf"] [deps.Unitful.extensions] ConstructionBaseUnitfulExt = "ConstructionBase" + ForwardDiffExt = "ForwardDiff" InverseFunctionsUnitfulExt = "InverseFunctions" - - [deps.Unitful.weakdeps] - ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + PrintfExt = "Printf" [[deps.UnitfulLatexify]] deps = ["LaTeXStrings", "Latexify", "Unitful"] -git-tree-sha1 = "e2d817cc500e960fdbafcf988ac8436ba3208bfd" +git-tree-sha1 = "af305cc62419f9bd61b6644d19170a4d258c7967" uuid = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" -version = "1.6.3" +version = "1.7.0" -[[deps.Unityper]] -deps = ["ConstructionBase"] -git-tree-sha1 = "21c8fc7cd598ef49f11bc9e94871f5d7740e34b9" -uuid = "a7c27f48-0311-42f6-a7f8-2c11e75eb415" +[[deps.Unrolled]] +deps = ["MacroTools"] +git-tree-sha1 = "6cc9d682755680e0f0be87c56392b7651efc2c7b" +uuid = "9602ed7d-8fef-5bc8-8597-8f21381861e8" version = "0.1.5" [[deps.Unzip]] @@ -2117,32 +2532,26 @@ version = "0.2.0" [[deps.VectorizationBase]] deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "b182207d4af54ac64cbc71797765068fdeff475d" +git-tree-sha1 = "4ab62a49f1d8d9548a1c8d1a75e5f55cf196f64e" uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" -version = "0.21.64" +version = "0.21.71" [[deps.VersionParsing]] git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" version = "1.3.0" -[[deps.VertexSafeGraphs]] -deps = ["Graphs"] -git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" -uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" -version = "0.2.0" +[[deps.Vulkan_Loader_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] +git-tree-sha1 = "2f0486047a07670caad3a81a075d2e518acc5c59" +uuid = "a44049a8-05dd-5a78-86c9-5fde0876e88c" +version = "1.3.243+0" [[deps.Wayland_jll]] -deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "ed8d92d9774b077c53e1da50fd81a36af3744c1c" +deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll"] +git-tree-sha1 = "96478df35bbc2f3e1e791bc7a3d0eeee559e60e9" uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -version = "1.21.0+0" - -[[deps.Wayland_protocols_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "4528479aa01ee1b3b4cd0e6faef0e04cf16466da" -uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" -version = "1.25.0+0" +version = "1.24.0+0" [[deps.Weave]] deps = ["Base64", "Dates", "Highlights", "JSON", "Markdown", "Mustache", "Pkg", "Printf", "REPL", "RelocatableFolders", "Requires", "Serialization", "YAML"] @@ -2150,262 +2559,286 @@ git-tree-sha1 = "092217eb5443926d200ae9325f103906efbb68b1" uuid = "44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9" version = "0.10.12" -[[deps.WoodburyMatrices]] -deps = ["LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3" -uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" -version = "0.5.5" - -[[deps.XML2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "04a51d15436a572301b5abbb9d099713327e9fc4" -uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.10.4+0" - -[[deps.XSLT_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" -uuid = "aed1982a-8fda-507f-9586-7b0439959a61" -version = "1.1.34+0" - [[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "cf2c7de82431ca6f39250d2fc4aacd0daa1675c0" +git-tree-sha1 = "fee71455b0aaa3440dfdd54a9a36ccef829be7d4" uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -version = "5.4.4+0" +version = "5.8.1+0" + +[[deps.Xorg_libICE_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "a3ea76ee3f4facd7a64684f9af25310825ee3668" +uuid = "f67eecfb-183a-506d-b269-f58e52b52d7c" +version = "1.1.2+0" + +[[deps.Xorg_libSM_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libICE_jll"] +git-tree-sha1 = "9c7ad99c629a44f81e7799eb05ec2746abb5d588" +uuid = "c834827a-8449-5923-a945-d239c165b7dd" +version = "1.2.6+0" [[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] -git-tree-sha1 = "afead5aba5aa507ad5a3bf01f58f82c8d1403495" +git-tree-sha1 = "b5899b25d17bf1889d25906fb9deed5da0c15b3b" uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" -version = "1.8.6+0" +version = "1.8.12+0" [[deps.Xorg_libXau_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6035850dcc70518ca32f012e46015b9beeda49d8" +git-tree-sha1 = "aa1261ebbac3ccc8d16558ae6799524c450ed16b" uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" -version = "1.0.11+0" +version = "1.0.13+0" [[deps.Xorg_libXcursor_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "6c74ca84bbabc18c4547014765d194ff0b4dc9da" uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" -version = "1.2.0+4" +version = "1.2.4+0" [[deps.Xorg_libXdmcp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "34d526d318358a859d7de23da945578e8e8727b7" +git-tree-sha1 = "52858d64353db33a56e13c341d7bf44cd0d7b309" uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" -version = "1.1.4+0" +version = "1.1.6+0" [[deps.Xorg_libXext_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "a4c0ee07ad36bf8bbce1c3bb52d21fb1e0b987fb" uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" -version = "1.3.4+4" +version = "1.3.7+0" [[deps.Xorg_libXfixes_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "9caba99d38404b285db8801d5c45ef4f4f425a6d" uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" -version = "5.0.3+4" +version = "6.0.1+0" [[deps.Xorg_libXi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] -git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "a376af5c7ae60d29825164db40787f15c80c7c54" uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" -version = "1.7.10+4" +version = "1.8.3+0" [[deps.Xorg_libXinerama_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] -git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll"] +git-tree-sha1 = "a5bc75478d323358a90dc36766f3c99ba7feb024" uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" -version = "1.1.4+4" +version = "1.1.6+0" [[deps.Xorg_libXrandr_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "aff463c82a773cb86061bce8d53a0d976854923e" uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" -version = "1.5.2+4" +version = "1.5.5+0" [[deps.Xorg_libXrender_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] -git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "7ed9347888fac59a618302ee38216dd0379c480d" uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" -version = "0.9.10+4" - -[[deps.Xorg_libpthread_stubs_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "8fdda4c692503d44d04a0603d9ac0982054635f9" -uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" -version = "0.1.1+0" +version = "0.9.12+0" [[deps.Xorg_libxcb_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] -git-tree-sha1 = "b4bfde5d5b652e22b9c790ad00af08b6d042b97d" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXau_jll", "Xorg_libXdmcp_jll"] +git-tree-sha1 = "bfcaf7ec088eaba362093393fe11aa141fa15422" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.15.0+0" +version = "1.17.1+0" [[deps.Xorg_libxkbfile_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "730eeca102434283c50ccf7d1ecdadf521a765a4" +git-tree-sha1 = "e3150c7400c41e207012b41659591f083f3ef795" uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" -version = "1.1.2+0" +version = "1.1.3+0" + +[[deps.Xorg_xcb_util_cursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_jll", "Xorg_xcb_util_renderutil_jll"] +git-tree-sha1 = "c5bf2dad6a03dfef57ea0a170a1fe493601603f2" +uuid = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" +version = "0.1.5+0" [[deps.Xorg_xcb_util_image_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "f4fc02e384b74418679983a97385644b67e1263b" uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] -git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll"] +git-tree-sha1 = "68da27247e7d8d8dafd1fcf0c3654ad6506f5f97" uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_keysyms_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "44ec54b0e2acd408b0fb361e1e9244c60c9c3dd4" uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_renderutil_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "5b0263b6d080716a02544c55fdff2c8d7f9a16a0" uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" -version = "0.3.9+1" +version = "0.3.10+0" [[deps.Xorg_xcb_util_wm_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "f233c83cad1fa0e70b7771e0e21b061a116f2763" uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" -version = "0.4.1+1" +version = "0.4.2+0" [[deps.Xorg_xkbcomp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] -git-tree-sha1 = "330f955bc41bb8f5270a369c473fc4a5a4e4d3cb" +git-tree-sha1 = "801a858fc9fb90c11ffddee1801bb06a738bda9b" uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" -version = "1.4.6+0" +version = "1.4.7+0" [[deps.Xorg_xkeyboard_config_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] -git-tree-sha1 = "691634e5453ad362044e2ad653e79f3ee3bb98c3" +git-tree-sha1 = "00af7ebdc563c9217ecc67776d1bbf037dbcebf4" uuid = "33bec58e-1273-512f-9401-5d533626f822" -version = "2.39.0+0" +version = "2.44.0+0" [[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e92a1a012a10506618f10b7047e478403a046c77" +git-tree-sha1 = "a63799ff68005991f9d9491b6e95bd3478d783cb" uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" -version = "1.5.0+0" +version = "1.6.0+0" [[deps.YAML]] deps = ["Base64", "Dates", "Printf", "StringEncodings"] -git-tree-sha1 = "e6330e4b731a6af7959673621e91645eb1356884" +git-tree-sha1 = "2f58ac39f64b41fb812340347525be3b590cce3b" uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" -version = "0.4.9" +version = "0.4.14" [[deps.ZMQ]] -deps = ["FileWatching", "Sockets", "ZeroMQ_jll"] -git-tree-sha1 = "356d2bdcc0bce90aabee1d1c0f6d6f301eda8f77" +deps = ["FileWatching", "PrecompileTools", "Sockets", "ZeroMQ_jll"] +git-tree-sha1 = "2d060e1f014c07561817bf6f3c0eb66b309e04bd" uuid = "c2297ded-f4af-51ae-bb23-16f91089e4e1" -version = "1.2.2" +version = "1.4.1" [[deps.ZeroMQ_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "libsodium_jll"] -git-tree-sha1 = "fe5c65a526f066fb3000da137d5785d9649a8a47" +deps = ["Artifacts", "JLLWrappers", "Libdl", "libsodium_jll"] +git-tree-sha1 = "766d90db2817565b667c1cc9cc420d668f2e8dba" uuid = "8f1865be-045e-5c20-9c9f-bfbfb0764568" -version = "4.3.4+0" +version = "4.3.6+0" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" +version = "1.2.13+1" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "49ce682769cd5de6c72dcf1b94ed7790cd08974c" +git-tree-sha1 = "446b23e73536f84e8037f5dce465e92275f6a308" uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" -version = "1.5.5+0" +version = "1.5.7+1" -[[deps.ZygoteRules]] -deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "977aed5d006b840e2e40c0b48984f7463109046d" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.3" +[[deps.eudev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c3b0e6196d50eab0c5ed34021aaa0bb463489510" +uuid = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" +version = "3.2.14+0" [[deps.fzf_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "868e669ccb12ba16eaf50cb2957ee2ff61261c56" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b6a34e0e0960190ac2a4363a1bd003504772d631" uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" -version = "0.29.0+0" +version = "0.61.1+0" [[deps.libaom_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "4bba74fa59ab0755167ad24f98800fe5d727175b" uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" -version = "3.4.0+0" +version = "3.12.1+0" [[deps.libass_jll]] -deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "125eedcb0a4a0bba65b657251ce1d27c8714e9d6" uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" -version = "0.15.1+0" +version = "0.17.4+0" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+0" +version = "5.11.0+0" + +[[deps.libdecor_jll]] +deps = ["Artifacts", "Dbus_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pango_jll", "Wayland_jll", "xkbcommon_jll"] +git-tree-sha1 = "9bf7903af251d2050b467f76bdbe57ce541f7f4f" +uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" +version = "0.2.2+0" + +[[deps.libevdev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "56d643b57b188d30cccc25e331d416d3d358e557" +uuid = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" +version = "1.13.4+0" [[deps.libfdk_aac_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "646634dd19587a56ee2f1199563ec056c5f228df" uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" -version = "2.0.2+0" +version = "2.0.4+0" + +[[deps.libinput_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "eudev_jll", "libevdev_jll", "mtdev_jll"] +git-tree-sha1 = "91d05d7f4a9f67205bd6cf395e488009fe85b499" +uuid = "36db933b-70db-51c0-b978-0f229ee0e533" +version = "1.28.1+0" [[deps.libpng_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] -git-tree-sha1 = "94d180a6d2b5e55e447e2d27a29ed04fe79eb30c" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "07b6a107d926093898e82b3b1db657ebe33134ec" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.38+0" +version = "1.6.50+0" [[deps.libsodium_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "848ab3d00fe39d6fbc2a8641048f8f272af1c51e" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "011b0a7331b41c25524b64dc42afc9683ee89026" uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8" -version = "1.0.20+0" +version = "1.0.21+0" [[deps.libvorbis_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] -git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll"] +git-tree-sha1 = "11e1772e7f3cc987e9d3de991dd4f6b2602663a5" uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" -version = "1.3.7+1" +version = "1.3.8+0" + +[[deps.mtdev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b4d631fd51f2e9cdd93724ae25b2efc198b059b1" +uuid = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" +version = "1.1.7+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.52.0+1" + +[[deps.oneTBB_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "d5a767a3bb77135a99e433afe0eb14cd7f6914c3" +uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" +version = "2022.0.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" [[deps.x264_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "14cc7083fc6dff3cc44f2bc435ee96d06ed79aa7" uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" -version = "2021.5.5+0" +version = "10164.0.1+0" [[deps.x265_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "e7b67590c14d487e734dcb925924c5dc43ec85f3" uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" -version = "3.5.0+0" +version = "4.1.0+0" [[deps.xkbcommon_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] -git-tree-sha1 = "9ebfc140cc56e8c2156a15ceac2f0302e327ac0a" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "fbf139bce07a534df0e699dbb5f5cc9346f95cc1" uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" -version = "1.4.1+0" +version = "1.9.2+0" diff --git a/benchmarks/SimpleHandwrittenPDE/Project.toml b/benchmarks/SimpleHandwrittenPDE/Project.toml index 44f95075a..ffdfc82c8 100644 --- a/benchmarks/SimpleHandwrittenPDE/Project.toml +++ b/benchmarks/SimpleHandwrittenPDE/Project.toml @@ -1,30 +1,25 @@ [deps] -ApproxFun = "28f2ccd6-bb30-5033-b560-165f7b14dc2f" +ClassicalOrthogonalPolynomials = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd" DiffEqDevTools = "f3b72e0c-5b89-59e1-b016-84e28bfd966d" -DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" LSODA = "7f56f5a3-f504-529b-bc02-0b1fe5e64312" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -MethodOfLines = "94925ecb-adb7-4558-8ed8-f975c56a0bf4" -ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" -ODEInterfaceDiffEq = "09606e27-ecf5-54fc-bb29-004bd9f985bf" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" SciMLBenchmarks = "31c91b34-3c75-11e9-0341-95557aab0344" +SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" +SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +SummationByPartsOperators = "9f78cca6-572e-554e-b819-917d2f1cf240" Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" [compat] -ApproxFun = "0.13" +ClassicalOrthogonalPolynomials = "0.15" DiffEqDevTools = "2.22" -DomainSets = "0.6, 0.7" +LinearSolve = "3" LSODA = "0.6, 0.7" -LinearSolve = "2, 3" -MethodOfLines = "0.9" -ModelingToolkit = "8, 10" -ODEInterfaceDiffEq = "3.7" -OrdinaryDiffEq = "5.41, 6" +OrdinaryDiffEq = "6" Plots = "1.4" -RecursiveFactorization = "0.2.23" SciMLBenchmarks = "0.1" +SciMLOperators = "1" +SummationByPartsOperators = "0.5" Sundials = "4.2" diff --git a/benchmarks/SimpleHandwrittenPDE/allen_cahn_fdm_wpd.jmd b/benchmarks/SimpleHandwrittenPDE/allen_cahn_fdm_wpd.jmd index b2de3efee..33b124544 100644 --- a/benchmarks/SimpleHandwrittenPDE/allen_cahn_fdm_wpd.jmd +++ b/benchmarks/SimpleHandwrittenPDE/allen_cahn_fdm_wpd.jmd @@ -1,236 +1,272 @@ --- -title: Allen_Cahn FDM Work-Precision Diagrams -author: HAO HAO +title: Allen-Cahn Finite-Difference Method Work-Precision Diagrams +author: Arjit Seth --- -```julia -using ApproxFun, OrdinaryDiffEq, Sundials, LinearSolve -using DiffEqDevTools -using LinearAlgebra, RecursiveFactorization -using Plots; gr() +## Problem Description + +The Allen-Cahn partial differential equation is solved on the domain $[-L, L] \times [0, T] \in \mathbb R \times R,~L = 2,~T = 1$, with the following initial and Dirichlet boundary conditions: +```math +\begin{align} + \partial_t u(t,x) & = p(u(t,x) - u(t,x)^3) + \epsilon \partial_x^2 u(t,x), \\ + u(0,x) & = \cos(2\pi x), \\ + u(t,-L) & = u(t,L) = 0. +\end{align} +``` +The spatial derivative operators are represented via finite difference approximations on an equispaced grid of points $x_s \in [-L, L]$. The coefficients $p = 3,~\epsilon = 10^{-3}$ are chosen to produce `interesting' behavior as seen in the reference solution below. +```math +\begin{align} + \frac{du}{dt} & = p(u - u^3) + \epsilon D_x^2 u, \\ + u(0,x_s) & = \cos(2\pi x_s), \\ + u(t,-L) & = u(t,L) = 0. +\end{align} ``` -Here is the Burgers equation using FDM. +### Implementation ```julia -# Define the linear and nonlinear terms -function lin_term(N) - dx = 1/(N + 1) - du = 1/2 * ones(N - 1) # super diagonal - dl = -1/2 * ones(N - 1) # lower diagonal - DiffEqArrayOperator(0.01*(1/dx) * diagm(-1 => dl, 1 => du)) -end +using OrdinaryDiffEq +using DiffEqDevTools +using SciMLOperators +using LinearSolve +using LinearAlgebra +using SparseArrays +using Sundials +using SummationByPartsOperators +const SBP = SummationByPartsOperators +using Plots +gr(); +``` -function nl_term(N) - function (du,u,p,t) - du .= u .- u.^3 - end +```julia +# Nonlinear term: u - u^3 +function forcing_term(du, u, p, t) + du .= p * @. (u - u^3) + # Apply boundary conditions (ghost cells) + du[1] = 0.0 + du[end] = 0.0 end # Construct the problem -function allen_cahn(N) - f1 = lin_term(N) - f2 = nl_term(N) - dx = 1 / (N + 1) - xs = (1:N) * dx - - f0 = x -> .53*x + .47*sin(-1.5*pi*x) - x - u0 = f0.(xs) - prob = SplitODEProblem(f1, f2, u0, (0.0, 1.0)) - xs, prob +function allen_cahn(N, L) + # Linear and nonlinear terms + eps = 1e-3 # Diffusion coefficient + D2 = derivative_operator(MattssonSvärdNordström2004(); + derivative_order = 2, accuracy_order = 2, + xmin = -L, xmax = L, N = N) + + x = LinRange(-L, L, N) # Domain discretization + u0 = @. cos(2π * x) # Initial condition + p = 3.0 # Nonlinear coefficient + + prob = SplitODEProblem(MatrixOperator(eps * sparse(D2)), forcing_term, u0, (0.0, 1.0), p) + + x, prob end; ``` -Reference solution using Vern9 is below: +### Reference Solution ```julia -xs, prob = allen_cahn(100) -sol = solve(prob, RadauIIA5(autodiff=false); abstol=1e-14, reltol=1e-14, dt=1e-4, adaptive=false) -test_sol = TestSolution(sol); - -tslices = [0.0 0.25 0.50 0.75 1.] -ys = hcat((sol(t) for t in tslices)...) -labels = ["t = $t" for t in tslices] -plot(xs, ys, label=labels) -``` +N = 128 # Number of grid points +L = 2.0 # Domain length +xs, prob = allen_cahn(N, L) +@time sol = solve(prob, AutoVern7(RadauIIA5(autodiff=false)); dt=1e-2, abstol=1e-14, reltol=1e-14, adaptive=true) -Linear solvers +test_sol = TestSolution(sol) # Reference solution for error estimation -```julia -const LS_Dense = LinSolveFactorize(lu) +tslices = LinRange(prob.tspan..., 50) +ys = mapreduce(sol, hcat, tslices) +plt = heatmap(xs, tslices, ys', xlabel="x", ylabel="t") ``` -## High tolerances +## Work-Precision Diagrams -## In-family comparisons +### High Tolerances -1.IMEX methods (dense linear solver) +#### Implicit-Explicit Methods ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), - Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), - Dict(:alg => SBDF2(), :dts => 1e-3 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, dense linsolve, low order") +setups = [ + Dict(:alg => IMEXEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), + Dict(:alg => SBDF2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "IMEXEuler", + "CNAB2", + "CNLF2", + "SBDF2", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Work-Precision Diagram, High Tolerance") ``` -1.IMEX methods (Krylov linear solver) +#### Exponential Integrators ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(linsolve=KrylovJL_GMRES()), :dts => 1e-3 * multipliers), - Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), - Dict(:alg => CNLF2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), - Dict(:alg => SBDF2(linsolve=KrylovJL_GMRES()), :dts => 1e-3 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, Krylov linsolve, low order") +setups = [ + Dict(:alg => NorsettEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-3 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-3 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-3 * multipliers) +] +labels = hcat( + "NorsettEuler (caching)", + "NorsettEuler (m=5)", + "NorsettEuler (m=20)", + "ETDRK2 (caching)", + "ETDRK2 (m=5)", + "ETDRK2 (m=20)" +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, High Tolerance") ``` -2. ExpRK methods +#### Comparisons Between Families ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => NorsettEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-3 * multipliers), - Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-3 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-3 * multipliers), - Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-2 * multipliers)] -labels = hcat("NorsettEuler (caching)", "NorsettEuler (m=5)", "NorsettEuler (m=20)", - "ETDRK2 (caching)", "ETDRK2 (m=5)", "ETDRK2 (m=20)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="ExpRK methods, low order") +setups = [ + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), + Dict(:alg => Tsit5(), :dts => 1e-5 * multipliers), +] +labels = hcat( + "CNAB2 (dense linsolve)", + "CNAB2 (Krylov linsolve)", + "ETDRK2 (caching)", + "Tsit5", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, High Tolerances") ``` -## Between family comparisons - -```julia -abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much -reltols = 0.1 .^ (1:4) -multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), - Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-3 * multipliers)] -labels = ["CNAB2 (dense linsolve)" "CNAB2 (Krylov linsolve)" "ETDRK2 (m=5)"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="Between family, low orders") -``` -## Low tolerances +### Low Tolerances -## In-family comparisons +#### Implicit-Explicit Methods -1.IMEX methods (dense linear solver) +Dense/banded linear solvers. ```julia abstols = 0.1 .^ (7:13) reltols = 0.1 .^ (4:10) -setups = [Dict(:alg => KenCarp3()), - Dict(:alg => KenCarp4()), - Dict(:alg => KenCarp5()), - Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Dense)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Dense)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Dense))] -labels = hcat("KenCarp3", "KenCarp4", "KenCarp5", "ARKODE3", "ARKODE4", "ARKODE5") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, dense linsolve, medium order") +setups = [ + Dict(:alg => KenCarp3()), + Dict(:alg => KenCarp4()), + Dict(:alg => KenCarp5()), + Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Band, jac_upper=1, jac_lower=1)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Band, jac_upper=1, jac_lower=1)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1)), +] +labels = hcat( + "KenCarp3", + "KenCarp4", + "KenCarp5", + "ARKODE3", + "ARKODE4", + "ARKODE5", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Band Linsolve, Low Tolerances") ``` -1.IMEX methods (Krylov linear solver) - +Krylov linear solvers. ```julia abstols = 0.1 .^ (7:13) reltols = 0.1 .^ (4:10) -setups = [Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), - Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES))] -labels = ["KenCarp3" "KenCarp4" "KenCarp5" "ARKODE3" "ARKODE4" "ARKODE5"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, medium order") +setups = [ + Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), + Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), +] +labels = hcat( + "KenCarp3", + "KenCarp4", + "KenCarp5", + "ARKODE3", + "ARKODE4", + "ARKODE5", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Krylov Linsolve, Low Tolerances") ``` -2.ExpRK methods +#### Exponential Integrators ```julia abstols = 0.1 .^ (7:11) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK3(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers), - Dict(:alg => HochOst4(krylov=true, m=5), :dts => 1e-2 * multipliers)] -labels = hcat("ETDRK3 (caching)", "ETDRK3 (m=5)", "ETDRK4 (caching)", - "ETDRK4 (m=5)", "HochOst4 (caching)", "HochOst4 (m=5)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="ExpRK methods, medium order") +setups = [ + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), + Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers), +] +labels = hcat( + "ETDRK3 (caching)", + "ETDRK4 (caching)", + "HochOst4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, Low Tolerances") ``` -## Between family comparisons +#### Comparisons Between Families ```julia abstols = 0.1 .^ (7:11) reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => KenCarp5()), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Dense)), - Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), - Dict(:alg => ETDRK3(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(krylov=true, m=5), :dts => 1e-2 * multipliers)] -labels = hcat("KenCarp5 (dense linsolve)", "ARKODE (dense linsolve)", "KenCarp5 (Krylov linsolve)", - "ARKODE (Krylov linsolve)", "ETDRK3 (m=5)", "ETDRK4 (m=5)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="Between family, medium order") +setups = [ + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), +] +labels = hcat("ARKODE (nondiagonal linsolve)", "ETDRK3 ()", "ETDRK4 ()") +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, Low Tolerances") ``` + ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/SimpleHandwrittenPDE/allen_cahn_spectral_wpd.jmd b/benchmarks/SimpleHandwrittenPDE/allen_cahn_spectral_wpd.jmd index a4b423a76..bf65aff1c 100644 --- a/benchmarks/SimpleHandwrittenPDE/allen_cahn_spectral_wpd.jmd +++ b/benchmarks/SimpleHandwrittenPDE/allen_cahn_spectral_wpd.jmd @@ -1,226 +1,283 @@ --- title: Allen-Cahn Pseudospectral Methods Work-Precision Diagrams -author: HAO HAO +author: Arjit Seth --- + +## Problem Description + +The Allen-Cahn partial differential equation is solved on the domain $[-L, L] \times [0, T] \in \mathbb R \times R,~L = 1,~T = 1$, with the following initial and boundary conditions: +```math +\begin{aligned} + \partial_t u(t,x) & = u(t,x) - u^3(t,x) + \epsilon \partial_x^2 u(t,x), \\ + u(0,x) & = \cos(2\pi x), \\ + u(t,-L) & = u(t,L) = 1. +\end{aligned} +``` +The spatial derivative operators are represented via Chebyshev pseudospectral approximations. Here, the domain is discretized by projecting on a cosine-spaced grid of points $x_s \in [-1, 1]$; the solution is approximated on this grid via linear combinations of Chebyshev polynomial basis functions in space. The coefficient $p = 3,~\epsilon = 10^{-3}$ is chosen to produce `interesting' behavior as seen in the reference solution below. +```math +\begin{aligned} + \frac{du}{dt} & = p(u(t,x) - u^3(t,x)) + \epsilon D_x^2 u(t,x), \\ + u(0,x_s) & = \cos(2\pi x_s), \\ + u(t,-L) & = u(t,L) = 1. +\end{aligned} +``` + +### Implementation + ```julia -using ApproxFun, OrdinaryDiffEq, Sundials, LinearSolve +using OrdinaryDiffEq using DiffEqDevTools -using LinearAlgebra, RecursiveFactorization -using Plots; gr() +using SciMLOperators +using LinearSolve +using LinearAlgebra +using SparseArrays +using Sundials +using ClassicalOrthogonalPolynomials +using Plots +gr(); ``` -Here is the Allen-Cahn equation using Chebyshev spectral methods. - ```julia -function cheb(N) - N==0 && return (0,1) - x = cos.(pi*(0:N)/N) - c = [2; ones(N-1,1); 2].*(-1).^(0:N) - X = hcat([x for i in 1:N+1]...) - dX = X-X' - D = (c*(1 ./c)')./(dX+I) # off-diagonal entries - D = D .- Diagonal(vec(sum(D,dims=2))) # diagonal entries - D,x -end -N = 128 -ChebD2,x = cheb(N) -xx = x -x = x[2:N] -w = .53*x + .47*sin.(-1.5*pi*x) - x # use w = u-x to make BCs homogeneous -u = [1;w+x;-1] - -ϵ=0.01 -D2=ϵ*(ChebD2^2)[2:N, 2:N] -function allen_cahn(du,u,x,t) - @. du = (u + x) - (u + x)^3 +# Nonlinear component of vector field +function f_nonlinear!(du, u, p, t) + M, D0, alpha, tmp = p + Tu = D0 * u # Pseudo-spectral representation of solution + @. tmp[2:end-1] = alpha * (Tu - Tu^3) + ldiv!(du, M, tmp) # Solve the linear system M * du = tmp end + +function allen_cahn(n, eps) + T = ChebyshevT() # Chebyshev basis + x1 = reverse(ChebyshevGrid{1}(n - 2)) # 1st kind points, sorted + x2 = reverse(ChebyshevGrid{2}(n)) # 2nd kind points, sorted + + V = T[x2, 1:n] # Vandermonde matrix, its inverse is transform from values to coefficients + D0 = diff(T, 0)[x1, 1:n] / V # discretisation of identity matrix + D2 = diff(T, 2)[x1, 1:n] / V # 2nd derivative from x2 to x1 + + B_l = [1; zeros(n-1)]' # Left Dirichlet conditions + B_r = [zeros(n-1); 1]' # Right Dirichlet + M = lu([B_l; D0; B_r]) # Mass matrix for the problem + u0 = cos.(2π * x2) # Initial condition + alpha = 3.0 # Time scaling factor + D2_bc = [zeros(1, n); D2; zeros(1, n)] # 2nd derivative with Dirichlet conditions + + # Problem setup + prob = SplitODEProblem( + MatrixOperator(eps * (M \ D2_bc)), # Linear operator with mass matrix inversion + f_nonlinear!, + u0, (0.0, 1.0), + (M, D0, alpha, similar(u0)) + ) + + return x2, prob +end; ``` -Reference solution using RadauIIA5 is below: +### Reference Solution ```julia -prob = SplitODEProblem(DiffEqArrayOperator(D2), allen_cahn, w, (0.0,5.0), x) -sol = solve(prob, RadauIIA5(autodiff=false); reltol=1e-14,abstol=1e-14) -test_sol = TestSolution(sol) - -tslices=[0.0 1.0 2.0 3.0 5.0] -ys=hcat(([1;x.+sol(t);-1] for t in tslices)...) -labels=["t=$t" for t in tslices] -plot(xx,ys,label=labels) -``` - -## High tolerances +N = 128 +eps = 1e-3 +xs, prob = allen_cahn(N, eps); -## In-family comparisons +@time sol = solve(prob, Rodas5(autodiff=false); dt=1e-4, reltol=1e-12, abstol=1e-12); -1.IMEX methods (dense linear solver) +test_sol = TestSolution(sol); # Reference solution for error estimation -```julia -abstols = 0.1 .^ (5:8) -reltols = 0.1 .^ (1:4) -multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => CNAB2(), :dts => 5e-3 * multipliers), - Dict(:alg => CNLF2(), :dts => 5e-4 * multipliers), - Dict(:alg => SBDF2(), :dts => 1e-3 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp1 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true,names=labels, - numruns=5,seconds=5, - save_everystop=false,appxsol=test_sol,maxiters=Int(1e5)); - -plot(wp1,label=labels,markershape=:auto,title="IMEX methods, dense linsolve, low order") +tslices = LinRange(prob.tspan..., 50) +ys = mapreduce(sol, hcat, tslices) +heatmap(xs, tslices, ys', xlabel="x", ylabel="t") ``` -1.IMEX methods (Krylov linear solver) +## Work-Precision Diagrams + +### High Tolerances + +#### Implicit-Explicit Methods ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(linsolve=KrylovJL_GMRES()), :dts => 1e-3 * multipliers), - Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 5e-3 * multipliers), - Dict(:alg => CNLF2(linsolve=KrylovJL_GMRES()), :dts => 5e-4 * multipliers), - Dict(:alg => SBDF2(linsolve=KrylovJL_GMRES()), :dts => 1e-3 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp1 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp1, label=labels, markershape=:auto, title="IMEX methods, Krylov linsolve, low order") +setups = [ + Dict(:alg => IMEXEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), + Dict(:alg => SBDF2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "IMEXEuler", + "CNAB2", + "CNLF2", + "SBDF2", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Work-Precision Diagram, High Tolerance") ``` -2. ExpRK methods +#### Exponential Integrators ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => NorsettEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-3 * multipliers), - Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-3 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-2 * multipliers)] -labels = hcat("NorsettEuler (caching)", "NorsettEuler (m=5)", "NorsettEuler (m=20)", - "ETDRK2 (caching)", "ETDRK2 (m=5)", "ETDRK2 (m=20)") -@time wp2 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp2, label=labels, markershape=:auto, title="ExpRK methods, low order") +setups = [ + Dict(:alg => NorsettEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-4 * multipliers) +] +labels = hcat( + "NorsettEuler (caching)", + "NorsettEuler (m=5)", + "NorsettEuler (m=20)", + "ETDRK2 (caching)", + "ETDRK2 (m=5)", + "ETDRK2 (m=20)" +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, High Tolerance") ``` -## Between family comparisons + +#### Comparisons Between Families ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => CNAB2(), :dts => 5e-3 * multipliers), - Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 5e-3 * multipliers), - Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-2 * multipliers)] -labels = ["CNAB2 (dense linsolve)" "CNAB2 (Krylov linsolve)" "ETDRK2 (m=5)"] -@time wp3 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp3, label=labels, markershape=:auto, title="Between family, low orders") +setups = [ + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "CNAB2 (dense linsolve)", + "CNAB2 (Krylov linsolve)", + "ETDRK2 (m=5)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, High Tolerances") ``` -## Low tolerances -## In-family comparisons -1.IMEX methods (dense/band linear solver) +### Low Tolerances + + +#### Implicit-Explicit Methods + +Dense/banded linear solvers. ```julia abstols = 0.1 .^ (7:13) reltols = 0.1 .^ (4:10) -setups = [Dict(:alg => KenCarp3()), - Dict(:alg => KenCarp4()), - Dict(:alg => KenCarp5()), - Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Band, jac_upper=1, jac_lower=1)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Band, jac_upper=1, jac_lower=1)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1))] -labels = hcat("KenCarp3", "KenCarp4", "KenCarp5", - "ARKODE3", "ARKODE4", "ARKODE5") -@time wp4 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp4, label=labels, markershape=:auto, title="IMEX methods, dense/band linsolve, medium order") +setups = [ + Dict(:alg => KenCarp3()), + Dict(:alg => KenCarp4()), + Dict(:alg => KenCarp5()), + #Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Band, jac_upper=1, jac_lower=1)), + #Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Band, jac_upper=1, jac_lower=1)), + #Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1)) +] +labels = hcat( + "KenCarp3", + "KenCarp4", + "KenCarp5", + #"ARKODE3", + #"ARKODE4", + #"ARKODE5", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Band Linsolve, Low Tolerances") ``` -1.IMEX methods (krylov linear solver) - +Krylov linear solvers. ```julia abstols = 0.1 .^ (7:13) reltols = 0.1 .^ (4:10) -setups = [Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), - Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES))] -labels = ["KenCarp3" "KenCarp4" "KenCarp5" "ARKODE3" "ARKODE4" "ARKODE5"] -@time wp4 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp4, label=labels, markershape=:auto, title="IMEX methods, Krylov linsolve, medium order") +setups = [ + Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), + Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), +] +labels = hcat( + "KenCarp3", + "KenCarp4", + "KenCarp5", + "ARKODE3", + "ARKODE4", + "ARKODE5", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Krylov Linsolve, Low Tolerances") ``` -2.ExpRK methods +#### Exponential Integrators ```julia abstols = 0.1 .^ (7:11) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK3(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers), - Dict(:alg => HochOst4(krylov=true, m=5), :dts => 1e-2 * multipliers)] -labels = hcat("ETDRK3 (caching)", "ETDRK3 (m=5)", "ETDRK4 (caching)", - "ETDRK4 (m=5)", "HochOst4 (caching)", "HochOst4 (m=5)") -@time wp5 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp5, label=labels, markershape=:auto, title="ExpRK methods, medium order") +setups = [ + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), + Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers), +] +labels = hcat( + "ETDRK3 (caching)", + "ETDRK4 (caching)", + "HochOst4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, Low Tolerances") ``` -## Between family comparisons +#### Comparisons Between Families ```julia abstols = 0.1 .^ (7:11) reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => KenCarp5()), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Dense)), - Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), - Dict(:alg => ETDRK3(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(krylov=true, m=5), :dts => 1e-2 * multipliers)] -labels = hcat("KenCarp5 (dense linsolve)", "ARKODE (dense linsolve)", "KenCarp5 (Krylov linsolve)", - "ARKODE (Krylov linsolve)", "ETDRK3 (m=5)", "ETDRK4 (m=5)") -@time wp6 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp6, label=labels, markershape=:auto, title="Between family, medium order") +setups = [ + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers) +] +labels = hcat("ARKODE (Krylov linsolve)", "ETDRK3 ()", "ETDRK4 ()") +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, Low Tolerances") ``` + ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/SimpleHandwrittenPDE/burgers_fdm_wpd.jmd b/benchmarks/SimpleHandwrittenPDE/burgers_fdm_wpd.jmd index 0f100f351..bc3b07b85 100644 --- a/benchmarks/SimpleHandwrittenPDE/burgers_fdm_wpd.jmd +++ b/benchmarks/SimpleHandwrittenPDE/burgers_fdm_wpd.jmd @@ -1,238 +1,276 @@ --- -title: Burgers FDM Work-Precision Diagrams -author: HAO HAO +title: Burgers' Equation Finite-Difference Method Work-Precision Diagrams +author: Arjit Seth --- +## Problem Description + +The Burgers' partial differential equation is solved on the domain $[0, L] \times [0, T] \in \mathbb R \times R,~L = 1,~T = 1$, with the following initial and boundary conditions: +```math +\begin{aligned} + \partial_t u(t,x) & = -\partial_x u^2(t,x) + \nu \partial_x^2 u(t,x), \\ + u(0,x) & = \exp\left[\frac{(x - 0.5)^2}{2 \times 0.05^2}\right], \\ + u(-L,x) & = u(L,x) = 0. +\end{aligned} +``` +The spatial derivative operators are represented via finite difference approximations on an equispaced grid of points $x_s \in [-L, L]$. The diffusion coefficient $\nu = 10^{-2}$ is chosen to produce `interesting' behavior as seen in the reference solution below. +```math +\begin{aligned} + \frac{du}{dt} & = -D_x u^2(t,x) + \nu D_x^2 u(t,x), \\ + u(0,x_s) & = \exp\left[\frac{(x_s - 0.5)^2}{2 \times 0.05^2}\right], \\ + u(t,-L) & = u(t,L) = 0. +\end{aligned} +``` + +### Implementation + ```julia -using ApproxFun, OrdinaryDiffEq, Sundials, LinearSolve +using OrdinaryDiffEq using DiffEqDevTools -using LinearAlgebra, RecursiveFactorization -using Plots; gr() +using SciMLOperators +using LinearSolve +using LinearAlgebra +using SparseArrays +using Sundials +using SummationByPartsOperators +const SBP = SummationByPartsOperators +using Plots +gr(); ``` -Here is the Burgers equation using FDM. - ```julia -function lin_term(N, ϵ) - dx = 1/(N + 1) - d = -2 * ones(N) # main diagonal - du = ones(N - 1) # off diagonal - DiffEqArrayOperator((ϵ/dx^2) * diagm(-1 => du, 0 => d, 1 => du)) -end - -function nl_term(N) - dx = 1/(N + 1) - du = ones(N - 1) # super diagonal - dl = -ones(N - 1) # lower diagonal - D = (-1/(4*dx)) * diagm(-1 => dl, 1 => du) - - tmp = zeros(N) - function (du,u,p,t) - @. tmp = u^2 - mul!(du, D, tmp) - end -end - -# Construct the problem -function burgers(N, ϵ) - f1 = lin_term(N, ϵ) - f2 = nl_term(N) - dx = 1 / (N + 1) - xs = (1:N) * dx - - μ0 = 0.3; σ0 = 0.05 - f0 = x -> exp(-(x - μ0)^2 / (2 * σ0^2)) - u0 = f0.(xs) - prob = SplitODEProblem(f1, f2, u0, (0.0, 1.0)) - xs, prob +nonlinear_convection!(du, u, p, t) = du .= (-p.alpha / 3) * (u .* (p.D1 * u) + p.D1 * (u .^ 2)) + +# Constructor +function burgers(N, L) + # Derivative operators + D1 = derivative_operator(MattssonSvärdNordström2004(); + derivative_order = 1, accuracy_order = 2, + xmin = -L, xmax = L, N = N) + D2 = derivative_operator(MattssonSvärdNordström2004(); + derivative_order = 2, accuracy_order = 2, + xmin = -L, xmax = L, N = N) + + x = LinRange(0, L, N) # Domain discretization + u0 = @. exp(-(x - 0.5)^2 / (2 * 0.05^2)) # Initial condition + nu = 1e-2 # Diffusion coefficient + alpha = 1.0 # Convection coefficient + p = (; D1, alpha) + + prob = SplitODEProblem(MatrixOperator(nu * sparse(D2)), nonlinear_convection!, u0, (0.0, 1.0), p) + + return x, prob end; ``` -Reference solution using Vern9 is below: +### Reference Solution + +Using an adaptive timestepping method to solve the system of ordinary differential equations with high precision. ```julia -xs, prob = burgers(512, 1e-3) -sol = solve(prob, Vern9(); abstol=1e-14, reltol=1e-14) -test_sol = TestSolution(sol); - -tslices = [0.0 0.25 0.50 0.75 1.00] -ys = hcat((sol(t) for t in tslices)...) -labels = ["t = $t" for t in tslices] -plot(xs, ys, label=labels) +N = 128 +L = 1.0 +xs, prob = burgers(N, L) +sol = solve(prob, AutoVern7(Rodas5(autodiff=false)); abstol=1e-14, reltol=1e-14, adaptive=true) + +test_sol = TestSolution(sol); # Reference solution for error estimation + +tslices = LinRange(prob.tspan..., 50) +ys = mapreduce(sol, hcat, tslices) +p = heatmap(xs, tslices, ys', xlabel="x", ylabel="t") ``` -## High tolerances +## Work-Precision Diagrams -## In-family comparisons +### High Tolerances -1.IMEX methods (dense linear solver) +#### Implicit-Explicit Methods ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), - Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), - Dict(:alg => SBDF2(), :dts => 1e-3 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, dense linsolve, low order") +setups = [ + Dict(:alg => IMEXEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), + Dict(:alg => SBDF2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "IMEXEuler", + "CNAB2", + "CNLF2", + "SBDF2", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Work-Precision Diagram, High Tolerance") ``` -1.IMEX methods (Krylov linear solver) +#### Exponential Integrators ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(linsolve=KrylovJL_GMRES()), :dts => 1e-3 * multipliers), - Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), - Dict(:alg => CNLF2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), - Dict(:alg => SBDF2(linsolve=KrylovJL_GMRES()), :dts => 1e-3 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, Krylov linsolve, low order") +setups = [ + Dict(:alg => NorsettEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-3 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-3 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-3 * multipliers) +] +labels = hcat( + "NorsettEuler (caching)", + "NorsettEuler (m=5)", + "NorsettEuler (m=20)", + "ETDRK2 (caching)", + "ETDRK2 (m=5)", + "ETDRK2 (m=20)" +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, High Tolerance") ``` -2. ExpRK methods + +#### Comparisons Between Families ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => NorsettEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-3 * multipliers), - Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-3 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-3 * multipliers)] - #Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-2 * multipliers)) matrix contains Inf or NaN - #Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-2 * multipliers) matrix contains Inf or NaN -labels = hcat("NorsettEuler (caching)", "NorsettEuler (m=5)", "NorsettEuler (m=20)", - "ETDRK2 (caching)")#, "ETDRK2 (m=5)"), "ETDRK2 (m=20)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="ExpRK methods, low order") +setups = [ + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "CNAB2 (dense linsolve)", + "CNAB2 (Krylov linsolve)", + "ETDRK2 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, High Tolerances") ``` -## Between family comparisons -```julia -abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much -reltols = 0.1 .^ (1:4) -multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), - Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-3 * multipliers)] -labels = ["CNAB2 (dense linsolve)" "CNAB2 (Krylov linsolve)" "ETDRK2 (m=5)"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="Between family, low orders") -``` +### Low Tolerances -## Low tolerances -## In-family comparisons +#### Implicit-Explicit Methods -1.IMEX methods (dense linear solver) +Dense/banded linear solvers. ```julia -abstols = 0.1 .^ (8:13) -reltols = 0.1 .^ (5:10) -setups = [Dict(:alg => KenCarp3()), - Dict(:alg => KenCarp4()), - Dict(:alg => KenCarp5()), - Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Dense)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Dense)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Dense))] -labels = hcat("KenCarp3", "KenCarp4", "KenCarp5", "ARKODE3", "ARKODE4", "ARKODE5") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, dense linsolve, medium order") +abstols = 0.1 .^ (7:13) +reltols = 0.1 .^ (4:10) +setups = [ + Dict(:alg => KenCarp3()), + Dict(:alg => KenCarp4()), + Dict(:alg => KenCarp5()), + Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Band, jac_upper=1, jac_lower=1)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Band, jac_upper=1, jac_lower=1)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1)) +] +labels = hcat( + "KenCarp3", + "KenCarp4", + "KenCarp5", + "ARKODE3", + "ARKODE4", + "ARKODE5", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Band Linsolve, Low Tolerances") ``` -1.IMEX methods (Krylov linear solver) - +Krylov linear solvers. ```julia -abstols = 0.1 .^ (8:13) -reltols = 0.1 .^ (5:10) -setups = [Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), - Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES))] -labels = ["KenCarp3" "KenCarp4" "KenCarp5" "ARKODE3" "ARKODE4" "ARKODE5"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, medium order") +abstols = 0.1 .^ (7:13) +reltols = 0.1 .^ (4:10) +setups = [ + Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), + Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), +] +labels = hcat( + "KenCarp3", + "KenCarp4", + "KenCarp5", + "ARKODE3", + "ARKODE4", + "ARKODE5", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Krylov Linsolve, Low Tolerances") ``` -2.ExpRK methods +#### Exponential Integrators ```julia abstols = 0.1 .^ (7:11) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK3(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers), - Dict(:alg => HochOst4(krylov=true, m=5), :dts => 1e-2 * multipliers)] -labels = hcat("ETDRK3 (caching)", "ETDRK3 (m=5)", "ETDRK4 (caching)", - "ETDRK4 (m=5)", "HochOst4 (caching)", "HochOst4 (m=5)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="ExpRK methods, medium order") +setups = [ + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), + Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers), +] +labels = hcat( + "ETDRK3 (caching)", + "ETDRK4 (caching)", + "HochOst4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, Low Tolerances") ``` -## Between family comparisons - +#### Comparisons Between Families ```julia -abstols = 0.1 .^ (8:13) -reltols = 0.1 .^ (5:10) -multipliers = 0.5 .^ (0:5) -setups = [Dict(:alg => KenCarp4()), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Dense)), - Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), - Dict(:alg => ETDRK3(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(krylov=true, m=5), :dts => 1e-2 * multipliers)] -labels = hcat("KenCarp4 (dense linsolve)", "ARKODE (dense linsolve)", "KenCarp4 (Krylov linsolve)", - "ARKODE (Krylov linsolve)", "ETDRK3 (m=5)", "ETDRK4 (m=5)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5));#162s - -plot(wp, label=labels, markershape=:auto, title="Between family, medium order") +abstols = 0.1 .^ (7:11) +reltols = 0.1 .^ (4:8) +multipliers = 0.5 .^ (0:4) +setups = [ + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1)), + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), +] +labels = hcat( + "ARKODE (Band linsolve)", + "ETDRK3 (caching)", + "ETDRK4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, Low Tolerances") ``` + ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/SimpleHandwrittenPDE/burgers_spectral_wpd.jmd b/benchmarks/SimpleHandwrittenPDE/burgers_spectral_wpd.jmd index 502ebf658..003fbfd15 100644 --- a/benchmarks/SimpleHandwrittenPDE/burgers_spectral_wpd.jmd +++ b/benchmarks/SimpleHandwrittenPDE/burgers_spectral_wpd.jmd @@ -1,181 +1,281 @@ --- -title: Burgers Pseudospectral Methods Work-Precision Diagrams -author: HAO HAO +title: Burgers' Equation Pseudospectral Method Work-Precision Diagrams +author: Arjit Seth --- +### Problem Description + +The Burgers' partial differential equation is solved on the domain $[-L, L] \times [0, T] \in \mathbb R \times R,~L = 1,~T = 1$, with the following initial and boundary conditions: +```math +\begin{aligned} + \partial_t u(t,x) & = -\partial_x u^2(t,x) + \nu \partial_x^2 u(t,x), \\ + u(0,x) & = \exp\left(\frac{x^2}{2 \times 0.01^2}\right), \\ + u(t,-L) & = u(t,L) = 0. +\end{aligned} +``` +The spatial derivative operators are represented via Chebyshev pseudospectral approximations. Here, the domain is discretized by projecting on a cosine-spaced grid of points $x_s \in [-1, 1]$; the solution is approximated on this grid via linear combinations of Chebyshev polynomial basis functions in space. The diffusion coefficient $\nu = 10^{-2}$ is chosen to produce `interesting' behavior as seen in the reference solution below. +```math +\begin{aligned} + \frac{du}{dt} & = -D_x u^2(t,x) + \nu D_x^2 u(t,x), \\ + u(0,x_s) & = \exp\left(\frac{x_s^2}{2 \times 0.01^2}\right), \\ + u(t,-L) & = u(t,L) = 0. +\end{aligned} +``` + +### Implementation + ```julia -using ApproxFun, OrdinaryDiffEq, Sundials, LinearSolve +using OrdinaryDiffEq using DiffEqDevTools -using LinearAlgebra, RecursiveFactorization -using Plots; gr() +using SciMLOperators +using LinearSolve +using LinearAlgebra +using SparseArrays +using Sundials +using ClassicalOrthogonalPolynomials +const COP = ClassicalOrthogonalPolynomials +using Plots +gr(); ``` -Here is the Burgers equation using Fourier spectral methods. - ```julia -S = Fourier() -n = 512 -x = points(S, n) -D2 = Derivative(S,2)[1:n,1:n] -D = (Derivative(S) → S)[1:n,1:n] -T = ApproxFun.plan_transform(S, n) -Ti = ApproxFun.plan_itransform(S, n) - -û₀ = T*cos.(cos.(x.-0.1)) -A = 0.03*D2 -tmp = similar(û₀) -p = (D,D2,T,Ti,tmp,similar(tmp)) -function burgers_nl(dû,û,p,t) - D,D2,T,Ti,u,tmp = p - mul!(tmp, D, û) - mul!(u, Ti, tmp) - mul!(tmp, Ti, û) - @. tmp = tmp*u - mul!(u, T, tmp) - @. dû = - u +# Nonlinear component of vector field +function f_nonlinear!(du, u, p, t) + M, D0, D1, tmp = p + tmp[2:end-1] .= -(D0 * u) .* (D1 * u) # Nonlinear convection + ldiv!(du, M, tmp) # Solve the linear system M * du = tmp end -``` -Reference solution using Rodas5 is below: +# Constructor +function burgers(n) + T = ChebyshevT() # Chebyshev basis + x1 = reverse(ChebyshevGrid{1}(n - 2)) # 1st kind points, sorted + x2 = reverse(ChebyshevGrid{2}(n)) # 2nd kind points, sorted + V = T[x2, 1:n] # Vandermonde matrix, its inverse is transform from values to coefficients + D0 = diff(T, 0)[x1, 1:n] / V # 0th derivative from x2 to x1 (identity) + D1 = diff(T, 1)[x1, 1:n] / V # 1st derivative from x2 to x1 + D2 = diff(T, 2)[x1, 1:n] / V # 2nd derivative from x2 to x1 -```julia -prob = SplitODEProblem(DiffEqArrayOperator(Diagonal(A)), burgers_nl, û₀, (0.0,5.0), p) -sol = solve(prob, Rodas5(autodiff=false); reltol=1e-12,abstol=1e-12) -test_sol = TestSolution(sol) - -tslices=[0.0 1.0 2.0 3.0 5.0] -ys=hcat((Ti*sol(t) for t in tslices)...) -labels=["t=$t" for t in tslices] -plot(x,ys,label=labels) + + u0 = @. exp(-x2^2 / (2 * 0.1^2)) # Initial condition + B_l = [1 zeros(1, n-1)] # Left Dirichlet conditions + B_r = reverse(B_l) # Right Dirichlet + M = lu([B_l; D0; B_r]) # Mass matrix for the problem + nu = 1e-2 # Diffusion coefficient + D2_bc = [zeros(1, n); D2; zeros(1, n)] # 2nd derivative with boundary conditions + prob = SplitODEProblem( + MatrixOperator(nu * (M \ D2_bc)), + f_nonlinear!, + u0, (0.0, 1.0), + (M, D0, D1, similar(u0)) + ) + + return x2, prob +end; ``` -## High tolerances +### Reference Solution ```julia -diag_linsolve=LinSolveFactorize(W->let tmp = tmp - for i in 1:size(W, 1) - tmp[i] = W[i, i] - end - Diagonal(tmp) -end) +n = 128 # Number of Chebyshev points +xs, prob = burgers(n) +@time sol = solve(prob, Rodas5(autodiff=false), reltol = 1e-12, abstol = 1e-12) + +test_sol = TestSolution(sol) # Reference solution for error estimation + +tslices = LinRange(prob.tspan..., 50) +ys = mapreduce(sol, hcat, tslices) +heatmap(xs, tslices, ys') ``` -## In-family comparisons +## Work-Precision Diagrams -1.IMEX methods (diagonal linear solver) +### High Tolerances + +#### Implicit-Explicit Methods ```julia -abstols = 0.1 .^ (5:8) +abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) -multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(linsolve=diag_linsolve), :dts => 1e-3 * multipliers), - Dict(:alg => CNAB2(linsolve=diag_linsolve), :dts => 5e-3 * multipliers), - Dict(:alg => CNLF2(linsolve=diag_linsolve), :dts => 5e-3 * multipliers), - Dict(:alg => SBDF2(linsolve=diag_linsolve), :dts => 1e-3 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp1 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true,names=labels, - numruns=5,seconds=5, - save_everystop=false,appxsol=test_sol,maxiters=Int(1e5)); - -plot(wp1,label=labels,markershape=:auto,title="IMEX methods, diagonal linsolve, low order") +multipliers = 0.5 .^ (0:3) +setups = [ + Dict(:alg => IMEXEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), + Dict(:alg => SBDF2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "IMEXEuler", + "CNAB2", + "CNLF2", + "SBDF2", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Work-Precision Diagram, High Tolerance") ``` -2. ExpRK methods +#### Exponential Integrators ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => NorsettEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-2 * multipliers)] -labels = hcat("NorsettEuler", - "ETDRK2 (caching)") -@time wp2 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp2, label=labels, markershape=:auto, title="ExpRK methods, low order") +setups = [ + Dict(:alg => NorsettEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-4 * multipliers) +] +labels = hcat( + "NorsettEuler (caching)", + "NorsettEuler (m=5)", + "NorsettEuler (m=20)", + "ETDRK2 (caching)", + "ETDRK2 (m=5)", + "ETDRK2 (m=20)" +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, High Tolerance") ``` -## Between family comparisons + +#### Comparisons Between Families ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => CNAB2(linsolve=diag_linsolve), :dts => 5e-3 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-2 * multipliers)] -labels = ["CNAB2 (diagonal linsolve)" "ETDRK2"] -@time wp3 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp3, label=labels, markershape=:auto, title="Between family, low orders") +setups = [ + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "CNAB2 (dense linsolve)", + "CNAB2 (Krylov linsolve)", + "ETDRK2 (m=5)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, High Tolerances") ``` -## Low tolerances +### Low Tolerances -## In-family comparisons +#### Implicit-Explicit Methods -1.IMEX methods (band linear solver) +Dense/banded linear solvers. ```julia abstols = 0.1 .^ (7:13) reltols = 0.1 .^ (4:10) -setups = [Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Band, jac_upper=1, jac_lower=1)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Band, jac_upper=1, jac_lower=1)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1))] -labels = hcat("ARKODE3", "ARKODE4", "ARKODE5") -@time wp4 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp4, label=labels, markershape=:auto, title="IMEX methods, band linsolve, medium order") +setups = [ + Dict(:alg => KenCarp3()), + Dict(:alg => KenCarp4()), + Dict(:alg => KenCarp5()), + Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Band, jac_upper=1, jac_lower=1)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Band, jac_upper=1, jac_lower=1)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1)) +] +labels = hcat( + "KenCarp3", + "KenCarp4", + "KenCarp5", + "ARKODE3", + "ARKODE4", + "ARKODE5", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Band Linsolve, Low Tolerances") ``` -2.ExpRK methods +Krylov linear solvers. +```julia +abstols = 0.1 .^ (7:13) +reltols = 0.1 .^ (4:10) +setups = [ + Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), + Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), +] +labels = hcat( + "KenCarp3", + "KenCarp4", + "KenCarp5", + "ARKODE3", + "ARKODE4", + "ARKODE5", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Krylov Linsolve, Low Tolerances") +``` + +#### Exponential Integrators ```julia abstols = 0.1 .^ (7:11) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), - Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers)] -labels = hcat("ETDRK3 (caching)", "ETDRK4 (caching)", - "HochOst4 (caching)") -@time wp5 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp5, label=labels, markershape=:auto, title="ExpRK methods, medium order") -``` +setups = [ + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), + Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers), +] +labels = hcat( + "ETDRK3 (caching)", + "ETDRK4 (caching)", + "HochOst4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); -## Between family comparisons +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, Low Tolerances") +``` +#### Comparisons Between Families ```julia abstols = 0.1 .^ (7:11) reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1)), - Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers)] -labels = hcat("ARKODE (nondiagonal linsolve)", "ETDRK3 ()", "ETDRK4 ()") - #"ARKODE (Krylov linsolve)") -@time wp6 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp6, label=labels, markershape=:auto, title="Between family, medium order") +setups = [ + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1)), + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), +] +labels = hcat( + "ARKODE (Band linsolve)", + "ETDRK3 (caching)", + "ETDRK4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, Low Tolerances") ``` + ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/SimpleHandwrittenPDE/kdv_fdm_wpd.jmd b/benchmarks/SimpleHandwrittenPDE/kdv_fdm_wpd.jmd index 4a862dfe8..08716c7fd 100644 --- a/benchmarks/SimpleHandwrittenPDE/kdv_fdm_wpd.jmd +++ b/benchmarks/SimpleHandwrittenPDE/kdv_fdm_wpd.jmd @@ -1,248 +1,253 @@ --- -title: KdV FDM Work-Precision Diagrams -author: HAO HAO +title: Kortwrieg-de Vries Equation FDM Work-Precision Diagrams +author: Arjit Seth --- +### Problem Description + +The Kortwrieg de Vries (KdV) partial differential equation is solved on the domain $[-L, L] \times [0, T] \in \mathbb R \times R,~L = 16,~T = 20$, with the following initial and periodic boundary conditions: +```math +\begin{align} + \partial_t u(t,x) & = -6u(t,x)\partial_x u(t,x) -\partial_x^3 u(t,x), \\ + u(0,x) & = \cos\left(\frac{\pi x}{L}\right), \\ + u(t,-L) & = u(t,L) = -1. +\end{align} +``` +The spatial derivative operators are represented via finite difference approximations on an equispaced grid of points $x_s \in [-L, L]$. +```math +\begin{align} + \frac{du}{dt} & = -6uD_x u -D_x^3 u, \\ + u(0,x_s) & = \cos\left(\frac{\pi x_s}{L}\right), \\ + u(t,-L) & = u(t,L) = -1. +\end{align} +``` + +### Implementation + ```julia -using ApproxFun, OrdinaryDiffEq, Sundials, LinearSolve +using OrdinaryDiffEq using DiffEqDevTools -using LinearAlgebra, RecursiveFactorization -using Plots; gr() +using SciMLOperators +using LinearSolve +using LinearAlgebra +using SparseArrays +using Sundials +using SummationByPartsOperators +const SBP = SummationByPartsOperators +using Plots +gr(); ``` -Here is the KdV equation using FDM. - ```julia -# Define the linear and nonlinear terms -function lin_term(N) - dx = 1/(N + 1) - du = ones(N-1) # off diagonal - du2 = -ones(N-1) # off diagonal - d = (1/2) * ones(N-2) - d2 = (-1/2) * ones(N-2) - diag=-2 * ones(N) - DiffEqArrayOperator(5e-5*(1/dx^3) * diagm(-2 => d2, -1 => du, 1 => du2, 2 => d)) -end - -function nl_term(N) - dx = 1/(N + 1) - du = ones(N - 1) # super diagonal - dl = -ones(N - 1) # lower diagonal - D = (0.2/dx) * diagm(-1 => dl, 1 => du) - - tmp = zeros(N) - function (du,u,p,t) - @. tmp = u^2 - mul!(du, D, tmp) - end -end +nonlinear_convection!(du, u, p, t) = du .= (-6 * p.alpha / 3) * (u .* (p.D1 * u) + p.D1 * (u .^ 2)) # Construct the problem -function kdv(N) - f1 = lin_term(N) - f2 = nl_term(N) - dx = 1 / (N + 1) - xs = (1:N) * dx - - μ0 = 0.3; σ0 = 0.05 - f0 = x -> 0.9*exp(-(x - μ0)^2 / (2 * σ0^2)) - u0 = f0.(xs) - prob = SplitODEProblem(f1, f2, u0, (0.0, 1.0)) - xs, prob +function kortwrieg_de_vries(N, L, alpha) + D1 = periodic_derivative_operator(derivative_order = 1, accuracy_order = 4, + xmin = -L, xmax = L, N = N) + D3 = periodic_derivative_operator(derivative_order = 3, accuracy_order = 4, + xmin = -L, xmax = L, N = N) + + # u0 = usol.(first(tspan), SBP.grid(D1)) + x = SBP.grid(D1) + u0 = @. cos(π * x / L) # Initial condition + p = (; D1, alpha) + + tspan = (0.0, 1.0) + prob = SplitODEProblem(MatrixOperator(-p.alpha * sparse(D3)), + nonlinear_convection!, + u0, tspan, p); + + return x, prob end; ``` -Reference solution using Tsit5 is below: +### Reference Solution + +Using an adaptive timestepping method to solve the system of ordinary differential equations with high precision. ```julia -xs, prob = kdv(200) -sol = solve(prob, Tsit5(); abstol=1e-11, reltol=1e-11, dt=1e-7, adptive=false) -test_sol = TestSolution(sol); - -tslices = [0.0 0.25 0.50 0.75 1.00] -ys = hcat((sol(t) for t in tslices)...) -labels = ["t = $t" for t in tslices] -fn=plot(xs, ys, label=labels) -``` +N = 128 # Number of grid points +L = 16.0 # Domain length +alpha = 5.0 # Time scaling factor +xs, prob = kortwrieg_de_vries(N, L, alpha) -Linear solvers +@time sol = solve(prob, AutoVern7(RadauIIA5(autodiff=false)); + dt = 1e-4, abstol = 1e-14, reltol = 1e-14); -```julia -const LS_Dense = LinSolveFactorize(lu) +test_sol = TestSolution(sol) # Reference solution for error estimation + +tslices = LinRange(prob.tspan..., 50) +ys = mapreduce(sol, hcat, tslices) +plt = heatmap(xs, tslices, ys', xlabel="x", ylabel="t") ``` -## High tolerances +## Work-Precision Diagrams -## In-family comparisons +### High Tolerances -1.IMEX methods (dense linear solver) +#### Implicit-Explicit Methods ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => CNAB2(), :dts => 1e-5 * multipliers), - Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), - Dict(:alg => SBDF2(), :dts => 1e-3 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, dense linsolve, low order") +setups = [ + Dict(:alg => IMEXEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), + Dict(:alg => SBDF2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "IMEXEuler", + "CNAB2", + "CNLF2", + "SBDF2", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Work-Precision Diagram, High Tolerance") ``` -1.IMEX methods (Krylov linear solver) +#### Exponential Integrators ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [#Dict(:alg => IMEXEuler(linsolve=KrylovJL_GMRES()), :dts => 1e-5 * multipliers), - Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-5 * multipliers), - Dict(:alg => CNLF2(linsolve=KrylovJL_GMRES()), :dts => 1e-5 * multipliers), - Dict(:alg => SBDF2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, Krylov linsolve, low order") +setups = [ + Dict(:alg => NorsettEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-4 * multipliers) +] +labels = hcat( + "NorsettEuler (caching)", + "NorsettEuler (m=5)", + "NorsettEuler (m=20)", + "ETDRK2 (caching)", + "ETDRK2 (m=5)", + "ETDRK2 (m=20)" +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, High Tolerance") ``` -2. ExpRK methods - -```julia -abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much -reltols = 0.1 .^ (1:4) -multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => NorsettEuler(), :dts => 1e-6 * multipliers), - Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-3 * multipliers), - #Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-3 * multipliers), matrix contains Infs or NaNs - Dict(:alg => ETDRK2(), :dts => 1e-3 * multipliers), - Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-2 * multipliers)] -labels = hcat("NorsettEuler (caching)", "NorsettEuler (m=5)",# "NorsettEuler (m=20)", - "ETDRK2 (caching)", "ETDRK2 (m=5)", "ETDRK2 (m=20)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="ExpRK methods, low order") -``` -## Between family comparisons +#### Comparisons Between Families ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => CNAB2(), :dts => 1e-5 * multipliers), - Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-5 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-3 * multipliers)] -labels = ["CNAB2 (dense linsolve)" "CNAB2 (Krylov linsolve)" "ETDRK2 (m=5)"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="Between family, low orders") +setups = [ + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "CNAB2 (dense)", + "CNAB2 (Krylov)", + "ETDRK2 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, High Tolerances") ``` -## Low tolerances -## In-family comparisons +### Low Tolerances -1.IMEX methods (dense linear solver) +#### Implicit-Explicit Methods +Dense and Krylov linear solvers. ```julia -abstols = 0.1 .^ (7:13) -reltols = 0.1 .^ (4:10) -setups = [Dict(:alg => KenCarp3()), - Dict(:alg => KenCarp4()), - Dict(:alg => KenCarp5()), - Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Dense)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Dense)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Dense))] -labels = hcat("KenCarp3", "KenCarp4", "KenCarp5", "ARKODE3", "ARKODE4", "ARKODE5") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, dense linsolve, medium order") +abstols = 0.1 .^ (8:12) +reltols = 0.1 .^ (5:9) +setups = [ + Dict(:alg => KenCarp3()), + Dict(:alg => KenCarp4()), + Dict(:alg => KenCarp5()), + Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), + Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), +] +labels = hcat( + "KenCarp3 (dense)", + "KenCarp4 (dense)", + "KenCarp5 (dense)", + "KenCarp3 (Krylov)", + "KenCarp4 (Krylov)", + "KenCarp5 (Krylov)", + "ARKODE3 (Krylov)", + "ARKODE4 (Krylov)", + "ARKODE5 (Krylov)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Krylov Linsolve, Low Tolerances") ``` -1.IMEX methods (Krylov linear solver) - -```julia -abstols = 0.1 .^ (7:13) -reltols = 0.1 .^ (4:10) -setups = [Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), - Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES))] -labels = ["KenCarp3" "KenCarp4" "KenCarp5" "ARKODE3" "ARKODE4" "ARKODE5"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, medium order") -``` - -2.ExpRK methods +#### Exponential Integrators ```julia abstols = 0.1 .^ (7:11) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - #Dict(:alg => ETDRK3(krylov=true, m=5), :dts => 1e-2 * multipliers),matrix contains Infs or NaNs +setups = [Dict(:alg => ETDRK3(), :dts => 1e-3 * multipliers), Dict(:alg => ETDRK4(), :dts => 1e-3 * multipliers), - #Dict(:alg => ETDRK4(krylov=true, m=5), :dts => 1e-2 * multipliers),matrix contains Infs or NaNs - Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers)] - #Dict(:alg => HochOst4(krylov=true, m=5), :dts => 1e-2 * multipliers)] matrix contains Infs or NaNs -labels = hcat("ETDRK3 (caching)", "ETDRK4 (caching)",# "ETDRK3 (m=5)", "ETDRK4 (m=5)" - "HochOst4 (caching)")#, "HochOst4 (m=5)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="ExpRK methods, medium order") + Dict(:alg => HochOst4(), :dts => 1e-3 * multipliers)] +labels = hcat( + "ETDRK3 (caching)", + "ETDRK4 (caching)", + "HochOst4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, Low Tolerances") ``` -## Between family comparisons - +#### Comparisons Between Families ```julia abstols = 0.1 .^ (7:11) reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => KenCarp5()), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Dense)), - Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), - Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(), :dts => 1e-3 * multipliers)] -labels = hcat("KenCarp5 (dense linsolve)", "ARKODE (dense linsolve)", "KenCarp5 (Krylov linsolve)", - "ARKODE (Krylov linsolve)", "ETDRK3 (m=5)", "ETDRK4 (m=5)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="Between family, medium order") +setups = [ + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), +] +labels = hcat( + "ARKODE5 (Krylov)", + "ETDRK3 (caching)", + "ETDRK4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, Low Tolerances") ``` + ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/SimpleHandwrittenPDE/kdv_spectral_wpd.jmd b/benchmarks/SimpleHandwrittenPDE/kdv_spectral_wpd.jmd index f285c417f..af7cb1268 100644 --- a/benchmarks/SimpleHandwrittenPDE/kdv_spectral_wpd.jmd +++ b/benchmarks/SimpleHandwrittenPDE/kdv_spectral_wpd.jmd @@ -1,169 +1,246 @@ --- -title: KdV Pseudospectral Methods Work-Precision Diagrams -author: HAO HAO +title: Korteweg-De Vries Equation Pseudospectral Methods Work-Precision Diagrams +author: Arjit Seth --- ```julia -using ApproxFun, OrdinaryDiffEq, Sundials, LinearSolve +using OrdinaryDiffEq using DiffEqDevTools -using LinearAlgebra, RecursiveFactorization -using Plots; gr() +using SciMLOperators +using LinearSolve +using LinearAlgebra +using SparseArrays +using Sundials +using SummationByPartsOperators +const SBP = SummationByPartsOperators +using Plots +gr() ``` -Here is the Burgers equation using Fourier spectral methods. +## Problem Description + +The Kortwrieg de Vries (KdV) partial differential equation is solved on the domain $[-L, L] \times [0, T] \in \mathbb R \times R,~L = 16,~T = 5$, with the following initial and periodic boundary conditions: +```math +\begin{align} + \partial_t u(t,x) & = -6u(t,x)\partial_x u(t,x) -\partial_x^3 u(t,x), \\ + u(0,x) & = \cos\left(\frac{\pi x}{L}\right), \\ + u(t,-L) & = u(t,L) = -1. +\end{align} +``` +The spatial derivative operators are represented via Fourier pseudospectral approximations. Here, the domain is discretized by projecting on an equispaced grid of points $x_s \in [-L, L]$; the solution is approximated on this grid via linear combinations of sinusoidal functions in space. +```math +\begin{align} + \frac{du}{dt} & = -6uD_x u -D_x^3 u, \\ + u(0,x_s) & = \cos\left(\frac{\pi x_s}{L}\right), \\ + u(t,-L) & = u(t,L) = -1. +\end{align} +``` + + +### Implementation ```julia -S = Fourier() -n = 512 -x = points(S, n) -D2 = Derivative(S,2)[1:n,1:n] -D = (Derivative(S) → S)[1:n,1:n] -T = ApproxFun.plan_transform(S, n) -Ti = ApproxFun.plan_itransform(S, n) - -D3 = (Derivative(S,3) → S)[1:n,1:n] -û₀ = T*cos.(x) -δ=0.022 -tmp = similar(û₀) -p = (D,T,Ti,similar(tmp),tmp) -function kdv(dû,û,p,t) - D,T,Ti,u,tmp = p - mul!(u,D,û) - mul!(tmp,Ti,u) - mul!(u,Ti,û) - @. tmp=u*tmp - mul!(u,T,tmp) - @.dû = 6*u -end +nonlinear_convection!(du, u, p, t) = du .= (-6 * p.alpha / 3) * (u .* (p.D1 * u) + p.D1 * (u .^ 2)) + +function korteweg_de_vries(N, L, alpha) + D1 = fourier_derivative_operator(xmin = -L, xmax = L, N = N) + D3 = D1^3 # 3rd derivative operator + x = SBP.grid(D1) + u0 = @. cos(π * x / L) # Initial condition + p = (; D1, alpha) + + tspan = (0.0, 1.0) + prob = SplitODEProblem(MatrixOperator(-p.alpha * Matrix(D3)), + nonlinear_convection!, + u0, tspan, p); + + return x, prob +end; ``` -Reference solution using RadauIIA5 is below: +### Reference Solution + +Using an adaptive timestepping method to solve the system of ordinary differential equations with high precision. ```julia -prob = SplitODEProblem(DiffEqArrayOperator(-D3), kdv, û₀, (0.0,5.0), p) -sol = solve(prob, RadauIIA5(autodiff=false); reltol=1e-14,abstol=1e-14) -test_sol = TestSolution(sol) - -tslices=[0.0 1.0 2.0 3.0 5.0] -ys=hcat((Ti*sol(t) for t in tslices)...) -labels=["t=$t" for t in tslices] -plot(x,ys,label=labels) +L = 16.0 # Domain length +n = 128 # Number of Chebyshev points +alpha = 5.0 # Time scaling factor +xs, prob = korteweg_de_vries(n, L, alpha) + +@time sol = solve(prob, AutoVern7(RadauIIA5(autodiff=false)); + dt = 1e-4, reltol = 1e-12, abstol = 1e-12); + +test_sol = TestSolution(sol) # Reference solution for error estimation + +tslices = LinRange(prob.tspan..., 50) +ys = mapreduce(sol, hcat, tslices) +plt = heatmap(xs, tslices, ys', xlabel = "x", ylabel = "t") ``` -## High tolerances +## Work-Precision Diagrams -## In-family comparisons +### High Tolerances -1.IMEX methods (diagonal linear solver) +#### Implicit-Explicit Methods ```julia -abstols = 0.1 .^ (5:8) +abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) -multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(linsolve=diag_linsolve), :dts => 1e-5 * multipliers), - Dict(:alg => CNAB2(linsolve=diag_linsolve), :dts => 5e-7 * multipliers), - Dict(:alg => CNLF2(linsolve=diag_linsolve), :dts => 5e-7 * multipliers), - Dict(:alg => SBDF2(linsolve=diag_linsolve), :dts => 1e-5 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp1 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true,names=labels, - numruns=5,seconds=5, - save_everystop=false,appxsol=test_sol,maxiters=Int(1e5)); - -plot(wp1,label=labels,markershape=:auto,title="IMEX methods, diagonal linsolve, low order") +multipliers = 0.5 .^ (0:3) +setups = [ + Dict(:alg => IMEXEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), + Dict(:alg => SBDF2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "IMEXEuler", + "CNAB2", + "CNLF2", + "SBDF2", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Work-Precision Diagram, High Tolerance") ``` -2. ExpRK methods +#### Exponential Integrators ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => NorsettEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-2 * multipliers)] -labels = hcat("NorsettEuler", - "ETDRK2 (caching)") -@time wp2 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp2, label=labels, markershape=:auto, title="ExpRK methods, low order") +setups = [ + Dict(:alg => NorsettEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-4 * multipliers) +] +labels = hcat( + "NorsettEuler (caching)", + "NorsettEuler (m=5)", + "NorsettEuler (m=20)", + "ETDRK2 (caching)", + "ETDRK2 (m=5)", + "ETDRK2 (m=20)" +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, High Tolerance") ``` -## Between family comparisons + +#### Comparisons Between Families ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => CNAB2(linsolve=diag_linsolve), :dts => 5e-5 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-2 * multipliers)] -labels = ["CNAB2 (diagonal linsolve)" "ETDRK2"] -@time wp3 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp3, label=labels, markershape=:auto, title="Between family, low orders") +setups = [ + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "CNAB2 (dense linsolve)", + "CNAB2 (Krylov linsolve)", + "ETDRK2 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, High Tolerances") ``` -## Low tolerances +### Low Tolerances -## In-family comparisons +#### Implicit-Explicit Methods -1.IMEX methods (band linear solver) ```julia -abstols = 0.1 .^ (7:13) -reltols = 0.1 .^ (4:10) -setups = [Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Band, jac_upper=1, jac_lower=1)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Band, jac_upper=1, jac_lower=1)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1))] -labels = hcat("ARKODE3", "ARKODE4", "ARKODE5") -@time wp4 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp4, label=labels, markershape=:auto, title="IMEX methods, band linsolve, medium order") +abstols = 0.1 .^ (8:10) +reltols = 0.1 .^ (5:7) +setups = [ + Dict(:alg => KenCarp3()), + Dict(:alg => KenCarp4()), + # Dict(:alg => KenCarp5()), + Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), + # Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), + Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), +] +labels = hcat( + "KenCarp3", + "KenCarp4", + # "KenCarp5", + "KenCarp3 (Krylov)", + "KenCarp4 (Krylov)", + # "KenCarp5 (Krylov)", + "ARKODE3 (Krylov)", + "ARKODE4 (Krylov)", + "ARKODE5 (Krylov)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Krylov Linsolve, Low Tolerances") ``` -2.ExpRK methods +#### Exponential Integrators ```julia abstols = 0.1 .^ (7:11) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), - Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers)] -labels = hcat("ETDRK3 (caching)", "ETDRK4 (caching)", - "HochOst4 (caching)")#,"ETDRK4 (m=5)" "ETDRK3 (m=5)" "HochOst4 (m=5)") -@time wp5 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp5, label=labels, markershape=:auto, title="ExpRK methods, medium order") +setups = [ + Dict(:alg => ETDRK3(), :dts => 1e-3 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-3 * multipliers), + Dict(:alg => HochOst4(), :dts => 1e-3 * multipliers), +] +labels = hcat( + "ETDRK3 (caching)", + "ETDRK4 (caching)", + "HochOst4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, Low Tolerances") ``` -## Between family comparisons +#### Comparisons Between Families ```julia abstols = 0.1 .^ (7:11) reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1)), - Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers)] -labels = hcat("ARKODE (nondiagonal linsolve)", "ETDRK3 ()", "ETDRK4 ()") -@time wp6 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp6, label=labels, markershape=:auto, title="Between family, medium order") +setups = [ + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), + Dict(:alg => ETDRK3(), :dts => 1e-3 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-3 * multipliers), +] +labels = hcat( + "ARKODE (Krylov linsolve)", + "ETDRK3 (caching)", + "ETDRK4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, Low Tolerances") ``` ```julia, echo = false diff --git a/benchmarks/SimpleHandwrittenPDE/ks_fdm_wpd.jmd b/benchmarks/SimpleHandwrittenPDE/ks_fdm_wpd.jmd index 224929e14..8fca6f766 100644 --- a/benchmarks/SimpleHandwrittenPDE/ks_fdm_wpd.jmd +++ b/benchmarks/SimpleHandwrittenPDE/ks_fdm_wpd.jmd @@ -1,251 +1,253 @@ --- -title: KS FDM Work-Precision Diagrams -author: HAO HAO +title: Kuramoto-Sivashinsky Finite-Difference Method Work-Precision Diagrams +author: Arjit Seth --- +## Problem Description + +The Kuramoto-Sivashinsky partial differential equation is solved on the domain $[-L, L] \times [0, T] \in \mathbb R \times R,~L = 16,~T = 30$, with the following initial and periodic boundary conditions: +```math +\begin{align} + \partial_t u & = -\kappa u(t,x)\partial_x u(t,x) - \beta \partial_x^2 u(t,x) - \gamma \partial_x^4 u(t,x), \\ + u(0,x) & = \cos\left(\frac{2\pi}{L} x\right), \\ + u(t,-L) & = u(t,L) = 1. +\end{align} +``` +The spatial derivative operators are represented via finite difference approximations, incorporating the periodic boundary conditions on an equispaced grid of points $x_s \in [-L, L]$. The coefficients $\kappa = 1,~\beta = 1/2,~\gamma = 1/8$ are chosen to produce `interesting' behavior as seen in the reference solution below. +```math +\begin{align} + \frac{du}{dt} & = -\kappa u D_x u - \beta D_x^2 u - \gamma D_x^4 u, \\ + u(0,x_s) & = \cos\left(\frac{2\pi}{L} x_s\right), \\ + u(t,-L) & = u(t,L) = 1. +\end{align} +``` + +### Implementation + ```julia -using ApproxFun, OrdinaryDiffEq, Sundials, LinearSolve +using OrdinaryDiffEq using DiffEqDevTools -using LinearAlgebra, RecursiveFactorization -using Plots; gr() +using SciMLOperators +using LinearSolve +using LinearAlgebra +using SparseArrays +using Sundials +using SummationByPartsOperators +const SBP = SummationByPartsOperators +using Plots +gr(); ``` -Here is the KS equation using FDM. - ```julia -# Define the linear and nonlinear terms -function lin_term(N) - #which is -(D2+D4) - dx = 1/(N + 1) - d2 = (-2) * ones(N) # main diagonal - du2 = ones(N - 1) # off diagonal - - d4 = 6 * ones(N) # main diagonal - du4 = (-4) * ones(N - 1) # off diagonal - duu4 = ones(N - 2) - DiffEqArrayOperator(-0.0004*((1/dx^2) * diagm(-1 => du2, 0 => d2, 1 => du2) - +(1/dx^4) * diagm(-2 => duu4, -1 => du4, 0 => d4, 1 => du4, 2 => duu4))) -end - -function nl_term(N) - dx = 1/(N + 1) - du = ones(N - 1) # super diagonal - dl = -ones(N - 1) # lower diagonal - D = (-0.2/(4*dx)) * diagm(-1 => dl, 1 => du) - - tmp = zeros(N) - function (du,u,p,t) - @. tmp = u^2 - mul!(du, D, tmp) - end -end +nonlinear_convection!(du, u, p, t) = du .= (-p.alpha / 3) * (u .* (p.D1 * u) + p.D1 * (u .^ 2)) # Construct the problem -function ks(N) - f1 = lin_term(N) - f2 = nl_term(N) - dx = 1 / (N + 1) - xs = (1:N) * dx - - μ0 = 0.3; σ0 = 0.05 - f0 = x -> 0.6*exp(-(x - μ0)^2 / (2 * σ0^2)) - u0 = f0.(xs) - prob = SplitODEProblem(f1, f2, u0, (0.0, 1.0)) - xs, prob +function kuramoto_sivashinsky(N, L, alpha) + D1 = periodic_derivative_operator(derivative_order = 1, accuracy_order = 4, + xmin = -L, xmax = L, N = N) + D2 = periodic_derivative_operator(derivative_order = 2, accuracy_order = 4, + xmin = -L, xmax = L, N = N) + D4 = periodic_derivative_operator(derivative_order = 4, accuracy_order = 4, + xmin = -L, xmax = L, N = N) + + x = SBP.grid(D1) + u0 = @. cos(2π * x / L) # Initial condition + p = (; D1, alpha) + + tspan = (0.0, 1.0) + prob = SplitODEProblem(MatrixOperator(-p.alpha / 2 * (sparse(D2) + 1/4 * sparse(D4))), + nonlinear_convection!, + u0, tspan, p); + + return x, prob end; ``` -Reference solution using RadauIIA5 is below: +### Reference Solution -```julia -xs, prob = ks(200) -sol = solve(prob, RadauIIA5(autodiff=false); abstol=1e-14, reltol=1e-14) -test_sol = TestSolution(sol); +Using an adaptive timestepping method to solve the system of ordinary differential equations with high precision. -tslices = [0.0 0.25 0.50 0.75 1.] -ys = hcat((sol(t) for t in tslices)...) -labels = ["t = $t" for t in tslices] -plot(xs, ys, label=labels) -``` +```julia +N = 128 # Number of grid points +L = 16.0 # Domain length +alpha = 30.0 # Time scaling factor +xs, prob = kuramoto_sivashinsky(N, L, alpha) +@time sol = solve(prob, RadauIIA5(autodiff=false); dt = 1e-4, abstol=1e-14, reltol=1e-14, adaptive=true) -Linear solvers +test_sol = TestSolution(sol); -```julia -const LS_Dense = LinSolveFactorize(lu) +tslices = LinRange(prob.tspan..., 50) +ys = mapreduce(sol, hcat, tslices) +plt = heatmap(xs, tslices, ys', xlabel="x", ylabel="t") ``` -## High tolerances +## Work-Precision Diagrams -## In-family comparisons +### High Tolerances -1.IMEX methods (dense linear solver) +#### Implicit-Explicit Methods ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), - Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), - Dict(:alg => SBDF2(), :dts => 1e-3 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, dense linsolve, low order") +setups = [ + Dict(:alg => IMEXEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), + Dict(:alg => SBDF2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "IMEXEuler", + "CNAB2", + "CNLF2", + "SBDF2", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Work-Precision Diagram, High Tolerance") ``` -1.IMEX methods (Krylov linear solver) +#### Exponential Integrators ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(linsolve=KrylovJL_GMRES()), :dts => 1e-9 * multipliers), - Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-9 * multipliers), - Dict(:alg => CNLF2(linsolve=KrylovJL_GMRES()), :dts => 1e-9 * multipliers), - Dict(:alg => SBDF2(linsolve=KrylovJL_GMRES()), :dts => 1e-9 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, Krylov linsolve, low order") +setups = [ + Dict(:alg => NorsettEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-4 * multipliers), # Maxiters + Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-4 * multipliers), # Maxiters + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-4 * multipliers) +] +labels = hcat( + "NorsettEuler (caching)", + "NorsettEuler (m=5)", + "NorsettEuler (m=20)", + "ETDRK2 (caching)", + "ETDRK2 (m=5)", + "ETDRK2 (m=20)" +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, High Tolerance") ``` -2. ExpRK methods -```julia -abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much -reltols = 0.1 .^ (1:4) -multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => NorsettEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-3 * multipliers), - Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-3 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-3 * multipliers), - Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-2 * multipliers)] -labels = hcat("NorsettEuler (caching)", "NorsettEuler (m=5)", "NorsettEuler (m=20)", - "ETDRK2 (caching)", "ETDRK2 (m=5)", "ETDRK2 (m=20)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="ExpRK methods, low order") -``` - -## Between family comparisons +#### Comparisons Between Families ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), - Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-9 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-3 * multipliers)] -labels = ["CNAB2 (dense linsolve)" "CNAB2 (Krylov linsolve)" "ETDRK2 (m=5)"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="Between family, low orders") +setups = [ + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "CNAB2 (dense)", + "CNAB2 (Krylov)", + "ETDRK2 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, High Tolerances") ``` -## Low tolerances - -## In-family comparisons +### Low Tolerances -1.IMEX methods (dense linear solver) +#### Implicit-Explicit Methods +Dense and Krylov linear solvers. ```julia -abstols = 0.1 .^ (7:13) -reltols = 0.1 .^ (4:10) -setups = [Dict(:alg => KenCarp3()), - Dict(:alg => KenCarp4()), - Dict(:alg => KenCarp5()), - Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Dense)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Dense)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Dense))] -labels = hcat("KenCarp3", "KenCarp4", "KenCarp5", "ARKODE3", "ARKODE4", "ARKODE5") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, dense linsolve, medium order") +abstols = 0.1 .^ (8:12) +reltols = 0.1 .^ (5:9) +setups = [ + Dict(:alg => KenCarp3()), + Dict(:alg => KenCarp4()), + Dict(:alg => KenCarp5()), + Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), + Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), +] +labels = hcat( + "KenCarp3 (dense)", + "KenCarp4 (dense)", + "KenCarp5 (dense)", + "KenCarp3 (Krylov)", + "KenCarp4 (Krylov)", + "KenCarp5 (Krylov)", + "ARKODE3 (Krylov)", + "ARKODE4 (Krylov)", + "ARKODE5 (Krylov)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Krylov Linsolve, Low Tolerances") ``` -1.IMEX methods (Krylov linear solver) - -```julia -abstols = 0.1 .^ (7:13) -reltols = 0.1 .^ (4:10) -setups = [Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), - Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES))] -labels = ["KenCarp3" "KenCarp4" "KenCarp5" "ARKODE3" "ARKODE4" "ARKODE5"] -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="IMEX methods, medium order") -``` - -2.ExpRK methods +#### Exponential Integrators ```julia abstols = 0.1 .^ (7:11) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK3(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers), - Dict(:alg => HochOst4(krylov=true, m=5), :dts => 1e-2 * multipliers)] -labels = hcat("ETDRK3 (caching)", "ETDRK3 (m=5)", "ETDRK4 (caching)", - "ETDRK4 (m=5)", "HochOst4 (caching)", "HochOst4 (m=5)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="ExpRK methods, medium order") +setups = [ + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), + Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers), +] +labels = hcat( + "ETDRK3 (caching)", + "ETDRK4 (caching)", + "HochOst4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, Low Tolerances") ``` -## Between family comparisons - +#### Comparisons Between Families ```julia abstols = 0.1 .^ (7:11) reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => KenCarp5()), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Dense)), - Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), - Dict(:alg => ETDRK3(krylov=true, m=5), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(krylov=true, m=5), :dts => 1e-2 * multipliers)] -labels = hcat("KenCarp5 (dense linsolve)", "ARKODE (dense linsolve)", "KenCarp5 (Krylov linsolve)", - "ARKODE (Krylov linsolve)", "ETDRK3 (m=5)", "ETDRK4 (m=5)") -@time wp = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp, label=labels, markershape=:auto, title="Between family, medium order") +setups = [ + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), +] +labels = hcat( + "ARKODE5 (Krylov)", + "ETDRK3 (caching)", + "ETDRK4 (caching)" +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, Low Tolerances") ``` + ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/SimpleHandwrittenPDE/ks_spectral_wpd.jmd b/benchmarks/SimpleHandwrittenPDE/ks_spectral_wpd.jmd index f096e90f0..1850fbb93 100644 --- a/benchmarks/SimpleHandwrittenPDE/ks_spectral_wpd.jmd +++ b/benchmarks/SimpleHandwrittenPDE/ks_spectral_wpd.jmd @@ -1,181 +1,246 @@ --- -title: KS Pseudospectral Methods Work-Precision Diagrams -author: HAO HAO +title: Kuramoto-Sivashinsky Pseudospectral Methods Work-Precision Diagrams +author: Arjit Seth --- -```julia -using ApproxFun, OrdinaryDiffEq, Sundials, LinearSolve -using DiffEqDevTools -using LinearAlgebra, RecursiveFactorization -using Plots; gr() +## Problem Description + +The Kuramoto-Sivashinsky partial differential equation is solved on the domain $[-L, L] \times [0, T] \in \mathbb R \times R,~L = 16,~T = 10$, with the following initial and periodic boundary conditions: +```math +\begin{align} + \partial_t u & = -\kappa u(t,x) \partial_x u(t,x) - \beta \partial_x^2 u(t,x) - \gamma \partial_x^4 u(t,x) \\ + u(0,x) & = \cos\left(\frac{2\pi}{L} x\right), \\ + u(t,-L) & = u(t,L) = 1. +\end{align} +``` +The spatial derivative operators are represented via Fourier pseudospectral approximations. Here, the domain is discretized by projecting on an equispaced grid of points $x_s \in [-L, L]$; the solution is approximated on this grid via linear combinations of sinusoidal functions in space. The coefficients $\kappa = 1, \beta = 1/2,~\gamma = 1/16$ are chosen to produce `interesting' behavior as seen in the reference solution below. +```math +\begin{align} + \frac{du}{dt} & = -\kappa u D_x u - \beta D_x^2 u - \gamma D_x^4 u \\ + u(0,x_s) & = \cos\left(\frac{2\pi}{L} x_s\right), \\ + u(t,-L) & = u(t,L) = 1. +\end{align} ``` -Here is the kuramoto_sivashinsky equation using Fourier spectral methods. +### Implementation ```julia -S = Fourier() -n = 512 -x = points(S, n) -D2 = Derivative(S,2)[1:n,1:n] -D = (Derivative(S) → S)[1:n,1:n] -T = ApproxFun.plan_transform(S, n) -Ti = ApproxFun.plan_itransform(S, n) - -D4 = Derivative(S,4)[1:n,1:n] -û₀ = T*(cos.(x./16).*(1 .+ sin.(x./2.04))) -tmp=similar(û₀) -q = (D,T,Ti,tmp,similar(tmp),similar(tmp)) -function kuramoto_sivashinsky(dû,û,q,t) - D,T,Ti,tmp,u,uc = q - mul!(u, D, û) - mul!(tmp, Ti, u) - mul!(u, Ti, û) - @. tmp=tmp*u - mul!(u,T, tmp) - #mul!(uc, D2, û) - @. dû = - u -end +using OrdinaryDiffEq +using DiffEqDevTools +using SciMLOperators +using LinearSolve +using LinearAlgebra +using SparseArrays +using Sundials +using SummationByPartsOperators +const SBP = SummationByPartsOperators +using Plots +gr(); ``` -Reference solution using Rodas5 is below: - ```julia -prob = SplitODEProblem(DiffEqArrayOperator(-Diagonal(D4+D2)), kuramoto_sivashinsky, û₀, (0.0,5.0), q) -sol = solve(prob,RadauIIA5(autodiff=false); reltol=1e-14,abstol=1e-14) -test_sol = TestSolution(sol) - -tslices=[0.0 1.0 2.0 3.0 5.0] -ys=hcat((Ti*sol(t) for t in tslices)...) -labels=["t=$t" for t in tslices] -plot(x,ys,label=labels) +nonlinear_convection!(du, u, p, t) = du .= (-p.alpha / 3) * (u .* (p.D1 * u) + p.D1 * (u .^ 2)) + +function kuramoto_sivashinsky(N, L, alpha) + D1 = fourier_derivative_operator(xmin = -L, xmax = L, N = N) + D2 = D1^2 # 2nd derivative operator + D4 = D1^4 # 4th derivative operator + x = SBP.grid(D1) + u0 = @. cos(2π * x / L) # Initial condition + p = (; D1, alpha) + + tspan = (0.0, 1.0) + prob = SplitODEProblem(MatrixOperator(-p.alpha / 2 * (Matrix(D2) + 1/8 * Matrix(D4))), + nonlinear_convection!, + u0, tspan, p); + + return x, prob +end; ``` -## High tolerances +### Reference Solution + +Using an adaptive timestepping method to solve the system of ordinary differential equations with high precision. ```julia -diag_linsolve=LinSolveFactorize(W->let tmp = tmp - for i in 1:size(W, 1) - tmp[i] = W[i, i] - end - Diagonal(tmp) -end) +N = 128 # Number of grid points +L = 16.0 # Domain length +alpha = 10.0 # Time scaling factor +xs, prob = kuramoto_sivashinsky(N, L, alpha) + +sol = solve(prob, Rodas5(autodiff=false); dt = 1e-4, reltol = 1e-12, abstol = 1e-12) + +test_sol = TestSolution(sol) # Reference solution for error estimation + +tslices = LinRange(prob.tspan..., 50) +ys = mapreduce(sol, hcat, tslices) +heatmap(xs, tslices, ys', xlabel = "x", ylabel = "t") ``` -## In-family comparisons +## Work-Precision Diagrams -1.IMEX methods (diagonal linear solver) +### High Tolerances + +#### Implicit-Explicit Methods ```julia -abstols = 0.1 .^ (5:8) +abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) -multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => IMEXEuler(linsolve=diag_linsolve), :dts => 1e-3 * multipliers), - Dict(:alg => CNAB2(linsolve=diag_linsolve), :dts => 5e-3 * multipliers), - Dict(:alg => CNLF2(linsolve=diag_linsolve), :dts => 5e-3 * multipliers), - Dict(:alg => SBDF2(linsolve=diag_linsolve), :dts => 1e-3 * multipliers)] -labels = ["IMEXEuler" "CNAB2" "CNLF2" "SBDF2"] -@time wp1 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true,names=labels, - numruns=5,seconds=5, - save_everystop=false,appxsol=test_sol,maxiters=Int(1e5)); - -plot(wp1,label=labels,markershape=:auto,title="IMEX methods, diagonal linsolve, low order") +multipliers = 0.5 .^ (0:3) +setups = [ + Dict(:alg => IMEXEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNLF2(), :dts => 1e-4 * multipliers), + Dict(:alg => SBDF2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "IMEXEuler", + "CNAB2", + "CNLF2", + "SBDF2", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Work-Precision Diagram, High Tolerance") ``` -2. ExpRK methods +#### Exponential Integrators ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => NorsettEuler(), :dts => 1e-3 * multipliers), - Dict(:alg => ETDRK2(), :dts => 1e-2 * multipliers)] -labels = hcat("NorsettEuler", - "ETDRK2 (caching)") -@time wp2 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp2, label=labels, markershape=:auto, title="ExpRK methods, low order") +setups = [ + Dict(:alg => NorsettEuler(), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => NorsettEuler(krylov=true, m=20), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=5), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(krylov=true, m=20), :dts => 1e-4 * multipliers) +] +labels = hcat( + "NorsettEuler (caching)", + "NorsettEuler (m=5)", + "NorsettEuler (m=20)", + "ETDRK2 (caching)", + "ETDRK2 (m=5)", + "ETDRK2 (m=20)" +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, High Tolerance") ``` -## Between family comparisons + +#### Comparisons Between Families ```julia abstols = 0.1 .^ (5:8) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (1:4) multipliers = 0.5 .^ (0:3) -setups = [Dict(:alg => CNAB2(linsolve=diag_linsolve), :dts => 5e-3 * multipliers) - Dict(:alg => ETDRK2(), :dts => 1e-2 * multipliers)] -labels = ["CNAB2 (diagonal linsolve)" "ETDRK2"] -@time wp3 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp3, label=labels, markershape=:auto, title="Between family, low orders") +setups = [ + Dict(:alg => CNAB2(), :dts => 1e-4 * multipliers), + Dict(:alg => CNAB2(linsolve=KrylovJL_GMRES()), :dts => 1e-4 * multipliers), + Dict(:alg => ETDRK2(), :dts => 1e-4 * multipliers), +] +labels = hcat( + "CNAB2 (dense linsolve)", + "CNAB2 (Krylov linsolve)", + "ETDRK2 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, High Tolerances") ``` -## Low tolerances -## In-family comparisons +### Low Tolerances -1.IMEX methods (band linear solver) +#### Implicit-Explicit Methods ```julia -abstols = 0.1 .^ (7:13) -reltols = 0.1 .^ (4:10) -setups = [Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:Band, jac_upper=1, jac_lower=1)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:Band, jac_upper=1, jac_lower=1)), - Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1))] -labels = hcat("ARKODE3", "ARKODE4", "ARKODE5") -@time wp4 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp4, label=labels, markershape=:auto, title="IMEX methods, band linsolve, medium order") +abstols = 0.1 .^ (7:10) +reltols = 0.1 .^ (4:7) +setups = [ + Dict(:alg => KenCarp3()), + Dict(:alg => KenCarp4()), + Dict(:alg => KenCarp5()), + Dict(:alg => KenCarp3(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp4(linsolve=KrylovJL_GMRES())), + Dict(:alg => KenCarp5(linsolve=KrylovJL_GMRES())), + # ARKODE with banded linear solvers fail. + Dict(:alg => ARKODE(Sundials.Implicit(), order=3, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=4, linear_solver=:GMRES)), + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), +] +labels = hcat( + "KenCarp3", + "KenCarp4", + "KenCarp5", + "KenCarp3 (Krylov)", + "KenCarp4 (Krylov)", + "KenCarp5 (Krylov)", + "ARKODE3 (Krylov)", + "ARKODE4 (Krylov)", + "ARKODE5 (Krylov)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="IMEX Methods, Krylov Linsolve, Low Tolerances") ``` -2.ExpRK methods +#### Exponential Integrators ```julia abstols = 0.1 .^ (7:11) # all fixed dt methods so these don't matter much reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), - Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers)] -labels = hcat("ETDRK3 (caching)", "ETDRK4 (caching)", - "HochOst4 (caching)") -@time wp5 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp5, label=labels, markershape=:auto, title="ExpRK methods, medium order") +setups = [ + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), + Dict(:alg => HochOst4(), :dts => 1e-2 * multipliers), +] +labels = hcat( + "ETDRK3 (caching)", + "ETDRK4 (caching)", + "HochOst4 (caching)", +) +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="ExpRK Methods, Low Tolerances") ``` -## Between family comparisons +#### Comparisons Between Families ```julia abstols = 0.1 .^ (7:11) reltols = 0.1 .^ (4:8) multipliers = 0.5 .^ (0:4) -setups = [Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:Band, jac_upper=1, jac_lower=1)), - Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), - Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers)] -labels = hcat("ARKODE (nondiagonal linsolve)", "ETDRK3 ()", "ETDRK4 ()") -@time wp6 = WorkPrecisionSet(prob,abstols,reltols,setups; - print_names=true, names=labels, - numruns=5, error_estimate=:l2, - save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); - -plot(wp6, label=labels, markershape=:auto, title="Between family, medium order") +setups = [ + Dict(:alg => ARKODE(Sundials.Implicit(), order=5, linear_solver=:GMRES)), + Dict(:alg => ETDRK3(), :dts => 1e-2 * multipliers), + Dict(:alg => ETDRK4(), :dts => 1e-2 * multipliers), +] +labels = hcat("ARKODE (Krylov linsolve)", "ETDRK3 ()", "ETDRK4 ()") +@time wp = WorkPrecisionSet(prob, abstols, reltols, setups; + print_names=true, names=labels, numruns=5, error_estimate=:l2, + save_everystep=false, appxsol=test_sol, maxiters=Int(1e5)); + +plot(wp, label=labels, markershape=:auto, title="Between Families, Low Tolerances") ``` + ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/StiffBVP/Project.toml b/benchmarks/StiffBVP/Project.toml index 864f09bcc..8346c199c 100644 --- a/benchmarks/StiffBVP/Project.toml +++ b/benchmarks/StiffBVP/Project.toml @@ -13,7 +13,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" BenchmarkTools = "1" BoundaryValueDiffEq = "5.16" BracketingNonlinearSolve = "1.1" -CairoMakie = "0.12, 0.13" +CairoMakie = "0.12, 0.13, 0.15" DiffEqDevTools = "2.48" Interpolations = "0.15.1, 0.16" ODEInterface = "0.5" diff --git a/benchmarks/StiffBVP/ionic_liquid_dehumidifier.jmd b/benchmarks/StiffBVP/ionic_liquid_dehumidifier.jmd index 362538c49..364459d7f 100644 --- a/benchmarks/StiffBVP/ionic_liquid_dehumidifier.jmd +++ b/benchmarks/StiffBVP/ionic_liquid_dehumidifier.jmd @@ -6,15 +6,16 @@ author: Qingyu Qu and maysam-gholampour This benchmark compares the runtime and error of BVP solvers, including FIRK solvers and FORTRAN BVP solvers on ionic liquid dehumidifier problem. For this problem, we test the following solvers: -- BoundaryValueDiffEq.jl's FIRK nested solvers(including `RadauIIa3`, `RadauIIa5`, `RadauIIa7`, `LobattoIIIa3`, `LobattoIIIa4`, `LobattoIIIa5`, `LobattoIIIb3`, `LobattoIIIb4`, `LobattoIIIb5`, `LobattoIIIc3`, `LobattoIIIc4`, `LobattoIIIc5`). -- FORTRAN BVP solvers from ODEInterface.jl(including `BVPM2` and `COLNEW`). + - BoundaryValueDiffEq.jl's FIRK nested solvers(including `RadauIIa3`, `RadauIIa5`, `RadauIIa7`, `LobattoIIIa3`, `LobattoIIIa4`, `LobattoIIIa5`, `LobattoIIIb3`, `LobattoIIIb4`, `LobattoIIIb5`, `LobattoIIIc3`, `LobattoIIIc4`, `LobattoIIIc5`). + - FORTRAN BVP solvers from ODEInterface.jl(including `BVPM2` and `COLNEW`). # Setup Fetch required packages. ```julia -using BoundaryValueDiffEq, BracketingNonlinearSolve, ODEInterface, DiffEqDevTools, BenchmarkTools, +using BoundaryValueDiffEq, BracketingNonlinearSolve, ODEInterface, DiffEqDevTools, + BenchmarkTools, Interpolations, StaticArrays, CairoMakie ``` @@ -22,19 +23,68 @@ Set up the benchmarked solvers. ```julia solvers_all = [ - (; pkg = :boundaryvaluediffeq, type = :firk, name = "RadauIIa3", solver = Dict(:alg => RadauIIa3(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "RadauIIa5", solver = Dict(:alg => RadauIIa5(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "RadauIIa7", solver = Dict(:alg => RadauIIa7(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIa3", solver = Dict(:alg => LobattoIIIa3(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIa4", solver = Dict(:alg => LobattoIIIa4(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIa5", solver = Dict(:alg => LobattoIIIa5(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIb3", solver = Dict(:alg => LobattoIIIb3(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIb4", solver = Dict(:alg => LobattoIIIb4(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIb5", solver = Dict(:alg => LobattoIIIb5(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIb3", solver = Dict(:alg => LobattoIIIc3(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIb4", solver = Dict(:alg => LobattoIIIc4(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :boundaryvaluediffeq, type = :firk, name = "LobattoIIIb5", solver = Dict(:alg => LobattoIIIc5(; nested_nlsolve = true), :dts=>1.0 ./ 10.0 .^ (2:4))), - (; pkg = :wrapper, type = :general, name = "COLNEW", solver = Dict(:alg => COLNEW(), :dts=>1.0 ./ 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "RadauIIa3", + solver = Dict(:alg => RadauIIa3(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "RadauIIa5", + solver = Dict(:alg => RadauIIa5(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "RadauIIa7", + solver = Dict(:alg => RadauIIa7(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "LobattoIIIa3", + solver = Dict(:alg => LobattoIIIa3(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "LobattoIIIa4", + solver = Dict(:alg => LobattoIIIa4(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "LobattoIIIa5", + solver = Dict(:alg => LobattoIIIa5(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "LobattoIIIb3", + solver = Dict(:alg => LobattoIIIb3(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "LobattoIIIb4", + solver = Dict(:alg => LobattoIIIb4(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "LobattoIIIb5", + solver = Dict(:alg => LobattoIIIb5(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "LobattoIIIb3", + solver = Dict(:alg => LobattoIIIc3(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "LobattoIIIb4", + solver = Dict(:alg => LobattoIIIc4(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :boundaryvaluediffeq, + type = :firk, + name = "LobattoIIIb5", + solver = Dict(:alg => LobattoIIIc5(; nested_nlsolve = true), :dts=>1.0 ./ + 10.0 .^ (2:4))), + (; pkg = :wrapper, type = :general, name = "COLNEW", + solver = Dict(:alg => COLNEW(), :dts=>1.0 ./ 10.0 .^ (2:4))) ]; ``` @@ -49,110 +99,110 @@ reltols = 1.0 ./ 10.0 .^ (1:3); ```julia iᵥ_ₛₐₜ(T) = 10^(6.697227966814859 - 273.8702703951898 / - (T + 642.1729733423742)) + (T + 642.1729733423742)) begin - "Properties Interpolations and Extrapolations" - - const Tⁿᵒᵈᵉˢ = @SVector[x + 273.15 for x in [25.0, 35.0, 60.0, 80.0]] - const ξⁿᵒᵈᵉˢ_2 = @SVector[x * 0.01 for x in [0.0, 50.0, 70.0, 80.0, 85.0, 90.0, 95.0]] - const nodes = (Tⁿᵒᵈᵉˢ, ξⁿᵒᵈᵉˢ_2) - - const Δh_data = @SMatrix[ - 0.0 -58000.0 -75000.0 -74000.0 -68000.0 -55000.0 -34000.0 - 0.0 -57000.0 -72000.0 -72000.0 -67000.0 -54000.0 -33000.0 - 0.0 -52000.0 -67000.0 -67000.0 -62000.0 -51000.0 -31000.0 - 0.0 -48000.0 -62000.0 -64000.0 -59000.0 -49000.0 -30000.0 - ] - # # ================== Interpolation and Extrapolation P_ν ================== - const a0_p = 12.10 - const a1_p = -28.01 - const a2_p = 50.34 - const a3_p = -24.63 - const b0_p = 1212.67 - const b1_p = 772.37 - const b2_p = 614.59 - const b3_p = 493.33 - - @inline function _Pᵥₐₚₒᵣ_ₛₒₗ(T, ξ) - A = a0_p + a1_p * ξ + a2_p * ξ^2 + a3_p * ξ^3 - B = b0_p + b1_p * ξ + b2_p * ξ^2 + b3_p * ξ^3 - return 10^(A - B / T) * 100.0 - end - # ================== Interpolation and Extrapolation cp ==================== - function _cpₛₒₗ(T, ξ) - return ((0.00476 * T - 4.01) * ξ + 4.21) * 1e3 - end - - @inline function _Δh(T, ξ) - Δh_interpolated = interpolate(nodes, Δh_data, Gridded(Linear())) - Δh_extrapolated = extrapolate(Δh_interpolated, Line()) - return Δh_extrapolated(T, ξ) - end - - @inline function _iₛₒₗ(T, ξ) - Δh = _Δh(T, ξ) - i = _cpₛₒₗ(T, ξ) * (T - 273.15) + Δh - return i - end - - # ================== Find T given i_sol and ξ ==================== - # Function to find the root, given i_sol and ξ - @inline function calculate_T_sol(iᵛₛₒₗ, ξ; T_lower = -150.0 + 273.15, T_upper = 95.0 + 273.15) - f(T, p) = _iₛₒₗ(T, p[2]) - p[1] - p = @SVector[iᵛₛₒₗ, ξ] - T_span = (T_lower, T_upper) - prob = IntervalNonlinearProblem{false}(f, T_span, p) - result = solve(prob, BracketingNonlinearSolve.ITP()) - return result.u - end + "Properties Interpolations and Extrapolations" + + const Tⁿᵒᵈᵉˢ = @SVector[x + 273.15 for x in [25.0, 35.0, 60.0, 80.0]] + const ξⁿᵒᵈᵉˢ_2 = @SVector[x * 0.01 for x in [0.0, 50.0, 70.0, 80.0, 85.0, 90.0, 95.0]] + const nodes = (Tⁿᵒᵈᵉˢ, ξⁿᵒᵈᵉˢ_2) + + const Δh_data = @SMatrix[0.0 -58000.0 -75000.0 -74000.0 -68000.0 -55000.0 -34000.0 + 0.0 -57000.0 -72000.0 -72000.0 -67000.0 -54000.0 -33000.0 + 0.0 -52000.0 -67000.0 -67000.0 -62000.0 -51000.0 -31000.0 + 0.0 -48000.0 -62000.0 -64000.0 -59000.0 -49000.0 -30000.0] + # # ================== Interpolation and Extrapolation P_ν ================== + const a0_p = 12.10 + const a1_p = -28.01 + const a2_p = 50.34 + const a3_p = -24.63 + const b0_p = 1212.67 + const b1_p = 772.37 + const b2_p = 614.59 + const b3_p = 493.33 + + @inline function _Pᵥₐₚₒᵣ_ₛₒₗ(T, ξ) + A = a0_p + a1_p * ξ + a2_p * ξ^2 + a3_p * ξ^3 + B = b0_p + b1_p * ξ + b2_p * ξ^2 + b3_p * ξ^3 + return 10^(A - B / T) * 100.0 + end + # ================== Interpolation and Extrapolation cp ==================== + function _cpₛₒₗ(T, ξ) + return ((0.00476 * T - 4.01) * ξ + 4.21) * 1e3 + end + + @inline function _Δh(T, ξ) + Δh_interpolated = interpolate(nodes, Δh_data, Gridded(Linear())) + Δh_extrapolated = extrapolate(Δh_interpolated, Line()) + return Δh_extrapolated(T, ξ) + end + + @inline function _iₛₒₗ(T, ξ) + Δh = _Δh(T, ξ) + i = _cpₛₒₗ(T, ξ) * (T - 273.15) + Δh + return i + end + + # ================== Find T given i_sol and ξ ==================== + # Function to find the root, given i_sol and ξ + @inline function calculate_T_sol(iᵛₛₒₗ, ξ; T_lower = -150.0 + 273.15, T_upper = 95.0 + + 273.15) + f(T, p) = _iₛₒₗ(T, p[2]) - p[1] + p = @SVector[iᵛₛₒₗ, ξ] + T_span = (T_lower, T_upper) + prob = IntervalNonlinearProblem{false}(f, T_span, p) + result = solve(prob, BracketingNonlinearSolve.ITP()) + return result.u + end end function ionic_liquid_coil_ode!(du, u, p, t) - # ωₐᵢᵣ, iₐᵢᵣ, ṁₛₒₗ,ξₛₒₗ, iₛₒₗ = u - # ======================================== - Le = p[1] - ∂Qᵣ = p[2] - ṁₐᵢᵣ = p[3] - NTUᴰₐᵢᵣ = p[4] - σ = p[5] - ṁₛₒₗ_ᵢₙ = p[6] - ξₛₒₗ_ᵢₙ = p[7] - iₛₒₗ_ᵢₙ = p[8] - ωₐ_ᵢₙ = p[9] - iₐ_ᵢₙ = p[10] - MR = ṁₛₒₗ_ᵢₙ / ṁₐᵢᵣ - ER = iₛₒₗ_ᵢₙ / iₐ_ᵢₙ - # ======================================== - Tₛₒₗ = calculate_T_sol(u[5] * iₛₒₗ_ᵢₙ, u[4] * ξₛₒₗ_ᵢₙ) - Pᵥₐₚₒᵣ_ₛₒₗ = _Pᵥₐₚₒᵣ_ₛₒₗ(Tₛₒₗ, u[4] * ξₛₒₗ_ᵢₙ) - ωₑ = 0.622 * Pᵥₐₚₒᵣ_ₛₒₗ / (101325.0 - Pᵥₐₚₒᵣ_ₛₒₗ) / ωₐ_ᵢₙ - iₑ = (1.005 * (Tₛₒₗ - 273.15) + ωₑ * ωₐ_ᵢₙ * (2500.9 + 1.82 * (Tₛₒₗ - 273.15))) / iₐ_ᵢₙ - iₑ *= 1000 - iᵥₐₚₒᵣ_ₜₛ = iᵥ_ₛₐₜ(Tₛₒₗ) / iₐ_ᵢₙ - - du[1] = σ * NTUᴰₐᵢᵣ * (u[1] - ωₑ) - du[2] = σ * NTUᴰₐᵢᵣ * Le * ((u[2] - iₑ) + (ωₐ_ᵢₙ * iᵥₐₚₒᵣ_ₜₛ * (1 / Le - 1) * (u[1] - ωₑ))) - du[3] = σ * ωₐ_ᵢₙ * du[1] / MR - du[4] = (-u[4] / u[3]) * du[3] - du[5] = (1 / u[3]) * (σ * (1.0 / (MR * ER)) * du[2] - u[5] * du[3] - ∂Qᵣ / (ṁₛₒₗ_ᵢₙ * iₛₒₗ_ᵢₙ)) - nothing + # ωₐᵢᵣ, iₐᵢᵣ, ṁₛₒₗ,ξₛₒₗ, iₛₒₗ = u + # ======================================== + Le = p[1] + ∂Qᵣ = p[2] + ṁₐᵢᵣ = p[3] + NTUᴰₐᵢᵣ = p[4] + σ = p[5] + ṁₛₒₗ_ᵢₙ = p[6] + ξₛₒₗ_ᵢₙ = p[7] + iₛₒₗ_ᵢₙ = p[8] + ωₐ_ᵢₙ = p[9] + iₐ_ᵢₙ = p[10] + MR = ṁₛₒₗ_ᵢₙ / ṁₐᵢᵣ + ER = iₛₒₗ_ᵢₙ / iₐ_ᵢₙ + # ======================================== + Tₛₒₗ = calculate_T_sol(u[5] * iₛₒₗ_ᵢₙ, u[4] * ξₛₒₗ_ᵢₙ) + Pᵥₐₚₒᵣ_ₛₒₗ = _Pᵥₐₚₒᵣ_ₛₒₗ(Tₛₒₗ, u[4] * ξₛₒₗ_ᵢₙ) + ωₑ = 0.622 * Pᵥₐₚₒᵣ_ₛₒₗ / (101325.0 - Pᵥₐₚₒᵣ_ₛₒₗ) / ωₐ_ᵢₙ + iₑ = (1.005 * (Tₛₒₗ - 273.15) + ωₑ * ωₐ_ᵢₙ * (2500.9 + 1.82 * (Tₛₒₗ - 273.15))) / iₐ_ᵢₙ + iₑ *= 1000 + iᵥₐₚₒᵣ_ₜₛ = iᵥ_ₛₐₜ(Tₛₒₗ) / iₐ_ᵢₙ + + du[1] = σ * NTUᴰₐᵢᵣ * (u[1] - ωₑ) + du[2] = σ * NTUᴰₐᵢᵣ * Le * + ((u[2] - iₑ) + (ωₐ_ᵢₙ * iᵥₐₚₒᵣ_ₜₛ * (1 / Le - 1) * (u[1] - ωₑ))) + du[3] = σ * ωₐ_ᵢₙ * du[1] / MR + du[4] = (-u[4] / u[3]) * du[3] + du[5] = (1 / u[3]) * + (σ * (1.0 / (MR * ER)) * du[2] - u[5] * du[3] - ∂Qᵣ / (ṁₛₒₗ_ᵢₙ * iₛₒₗ_ᵢₙ)) + nothing end function bca!(res_a, u_a, p) - res_a[1] = u_a[3] - 1.0 - res_a[2] = u_a[4] - 1.0 - res_a[3] = u_a[5] - 1.0 - nothing + res_a[1] = u_a[3] - 1.0 + res_a[2] = u_a[4] - 1.0 + res_a[3] = u_a[5] - 1.0 + nothing end function bcb!(res_b, u_b, p) - res_b[1] = u_b[1] - 1.0 - res_b[2] = u_b[2] - 1.0 - nothing + res_b[1] = u_b[1] - 1.0 + res_b[2] = u_b[2] - 1.0 + nothing end - dt = 0.05 tspan = (0.0, 1.0) @@ -172,31 +222,32 @@ p = @SVector[Le, ∂Qᵣ, ṁₐᵢᵣ_ᵢₙ, NTUᴰₐᵢᵣ, σ, ṁₛₒₗ u0 = [0.1, 0.1, 1.0001, 0.9, 1.01] bvp_fun = BVPFunction( - ionic_liquid_coil_ode!, (bca!, bcb!); - bcresid_prototype = (zeros(3), zeros(2)), twopoint = Val(true), + ionic_liquid_coil_ode!, (bca!, bcb!); + bcresid_prototype = (zeros(3), zeros(2)), twopoint = Val(true) ) prob = TwoPointBVProblem(bvp_fun, u0, tspan, p) sol = solve(prob, RadauIIa7(nested_nlsolve = true, nest_tol = 1e-3), dt = dt, abstol = 1e-5) testsol = TestSolution(sol) -wp_set = WorkPrecisionSet(prob, abstols, reltols, getfield.(solvers_all, :solver); names = getfield.(solvers_all, :name), appxsol = testsol, maxiters=Int(1e4)) +wp_set = WorkPrecisionSet(prob, abstols, reltols, getfield.(solvers_all, :solver); + names = getfield.(solvers_all, :name), appxsol = testsol, maxiters = Int(1e4)) ``` Plot the result ```julia fig = begin - LINESTYLES = Dict(:boundaryvaluediffeq => :solid, :simpleboundaryvaluediffeq => :dash, :wrapper => :dot) - ASPECT_RATIO = 0.7 - WIDTH = 1200 - HEIGHT = round(Int, WIDTH * ASPECT_RATIO) - STROKEWIDTH = 2.5 + LINESTYLES = Dict(:boundaryvaluediffeq => :solid, :simpleboundaryvaluediffeq => :dash, :wrapper => :dot) + ASPECT_RATIO = 0.7 + WIDTH = 1200 + HEIGHT = round(Int, WIDTH * ASPECT_RATIO) + STROKEWIDTH = 2.5 colors = cgrad(:seaborn_bright, length(solvers_all); categorical = true) cycle = Cycle([:marker], covary = true) plot_theme = Theme(Lines = (; cycle), Scatter = (; cycle)) - with_theme(plot_theme) do + with_theme(plot_theme) do fig = Figure(; size = (WIDTH, HEIGHT)) ax = Axis(fig[1, 1], ylabel = L"Time $\mathbf{(s)}$", xlabelsize = 22, ylabelsize = 22, @@ -214,18 +265,19 @@ fig = begin errors = [err.l∞ for err in errors] l = lines!(ax, errors, times; linestyle = LINESTYLES[solver.pkg], label = name, linewidth = 5, color = colors[i]) - sc = scatter!(ax, errors, times; label = name, markersize = 16, strokewidth = 2, + sc = scatter!( + ax, errors, times; label = name, markersize = 16, strokewidth = 2, color = colors[i]) push!(ls, l) push!(scs, sc) end - xlims!(ax; high=1) - ylims!(ax; low=1e-4) + xlims!(ax; high = 1) + ylims!(ax; low = 1e-4) axislegend(ax, [[l, sc] for (l, sc) in zip(ls, scs)], [solver.name for solver in solvers_all[idxs]], "BVP Solvers"; - framevisible=true, framewidth = STROKEWIDTH, position = :rb, + framevisible = true, framewidth = STROKEWIDTH, position = :rb, titlesize = 20, labelsize = 16, patchsize = (40.0f0, 20.0f0)) fig[0, :] = Label(fig, "Ionic Liquid Dehumidifier Benchmark", @@ -239,8 +291,7 @@ end save("ionic_liquid_dehumidifier.svg", fig) ``` - ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/StiffDDE/QuorumSensing.jmd b/benchmarks/StiffDDE/QuorumSensing.jmd index 9e808ac41..fef410291 100644 --- a/benchmarks/StiffDDE/QuorumSensing.jmd +++ b/benchmarks/StiffDDE/QuorumSensing.jmd @@ -15,14 +15,16 @@ using DelayDiffEq, DiffEqDevTools, DDEProblemLibrary, Plots import DDEProblemLibrary: prob_dde_qs gr() -sol = solve(prob_dde_qs, MethodOfSteps(Vern9(); fpsolve = NLFunctional(; max_iter = 1000)); reltol=1e-14, abstol=1e-14) +sol = solve(prob_dde_qs, MethodOfSteps(Vern9(); fpsolve = NLFunctional(; max_iter = 1000)); + reltol = 1e-14, abstol = 1e-14) plot(sol) ``` Particularly, we are interested in the third, low-level component of the system: ```julia -sol = solve(prob_dde_qs, MethodOfSteps(Vern9(); fpsolve = NLFunctional(; max_iter = 1000)); reltol=1e-14, abstol=1e-14, save_idxs=3) +sol = solve(prob_dde_qs, MethodOfSteps(Vern9(); fpsolve = NLFunctional(; max_iter = 1000)); + reltol = 1e-14, abstol = 1e-14, save_idxs = 3) test_sol = TestSolution(sol) plot(sol) ``` @@ -34,104 +36,114 @@ First we compare the quality of the solution's third component for different alg ### RK methods ```julia -sol = solve(prob_dde_qs, MethodOfSteps(BS3()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve(prob_dde_qs, MethodOfSteps(BS3()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ```julia -sol = solve(prob_dde_qs, MethodOfSteps(Tsit5()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve( + prob_dde_qs, MethodOfSteps(Tsit5()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ```julia -sol = solve(prob_dde_qs, MethodOfSteps(RK4()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve(prob_dde_qs, MethodOfSteps(RK4()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ```julia -sol = solve(prob_dde_qs, MethodOfSteps(DP5()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve(prob_dde_qs, MethodOfSteps(DP5()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ```julia -sol = solve(prob_dde_qs, MethodOfSteps(DP8()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve(prob_dde_qs, MethodOfSteps(DP8()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ```julia -sol = solve(prob_dde_qs, MethodOfSteps(OwrenZen3()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve( + prob_dde_qs, MethodOfSteps(OwrenZen3()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ```julia -sol = solve(prob_dde_qs, MethodOfSteps(OwrenZen4()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve( + prob_dde_qs, MethodOfSteps(OwrenZen4()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ```julia -sol = solve(prob_dde_qs, MethodOfSteps(OwrenZen5()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve( + prob_dde_qs, MethodOfSteps(OwrenZen5()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ### Rosenbrock methods ```julia -sol = solve(prob_dde_qs, MethodOfSteps(Rosenbrock23()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve( + prob_dde_qs, MethodOfSteps(Rosenbrock23()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ```julia -sol = solve(prob_dde_qs, MethodOfSteps(Rosenbrock32()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve( + prob_dde_qs, MethodOfSteps(Rosenbrock32()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ```julia -sol = solve(prob_dde_qs, MethodOfSteps(Rodas4()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve( + prob_dde_qs, MethodOfSteps(Rodas4()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ```julia -sol = solve(prob_dde_qs, MethodOfSteps(Rodas5()); reltol=1e-4, abstol=1e-6, save_idxs=3) +sol = solve( + prob_dde_qs, MethodOfSteps(Rodas5()); reltol = 1e-4, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ### Lazy interpolants ```julia -sol = solve(prob_dde_qs, MethodOfSteps(Vern7()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve( + prob_dde_qs, MethodOfSteps(Vern7()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` ```julia -sol = solve(prob_dde_qs, MethodOfSteps(Vern9()); reltol=1e-3, abstol=1e-6, save_idxs=3) +sol = solve( + prob_dde_qs, MethodOfSteps(Vern9()); reltol = 1e-3, abstol = 1e-6, save_idxs = 3) p = plot(sol); -scatter!(p,sol.t, sol.u) +scatter!(p, sol.t, sol.u) p ``` @@ -150,14 +162,14 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(BS3())), - Dict(:alg=>MethodOfSteps(Tsit5())), - Dict(:alg=>MethodOfSteps(RK4())), - Dict(:alg=>MethodOfSteps(DP5())), - Dict(:alg=>MethodOfSteps(OwrenZen3())), - Dict(:alg=>MethodOfSteps(OwrenZen4())), - Dict(:alg=>MethodOfSteps(OwrenZen5()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen3())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -168,14 +180,14 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(BS3())), - Dict(:alg=>MethodOfSteps(Tsit5())), - Dict(:alg=>MethodOfSteps(RK4())), - Dict(:alg=>MethodOfSteps(DP5())), - Dict(:alg=>MethodOfSteps(OwrenZen3())), - Dict(:alg=>MethodOfSteps(OwrenZen4())), - Dict(:alg=>MethodOfSteps(OwrenZen5()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen3())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -186,14 +198,14 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(BS3())), - Dict(:alg=>MethodOfSteps(Tsit5())), - Dict(:alg=>MethodOfSteps(RK4())), - Dict(:alg=>MethodOfSteps(DP5())), - Dict(:alg=>MethodOfSteps(OwrenZen3())), - Dict(:alg=>MethodOfSteps(OwrenZen4())), - Dict(:alg=>MethodOfSteps(OwrenZen5()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L∞) + Dict(:alg=>MethodOfSteps(Tsit5())), + Dict(:alg=>MethodOfSteps(RK4())), + Dict(:alg=>MethodOfSteps(DP5())), + Dict(:alg=>MethodOfSteps(OwrenZen3())), + Dict(:alg=>MethodOfSteps(OwrenZen4())), + Dict(:alg=>MethodOfSteps(OwrenZen5()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L∞) plot(wp) ``` @@ -208,11 +220,11 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(Rosenbrock23())), - Dict(:alg=>MethodOfSteps(Rosenbrock32())), - Dict(:alg=>MethodOfSteps(Rodas4())), - Dict(:alg=>MethodOfSteps(RK4()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Rosenbrock32())), + Dict(:alg=>MethodOfSteps(Rodas4())), + Dict(:alg=>MethodOfSteps(RK4()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -221,11 +233,11 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(Rosenbrock23())), - Dict(:alg=>MethodOfSteps(Rosenbrock32())), - Dict(:alg=>MethodOfSteps(Rodas4())), - Dict(:alg=>MethodOfSteps(RK4()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Rosenbrock32())), + Dict(:alg=>MethodOfSteps(Rodas4())), + Dict(:alg=>MethodOfSteps(RK4()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -234,11 +246,11 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(Rosenbrock23())), - Dict(:alg=>MethodOfSteps(Rosenbrock32())), - Dict(:alg=>MethodOfSteps(Rodas4())), - Dict(:alg=>MethodOfSteps(RK4()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L∞) + Dict(:alg=>MethodOfSteps(Rosenbrock32())), + Dict(:alg=>MethodOfSteps(Rodas4())), + Dict(:alg=>MethodOfSteps(RK4()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L∞) plot(wp) ``` @@ -253,12 +265,12 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(Vern6())), - Dict(:alg=>MethodOfSteps(Vern7())), - Dict(:alg=>MethodOfSteps(Vern8())), - Dict(:alg=>MethodOfSteps(Vern9())), - Dict(:alg=>MethodOfSteps(Rosenbrock23()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9())), + Dict(:alg=>MethodOfSteps(Rosenbrock23()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -267,12 +279,12 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(Vern6())), - Dict(:alg=>MethodOfSteps(Vern7())), - Dict(:alg=>MethodOfSteps(Vern8())), - Dict(:alg=>MethodOfSteps(Vern9())), - Dict(:alg=>MethodOfSteps(Rosenbrock23()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9())), + Dict(:alg=>MethodOfSteps(Rosenbrock23()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -281,12 +293,12 @@ abstols = 1.0 ./ 10.0 .^ (4:7) reltols = 1.0 ./ 10.0 .^ (1:4) setups = [Dict(:alg=>MethodOfSteps(Vern6())), - Dict(:alg=>MethodOfSteps(Vern7())), - Dict(:alg=>MethodOfSteps(Vern8())), - Dict(:alg=>MethodOfSteps(Vern9())), - Dict(:alg=>MethodOfSteps(Rosenbrock23()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L∞) + Dict(:alg=>MethodOfSteps(Vern7())), + Dict(:alg=>MethodOfSteps(Vern8())), + Dict(:alg=>MethodOfSteps(Vern9())), + Dict(:alg=>MethodOfSteps(Rosenbrock23()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L∞) plot(wp) ``` @@ -303,10 +315,10 @@ abstols = 1.0 ./ 10.0 .^ (8:11) reltols = 1.0 ./ 10.0 .^ (5:8) setups = [Dict(:alg=>MethodOfSteps(Rosenbrock23())), - Dict(:alg=>MethodOfSteps(Rodas4())), - Dict(:alg=>MethodOfSteps(Rodas5()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:final) + Dict(:alg=>MethodOfSteps(Rodas4())), + Dict(:alg=>MethodOfSteps(Rodas5()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :final) plot(wp) ``` @@ -315,10 +327,10 @@ abstols = 1.0 ./ 10.0 .^ (8:11) reltols = 1.0 ./ 10.0 .^ (5:8) setups = [Dict(:alg=>MethodOfSteps(Rosenbrock23())), - Dict(:alg=>MethodOfSteps(Rodas4())), - Dict(:alg=>MethodOfSteps(Rodas5()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) + Dict(:alg=>MethodOfSteps(Rodas4())), + Dict(:alg=>MethodOfSteps(Rodas5()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` @@ -327,10 +339,10 @@ abstols = 1.0 ./ 10.0 .^ (8:11) reltols = 1.0 ./ 10.0 .^ (5:8) setups = [Dict(:alg=>MethodOfSteps(Rosenbrock23())), - Dict(:alg=>MethodOfSteps(Rodas4())), - Dict(:alg=>MethodOfSteps(Rodas5()))] -wp = WorkPrecisionSet(prob_dde_qs,abstols,reltols,setups; - save_idxs=3,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L∞) + Dict(:alg=>MethodOfSteps(Rodas4())), + Dict(:alg=>MethodOfSteps(Rodas5()))] +wp = WorkPrecisionSet(prob_dde_qs, abstols, reltols, setups; + save_idxs = 3, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L∞) plot(wp) ``` @@ -338,5 +350,5 @@ Thus at low tolerances `Rodas5` outperforms `Rosenbrock23`. ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/StiffODE/Bruss.jmd b/benchmarks/StiffODE/Bruss.jmd index 07d0e6b7d..7958cd3a9 100644 --- a/benchmarks/StiffODE/Bruss.jmd +++ b/benchmarks/StiffODE/Bruss.jmd @@ -12,48 +12,54 @@ gr() const N = 8 -xyd_brusselator = range(0,stop=1,length=N) -brusselator_f(x, y, t) = (((x-0.3)^2 + (y-0.6)^2) <= 0.1^2) * (t >= 1.1) * 5. +xyd_brusselator = range(0, stop = 1, length = N) +brusselator_f(x, y, t) = (((x-0.3)^2 + (y-0.6)^2) <= 0.1^2) * (t >= 1.1) * 5.0 limit(a, N) = a == N+1 ? 1 : a == 0 ? N : a function brusselator_2d_loop(du, u, p, t) - A, B, alpha, dx = p - alpha = alpha/dx^2 - @inbounds for I in CartesianIndices((N, N)) - i, j = Tuple(I) - x, y = xyd_brusselator[I[1]], xyd_brusselator[I[2]] - ip1, im1, jp1, jm1 = limit(i+1, N), limit(i-1, N), limit(j+1, N), limit(j-1, N) - du[i,j,1] = alpha*(u[im1,j,1] + u[ip1,j,1] + u[i,jp1,1] + u[i,jm1,1] - 4u[i,j,1]) + - B + u[i,j,1]^2*u[i,j,2] - (A + 1)*u[i,j,1] + brusselator_f(x, y, t) - du[i,j,2] = alpha*(u[im1,j,2] + u[ip1,j,2] + u[i,jp1,2] + u[i,jm1,2] - 4u[i,j,2]) + - A*u[i,j,1] - u[i,j,1]^2*u[i,j,2] + A, B, alpha, dx = p + alpha = alpha/dx^2 + @inbounds for I in CartesianIndices((N, N)) + i, j = Tuple(I) + x, y = xyd_brusselator[I[1]], xyd_brusselator[I[2]] + ip1, im1, jp1, jm1 = limit(i+1, N), limit(i-1, N), limit(j+1, N), limit(j-1, N) + du[i, j, 1] = alpha*(u[im1, j, 1] + u[ip1, j, 1] + u[i, jp1, 1] + u[i, jm1, 1] - + 4u[i, j, 1]) + + B + u[i, j, 1]^2*u[i, j, 2] - (A + 1)*u[i, j, 1] + + brusselator_f(x, y, t) + du[i, j, 2] = alpha*(u[im1, j, 2] + u[ip1, j, 2] + u[i, jp1, 2] + u[i, jm1, 2] - + 4u[i, j, 2]) + + A*u[i, j, 1] - u[i, j, 1]^2*u[i, j, 2] end end -p = (3.4, 1., 10., step(xyd_brusselator)) +p = (3.4, 1.0, 10.0, step(xyd_brusselator)) -input = rand(N,N,2) +input = rand(N, N, 2) output = similar(input) -sparsity_pattern = Symbolics.jacobian_sparsity(brusselator_2d_loop,output,input,p,0.0) +sparsity_pattern = Symbolics.jacobian_sparsity(brusselator_2d_loop, output, input, p, 0.0) jac_sparsity = Float64.(sparse(sparsity_pattern)) -f = ODEFunction{true, SciMLBase.FullSpecialize}(brusselator_2d_loop;jac_prototype=jac_sparsity) +f = ODEFunction{true, SciMLBase.FullSpecialize}(brusselator_2d_loop; jac_prototype = jac_sparsity) function init_brusselator_2d(xyd) - N = length(xyd) - u = zeros(N, N, 2) - for I in CartesianIndices((N, N)) - x = xyd[I[1]] - y = xyd[I[2]] - u[I,1] = 22*(y*(1-y))^(3/2) - u[I,2] = 27*(x*(1-x))^(3/2) - end - u + N = length(xyd) + u = zeros(N, N, 2) + for I in CartesianIndices((N, N)) + x = xyd[I[1]] + y = xyd[I[2]] + u[I, 1] = 22*(y*(1-y))^(3/2) + u[I, 2] = 27*(x*(1-x))^(3/2) + end + u end u0 = init_brusselator_2d(xyd_brusselator) -prob = ODEProblem(f,u0,(0.,11.5),p); +prob = ODEProblem(f, u0, (0.0, 11.5), p); ``` ```julia -prob_mtk = ODEProblem(complete(modelingtoolkitize(prob)),[],(0.0,11.5),jac=true,sparse=true); +prob_mtk = ODEProblem( + complete(modelingtoolkitize(prob)), [], (0.0, 11.5), jac = true, sparse = true); ``` + Also comparing with MethodOfLines.jl: + ```julia using MethodOfLines, DomainSets @parameters x y t @@ -66,33 +72,34 @@ Dyy = Differential(y)^2 ∇²(u) = Dxx(u) + Dyy(u) -brusselator_f(x, y, t) = (((x-0.3)^2 + (y-0.6)^2) <= 0.1^2) * (t >= 1.1) * 5. +brusselator_f(x, y, t) = (((x-0.3)^2 + (y-0.6)^2) <= 0.1^2) * (t >= 1.1) * 5.0 x_min = y_min = t_min = 0.0 x_max = y_max = 1.0 t_max = 11.5 -α = 10. +α = 10.0 -u0_mol(x,y,t) = 22(y*(1-y))^(3/2) -v0_mol(x,y,t) = 27(x*(1-x))^(3/2) +u0_mol(x, y, t) = 22(y*(1-y))^(3/2) +v0_mol(x, y, t) = 27(x*(1-x))^(3/2) -eq = [Dt(u(x,y,t)) ~ 1. + v(x,y,t)*u(x,y,t)^2 - 4.4*u(x,y,t) + α*∇²(u(x,y,t)) + brusselator_f(x, y, t), - Dt(v(x,y,t)) ~ 3.4*u(x,y,t) - v(x,y,t)*u(x,y,t)^2 + α*∇²(v(x,y,t))] +eq = [ + Dt(u(x, y, t)) ~ + 1.0 + v(x, y, t)*u(x, y, t)^2 - 4.4*u(x, y, t) + α*∇²(u(x, y, t)) + + brusselator_f(x, y, t), + Dt(v(x, y, t)) ~ 3.4*u(x, y, t) - v(x, y, t)*u(x, y, t)^2 + α*∇²(v(x, y, t))] domains = [x ∈ Interval(x_min, x_max), - y ∈ Interval(y_min, y_max), - t ∈ Interval(t_min, t_max)] + y ∈ Interval(y_min, y_max), + t ∈ Interval(t_min, t_max)] -bcs = [u(x,y,0) ~ u0_mol(x,y,0), - u(0,y,t) ~ u(1,y,t), - u(x,0,t) ~ u(x,1,t), +bcs = [u(x, y, 0) ~ u0_mol(x, y, 0), + u(0, y, t) ~ u(1, y, t), + u(x, 0, t) ~ u(x, 1, t), v(x, y, 0) ~ v0_mol(x, y, 0), + v(0, y, t) ~ v(1, y, t), + v(x, 0, t) ~ v(x, 1, t)] - v(x,y,0) ~ v0_mol(x,y,0), - v(0,y,t) ~ v(1,y,t), - v(x,0,t) ~ v(x,1,t)] - -@named pdesys = PDESystem(eq,bcs,domains,[x,y,t],[u(x,y,t),v(x,y,t)]) +@named pdesys = PDESystem(eq, bcs, domains, [x, y, t], [u(x, y, t), v(x, y, t)]) # Method of lines discretization @@ -101,149 +108,170 @@ dy = 1/N order = 2 -discretization = MOLFiniteDifference([x=>dx, y=>dy], t; approx_order = order, jac = true, sparse = true, wrap = Val(false)) +discretization = MOLFiniteDifference( + [x=>dx, y=>dy], t; approx_order = order, jac = true, sparse = true, wrap = Val(false)) # Convert the PDE system into an ODE problem -prob_mol = discretize(pdesys,discretization) +prob_mol = discretize(pdesys, discretization) ``` + ```julia using Base.Experimental: Const, @aliasscope macro vp(expr) - nodes = (Symbol("llvm.loop.vectorize.predicate.enable"), 1) - if expr.head != :for - error("Syntax error: loopinfo needs a for loop") - end - push!(expr.args[2].args, Expr(:loopinfo, nodes)) - return esc(expr) + nodes = (Symbol("llvm.loop.vectorize.predicate.enable"), 1) + if expr.head != :for + error("Syntax error: loopinfo needs a for loop") + end + push!(expr.args[2].args, Expr(:loopinfo, nodes)) + return esc(expr) end struct Brusselator2DLoop <: Function - N::Int - s::Float64 + N::Int + s::Float64 end function (b::Brusselator2DLoop)(du, unc, p, t) - N = b.N - s = b.s - A, B, alpha, dx = p - alpha = alpha/abs2(dx) - u = Base.Experimental.Const(unc) - Base.Experimental.@aliasscope begin - @inbounds @fastmath begin - b = ((abs2(-0.3) + abs2(-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 - du1 = alpha*(u[N,1,1] + u[2,1,1] + u[1,2,1] + u[1,N,1] - 4u[1,1,1]) + - B + abs2(u[1,1,1])*u[1,1,2] - (A + 1)*u[1,1,1] + b - du2 = alpha*(u[N,1,2] + u[2,1,2] + u[1,2,2] + u[1,N,2] - 4u[1,1,2]) + - A*u[1,1,1] - abs2(u[1,1,1])*u[1,1,2] - du[1,1,1] = du1 - du[1,1,2] = du2 - @vp for i = 2:N-1 - x = (i-1)*s - ip1 = i+1 - im1 = i-1 - b = ((abs2(x-0.3) + abs2(-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 - du1 = alpha*(u[im1,1,1] + u[ip1,1,1] + u[i,2,1] + u[i,N,1] - 4u[i,1,1]) + - B + abs2(u[i,1,1])*u[i,1,2] - (A + 1)*u[i,1,1] + b - du2 = alpha*(u[im1,1,2] + u[ip1,1,2] + u[i,2,2] + u[i,N,2] - 4u[i,1,2]) + - A*u[i,1,1] - abs2(u[i,1,1])*u[i,1,2] - du[i,1,1] = du1 - du[i,1,2] = du2 - end - b = ((abs2(0.7) + abs2(-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 - du1 = alpha*(u[N-1,1,1] + u[1,1,1] + u[N,2,1] + u[N,N,1] - 4u[N,1,1]) + - B + abs2(u[N,1,1])*u[N,1,2] - (A + 1)*u[N,1,1] + b - du2 = alpha*(u[N-1,1,2] + u[1,1,2] + u[N,2,2] + u[N,N,2] - 4u[N,1,2]) + - A*u[N,1,1] - abs2(u[N,1,1])*u[N,1,2] - du[N,1,1] = du1 - du[N,1,2] = du2 - for j = 2:N-1 - y = (j-1)*s - jp1 = j+1 - jm1 = j-1 - b0 = ((abs2(-0.3) + abs2(y-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 - du[1,j,1] = alpha*(u[N,j,1] + u[2,j,1] + u[1,jp1,1] + u[1,jm1,1] - 4u[1,j,1]) + - B + abs2(u[1,j,1])*u[1,j,2] - (A + 1)*u[1,j,1] + b0 - du[1,j,2] = alpha*(u[N,j,2] + u[2,j,2] + u[1,jp1,2] + u[1,jm1,2] - 4u[1,j,2]) + - A*u[1,j,1] - abs2(u[1,j,1])*u[1,j,2] - @vp for i = 2:N-1 - x = (i-1)*s - b = ((abs2(x-0.3) + abs2(y-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 - du1 = alpha*(u[i-1,j,1] + u[i+1,j,1] + u[i,jp1,1] + u[i,jm1,1] - 4u[i,j,1]) + - B + abs2(u[i,j,1])*u[i,j,2] - (A + 1)*u[i,j,1] + b - du2 = alpha*(u[i-1,j,2] + u[i+1,j,2] + u[i,jp1,2] + u[i,jm1,2] - 4u[i,j,2]) + - A*u[i,j,1] - abs2(u[i,j,1])*u[i,j,2] - du[i,j,1] = du1 - du[i,j,2] = du2 - end - bN = ((abs2(0.7) + abs2(y-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 - du[N,j,1] = alpha*(u[N-1,j,1] + u[1,j,1] + u[N,jp1,1] + u[N,jm1,1] - 4u[N,j,1]) + - B + abs2(u[N,j,1])*u[N,j,2] - (A + 1)*u[N,j,1] + bN - du[N,j,2] = alpha*(u[N-1,j,2] + u[1,j,2] + u[N,jp1,2] + u[N,jm1,2] - 4u[N,j,2]) + - A*u[N,j,1] - abs2(u[N,j,1])*u[N,j,2] - end - b = ((abs2(-0.3) + abs2(0.4)) <= abs2(0.1)) * (t >= 1.1) * 5.0 - du1 = alpha*(u[N,N,1] + u[2,N,1] + u[1,1,1] + u[1,N-1,1] - 4u[1,N,1]) + - B + abs2(u[1,N,1])*u[1,N,2] - (A + 1)*u[1,N,1] + b - du2 = alpha*(u[N,N,2] + u[2,N,2] + u[1,1,2] + u[1,N-1,2] - 4u[1,N,2]) + - A*u[1,N,1] - abs2(u[1,N,1])*u[1,N,2] - du[1,N,1] = du1 - du[1,N,2] = du2 - @vp for i = 2:N-1 - x = (i-1)*s - ip1 = i+1 - im1 = i-1 - b = ((abs2(x-0.3) + abs2(0.4)) <= abs2(0.1)) * (t >= 1.1) * 5.0 - du1 = alpha*(u[im1,N,1] + u[ip1,N,1] + u[i,1,1] + u[i,N-1,1] - 4u[i,N,1]) + - B + abs2(u[i,N,1])*u[i,N,2] - (A + 1)*u[i,N,1] + b - du2 = alpha*(u[im1,N,2] + u[ip1,N,2] + u[i,1,2] + u[i,N-1,2] - 4u[i,N,2]) + - A*u[i,N,1] - abs2(u[i,N,1])*u[i,N,2] - du[i,N,1] = du1 - du[i,N,2] = du2 + N = b.N + s = b.s + A, B, alpha, dx = p + alpha = alpha/abs2(dx) + u = Base.Experimental.Const(unc) + Base.Experimental.@aliasscope begin + @inbounds @fastmath begin + b = ((abs2(-0.3) + abs2(-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 + du1 = alpha*(u[N, 1, 1] + u[2, 1, 1] + u[1, 2, 1] + u[1, N, 1] - 4u[1, 1, 1]) + + B + abs2(u[1, 1, 1])*u[1, 1, 2] - (A + 1)*u[1, 1, 1] + b + du2 = alpha*(u[N, 1, 2] + u[2, 1, 2] + u[1, 2, 2] + u[1, N, 2] - 4u[1, 1, 2]) + + A*u[1, 1, 1] - abs2(u[1, 1, 1])*u[1, 1, 2] + du[1, 1, 1] = du1 + du[1, 1, 2] = du2 + @vp for i in 2:(N - 1) + x = (i-1)*s + ip1 = i+1 + im1 = i-1 + b = ((abs2(x-0.3) + abs2(-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 + du1 = alpha*(u[im1, 1, 1] + u[ip1, 1, 1] + u[i, 2, 1] + u[i, N, 1] - + 4u[i, 1, 1]) + + B + abs2(u[i, 1, 1])*u[i, 1, 2] - (A + 1)*u[i, 1, 1] + b + du2 = alpha*(u[im1, 1, 2] + u[ip1, 1, 2] + u[i, 2, 2] + u[i, N, 2] - + 4u[i, 1, 2]) + + A*u[i, 1, 1] - abs2(u[i, 1, 1])*u[i, 1, 2] + du[i, 1, 1] = du1 + du[i, 1, 2] = du2 + end + b = ((abs2(0.7) + abs2(-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 + du1 = alpha*(u[N - 1, 1, 1] + u[1, 1, 1] + u[N, 2, 1] + u[N, N, 1] - + 4u[N, 1, 1]) + + B + abs2(u[N, 1, 1])*u[N, 1, 2] - (A + 1)*u[N, 1, 1] + b + du2 = alpha*(u[N - 1, 1, 2] + u[1, 1, 2] + u[N, 2, 2] + u[N, N, 2] - + 4u[N, 1, 2]) + + A*u[N, 1, 1] - abs2(u[N, 1, 1])*u[N, 1, 2] + du[N, 1, 1] = du1 + du[N, 1, 2] = du2 + for j in 2:(N - 1) + y = (j-1)*s + jp1 = j+1 + jm1 = j-1 + b0 = ((abs2(-0.3) + abs2(y-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 + du[1, j, 1] = alpha*(u[N, j, 1] + u[2, j, 1] + u[1, jp1, 1] + u[1, jm1, 1] - + 4u[1, j, 1]) + + B + abs2(u[1, j, 1])*u[1, j, 2] - (A + 1)*u[1, j, 1] + b0 + du[1, j, 2] = alpha*(u[N, j, 2] + u[2, j, 2] + u[1, jp1, 2] + u[1, jm1, 2] - + 4u[1, j, 2]) + + A*u[1, j, 1] - abs2(u[1, j, 1])*u[1, j, 2] + @vp for i in 2:(N - 1) + x = (i-1)*s + b = ((abs2(x-0.3) + abs2(y-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 + du1 = alpha*(u[i - 1, j, 1] + u[i + 1, j, 1] + u[i, jp1, 1] + + u[i, jm1, 1] - 4u[i, j, 1]) + + B + abs2(u[i, j, 1])*u[i, j, 2] - (A + 1)*u[i, j, 1] + b + du2 = alpha*(u[i - 1, j, 2] + u[i + 1, j, 2] + u[i, jp1, 2] + + u[i, jm1, 2] - 4u[i, j, 2]) + + A*u[i, j, 1] - abs2(u[i, j, 1])*u[i, j, 2] + du[i, j, 1] = du1 + du[i, j, 2] = du2 + end + bN = ((abs2(0.7) + abs2(y-0.6)) <= abs2(0.1)) * (t >= 1.1) * 5.0 + du[N, j, 1] = alpha*(u[N - 1, j, 1] + u[1, j, 1] + u[N, jp1, 1] + + u[N, jm1, 1] - 4u[N, j, 1]) + + B + abs2(u[N, j, 1])*u[N, j, 2] - (A + 1)*u[N, j, 1] + bN + du[N, j, 2] = alpha*(u[N - 1, j, 2] + u[1, j, 2] + u[N, jp1, 2] + + u[N, jm1, 2] - 4u[N, j, 2]) + + A*u[N, j, 1] - abs2(u[N, j, 1])*u[N, j, 2] + end + b = ((abs2(-0.3) + abs2(0.4)) <= abs2(0.1)) * (t >= 1.1) * 5.0 + du1 = alpha*(u[N, N, 1] + u[2, N, 1] + u[1, 1, 1] + u[1, N - 1, 1] - + 4u[1, N, 1]) + + B + abs2(u[1, N, 1])*u[1, N, 2] - (A + 1)*u[1, N, 1] + b + du2 = alpha*(u[N, N, 2] + u[2, N, 2] + u[1, 1, 2] + u[1, N - 1, 2] - + 4u[1, N, 2]) + + A*u[1, N, 1] - abs2(u[1, N, 1])*u[1, N, 2] + du[1, N, 1] = du1 + du[1, N, 2] = du2 + @vp for i in 2:(N - 1) + x = (i-1)*s + ip1 = i+1 + im1 = i-1 + b = ((abs2(x-0.3) + abs2(0.4)) <= abs2(0.1)) * (t >= 1.1) * 5.0 + du1 = alpha*(u[im1, N, 1] + u[ip1, N, 1] + u[i, 1, 1] + u[i, N - 1, 1] - + 4u[i, N, 1]) + + B + abs2(u[i, N, 1])*u[i, N, 2] - (A + 1)*u[i, N, 1] + b + du2 = alpha*(u[im1, N, 2] + u[ip1, N, 2] + u[i, 1, 2] + u[i, N - 1, 2] - + 4u[i, N, 2]) + + A*u[i, N, 1] - abs2(u[i, N, 1])*u[i, N, 2] + du[i, N, 1] = du1 + du[i, N, 2] = du2 + end + b = ((abs2(0.7) + abs2(0.4)) <= abs2(0.1)) * (t >= 1.1) * 5.0 + du1 = alpha*(u[N - 1, N, 1] + u[1, N, 1] + u[N, 1, 1] + u[N, N - 1, 1] - + 4u[N, N, 1]) + + B + abs2(u[N, N, 1])*u[N, N, 2] - (A + 1)*u[N, N, 1] + b + du2 = alpha*(u[N - 1, N, 2] + u[1, N, 2] + u[N, 1, 2] + u[N, N - 1, 2] - + 4u[N, N, 2]) + + A*u[N, N, 1] - abs2(u[N, N, 1])*u[N, N, 2] + du[N, N, 1] = du1 + du[N, N, 2] = du2 + end end - b = ((abs2(0.7) + abs2(0.4)) <= abs2(0.1)) * (t >= 1.1) * 5.0 - du1 = alpha*(u[N-1,N,1] + u[1,N,1] + u[N,1,1] + u[N,N-1,1] - 4u[N,N,1]) + - B + abs2(u[N,N,1])*u[N,N,2] - (A + 1)*u[N,N,1] + b - du2 = alpha*(u[N-1,N,2] + u[1,N,2] + u[N,1,2] + u[N,N-1,2] - 4u[N,N,2]) + - A*u[N,N,1] - abs2(u[N,N,1])*u[N,N,2] - du[N,N,1] = du1 - du[N,N,2] = du2 - end - end end function fast_bruss(N) - xyd_brusselator = range(0,stop=1,length=N) - brusselator_2d_loop = Brusselator2DLoop(N,Float64(step(xyd_brusselator))) - p = (3.4, 1., 10., step(xyd_brusselator)) - - input = rand(N,N,2) - output = similar(input) - sparsity_pattern = Symbolics.jacobian_sparsity(brusselator_2d_loop,output,input,p,0.0) - jac_sparsity = Float64.(sparse(sparsity_pattern)) - f = ODEFunction(brusselator_2d_loop;jac_prototype=jac_sparsity) - u0 = zeros(N, N, 2) - @inbounds for I in CartesianIndices((N, N)) - x = xyd_brusselator[I[1]] - y = xyd_brusselator[I[2]] - u0[I,1] = 22*(y*(1-y))^(3/2) - u0[I,2] = 27*(x*(1-x))^(3/2) - end - return ODEProblem(f,u0,(0.,11.5),p) + xyd_brusselator = range(0, stop = 1, length = N) + brusselator_2d_loop = Brusselator2DLoop(N, Float64(step(xyd_brusselator))) + p = (3.4, 1.0, 10.0, step(xyd_brusselator)) + + input = rand(N, N, 2) + output = similar(input) + sparsity_pattern = Symbolics.jacobian_sparsity( + brusselator_2d_loop, output, input, p, 0.0) + jac_sparsity = Float64.(sparse(sparsity_pattern)) + f = ODEFunction(brusselator_2d_loop; jac_prototype = jac_sparsity) + u0 = zeros(N, N, 2) + @inbounds for I in CartesianIndices((N, N)) + x = xyd_brusselator[I[1]] + y = xyd_brusselator[I[2]] + u0[I, 1] = 22*(y*(1-y))^(3/2) + u0[I, 2] = 27*(x*(1-x))^(3/2) + end + return ODEProblem(f, u0, (0.0, 11.5), p) end fastprob = fast_bruss(N) ``` ```julia -sol = solve(prob,CVODE_BDF(),abstol=1/10^14,reltol=1/10^14) -sol2 = solve(prob_mtk,CVODE_BDF(linear_solver = :KLU),abstol=1/10^14,reltol=1/10^14) -sol3 = solve(prob_mol,CVODE_BDF(linear_solver = :KLU),abstol=1/10^14,reltol=1/10^14,wrap=Val(false)) +sol = solve(prob, CVODE_BDF(), abstol = 1/10^14, reltol = 1/10^14) +sol2 = solve(prob_mtk, CVODE_BDF(linear_solver = :KLU), abstol = 1/10^14, reltol = 1/10^14) +sol3 = solve(prob_mol, CVODE_BDF(linear_solver = :KLU), + abstol = 1/10^14, reltol = 1/10^14, wrap = Val(false)) ``` ```julia -test_sol = [sol,sol2,sol,sol3] -probs = [prob,prob_mtk,fastprob,prob_mol]; +test_sol = [sol, sol2, sol, sol3] +probs = [prob, prob_mtk, fastprob, prob_mol]; ``` + ```julia plot(sol, idxs = 1) ``` @@ -257,72 +285,76 @@ plot(sol, idxs = 10) ### OrdinaryDiffEq ```julia -function incompletelu(W,du,u,p,t,newW,Plprev,Prprev,solverdata) - if newW === nothing || newW - Pl = ilu(convert(AbstractMatrix,W), τ = 50.0) - else - Pl = Plprev - end - Pl,nothing +function incompletelu(W, du, u, p, t, newW, Plprev, Prprev, solverdata) + if newW === nothing || newW + Pl = ilu(convert(AbstractMatrix, W), τ = 50.0) + else + Pl = Plprev + end + Pl, nothing end -function algebraicmultigrid(W,du,u,p,t,newW,Plprev,Prprev,solverdata) - if newW === nothing || newW - Pl = aspreconditioner(ruge_stuben(convert(AbstractMatrix,W))) - else - Pl = Plprev - end - Pl,nothing +function algebraicmultigrid(W, du, u, p, t, newW, Plprev, Prprev, solverdata) + if newW === nothing || newW + Pl = aspreconditioner(ruge_stuben(convert(AbstractMatrix, W))) + else + Pl = Plprev + end + Pl, nothing end ``` ### Sundials ```julia -const jaccache = prob_mtk.f.jac(prob.u0,prob.p,0.0) +const jaccache = prob_mtk.f.jac(prob.u0, prob.p, 0.0) const W = I - 1.0*jaccache prectmp = ilu(W, τ = 50.0) const preccache = Ref(prectmp) function psetupilu(p, t, u, du, jok, jcurPtr, gamma) - if !jok - prob_mtk.f.jac(jaccache,u,p,t) - jcurPtr[] = true - - # W = I - gamma*J - @. W = -gamma*jaccache - idxs = diagind(W) - @. @view(W[idxs]) = @view(W[idxs]) + 1 - - # Build preconditioner on W - preccache[] = ilu(W, τ = 5.0) - end + if !jok + prob_mtk.f.jac(jaccache, u, p, t) + jcurPtr[] = true + + # W = I - gamma*J + @. W = -gamma*jaccache + idxs = diagind(W) + @. @view(W[idxs]) = @view(W[idxs]) + 1 + + # Build preconditioner on W + preccache[] = ilu(W, τ = 5.0) + end end -function precilu(z,r,p,t,y,fy,gamma,delta,lr) - ldiv!(z,preccache[],r) +function precilu(z, r, p, t, y, fy, gamma, delta, lr) + ldiv!(z, preccache[], r) end -prectmp2 = aspreconditioner(ruge_stuben(W, presmoother = AlgebraicMultigrid.Jacobi(rand(size(W,1))), postsmoother = AlgebraicMultigrid.Jacobi(rand(size(W,1))))) +prectmp2 = aspreconditioner(ruge_stuben( + W, presmoother = AlgebraicMultigrid.Jacobi(rand(size(W, 1))), + postsmoother = AlgebraicMultigrid.Jacobi(rand(size(W, 1))))) const preccache2 = Ref(prectmp2) function psetupamg(p, t, u, du, jok, jcurPtr, gamma) - if !jok - prob_mtk.f.jac(jaccache,u,p,t) - jcurPtr[] = true - - # W = I - gamma*J - @. W = -gamma*jaccache - idxs = diagind(W) - @. @view(W[idxs]) = @view(W[idxs]) + 1 - - # Build preconditioner on W - preccache2[] = aspreconditioner(ruge_stuben(W, presmoother = AlgebraicMultigrid.Jacobi(rand(size(W,1))), postsmoother = AlgebraicMultigrid.Jacobi(rand(size(W,1))))) - end + if !jok + prob_mtk.f.jac(jaccache, u, p, t) + jcurPtr[] = true + + # W = I - gamma*J + @. W = -gamma*jaccache + idxs = diagind(W) + @. @view(W[idxs]) = @view(W[idxs]) + 1 + + # Build preconditioner on W + preccache2[] = aspreconditioner(ruge_stuben( + W, presmoother = AlgebraicMultigrid.Jacobi(rand(size(W, 1))), + postsmoother = AlgebraicMultigrid.Jacobi(rand(size(W, 1))))) + end end -function precamg(z,r,p,t,y,fy,gamma,delta,lr) - ldiv!(z,preccache2[],r) +function precamg(z, r, p, t, y, fy, gamma, delta, lr) + ldiv!(z, preccache2[], r) end ``` @@ -331,95 +363,105 @@ end ```julia abstols = 1.0 ./ 10.0 .^ (5:8) reltols = 1.0 ./ 10.0 .^ (1:4); -setups = [ - - Dict(:alg => KenCarp47(linsolve=KLUFactorization())), - Dict(:alg => KenCarp47(linsolve=KLUFactorization()), :prob_choice => 2), - Dict(:alg => KenCarp47(linsolve=KLUFactorization()), :prob_choice => 3), - Dict(:alg => KenCarp47(linsolve=KLUFactorization()), :prob_choice => 4), - Dict(:alg => KenCarp47(linsolve=KrylovJL_GMRES())), - Dict(:alg => KenCarp47(linsolve=KrylovJL_GMRES()), :prob_choice => 2), - Dict(:alg => KenCarp47(linsolve=KrylovJL_GMRES()), :prob_choice => 3), - Dict(:alg => KenCarp47(linsolve=KrylovJL_GMRES()), :prob_choice => 4),] -names = ["KenCarp47 KLU","KenCarp47 KLU MTK","KenCarp47 KLU FastBruss", "KenCarp47 KLU MOL", - "KenCarp47 GMRES", "KenCarp47 GMRES MTK", "KenCarp47 GMRES FastBruss", "KenCarp47 GMRES MOL"]; - -wp = WorkPrecisionSet(probs,abstols,reltols,setups;names = names, - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10,wrap=Val(false)) +setups = [Dict(:alg => KenCarp47(linsolve = KLUFactorization())), + Dict(:alg => KenCarp47(linsolve = KLUFactorization()), :prob_choice => 2), + Dict(:alg => KenCarp47(linsolve = KLUFactorization()), :prob_choice => 3), + Dict(:alg => KenCarp47(linsolve = KLUFactorization()), :prob_choice => 4), + Dict(:alg => KenCarp47(linsolve = KrylovJL_GMRES())), + Dict(:alg => KenCarp47(linsolve = KrylovJL_GMRES()), :prob_choice => 2), + Dict(:alg => KenCarp47(linsolve = KrylovJL_GMRES()), :prob_choice => 3), + Dict(:alg => KenCarp47(linsolve = KrylovJL_GMRES()), :prob_choice => 4)] +names = [ + "KenCarp47 KLU", "KenCarp47 KLU MTK", "KenCarp47 KLU FastBruss", "KenCarp47 KLU MOL", + "KenCarp47 GMRES", "KenCarp47 GMRES MTK", "KenCarp47 GMRES FastBruss", "KenCarp47 GMRES MOL"]; + +wp = WorkPrecisionSet(probs, abstols, reltols, setups; names = names, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10, wrap = Val(false)) plot(wp) ``` ## High Tolerances This is the speed when you just want the answer. + ```julia abstols = 1.0 ./ 10.0 .^ (5:8) reltols = 1.0 ./ 10.0 .^ (1:4); setups = [ - Dict(:alg=>CVODE_BDF(linear_solver = :KLU), :prob_choice => 2), - Dict(:alg=>CVODE_BDF(linear_solver = :GMRES)), - Dict(:alg=>CVODE_BDF(linear_solver = :GMRES), :prob_choice => 2), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precilu,psetup=psetupilu,prec_side=1)), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precamg,psetup=psetupamg,prec_side=1)), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precilu,psetup=psetupilu,prec_side=1), :prob_choice => 2), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precamg,psetup=psetupamg,prec_side=1), :prob_choice => 2), - ] -names = ["CVODE MTK KLU","CVODE GMRES","CVODE MTK GMRES", "CVODE iLU GMRES", "CVODE AMG GMRES", "CVODE iLU MTK GMRES", "CVODE AMG MTK GMRES"]; -wp = WorkPrecisionSet(probs,abstols,reltols,setups;names=names, - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) + Dict(:alg=>CVODE_BDF(linear_solver = :KLU), :prob_choice => 2), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES)), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES), :prob_choice => 2), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES, prec = precilu, psetup = psetupilu, prec_side = 1)), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES, prec = precamg, psetup = psetupamg, prec_side = 1)), + Dict( + :alg=>CVODE_BDF(linear_solver = :GMRES, prec = precilu, psetup = psetupilu, prec_side = 1), + :prob_choice => 2), + Dict( + :alg=>CVODE_BDF(linear_solver = :GMRES, prec = precamg, psetup = psetupamg, prec_side = 1), + :prob_choice => 2) +] +names = ["CVODE MTK KLU", "CVODE GMRES", "CVODE MTK GMRES", "CVODE iLU GMRES", + "CVODE AMG GMRES", "CVODE iLU MTK GMRES", "CVODE AMG MTK GMRES"]; +wp = WorkPrecisionSet(probs, abstols, reltols, setups; names = names, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10) plot(wp) ``` ```julia setups = [ - Dict(:alg=>KenCarp47(linsolve=KLUFactorization())), - Dict(:alg=>KenCarp47(linsolve=KLUFactorization()), :prob_choice => 2), - Dict(:alg=>KenCarp47(linsolve=UMFPACKFactorization())), - Dict(:alg=>KenCarp47(linsolve=UMFPACKFactorization()), :prob_choice => 2), - Dict(:alg=>KenCarp47(linsolve=KrylovJL_GMRES())), - Dict(:alg=>KenCarp47(linsolve=KrylovJL_GMRES()), :prob_choice => 2), - Dict(:alg=>KenCarp47(linsolve=KrylovJL_GMRES(),precs=incompletelu,concrete_jac=true)), - Dict(:alg=>KenCarp47(linsolve=KrylovJL_GMRES(),precs=incompletelu,concrete_jac=true), :prob_choice => 2), - Dict(:alg=>KenCarp47(linsolve=KrylovJL_GMRES(),precs=algebraicmultigrid,concrete_jac=true)), - Dict(:alg=>KenCarp47(linsolve=KrylovJL_GMRES(),precs=algebraicmultigrid,concrete_jac=true), :prob_choice => 2), - - ] -names = ["KenCarp47 KLU","KenCarp47 KLU MTK","KenCarp47 UMFPACK", "KenCarp47 UMFPACK MTK", "KenCarp47 GMRES", - "KenCarp47 GMRES MTK", "KenCarp47 iLU GMRES", "KenCarp47 iLU GMRES MTK", "KenCarp47 AMG GMRES", - "KenCarp47 AMG GMRES MTK"]; -wp = WorkPrecisionSet(probs,abstols,reltols,setups;names = names, - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) + Dict(:alg=>KenCarp47(linsolve = KLUFactorization())), + Dict(:alg=>KenCarp47(linsolve = KLUFactorization()), :prob_choice => 2), + Dict(:alg=>KenCarp47(linsolve = UMFPACKFactorization())), + Dict(:alg=>KenCarp47(linsolve = UMFPACKFactorization()), :prob_choice => 2), + Dict(:alg=>KenCarp47(linsolve = KrylovJL_GMRES())), + Dict(:alg=>KenCarp47(linsolve = KrylovJL_GMRES()), :prob_choice => 2), + Dict(:alg=>KenCarp47(linsolve = KrylovJL_GMRES(), precs = incompletelu, concrete_jac = true)), + Dict( + :alg=>KenCarp47(linsolve = KrylovJL_GMRES(), precs = incompletelu, concrete_jac = true), + :prob_choice => 2), + Dict(:alg=>KenCarp47(linsolve = KrylovJL_GMRES(), precs = algebraicmultigrid, concrete_jac = true)), + Dict( + :alg=>KenCarp47(linsolve = KrylovJL_GMRES(), precs = algebraicmultigrid, concrete_jac = true), + :prob_choice => 2)] +names = ["KenCarp47 KLU", "KenCarp47 KLU MTK", "KenCarp47 UMFPACK", + "KenCarp47 UMFPACK MTK", "KenCarp47 GMRES", + "KenCarp47 GMRES MTK", "KenCarp47 iLU GMRES", "KenCarp47 iLU GMRES MTK", "KenCarp47 AMG GMRES", + "KenCarp47 AMG GMRES MTK"]; +wp = WorkPrecisionSet(probs, abstols, reltols, setups; names = names, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10) plot(wp) ``` ```julia setups = [ - Dict(:alg=>TRBDF2()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>KenCarp47()), - # Dict(:alg=>QNDF()), # bad - Dict(:alg=>FBDF()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) + Dict(:alg=>TRBDF2()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>KenCarp47()), + # Dict(:alg=>QNDF()), # bad + Dict(:alg=>FBDF()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10) plot(wp) ``` ```julia setups = [ - Dict(:alg=>KenCarp47(linsolve=KLUFactorization()), :prob_choice => 2), - Dict(:alg=>KenCarp47(linsolve=KrylovJL_GMRES()), :prob_choice => 2), - Dict(:alg=>FBDF(linsolve=KLUFactorization()), :prob_choice => 2), - Dict(:alg=>FBDF(linsolve=KrylovJL_GMRES()), :prob_choice => 2), - Dict(:alg=>CVODE_BDF(linear_solver = :KLU), :prob_choice => 2), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precilu,psetup=psetupilu,prec_side=1), :prob_choice => 2), - ] + Dict(:alg=>KenCarp47(linsolve = KLUFactorization()), :prob_choice => 2), + Dict(:alg=>KenCarp47(linsolve = KrylovJL_GMRES()), :prob_choice => 2), + Dict(:alg=>FBDF(linsolve = KLUFactorization()), :prob_choice => 2), + Dict(:alg=>FBDF(linsolve = KrylovJL_GMRES()), :prob_choice => 2), + Dict(:alg=>CVODE_BDF(linear_solver = :KLU), :prob_choice => 2), + Dict( + :alg=>CVODE_BDF(linear_solver = :GMRES, prec = precilu, psetup = psetupilu, prec_side = 1), + :prob_choice => 2) +] names = ["KenCarp47 KLU MTK", "KenCarp47 GMRES MTK", - "FBDF KLU MTK", "FBDF GMRES MTK", - "CVODE MTK KLU", "CVODE iLU MTK GMRES" + "FBDF KLU MTK", "FBDF GMRES MTK", + "CVODE MTK KLU", "CVODE iLU MTK GMRES" ]; -wp = WorkPrecisionSet(probs,abstols,reltols,setups;names = names, - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; names = names, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10) plot(wp) ``` @@ -432,41 +474,48 @@ abstols = 1.0 ./ 10.0 .^ (7:12) reltols = 1.0 ./ 10.0 .^ (4:9) setups = [ - Dict(:alg=>CVODE_BDF(linear_solver = :KLU), :prob_choice => 2), - Dict(:alg=>CVODE_BDF(linear_solver = :GMRES)), - Dict(:alg=>CVODE_BDF(linear_solver = :GMRES), :prob_choice => 2), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precilu,psetup=psetupilu,prec_side=1)), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precamg,psetup=psetupamg,prec_side=1)), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precilu,psetup=psetupilu,prec_side=1), :prob_choice => 2), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precamg,psetup=psetupamg,prec_side=1), :prob_choice => 2), - ] -names = ["CVODE MTK KLU","CVODE GMRES","CVODE MTK GMRES", "CVODE iLU GMRES", "CVODE AMG GMRES", "CVODE iLU MTK GMRES", "CVODE AMG MTK GMRES"]; -wp = WorkPrecisionSet(probs,abstols,reltols,setups;names = names, - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) + Dict(:alg=>CVODE_BDF(linear_solver = :KLU), :prob_choice => 2), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES)), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES), :prob_choice => 2), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES, prec = precilu, psetup = psetupilu, prec_side = 1)), + Dict(:alg=>CVODE_BDF(linear_solver = :GMRES, prec = precamg, psetup = psetupamg, prec_side = 1)), + Dict( + :alg=>CVODE_BDF(linear_solver = :GMRES, prec = precilu, psetup = psetupilu, prec_side = 1), + :prob_choice => 2), + Dict( + :alg=>CVODE_BDF(linear_solver = :GMRES, prec = precamg, psetup = psetupamg, prec_side = 1), + :prob_choice => 2) +] +names = ["CVODE MTK KLU", "CVODE GMRES", "CVODE MTK GMRES", "CVODE iLU GMRES", + "CVODE AMG GMRES", "CVODE iLU MTK GMRES", "CVODE AMG MTK GMRES"]; +wp = WorkPrecisionSet(probs, abstols, reltols, setups; names = names, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10) plot(wp) ``` ```julia setups = [ - Dict(:alg=>KenCarp47(linsolve=KLUFactorization()), :prob_choice => 2), - Dict(:alg=>KenCarp47(linsolve=KrylovJL_GMRES()), :prob_choice => 2), - Dict(:alg=>FBDF(linsolve=KLUFactorization()), :prob_choice => 2), - Dict(:alg=>FBDF(linsolve=KrylovJL_GMRES()), :prob_choice => 2), - Dict(:alg=>Rodas5P(linsolve=KrylovJL_GMRES()), :prob_choice => 2), - Dict(:alg=>CVODE_BDF(linear_solver = :KLU), :prob_choice => 2), - Dict(:alg=>CVODE_BDF(linear_solver=:GMRES,prec=precilu,psetup=psetupilu,prec_side=1), :prob_choice => 2), - ] + Dict(:alg=>KenCarp47(linsolve = KLUFactorization()), :prob_choice => 2), + Dict(:alg=>KenCarp47(linsolve = KrylovJL_GMRES()), :prob_choice => 2), + Dict(:alg=>FBDF(linsolve = KLUFactorization()), :prob_choice => 2), + Dict(:alg=>FBDF(linsolve = KrylovJL_GMRES()), :prob_choice => 2), + Dict(:alg=>Rodas5P(linsolve = KrylovJL_GMRES()), :prob_choice => 2), + Dict(:alg=>CVODE_BDF(linear_solver = :KLU), :prob_choice => 2), + Dict( + :alg=>CVODE_BDF(linear_solver = :GMRES, prec = precilu, psetup = psetupilu, prec_side = 1), + :prob_choice => 2) +] names = ["KenCarp47 KLU MTK", "KenCarp47 GMRES MTK", - "FBDF KLU MTK", "FBDF GMRES MTK", - "Rodas5P GMRES MTK", - "CVODE MTK KLU", "CVODE iLU MTK GMRES" + "FBDF KLU MTK", "FBDF GMRES MTK", + "Rodas5P GMRES MTK", + "CVODE MTK KLU", "CVODE iLU MTK GMRES" ]; -wp = WorkPrecisionSet(probs,abstols,reltols,setups;names = names, - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; names = names, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10) plot(wp) ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/StiffODE/E5.jmd b/benchmarks/StiffODE/E5.jmd new file mode 100644 index 000000000..1f52ab9f7 --- /dev/null +++ b/benchmarks/StiffODE/E5.jmd @@ -0,0 +1,154 @@ +--- +title: E5 Work-Precision Diagrams +author: Chris Rackauckas +--- + +```julia +using OrdinaryDiffEq, DiffEqDevTools, Sundials, Plots, ODEInterfaceDiffEq, LSODA +using LinearAlgebra, StaticArrays, RecursiveFactorization +using OrdinaryDiffEqFIRK +gr() + +# E5 Problem from Stiff Test Set +# Exact implementation based on the Fortran feval subroutine +# 4-dimensional stiff ODE system with widely separated rate constants + +function e5!(du, u, p, t) + # E5 problem - exact translation from Fortran feval subroutine: + # prod1=7.89D-10*y(1) + # prod2=1.1D7*y(1)*y(3) + # prod3=1.13D9*y(2)*y(3) + # prod4=1.13D3*y(4) + # f(1)=-prod1-prod2 + # f(2)=prod1-prod3 + # f(4)=prod2-prod4 + # f(3)=f(2)-f(4) + + prod1 = 7.89e-10 * u[1] + prod2 = 1.1e7 * u[1] * u[3] + prod3 = 1.13e9 * u[2] * u[3] + prod4 = 1.13e3 * u[4] + + du[1] = -prod1 - prod2 # f(1) + du[2] = prod1 - prod3 # f(2) + du[4] = prod2 - prod4 # f(4) + du[3] = du[2] - du[4] # f(3) = f(2) - f(4) +end + +function e5(u, p, t) + # E5 problem - exact translation from Fortran feval subroutine: + # prod1=7.89D-10*y(1) + # prod2=1.1D7*y(1)*y(3) + # prod3=1.13D9*y(2)*y(3) + # prod4=1.13D3*y(4) + # f(1)=-prod1-prod2 + # f(2)=prod1-prod3 + # f(4)=prod2-prod4 + # f(3)=f(2)-f(4) + + prod1 = 7.89e-10 * u[1] + prod2 = 1.1e7 * u[1] * u[3] + prod3 = 1.13e9 * u[2] * u[3] + prod4 = 1.13e3 * u[4] + + du1 = -prod1 - prod2 # f(1) + du2 = prod1 - prod3 # f(2) + du4 = prod2 - prod4 # f(4) + du3 = du2 - du4 # f(3) = f(2) - f(4) + SA[du1, du2, du3, du4] +end + +# Initial conditions - system starts with all mass in species A +u0 = [1.76e-3, 0.0, 0.0, 0.0] + +# Time span - long enough to see both fast and slow time scales +tspan = (0.0, 1e10) + +prob = ODEProblem{true, SciMLBase.FullSpecialize}(e5!, u0, tspan) +probstatic = ODEProblem{false}(e5, SVector{4}(u0), tspan) +probbig = ODEProblem{true, SciMLBase.FullSpecialize}(e5!, big.(u0), big.(tspan)) + +# Generate reference solution +sol = solve(probbig, Rodas5P(), abstol = 1/10^60, reltol = 1/10^30) +probs = [prob, probstatic] +test_sol = [sol, sol] + +abstols = [1.7e-28 for i in 1:2] +reltols = 10.0 .^ -(6 .+ (1:2) ./ 4) +``` + +```julia +ylabels = 10.0 .^ (-30:2:0) +plot(sol, xscale = :log10, yscale = :log10, tspan = (1e-5, 1e10), + labels = ["A" "B" "C" "D"], yticks = ylabels) +``` + +## Benchmarks + +```julia +setups = [Dict(:alg=>Rosenbrock23()), + Dict(:alg=>Rosenbrock23(), :prob_choice => 2), + Dict(:alg=>lsoda()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>Rodas5P(), :prob_choice => 2), + Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), + Dict(:alg=>TRBDF2()), + Dict(:alg=>CVODE_BDF()), + #Dict(:alg=>rodas()), + #Dict(:alg=>radau()), + Dict(:alg=>RadauIIA5()), + Dict(:alg=>ROS34PW1a())] +wp = WorkPrecisionSet( + probs, abstols, reltols, setups; error_estimate = :l2, verbose = false, dense = false, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10) +plot(wp) +``` + +```julia +setups = [Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>lsoda()), + Dict(:alg=>ddebdf()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>Rodas5P(), :prob_choice => 2), + Dict(:alg=>rodas()), + Dict(:alg=>radau()), + Dict(:alg=>RadauIIA5()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10) +plot(wp) +``` + +```julia +setups = [Dict(:alg=>Kvaerno4()), + Dict(:alg=>Kvaerno5()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>KenCarp47()), + Dict(:alg=>KenCarp47(), :prob_choice => 2), + Dict(:alg=>KenCarp5()), + Dict(:alg=>lsoda()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>Rodas5P(), :prob_choice => 2), + Dict(:alg=>ImplicitEulerExtrapolation( + min_order = 4, init_order = 11, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitEulerExtrapolation(min_order = 4, init_order = 11, threading = false)), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation( + min_order = 4, init_order = 11, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 4, init_order = 11, threading = false)), + Dict(:alg=>ImplicitHairerWannerExtrapolation( + min_order = 3, init_order = 111, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitHairerWannerExtrapolation(min_order = 3, init_order = 11, threading = false)) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10) +plot(wp) +``` + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) +``` diff --git a/benchmarks/StiffODE/Hires.jmd b/benchmarks/StiffODE/Hires.jmd index c4028347b..ecc8be800 100644 --- a/benchmarks/StiffODE/Hires.jmd +++ b/benchmarks/StiffODE/Hires.jmd @@ -4,34 +4,35 @@ author: Chris Rackauckas --- ```julia -using OrdinaryDiffEq, ParameterizedFunctions, Plots, ODEInterfaceDiffEq, LSODA, DiffEqDevTools, Sundials +using OrdinaryDiffEq, ParameterizedFunctions, Plots, ODEInterfaceDiffEq, LSODA, + DiffEqDevTools, Sundials using LinearAlgebra, StaticArrays, RecursiveFactorization gr() #gr(fmt=:png) f = @ode_def Hires begin - dy1 = -1.71*y1 + 0.43*y2 + 8.32*y3 + 0.0007 - dy2 = 1.71*y1 - 8.75*y2 - dy3 = -10.03*y3 + 0.43*y4 + 0.035*y5 - dy4 = 8.32*y2 + 1.71*y3 - 1.12*y4 - dy5 = -1.745*y5 + 0.43*y6 + 0.43*y7 - dy6 = -280.0*y6*y8 + 0.69*y4 + 1.71*y5 - - 0.43*y6 + 0.69*y7 - dy7 = 280.0*y6*y8 - 1.81*y7 - dy8 = -280.0*y6*y8 + 1.81*y7 + dy1 = -1.71*y1 + 0.43*y2 + 8.32*y3 + 0.0007 + dy2 = 1.71*y1 - 8.75*y2 + dy3 = -10.03*y3 + 0.43*y4 + 0.035*y5 + dy4 = 8.32*y2 + 1.71*y3 - 1.12*y4 + dy5 = -1.745*y5 + 0.43*y6 + 0.43*y7 + dy6 = -280.0*y6*y8 + 0.69*y4 + 1.71*y5 - + 0.43*y6 + 0.69*y7 + dy7 = 280.0*y6*y8 - 1.81*y7 + dy8 = -280.0*y6*y8 + 1.81*y7 end u0 = zeros(8) u0[1] = 1 u0[8] = 0.0057 -prob = ODEProblem{true, SciMLBase.FullSpecialize}(f,u0,(0.0,321.8122)) -probstatic = ODEProblem{false}(f,SVector{8}(u0),(0.0,321.8122)) +prob = ODEProblem{true, SciMLBase.FullSpecialize}(f, u0, (0.0, 321.8122)) +probstatic = ODEProblem{false}(f, SVector{8}(u0), (0.0, 321.8122)) -sol = solve(prob,CVODE_BDF(),abstol=1/10^14,reltol=1/10^14) -sol2 = solve(probstatic,Rodas5P(),abstol=1/10^14,reltol=1/10^14) -probs = [prob,probstatic] -test_sol = [sol,sol2]; +sol = solve(prob, CVODE_BDF(), abstol = 1/10^14, reltol = 1/10^14) +sol2 = solve(probstatic, Rodas5P(), abstol = 1/10^14, reltol = 1/10^14) +probs = [prob, probstatic] +test_sol = [sol, sol2]; abstols = 1.0 ./ 10.0 .^ (4:11) reltols = 1.0 ./ 10.0 .^ (1:8); @@ -42,7 +43,7 @@ plot(sol) ``` ```julia -plot(sol,tspan=(0.0,5.0)) +plot(sol, tspan = (0.0, 5.0)) ``` ## Omissions @@ -82,98 +83,98 @@ This is the speed when you just want the answer. abstols = 1.0 ./ 10.0 .^ (5:8) reltols = 1.0 ./ 10.0 .^ (1:4); setups = [Dict(:alg=>Rosenbrock23()), - Dict(:alg=>Rosenbrock23(), :prob_choice => 2), - Dict(:alg=>FBDF()), - Dict(:alg=>QNDF()), - Dict(:alg=>TRBDF2()), - Dict(:alg=>CVODE_BDF()), - Dict(:alg=>rodas()), - Dict(:alg=>radau()), - Dict(:alg=>RadauIIA5()), - Dict(:alg=>ROS34PW1a()), - Dict(:alg=>lsoda()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups; verbose=false, dense=false, - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) + Dict(:alg=>Rosenbrock23(), :prob_choice => 2), + Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), + Dict(:alg=>TRBDF2()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>rodas()), + Dict(:alg=>radau()), + Dict(:alg=>RadauIIA5()), + Dict(:alg=>ROS34PW1a()), + Dict(:alg=>lsoda()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;dense = false,verbose=false, - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:l2) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; dense = false, verbose = false, + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :l2) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, dense=false, - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` ```julia setups = [Dict(:alg=>Rosenbrock23()), - Dict(:alg=>Rosenbrock23(), :prob_choice => 2), - Dict(:alg=>Kvaerno3()), - Dict(:alg=>CVODE_BDF()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>TRBDF2()), - Dict(:alg=>KenCarp3()), + Dict(:alg=>Rosenbrock23(), :prob_choice => 2), + Dict(:alg=>Kvaerno3()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>TRBDF2()), + Dict(:alg=>KenCarp3()), # Dict(:alg=>SDIRK2()), # Removed because it's bad - Dict(:alg=>radau())] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, dense=false, - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5)) + Dict(:alg=>radau())] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5)) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;dense = false,verbose=false, - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:l2) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; dense = false, verbose = false, + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :l2) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, dense=false, - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` ```julia setups = [Dict(:alg=>Rosenbrock23()), - Dict(:alg=>Rosenbrock23(), :prob_choice => 2), - Dict(:alg=>KenCarp5()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>KenCarp4(), :prob_choice => 2), - Dict(:alg=>KenCarp3()), - Dict(:alg=>ARKODE(order=5)), - Dict(:alg=>ARKODE()), - Dict(:alg=>ARKODE(order=3))] + Dict(:alg=>Rosenbrock23(), :prob_choice => 2), + Dict(:alg=>KenCarp5()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>KenCarp4(), :prob_choice => 2), + Dict(:alg=>KenCarp3()), + Dict(:alg=>ARKODE(order = 5)), + Dict(:alg=>ARKODE()), + Dict(:alg=>ARKODE(order = 3))] names = ["Rosenbrock23" "Rosenbrock23 Static" "KenCarp5" "KenCarp4" "KenCarp4 Static" "KenCarp3" "ARKODE5" "ARKODE4" "ARKODE3"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, dense=false, - names=names,save_everystep=false,appxsol=test_sol,maxiters=Int(1e5)) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + names = names, save_everystep = false, appxsol = test_sol, maxiters = Int(1e5)) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;dense = false,verbose=false, - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:l2) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; dense = false, verbose = false, + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :l2) plot(wp) ``` ```julia setups = [Dict(:alg=>Rosenbrock23()), - Dict(:alg=>Rosenbrock23(), :prob_choice => 2), - Dict(:alg=>TRBDF2()), - Dict(:alg=>ImplicitEulerExtrapolation()), - Dict(:alg=>ImplicitEulerBarycentricExtrapolation()), - Dict(:alg=>ImplicitHairerWannerExtrapolation()), - Dict(:alg=>ABDF2()), - Dict(:alg=>FBDF()), - Dict(:alg=>QNDF()), - Dict(:alg=>Exprb43()), - Dict(:alg=>Exprb32()), + Dict(:alg=>Rosenbrock23(), :prob_choice => 2), + Dict(:alg=>TRBDF2()), + Dict(:alg=>ImplicitEulerExtrapolation()), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation()), + Dict(:alg=>ImplicitHairerWannerExtrapolation()), + Dict(:alg=>ABDF2()), + Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), + Dict(:alg=>Exprb43()), + Dict(:alg=>Exprb32()) ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, dense=false, - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5)) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5)) plot(wp) ``` @@ -186,88 +187,88 @@ abstols = 1.0 ./ 10.0 .^ (7:13) reltols = 1.0 ./ 10.0 .^ (4:10) setups = [ - Dict(:alg=>FBDF()), - Dict(:alg=>QNDF()), - Dict(:alg=>Rodas4()), - Dict(:alg=>Rodas4(), :prob_choice => 2), - Dict(:alg=>CVODE_BDF()), - Dict(:alg=>ddebdf()), - Dict(:alg=>Rodas5()), - Dict(:alg=>Rodas5P()), - Dict(:alg=>Rodas5P(), :prob_choice => 2), - Dict(:alg=>rodas()), - Dict(:alg=>radau()), - Dict(:alg=>lsoda()), - Dict(:alg=>RadauIIA5()), + Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), + Dict(:alg=>Rodas4()), + Dict(:alg=>Rodas4(), :prob_choice => 2), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>ddebdf()), + Dict(:alg=>Rodas5()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>Rodas5P(), :prob_choice => 2), + Dict(:alg=>rodas()), + Dict(:alg=>radau()), + Dict(:alg=>lsoda()), + Dict(:alg=>RadauIIA5()) ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, dense=false, - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5)) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5)) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, - dense=false,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:l2) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, + dense = false, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :l2) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, dense=false, - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` ```julia setups = [Dict(:alg=>GRK4A()), - Dict(:alg=>Rodas5()), - Dict(:alg=>Rodas5P()), - Dict(:alg=>Rodas5P(), :prob_choice => 2), - Dict(:alg=>Kvaerno5()), - Dict(:alg=>CVODE_BDF()), - Dict(:alg=>lsoda()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>Rodas4()), - Dict(:alg=>radau()), - Dict(:alg=>ImplicitEulerExtrapolation()), - Dict(:alg=>ImplicitEulerBarycentricExtrapolation()), - Dict(:alg=>ImplicitHairerWannerExtrapolation()), - ] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, dense=false, - save_everystep=false,appxsol=test_sol,maxiters=Int(1e5)) + Dict(:alg=>Rodas5()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>Rodas5P(), :prob_choice => 2), + Dict(:alg=>Kvaerno5()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>lsoda()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>Rodas4()), + Dict(:alg=>radau()), + Dict(:alg=>ImplicitEulerExtrapolation()), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation()), + Dict(:alg=>ImplicitHairerWannerExtrapolation()) +] +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + save_everystep = false, appxsol = test_sol, maxiters = Int(1e5)) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, - dense=false,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:l2) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, + dense = false, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :l2) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, dense=false, - appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + appxsol = test_sol, maxiters = Int(1e5), error_estimate = :L2) plot(wp) ``` ```julia setups = [Dict(:alg=>Rodas5()), - Dict(:alg=>Rodas5(), :prob_choice => 2), - Dict(:alg=>KenCarp5()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>KenCarp4(), :prob_choice => 2), - Dict(:alg=>KenCarp3()), - Dict(:alg=>ARKODE(order=5)), - Dict(:alg=>ARKODE()), - Dict(:alg=>ARKODE(order=3))] + Dict(:alg=>Rodas5(), :prob_choice => 2), + Dict(:alg=>KenCarp5()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>KenCarp4(), :prob_choice => 2), + Dict(:alg=>KenCarp3()), + Dict(:alg=>ARKODE(order = 5)), + Dict(:alg=>ARKODE()), + Dict(:alg=>ARKODE(order = 3))] names = ["Rodas5" "Rodas5 Static" "KenCarp5" "KenCarp4" "KenCarp4 Static" "KenCarp3" "ARKODE5" "ARKODE4" "ARKODE3"] -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, dense=false, - names=names,save_everystep=false,appxsol=test_sol,maxiters=Int(1e5)) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + names = names, save_everystep = false, appxsol = test_sol, maxiters = Int(1e5)) plot(wp) ``` ```julia -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, - dense=false,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:l2) +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, + dense = false, appxsol = test_sol, maxiters = Int(1e5), error_estimate = :l2) plot(wp) ``` @@ -275,11 +276,11 @@ The following algorithms were removed since they failed. ```julia #setups = [#Dict(:alg=>Hairer4()), - #Dict(:alg=>Hairer42()), - #Dict(:alg=>Rodas3()), - #Dict(:alg=>Kvaerno4()), - #Dict(:alg=>KenCarp5()), - #Dict(:alg=>Cash4()) +#Dict(:alg=>Hairer42()), +#Dict(:alg=>Rodas3()), +#Dict(:alg=>Kvaerno4()), +#Dict(:alg=>KenCarp5()), +#Dict(:alg=>Cash4()) #] #wp = WorkPrecisionSet(probs,abstols,reltols,setups; # save_everystep=false,appxsol=test_sol,maxiters=Int(1e5)) @@ -296,37 +297,43 @@ abstols = 1.0 ./ 10.0 .^ (10:12) reltols = 1.0 ./ 10.0 .^ (7:9) setups = [ - Dict(:alg=>CVODE_BDF()), - Dict(:alg=>KenCarp4()), - Dict(:alg=>Rodas4()), - Dict(:alg=>Rodas4(), :prob_choice => 2), - Dict(:alg=>Rodas5P()), - Dict(:alg=>Rodas5P(), :prob_choice => 2), - Dict(:alg=>QNDF()), - Dict(:alg=>lsoda()), - Dict(:alg=>radau()), - Dict(:alg=>seulex()), - Dict(:alg=>ImplicitEulerExtrapolation(min_order = 4, init_order = 7,threading = OrdinaryDiffEq.PolyesterThreads())), - Dict(:alg=>ImplicitEulerExtrapolation(min_order = 4, init_order = 7,threading = false)), - Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 4, init_order = 7, threading = OrdinaryDiffEq.PolyesterThreads())), - Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 4, init_order = 7, threading = false)), - Dict(:alg=>ImplicitHairerWannerExtrapolation(min_order = 3, init_order = 6,threading = OrdinaryDiffEq.PolyesterThreads())), - Dict(:alg=>ImplicitHairerWannerExtrapolation(min_order = 3, init_order = 6,threading = false)), - ] - -solnames = ["CVODE_BDF","KenCarp4","Rodas4","Rodas4 Static","Rodas5P","Rodas5P Static","QNDF","lsoda","radau","seulex","ImplEulerExtpl (threaded)", "ImplEulerExtpl (non-threaded)", - "ImplEulerBaryExtpl (threaded)","ImplEulerBaryExtpl (non-threaded)","ImplHWExtpl (threaded)","ImplHWExtpl (non-threaded)"] - -wp = WorkPrecisionSet(probs,abstols,reltols,setups;verbose=false, dense=false, - names = solnames,save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) - -plot(wp, title = "Implicit Methods: HIRES",legend=:outertopleft,size = (1000,500), - xticks = 10.0 .^ (-15:1:1), - yticks = 10.0 .^ (-6:0.3:5), - bottom_margin= 5Plots.mm) + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>Rodas4()), + Dict(:alg=>Rodas4(), :prob_choice => 2), + Dict(:alg=>Rodas5P()), + Dict(:alg=>Rodas5P(), :prob_choice => 2), + Dict(:alg=>QNDF()), + Dict(:alg=>lsoda()), + Dict(:alg=>radau()), + Dict(:alg=>seulex()), + Dict(:alg=>ImplicitEulerExtrapolation( + min_order = 4, init_order = 7, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitEulerExtrapolation(min_order = 4, init_order = 7, threading = false)), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation( + min_order = 4, init_order = 7, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 4, init_order = 7, threading = false)), + Dict(:alg=>ImplicitHairerWannerExtrapolation( + min_order = 3, init_order = 6, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitHairerWannerExtrapolation(min_order = 3, init_order = 6, threading = false)) +] + +solnames = ["CVODE_BDF", "KenCarp4", "Rodas4", "Rodas4 Static", "Rodas5P", + "Rodas5P Static", "QNDF", "lsoda", "radau", "seulex", + "ImplEulerExtpl (threaded)", "ImplEulerExtpl (non-threaded)", + "ImplEulerBaryExtpl (threaded)", "ImplEulerBaryExtpl (non-threaded)", + "ImplHWExtpl (threaded)", "ImplHWExtpl (non-threaded)"] + +wp = WorkPrecisionSet(probs, abstols, reltols, setups; verbose = false, dense = false, + names = solnames, save_everystep = false, appxsol = test_sol, maxiters = Int(1e5), numruns = 10) + +plot(wp, title = "Implicit Methods: HIRES", legend = :outertopleft, size = (1000, 500), + xticks = 10.0 .^ (-15:1:1), + yticks = 10.0 .^ (-6:0.3:5), + bottom_margin = 5Plots.mm) ``` ```julia, echo = false using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) ``` diff --git a/benchmarks/StiffODE/MKMBatteryChemistry_wpd.jmd b/benchmarks/StiffODE/MKMBatteryChemistry_wpd.jmd new file mode 100644 index 000000000..16f0de5b8 --- /dev/null +++ b/benchmarks/StiffODE/MKMBatteryChemistry_wpd.jmd @@ -0,0 +1,470 @@ +--- +title: Microkinetic Model (MKM) Battery Chemistry Work-Precision Diagrams +author: Chris Rackauckas +--- + +# MKM Battery Chemistry + +This benchmark tests a microkinetic model (MKM) for battery chemistry representing oxygen reduction reaction (ORR) kinetics. The model includes 13 state variables representing different chemical species and intermediate states in the electrochemical reaction mechanism. The system exhibits extreme stiffness due to the wide range of time scales in the chemical reactions, from fast electron transfer steps to slower mass transport processes. + +The model consists of: +- 13 chemical species concentrations (x₁ to x₁₃) +- Complex reaction kinetics with exponential temperature dependencies +- Multiple reaction pathways for oxygen reduction +- Adsorption/desorption processes on electrode surfaces +- Electrochemical charge transfer reactions + +This represents a realistic electrochemical system with multiple time scales and nonlinear reaction kinetics, making it an excellent test for stiff ODE solvers. + +```julia +using OrdinaryDiffEq, DiffEqDevTools, Sundials, Plots, ODEInterfaceDiffEq, LSODA, LinearSolve +using ProfileSVG, BenchmarkTools, Profile +gr() # gr(fmt=:png) +using LinearAlgebra, StaticArrays, RecursiveFactorization + +ff = begin + ff = ((var"##MTIIPVar#15413", var"##MTKArg#15409", var"##MTKArg#15410", var"##MTKArg#15411")->begin + @inbounds begin + begin + let (x₁, x₂, x₃, x₄, x₅, x₆, x₇, x₈, x₉, x₁₀, x₁₁, x₁₂, x₁₃, α₁, α₂, α₃, α₄, α₅, α₆, α₇, α₈, α₉, α₁₀, α₁₁, α₁₂, α₁₃, α₁₄, α₁₅, α₁₆, α₁₇, α₁₈, α₁₉, α₂₀, α₂₁, α₂₂, α₂₃, α₂₄, α₂₅, α₂₆, α₂₇, α₂₈, α₂₉, α₃₀, α₃₁, α₃₂, t) = (var"##MTKArg#15409"[1], var"##MTKArg#15409"[2], var"##MTKArg#15409"[3], var"##MTKArg#15409"[4], var"##MTKArg#15409"[5], var"##MTKArg#15409"[6], var"##MTKArg#15409"[7], var"##MTKArg#15409"[8], var"##MTKArg#15409"[9], var"##MTKArg#15409"[10], var"##MTKArg#15409"[11], var"##MTKArg#15409"[12], var"##MTKArg#15409"[13], var"##MTKArg#15410"[1], var"##MTKArg#15410"[2], var"##MTKArg#15410"[3], var"##MTKArg#15410"[4], var"##MTKArg#15410"[5], var"##MTKArg#15410"[6], var"##MTKArg#15410"[7], var"##MTKArg#15410"[8], var"##MTKArg#15410"[9], var"##MTKArg#15410"[10], var"##MTKArg#15410"[11], var"##MTKArg#15410"[12], var"##MTKArg#15410"[13], var"##MTKArg#15410"[14], var"##MTKArg#15410"[15], var"##MTKArg#15410"[16], var"##MTKArg#15410"[17], var"##MTKArg#15410"[18], var"##MTKArg#15410"[19], var"##MTKArg#15410"[20], var"##MTKArg#15410"[21], var"##MTKArg#15410"[22], var"##MTKArg#15410"[23], var"##MTKArg#15410"[24], var"##MTKArg#15410"[25], var"##MTKArg#15410"[26], var"##MTKArg#15410"[27], var"##MTKArg#15410"[28], var"##MTKArg#15410"[29], var"##MTKArg#15410"[30], var"##MTKArg#15410"[31], var"##MTKArg#15410"[32], var"##MTKArg#15411") + var"##MTIIPVar#15413"[1] = 0.0 + var"##MTIIPVar#15413"[2] = ((((identity(0.0) + ((α₁₄ * (x₁ / 0.5)) * (x₁₀ / 0.5) - ((α₁₄ / exp((((identity(0) + 1.0 * ((α₁ / 2477.572) * true)) + -1.0 * ((α₂ / 2477.572) * true)) + 1.0 * ((α₁₀ / 2477.572) * true)) + -3.697891137634378)) * true) * (x₂ / 0.5))) - ((α₁₅ * (x₂ / 0.5)) * (x₁₁ / 0.5) - (((α₁₅ / exp(((((identity(0) + 1.0 * ((α₂ / 2477.572) * true)) + -1.0 * ((α₄ / 2477.572) * true)) + -1.0 * ((α₇ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₄ / 0.5)) * (x₇ / 0.5))) - ((α₁₉ * (x₂ / 0.5)) * (x₁₂ / 0.5) - ((α₁₉ / exp((((identity(0) + 1.0 * ((α₂ / 2477.572) * true)) + -1.0 * ((α₃ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -3.697891137634378)) * false) * (x₃ / 0.5))) + (α₂₀ * (x₃ / 0.5) - (((α₂₀ / exp((((identity(0) + -1.0 * ((α₂ / 2477.572) * true)) + 1.0 * ((α₃ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 3.697891137634378)) * false) * (x₂ / 0.5)) * (x₁₂ / 0.5))) * 0.5 + var"##MTIIPVar#15413"[3] = (((((((identity(0.0) - ((α₁₆ * (x₃ / 0.5)) * (x₁₁ / 0.5) - (((α₁₆ / exp(((((identity(0) + 1.0 * ((α₃ / 2477.572) * true)) + -1.0 * ((α₅ / 2477.572) * true)) + -1.0 * ((α₇ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₅ / 0.5)) * (x₇ / 0.5))) + ((α₁₉ * (x₂ / 0.5)) * (x₁₂ / 0.5) - ((α₁₉ / exp((((identity(0) + 1.0 * ((α₂ / 2477.572) * true)) + -1.0 * ((α₃ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -3.697891137634378)) * false) * (x₃ / 0.5))) - (α₂₀ * (x₃ / 0.5) - (((α₂₀ / exp((((identity(0) + -1.0 * ((α₂ / 2477.572) * true)) + 1.0 * ((α₃ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 3.697891137634378)) * false) * (x₂ / 0.5)) * (x₁₂ / 0.5))) - ((α₂₁ * (x₃ / 0.5)) * (x₁₂ / 0.5) - (((α₂₁ / exp(((((identity(0) + 1.0 * ((α₃ / 2477.572) * true)) + -1.0 * ((α₄ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₄ / 0.5)) * (x₁₃ / 0.5))) + ((α₂₂ * (x₄ / 0.5)) * (x₁₃ / 0.5) - (((α₂₂ / exp(((((identity(0) + -1.0 * ((α₃ / 2477.572) * true)) + 1.0 * ((α₄ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₃ / 0.5)) * (x₁₂ / 0.5))) - ((α₃₁ * (x₃ / 0.5)) * (x₁₂ / 0.5) - ((α₃₁ / exp((((identity(0) + 1.0 * ((α₃ / 2477.572) * true)) + -1.0 * ((α₆ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -3.697891137634378)) * false) * (x₆ / 0.5))) + (α₃₂ * (x₆ / 0.5) - (((α₃₂ / exp((((identity(0) + -1.0 * ((α₃ / 2477.572) * true)) + 1.0 * ((α₆ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 3.697891137634378)) * false) * (x₃ / 0.5)) * (x₁₂ / 0.5))) * 0.5 + var"##MTIIPVar#15413"[4] = (((((identity(0.0) + ((α₁₅ * (x₂ / 0.5)) * (x₁₁ / 0.5) - (((α₁₅ / exp(((((identity(0) + 1.0 * ((α₂ / 2477.572) * true)) + -1.0 * ((α₄ / 2477.572) * true)) + -1.0 * ((α₇ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₄ / 0.5)) * (x₇ / 0.5))) + ((α₂₁ * (x₃ / 0.5)) * (x₁₂ / 0.5) - (((α₂₁ / exp(((((identity(0) + 1.0 * ((α₃ / 2477.572) * true)) + -1.0 * ((α₄ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₄ / 0.5)) * (x₁₃ / 0.5))) - ((α₂₂ * (x₄ / 0.5)) * (x₁₃ / 0.5) - (((α₂₂ / exp(((((identity(0) + -1.0 * ((α₃ / 2477.572) * true)) + 1.0 * ((α₄ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₃ / 0.5)) * (x₁₂ / 0.5))) - ((α₂₃ * (x₄ / 0.5)) * (x₁₂ / 0.5) - ((α₂₃ / exp((((identity(0) + 1.0 * ((α₄ / 2477.572) * true)) + -1.0 * ((α₅ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -3.697891137634378)) * false) * (x₅ / 0.5))) + (α₂₄ * (x₅ / 0.5) - (((α₂₄ / exp((((identity(0) + -1.0 * ((α₄ / 2477.572) * true)) + 1.0 * ((α₅ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 3.697891137634378)) * false) * (x₄ / 0.5)) * (x₁₂ / 0.5))) * 0.5 + var"##MTIIPVar#15413"[5] = ((((((identity(0.0) + ((α₁₆ * (x₃ / 0.5)) * (x₁₁ / 0.5) - (((α₁₆ / exp(((((identity(0) + 1.0 * ((α₃ / 2477.572) * true)) + -1.0 * ((α₅ / 2477.572) * true)) + -1.0 * ((α₇ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₅ / 0.5)) * (x₇ / 0.5))) + ((α₁₇ * (x₆ / 0.5)) * (x₁₁ / 0.5) - (((α₁₇ / exp(((((identity(0) + -1.0 * ((α₅ / 2477.572) * true)) + 1.0 * ((α₆ / 2477.572) * true)) + -1.0 * ((α₈ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₅ / 0.5)) * (x₈ / 0.5))) + ((α₂₃ * (x₄ / 0.5)) * (x₁₂ / 0.5) - ((α₂₃ / exp((((identity(0) + 1.0 * ((α₄ / 2477.572) * true)) + -1.0 * ((α₅ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -3.697891137634378)) * false) * (x₅ / 0.5))) - (α₂₄ * (x₅ / 0.5) - (((α₂₄ / exp((((identity(0) + -1.0 * ((α₄ / 2477.572) * true)) + 1.0 * ((α₅ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 3.697891137634378)) * false) * (x₄ / 0.5)) * (x₁₂ / 0.5))) - ((α₂₅ * (x₅ / 0.5)) * (x₁₂ / 0.5) - (((α₂₅ / exp(((((identity(0) + 1.0 * ((α₅ / 2477.572) * true)) + -1.0 * ((α₁₀ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₁₀ / 0.5)) * (x₁₃ / 0.5))) + ((α₂₆ * (x₁₀ / 0.5)) * (x₁₃ / 0.5) - (((α₂₆ / exp(((((identity(0) + -1.0 * ((α₅ / 2477.572) * true)) + 1.0 * ((α₁₀ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₅ / 0.5)) * (x₁₂ / 0.5))) * 0.5 + var"##MTIIPVar#15413"[6] = ((((identity(0.0) - ((α₁₇ * (x₆ / 0.5)) * (x₁₁ / 0.5) - (((α₁₇ / exp(((((identity(0) + -1.0 * ((α₅ / 2477.572) * true)) + 1.0 * ((α₆ / 2477.572) * true)) + -1.0 * ((α₈ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₅ / 0.5)) * (x₈ / 0.5))) - (α₁₈ * (x₆ / 0.5) - (((α₁₈ / exp((((identity(0) + 1.0 * ((α₆ / 2477.572) * true)) + -1.0 * ((α₉ / 2477.572) * true)) + -1.0 * ((α₁₀ / 2477.572) * true)) + 3.697891137634378)) * true) * (x₁₀ / 0.5)) * (x₉ / 0.5))) + ((α₃₁ * (x₃ / 0.5)) * (x₁₂ / 0.5) - ((α₃₁ / exp((((identity(0) + 1.0 * ((α₃ / 2477.572) * true)) + -1.0 * ((α₆ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -3.697891137634378)) * false) * (x₆ / 0.5))) - (α₃₂ * (x₆ / 0.5) - (((α₃₂ / exp((((identity(0) + -1.0 * ((α₃ / 2477.572) * true)) + 1.0 * ((α₆ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 3.697891137634378)) * false) * (x₃ / 0.5)) * (x₁₂ / 0.5))) * 0.5 + var"##MTIIPVar#15413"[7] = ((((identity(0.0) + ((α₁₅ * (x₂ / 0.5)) * (x₁₁ / 0.5) - (((α₁₅ / exp(((((identity(0) + 1.0 * ((α₂ / 2477.572) * true)) + -1.0 * ((α₄ / 2477.572) * true)) + -1.0 * ((α₇ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₄ / 0.5)) * (x₇ / 0.5))) + ((α₁₆ * (x₃ / 0.5)) * (x₁₁ / 0.5) - (((α₁₆ / exp(((((identity(0) + 1.0 * ((α₃ / 2477.572) * true)) + -1.0 * ((α₅ / 2477.572) * true)) + -1.0 * ((α₇ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₅ / 0.5)) * (x₇ / 0.5))) - ((α₂₇ * (x₇ / 0.5)) * (x₁₂ / 0.5) - ((α₂₇ / exp((((identity(0) + 1.0 * ((α₇ / 2477.572) * true)) + -1.0 * ((α₈ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -3.697891137634378)) * false) * (x₈ / 0.5))) + (α₂₈ * (x₈ / 0.5) - (((α₂₈ / exp((((identity(0) + -1.0 * ((α₇ / 2477.572) * true)) + 1.0 * ((α₈ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 3.697891137634378)) * false) * (x₇ / 0.5)) * (x₁₂ / 0.5))) * 0.5 + var"##MTIIPVar#15413"[8] = (((((identity(0.0) + ((α₁₇ * (x₆ / 0.5)) * (x₁₁ / 0.5) - (((α₁₇ / exp(((((identity(0) + -1.0 * ((α₅ / 2477.572) * true)) + 1.0 * ((α₆ / 2477.572) * true)) + -1.0 * ((α₈ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₅ / 0.5)) * (x₈ / 0.5))) + ((α₂₇ * (x₇ / 0.5)) * (x₁₂ / 0.5) - ((α₂₇ / exp((((identity(0) + 1.0 * ((α₇ / 2477.572) * true)) + -1.0 * ((α₈ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -3.697891137634378)) * false) * (x₈ / 0.5))) - (α₂₈ * (x₈ / 0.5) - (((α₂₈ / exp((((identity(0) + -1.0 * ((α₇ / 2477.572) * true)) + 1.0 * ((α₈ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 3.697891137634378)) * false) * (x₇ / 0.5)) * (x₁₂ / 0.5))) - ((α₂₉ * (x₈ / 0.5)) * (x₁₂ / 0.5) - (((α₂₉ / exp(((((identity(0) + 1.0 * ((α₈ / 2477.572) * true)) + -1.0 * ((α₁₁ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₁₃ / 0.5)) * (x₁₁ / 0.5))) + ((α₃₀ * (x₁₃ / 0.5)) * (x₁₁ / 0.5) - (((α₃₀ / exp(((((identity(0) + -1.0 * ((α₈ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₈ / 0.5)) * (x₁₂ / 0.5))) * 0.5 + var"##MTIIPVar#15413"[9] = 0.0 + var"##MTIIPVar#15413"[10] = ((((identity(0.0) - ((α₁₄ * (x₁ / 0.5)) * (x₁₀ / 0.5) - ((α₁₄ / exp((((identity(0) + 1.0 * ((α₁ / 2477.572) * true)) + -1.0 * ((α₂ / 2477.572) * true)) + 1.0 * ((α₁₀ / 2477.572) * true)) + -3.697891137634378)) * true) * (x₂ / 0.5))) + (α₁₈ * (x₆ / 0.5) - (((α₁₈ / exp((((identity(0) + 1.0 * ((α₆ / 2477.572) * true)) + -1.0 * ((α₉ / 2477.572) * true)) + -1.0 * ((α₁₀ / 2477.572) * true)) + 3.697891137634378)) * true) * (x₁₀ / 0.5)) * (x₉ / 0.5))) + ((α₂₅ * (x₅ / 0.5)) * (x₁₂ / 0.5) - (((α₂₅ / exp(((((identity(0) + 1.0 * ((α₅ / 2477.572) * true)) + -1.0 * ((α₁₀ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₁₀ / 0.5)) * (x₁₃ / 0.5))) - ((α₂₆ * (x₁₀ / 0.5)) * (x₁₃ / 0.5) - (((α₂₆ / exp(((((identity(0) + -1.0 * ((α₅ / 2477.572) * true)) + 1.0 * ((α₁₀ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₅ / 0.5)) * (x₁₂ / 0.5))) * 0.5 + var"##MTIIPVar#15413"[11] = (((((identity(0.0) - ((α₁₅ * (x₂ / 0.5)) * (x₁₁ / 0.5) - (((α₁₅ / exp(((((identity(0) + 1.0 * ((α₂ / 2477.572) * true)) + -1.0 * ((α₄ / 2477.572) * true)) + -1.0 * ((α₇ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₄ / 0.5)) * (x₇ / 0.5))) - ((α₁₆ * (x₃ / 0.5)) * (x₁₁ / 0.5) - (((α₁₆ / exp(((((identity(0) + 1.0 * ((α₃ / 2477.572) * true)) + -1.0 * ((α₅ / 2477.572) * true)) + -1.0 * ((α₇ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₅ / 0.5)) * (x₇ / 0.5))) - ((α₁₇ * (x₆ / 0.5)) * (x₁₁ / 0.5) - (((α₁₇ / exp(((((identity(0) + -1.0 * ((α₅ / 2477.572) * true)) + 1.0 * ((α₆ / 2477.572) * true)) + -1.0 * ((α₈ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + 0.0)) * true) * (x₅ / 0.5)) * (x₈ / 0.5))) + ((α₂₉ * (x₈ / 0.5)) * (x₁₂ / 0.5) - (((α₂₉ / exp(((((identity(0) + 1.0 * ((α₈ / 2477.572) * true)) + -1.0 * ((α₁₁ / 2477.572) * true)) + 1.0 * ((α₁₂ / 2477.572) * true)) + -1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₁₃ / 0.5)) * (x₁₁ / 0.5))) - ((α₃₀ * (x₁₃ / 0.5)) * (x₁₁ / 0.5) - (((α₃₀ / exp(((((identity(0) + -1.0 * ((α₈ / 2477.572) * true)) + 1.0 * ((α₁₁ / 2477.572) * true)) + -1.0 * ((α₁₂ / 2477.572) * true)) + 1.0 * ((α₁₃ / 2477.572) * true)) + 0.0)) * false) * (x₈ / 0.5)) * (x₁₂ / 0.5))) * 0.5 + var"##MTIIPVar#15413"[12] = 0.0 + var"##MTIIPVar#15413"[13] = 0.0 + end + end + end + nothing + end) + tgrad = nothing + jac = ((var"##MTIIPVar#15420", var"##MTKArg#15416", var"##MTKArg#15417", var"##MTKArg#15418")->begin + @inbounds begin + begin + let (x₁, x₂, x₃, x₄, x₅, x₆, x₇, x₈, x₉, x₁₀, x₁₁, x₁₂, x₁₃, α₁, α₂, α₃, α₄, α₅, α₆, α₇, α₈, α₉, α₁₀, α₁₁, α₁₂, α₁₃, α₁₄, α₁₅, α₁₆, α₁₇, α₁₈, α₁₉, α₂₀, α₂₁, α₂₂, α₂₃, α₂₄, α₂₅, α₂₆, α₂₇, α₂₈, α₂₉, α₃₀, α₃₁, α₃₂, t) = (var"##MTKArg#15416"[1], var"##MTKArg#15416"[2], var"##MTKArg#15416"[3], var"##MTKArg#15416"[4], var"##MTKArg#15416"[5], var"##MTKArg#15416"[6], var"##MTKArg#15416"[7], var"##MTKArg#15416"[8], var"##MTKArg#15416"[9], var"##MTKArg#15416"[10], var"##MTKArg#15416"[11], var"##MTKArg#15416"[12], var"##MTKArg#15416"[13], var"##MTKArg#15417"[1], var"##MTKArg#15417"[2], var"##MTKArg#15417"[3], var"##MTKArg#15417"[4], var"##MTKArg#15417"[5], var"##MTKArg#15417"[6], var"##MTKArg#15417"[7], var"##MTKArg#15417"[8], var"##MTKArg#15417"[9], var"##MTKArg#15417"[10], var"##MTKArg#15417"[11], var"##MTKArg#15417"[12], var"##MTKArg#15417"[13], var"##MTKArg#15417"[14], var"##MTKArg#15417"[15], var"##MTKArg#15417"[16], var"##MTKArg#15417"[17], var"##MTKArg#15417"[18], var"##MTKArg#15417"[19], var"##MTKArg#15417"[20], var"##MTKArg#15417"[21], var"##MTKArg#15417"[22], var"##MTKArg#15417"[23], var"##MTKArg#15417"[24], var"##MTKArg#15417"[25], var"##MTKArg#15417"[26], var"##MTKArg#15417"[27], var"##MTKArg#15417"[28], var"##MTKArg#15417"[29], var"##MTKArg#15417"[30], var"##MTKArg#15417"[31], var"##MTKArg#15417"[32], var"##MTKArg#15418") + var"##MTIIPVar#15420"[1] = 0.0 + var"##MTIIPVar#15420"[2] = 2.0 * x₁₀ * α₁₄ + var"##MTIIPVar#15420"[3] = 0.0 + var"##MTIIPVar#15420"[4] = 0.0 + var"##MTIIPVar#15420"[5] = 0.0 + var"##MTIIPVar#15420"[6] = 0.0 + var"##MTIIPVar#15420"[7] = 0.0 + var"##MTIIPVar#15420"[8] = 0.0 + var"##MTIIPVar#15420"[9] = 0.0 + var"##MTIIPVar#15420"[10] = -2.0 * x₁₀ * α₁₄ + var"##MTIIPVar#15420"[11] = 0.0 + var"##MTIIPVar#15420"[12] = 0.0 + var"##MTIIPVar#15420"[13] = 0.0 + var"##MTIIPVar#15420"[14] = 0.0 + var"##MTIIPVar#15420"[15] = 0.5 * (-4.0 * x₁₁ * α₁₅ + -4.0 * x₁₂ * α₁₉ + -2.0 * exp(-3.697891137634378 + -0.00040362096439578745α₂ + 0.00040362096439578745 * (α₁ + α₁₀)) ^ -1 * α₁₄) + var"##MTIIPVar#15420"[16] = 2.0 * x₁₂ * α₁₉ + var"##MTIIPVar#15420"[17] = 2.0 * x₁₁ * α₁₅ + var"##MTIIPVar#15420"[18] = 0.0 + var"##MTIIPVar#15420"[19] = 0.0 + var"##MTIIPVar#15420"[20] = 2.0 * x₁₁ * α₁₅ + var"##MTIIPVar#15420"[21] = 0.0 + var"##MTIIPVar#15420"[22] = 0.0 + var"##MTIIPVar#15420"[23] = exp(-3.697891137634378 + -0.00040362096439578745α₂ + 0.00040362096439578745 * (α₁ + α₁₀)) ^ -1 * α₁₄ + var"##MTIIPVar#15420"[24] = -2.0 * x₁₁ * α₁₅ + var"##MTIIPVar#15420"[25] = 0.0 + var"##MTIIPVar#15420"[26] = 0.0 + var"##MTIIPVar#15420"[27] = 0.0 + var"##MTIIPVar#15420"[28] = α₂₀ + var"##MTIIPVar#15420"[29] = 0.5 * (-2.0α₂₀ + -4.0 * x₁₁ * α₁₆ + -4.0 * x₁₂ * (α₂₁ + α₃₁)) + var"##MTIIPVar#15420"[30] = 2.0 * x₁₂ * α₂₁ + var"##MTIIPVar#15420"[31] = 2.0 * x₁₁ * α₁₆ + var"##MTIIPVar#15420"[32] = 2.0 * x₁₂ * α₃₁ + var"##MTIIPVar#15420"[33] = 2.0 * x₁₁ * α₁₆ + var"##MTIIPVar#15420"[34] = 0.0 + var"##MTIIPVar#15420"[35] = 0.0 + var"##MTIIPVar#15420"[36] = 0.0 + var"##MTIIPVar#15420"[37] = -2.0 * x₁₁ * α₁₆ + var"##MTIIPVar#15420"[38] = 0.0 + var"##MTIIPVar#15420"[39] = 0.0 + var"##MTIIPVar#15420"[40] = 0.0 + var"##MTIIPVar#15420"[41] = 2.0 * x₇ * α₁₅ * exp(0.00040362096439578745 * (α₁₁ + α₂) + -0.00040362096439578745 * (α₄ + α₇)) ^ -1 + var"##MTIIPVar#15420"[42] = 2.0 * x₁₃ * α₂₂ + var"##MTIIPVar#15420"[43] = 0.5 * (-4.0 * x₁₂ * α₂₃ + -4.0 * x₁₃ * α₂₂ + -4.0 * x₇ * α₁₅ * exp(0.00040362096439578745 * (α₁₁ + α₂) + -0.00040362096439578745 * (α₄ + α₇)) ^ -1) + var"##MTIIPVar#15420"[44] = 2.0 * x₁₂ * α₂₃ + var"##MTIIPVar#15420"[45] = 0.0 + var"##MTIIPVar#15420"[46] = -2.0 * x₇ * α₁₅ * exp(0.00040362096439578745 * (α₁₁ + α₂) + -0.00040362096439578745 * (α₄ + α₇)) ^ -1 + var"##MTIIPVar#15420"[47] = 0.0 + var"##MTIIPVar#15420"[48] = 0.0 + var"##MTIIPVar#15420"[49] = 0.0 + var"##MTIIPVar#15420"[50] = 2.0 * x₇ * α₁₅ * exp(0.00040362096439578745 * (α₁₁ + α₂) + -0.00040362096439578745 * (α₄ + α₇)) ^ -1 + var"##MTIIPVar#15420"[51] = 0.0 + var"##MTIIPVar#15420"[52] = 0.0 + var"##MTIIPVar#15420"[53] = 0.0 + var"##MTIIPVar#15420"[54] = 0.0 + var"##MTIIPVar#15420"[55] = 2.0 * x₇ * α₁₆ * exp(0.00040362096439578745 * (α₁₁ + α₃) + -0.00040362096439578745 * (α₅ + α₇)) ^ -1 + var"##MTIIPVar#15420"[56] = α₂₄ + var"##MTIIPVar#15420"[57] = 0.5 * (-2.0α₂₄ + -4.0 * x₁₂ * α₂₅ + -4.0 * x₇ * α₁₆ * exp(0.00040362096439578745 * (α₁₁ + α₃) + -0.00040362096439578745 * (α₅ + α₇)) ^ -1 + -4.0 * x₈ * α₁₇ * exp(0.00040362096439578745 * (α₁₁ + α₆) + -0.00040362096439578745 * (α₅ + α₈)) ^ -1) + var"##MTIIPVar#15420"[58] = 2.0 * x₈ * α₁₇ * exp(0.00040362096439578745 * (α₁₁ + α₆) + -0.00040362096439578745 * (α₅ + α₈)) ^ -1 + var"##MTIIPVar#15420"[59] = -2.0 * x₇ * α₁₆ * exp(0.00040362096439578745 * (α₁₁ + α₃) + -0.00040362096439578745 * (α₅ + α₇)) ^ -1 + var"##MTIIPVar#15420"[60] = -2.0 * x₈ * α₁₇ * exp(0.00040362096439578745 * (α₁₁ + α₆) + -0.00040362096439578745 * (α₅ + α₈)) ^ -1 + var"##MTIIPVar#15420"[61] = 0.0 + var"##MTIIPVar#15420"[62] = 2.0 * x₁₂ * α₂₅ + var"##MTIIPVar#15420"[63] = 0.5 * (4.0 * x₇ * α₁₆ * exp(0.00040362096439578745 * (α₁₁ + α₃) + -0.00040362096439578745 * (α₅ + α₇)) ^ -1 + 4.0 * x₈ * α₁₇ * exp(0.00040362096439578745 * (α₁₁ + α₆) + -0.00040362096439578745 * (α₅ + α₈)) ^ -1) + var"##MTIIPVar#15420"[64] = 0.0 + var"##MTIIPVar#15420"[65] = 0.0 + var"##MTIIPVar#15420"[66] = 0.0 + var"##MTIIPVar#15420"[67] = 0.0 + var"##MTIIPVar#15420"[68] = α₃₂ + var"##MTIIPVar#15420"[69] = 0.0 + var"##MTIIPVar#15420"[70] = 2.0 * x₁₁ * α₁₇ + var"##MTIIPVar#15420"[71] = 0.5 * (-2.0 * (α₁₈ + α₃₂) + -4.0 * x₁₁ * α₁₇) + var"##MTIIPVar#15420"[72] = 0.0 + var"##MTIIPVar#15420"[73] = 2.0 * x₁₁ * α₁₇ + var"##MTIIPVar#15420"[74] = 0.0 + var"##MTIIPVar#15420"[75] = α₁₈ + var"##MTIIPVar#15420"[76] = -2.0 * x₁₁ * α₁₇ + var"##MTIIPVar#15420"[77] = 0.0 + var"##MTIIPVar#15420"[78] = 0.0 + var"##MTIIPVar#15420"[79] = 0.0 + var"##MTIIPVar#15420"[80] = 2.0 * x₄ * α₁₅ * exp(0.00040362096439578745 * (α₁₁ + α₂) + -0.00040362096439578745 * (α₄ + α₇)) ^ -1 + var"##MTIIPVar#15420"[81] = 2.0 * x₅ * α₁₆ * exp(0.00040362096439578745 * (α₁₁ + α₃) + -0.00040362096439578745 * (α₅ + α₇)) ^ -1 + var"##MTIIPVar#15420"[82] = -2.0 * x₄ * α₁₅ * exp(0.00040362096439578745 * (α₁₁ + α₂) + -0.00040362096439578745 * (α₄ + α₇)) ^ -1 + var"##MTIIPVar#15420"[83] = -2.0 * x₅ * α₁₆ * exp(0.00040362096439578745 * (α₁₁ + α₃) + -0.00040362096439578745 * (α₅ + α₇)) ^ -1 + var"##MTIIPVar#15420"[84] = 0.0 + var"##MTIIPVar#15420"[85] = 0.5 * (-4.0 * x₁₂ * α₂₇ + -4.0 * x₄ * α₁₅ * exp(0.00040362096439578745 * (α₁₁ + α₂) + -0.00040362096439578745 * (α₄ + α₇)) ^ -1 + -4.0 * x₅ * α₁₆ * exp(0.00040362096439578745 * (α₁₁ + α₃) + -0.00040362096439578745 * (α₅ + α₇)) ^ -1) + var"##MTIIPVar#15420"[86] = 2.0 * x₁₂ * α₂₇ + var"##MTIIPVar#15420"[87] = 0.0 + var"##MTIIPVar#15420"[88] = 0.0 + var"##MTIIPVar#15420"[89] = 0.5 * (4.0 * x₄ * α₁₅ * exp(0.00040362096439578745 * (α₁₁ + α₂) + -0.00040362096439578745 * (α₄ + α₇)) ^ -1 + 4.0 * x₅ * α₁₆ * exp(0.00040362096439578745 * (α₁₁ + α₃) + -0.00040362096439578745 * (α₅ + α₇)) ^ -1) + var"##MTIIPVar#15420"[90] = 0.0 + var"##MTIIPVar#15420"[91] = 0.0 + var"##MTIIPVar#15420"[92] = 0.0 + var"##MTIIPVar#15420"[93] = 0.0 + var"##MTIIPVar#15420"[94] = 0.0 + var"##MTIIPVar#15420"[95] = 0.0 + var"##MTIIPVar#15420"[96] = -2.0 * x₅ * α₁₇ * exp(0.00040362096439578745 * (α₁₁ + α₆) + -0.00040362096439578745 * (α₅ + α₈)) ^ -1 + var"##MTIIPVar#15420"[97] = 2.0 * x₅ * α₁₇ * exp(0.00040362096439578745 * (α₁₁ + α₆) + -0.00040362096439578745 * (α₅ + α₈)) ^ -1 + var"##MTIIPVar#15420"[98] = α₂₈ + var"##MTIIPVar#15420"[99] = 0.5 * (-2.0α₂₈ + -4.0 * x₁₂ * α₂₉ + -4.0 * x₅ * α₁₇ * exp(0.00040362096439578745 * (α₁₁ + α₆) + -0.00040362096439578745 * (α₅ + α₈)) ^ -1) + var"##MTIIPVar#15420"[100] = 0.0 + var"##MTIIPVar#15420"[101] = 0.0 + var"##MTIIPVar#15420"[102] = 0.5 * (4.0 * x₁₂ * α₂₉ + 4.0 * x₅ * α₁₇ * exp(0.00040362096439578745 * (α₁₁ + α₆) + -0.00040362096439578745 * (α₅ + α₈)) ^ -1) + var"##MTIIPVar#15420"[103] = 0.0 + var"##MTIIPVar#15420"[104] = 0.0 + var"##MTIIPVar#15420"[105] = 0.0 + var"##MTIIPVar#15420"[106] = 0.0 + var"##MTIIPVar#15420"[107] = 0.0 + var"##MTIIPVar#15420"[108] = 0.0 + var"##MTIIPVar#15420"[109] = 0.0 + var"##MTIIPVar#15420"[110] = 2.0 * x₁₀ * exp(3.697891137634378 + 0.00040362096439578745α₆ + -0.00040362096439578745 * (α₁₀ + α₉)) ^ -1 * α₁₈ + var"##MTIIPVar#15420"[111] = 0.0 + var"##MTIIPVar#15420"[112] = 0.0 + var"##MTIIPVar#15420"[113] = 0.0 + var"##MTIIPVar#15420"[114] = -2.0 * x₁₀ * exp(3.697891137634378 + 0.00040362096439578745α₆ + -0.00040362096439578745 * (α₁₀ + α₉)) ^ -1 * α₁₈ + var"##MTIIPVar#15420"[115] = 0.0 + var"##MTIIPVar#15420"[116] = 0.0 + var"##MTIIPVar#15420"[117] = 0.0 + var"##MTIIPVar#15420"[118] = 0.0 + var"##MTIIPVar#15420"[119] = 2.0 * x₁ * α₁₄ + var"##MTIIPVar#15420"[120] = 0.0 + var"##MTIIPVar#15420"[121] = 0.0 + var"##MTIIPVar#15420"[122] = 2.0 * x₁₃ * α₂₆ + var"##MTIIPVar#15420"[123] = 2.0 * x₉ * exp(3.697891137634378 + 0.00040362096439578745α₆ + -0.00040362096439578745 * (α₁₀ + α₉)) ^ -1 * α₁₈ + var"##MTIIPVar#15420"[124] = 0.0 + var"##MTIIPVar#15420"[125] = 0.0 + var"##MTIIPVar#15420"[126] = 0.0 + var"##MTIIPVar#15420"[127] = 0.5 * (-4.0 * x₁ * α₁₄ + -4.0 * x₁₃ * α₂₆ + -4.0 * x₉ * exp(3.697891137634378 + 0.00040362096439578745α₆ + -0.00040362096439578745 * (α₁₀ + α₉)) ^ -1 * α₁₈) + var"##MTIIPVar#15420"[128] = 0.0 + var"##MTIIPVar#15420"[129] = 0.0 + var"##MTIIPVar#15420"[130] = 0.0 + var"##MTIIPVar#15420"[131] = 0.0 + var"##MTIIPVar#15420"[132] = -2.0 * x₂ * α₁₅ + var"##MTIIPVar#15420"[133] = -2.0 * x₃ * α₁₆ + var"##MTIIPVar#15420"[134] = 2.0 * x₂ * α₁₅ + var"##MTIIPVar#15420"[135] = 0.5 * (4.0 * x₃ * α₁₆ + 4.0 * x₆ * α₁₇) + var"##MTIIPVar#15420"[136] = -2.0 * x₆ * α₁₇ + var"##MTIIPVar#15420"[137] = 0.5 * (4.0 * x₂ * α₁₅ + 4.0 * x₃ * α₁₆) + var"##MTIIPVar#15420"[138] = 0.5 * (4.0 * x₁₃ * α₃₀ + 4.0 * x₆ * α₁₇) + var"##MTIIPVar#15420"[139] = 0.0 + var"##MTIIPVar#15420"[140] = 0.0 + var"##MTIIPVar#15420"[141] = 0.5 * (-4.0 * x₁₃ * α₃₀ + -4.0 * x₂ * α₁₅ + -4.0 * x₃ * α₁₆ + -4.0 * x₆ * α₁₇) + var"##MTIIPVar#15420"[142] = 0.0 + var"##MTIIPVar#15420"[143] = 0.0 + var"##MTIIPVar#15420"[144] = 0.0 + var"##MTIIPVar#15420"[145] = -2.0 * x₂ * α₁₉ + var"##MTIIPVar#15420"[146] = 0.5 * (4.0 * x₂ * α₁₉ + -4.0 * x₃ * (α₂₁ + α₃₁)) + var"##MTIIPVar#15420"[147] = 0.5 * (4.0 * x₃ * α₂₁ + -4.0 * x₄ * α₂₃) + var"##MTIIPVar#15420"[148] = 0.5 * (4.0 * x₄ * α₂₃ + -4.0 * x₅ * α₂₅) + var"##MTIIPVar#15420"[149] = 2.0 * x₃ * α₃₁ + var"##MTIIPVar#15420"[150] = -2.0 * x₇ * α₂₇ + var"##MTIIPVar#15420"[151] = 0.5 * (4.0 * x₇ * α₂₇ + -4.0 * x₈ * α₂₉) + var"##MTIIPVar#15420"[152] = 0.0 + var"##MTIIPVar#15420"[153] = 2.0 * x₅ * α₂₅ + var"##MTIIPVar#15420"[154] = 2.0 * x₈ * α₂₉ + var"##MTIIPVar#15420"[155] = 0.0 + var"##MTIIPVar#15420"[156] = 0.0 + var"##MTIIPVar#15420"[157] = 0.0 + var"##MTIIPVar#15420"[158] = 0.0 + var"##MTIIPVar#15420"[159] = 2.0 * x₄ * α₂₂ + var"##MTIIPVar#15420"[160] = -2.0 * x₄ * α₂₂ + var"##MTIIPVar#15420"[161] = 2.0 * x₁₀ * α₂₆ + var"##MTIIPVar#15420"[162] = 0.0 + var"##MTIIPVar#15420"[163] = 0.0 + var"##MTIIPVar#15420"[164] = 2.0 * x₁₁ * α₃₀ + var"##MTIIPVar#15420"[165] = 0.0 + var"##MTIIPVar#15420"[166] = -2.0 * x₁₀ * α₂₆ + var"##MTIIPVar#15420"[167] = -2.0 * x₁₁ * α₃₀ + var"##MTIIPVar#15420"[168] = 0.0 + var"##MTIIPVar#15420"[169] = 0.0 + end + end + end + nothing + end) + M = UniformScaling{Bool}(true) + ODEFunction{true}(ff, jac = jac, tgrad = tgrad, mass_matrix = M, jac_prototype = nothing, syms = [:x₁, :x₂, :x₃, :x₄, :x₅, :x₆, :x₇, :x₈, :x₉, :x₁₀, :x₁₁, :x₁₂, :x₁₃]) + end +u0 = [0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 1.81e-6, 55500.0] +tspan = (0.0, 1.0e-5) +p = [153400.0, 134110.0, 116740.0, -9648.3, -14472.0, 147620.0, 51136.0, 19296.6, 179458.0, 0.0, 0.0, 0.0, 0.0, 1.0e8, 47320.473243810055, 3.4311035379976365e6, 3.4311035379976365e6, 1.6603867185365406, 5.52486e14, 2.3763009937807666e12, 5.52486e14, 8.308386964362935e-9, 5.52486e14, 7.882700332950447e13, 5.52486e14, 1.900083786848033e17, 5.52486e14, 2.0709841124207065e8, 5.52486e14, 2.2895136995798813e11, 5.52486e14, 3.010694854288576e19] +prob = ODEProblem(ff, u0, tspan, p) + +# Reference solution using a robust stiff solver +sol = solve(prob, Rodas5P(), abstol=1e-20, reltol=1e-14) +test_sol = TestSolution(sol) +abstols = 1.0 ./ 10.0 .^ (4:11) +reltols = 1.0 ./ 10.0 .^ (1:8); +``` + +```julia +plot(sol, vars=[8], xscale = :log10, tspan=(1e-12, 1e-5)) +``` + +```julia +plot(sol, vars=[11], xscale = :log10, tspan=(1e-12, 1e-5)) +``` + +## High Tolerances + +This is the speed when you just want the answer. + +```julia +abstols = 1.0 ./ 10.0 .^ (5:8) +reltols = 1.0 ./ 10.0 .^ (1:4); +setups = [Dict(:alg=>Rosenbrock23()), + Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), + Dict(:alg=>TRBDF2()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>rodas()), + Dict(:alg=>radau()), + Dict(:alg=>lsoda()), + Dict(:alg=>RadauIIA5()), + ] +wp = WorkPrecisionSet(prob,abstols,reltols,setups;verbose=false, + save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) +plot(wp) +``` + +```julia +wp = WorkPrecisionSet(prob,abstols,reltols,setups;dense = false,verbose = false, + appxsol=test_sol,maxiters=Int(1e5),error_estimate=:l2,numruns=10) +plot(wp) +``` + +```julia +wp = WorkPrecisionSet(prob,abstols,reltols,setups;verbose=false, + appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2,numruns=10) +plot(wp) +``` + +```julia +setups = [Dict(:alg=>Rosenbrock23()), + Dict(:alg=>Kvaerno3()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>TRBDF2()), + Dict(:alg=>KenCarp3()), + Dict(:alg=>Rodas4()), + Dict(:alg=>lsoda()), + Dict(:alg=>radau())] +wp = WorkPrecisionSet(prob,abstols,reltols,setups; verbose=false, + save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) +plot(wp) +``` + +```julia +wp = WorkPrecisionSet(prob,abstols,reltols,setups;dense = false,verbose = false, + appxsol=test_sol,maxiters=Int(1e5),error_estimate=:l2,numruns=10) +plot(wp) +``` + +```julia +wp = WorkPrecisionSet(prob,abstols,reltols,setups; verbose=false, + appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2,numruns=10) +plot(wp) +``` + +```julia +setups = [Dict(:alg=>Rosenbrock23()), + Dict(:alg=>KenCarp5()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>KenCarp3()), + Dict(:alg=>ARKODE(order=5)), + Dict(:alg=>ARKODE()), + Dict(:alg=>ARKODE(order=3))] +names = ["Rosenbrock23" "KenCarp5" "KenCarp4" "KenCarp3" "ARKODE5" "ARKODE4" "ARKODE3"] +wp = WorkPrecisionSet(prob,abstols,reltols,setups; verbose=false, + names=names,save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) +plot(wp) +``` + +```julia +setups = [Dict(:alg=>Rosenbrock23()), + Dict(:alg=>TRBDF2()), + Dict(:alg=>ImplicitEulerExtrapolation()), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation()), + Dict(:alg=>ImplicitHairerWannerExtrapolation()), + Dict(:alg=>ABDF2()), + Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), +] +wp = WorkPrecisionSet(prob,abstols,reltols,setups; verbose=false, + save_everystep=false,appxsol=test_sol,maxiters=Int(1e5)) +plot(wp) +``` + +```julia +setups = [Dict(:alg=>Rosenbrock23()), + Dict(:alg=>TRBDF2()), + Dict(:alg=>ImplicitEulerExtrapolation(linsolve = RFLUFactorization())), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation(linsolve = RFLUFactorization())), + Dict(:alg=>ImplicitHairerWannerExtrapolation(linsolve = RFLUFactorization())), + Dict(:alg=>ABDF2()), + Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), +] +wp = WorkPrecisionSet(prob,abstols,reltols,setups; verbose=false, + save_everystep=false,appxsol=test_sol,maxiters=Int(1e5)) +plot(wp) +``` + +### Low Tolerances + +This is the speed at lower tolerances, measuring what's good when accuracy is needed. + +```julia +abstols = 1.0 ./ 10.0 .^ (7:13) +reltols = 1.0 ./ 10.0 .^ (4:10) + +setups = [ + Dict(:alg=>FBDF()), + Dict(:alg=>QNDF()), + Dict(:alg=>Rodas4P()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>ddebdf()), + Dict(:alg=>Rodas4()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>rodas()), + Dict(:alg=>radau()), + Dict(:alg=>lsoda()) + ] +wp = WorkPrecisionSet(prob,abstols,reltols,setups;verbose=false, + save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) +plot(wp) +``` + +```julia +wp = WorkPrecisionSet(prob,abstols,reltols,setups;verbose=false, + dense=false,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:l2,numruns=10) +plot(wp) +``` + +```julia +wp = WorkPrecisionSet(prob,abstols,reltols,setups;verbose=false, + appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2,numruns=10) +plot(wp) +``` + +```julia +setups = [Dict(:alg=>GRK4A()), + Dict(:alg=>Rodas5()), + Dict(:alg=>Kvaerno4()), + Dict(:alg=>Kvaerno5()), + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>KenCarp5()), + Dict(:alg=>Rodas4()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>radau()), + Dict(:alg=>ImplicitEulerExtrapolation(min_order = 3)), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation()), + Dict(:alg=>ImplicitHairerWannerExtrapolation()), + ] +wp = WorkPrecisionSet(prob,abstols,reltols,setups; verbose=false, + save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) +plot(wp) +``` + +```julia +wp = WorkPrecisionSet(prob,abstols,reltols,setups;verbose=false, + dense=false,appxsol=test_sol,maxiters=Int(1e5),error_estimate=:l2,numruns=10) +plot(wp) +``` + +```julia +wp = WorkPrecisionSet(prob,abstols,reltols,setups; verbose=false, + appxsol=test_sol,maxiters=Int(1e5),error_estimate=:L2,numruns=10) +plot(wp) +``` + +Multithreading benchmarks with Parallel Extrapolation Methods + +```julia +#Setting BLAS to one thread to measure gains +LinearAlgebra.BLAS.set_num_threads(1) + +abstols = 1.0 ./ 10.0 .^ (11:13) +reltols = 1.0 ./ 10.0 .^ (8:10) + +setups = [ + Dict(:alg=>CVODE_BDF()), + Dict(:alg=>KenCarp4()), + Dict(:alg=>Rodas4()), + Dict(:alg=>Rodas5()), + Dict(:alg=>Rodas5P()), + Dict(:alg=>QNDF()), + Dict(:alg=>lsoda()), + Dict(:alg=>radau()), + Dict(:alg=>seulex()), + Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitEulerExtrapolation(min_order = 5, init_order = 3,threading = false)), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitEulerBarycentricExtrapolation(min_order = 5, threading = false)), + Dict(:alg=>ImplicitHairerWannerExtrapolation(threading = OrdinaryDiffEq.PolyesterThreads())), + Dict(:alg=>ImplicitHairerWannerExtrapolation(threading = false)), + ] + +solnames = ["CVODE_BDF","KenCarp4","Rodas4","Rodas5","Rodas5P","QNDF","lsoda","radau","seulex","ImplEulerExtpl (threaded)", "ImplEulerExtpl (non-threaded)", + "ImplEulerBaryExtpl (threaded)","ImplEulerBaryExtpl (non-threaded)","ImplHWExtpl (threaded)","ImplHWExtpl (non-threaded)"] + +wp = WorkPrecisionSet(prob,abstols,reltols,setups; verbose=false, + names = solnames,save_everystep=false,appxsol=test_sol,maxiters=Int(1e5),numruns=10) + +plot(wp, title = "Implicit Methods: MKM Battery Chemistry",legend=:outertopleft,size = (1000,500), + xticks = 10.0 .^ (-15:1:1), + yticks = 10.0 .^ (-6:0.3:5), + bottom_margin= 5Plots.mm) +``` + +### Conclusion + +This MKM battery chemistry benchmark tests stiff ODE solvers on a realistic electrochemical system with complex microkinetic reaction mechanisms. The extreme stiffness arising from multiple time scales in the chemical reactions creates significant challenges for adaptive time stepping algorithms, making it an excellent test for robust stiff solvers. + +```julia, echo = false +using SciMLBenchmarks +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) +``` \ No newline at end of file diff --git a/benchmarks/StiffODE/Manifest.toml b/benchmarks/StiffODE/Manifest.toml index fe3c8263e..e8819c699 100644 --- a/benchmarks/StiffODE/Manifest.toml +++ b/benchmarks/StiffODE/Manifest.toml @@ -1,13 +1,13 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.11.3" +julia_version = "1.10.9" manifest_format = "2.0" -project_hash = "80796edcb95bfedab219a7900610d980b95e0678" +project_hash = "3916e167d6740e94237c780dce42c34ea9dc912e" [[deps.ADTypes]] -git-tree-sha1 = "e2478490447631aedba0823d4d7a80b2cc8cdb32" +git-tree-sha1 = "be7ae030256b8ef14a441726c4c37766b90b93a3" uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "1.14.0" +version = "1.15.0" weakdeps = ["ChainRulesCore", "ConstructionBase", "EnzymeCore"] [deps.ADTypes.extensions] @@ -72,10 +72,10 @@ weakdeps = ["SparseArrays", "StaticArrays"] AdaptStaticArraysExt = "StaticArrays" [[deps.AlgebraicMultigrid]] -deps = ["CommonSolve", "LinearAlgebra", "Printf", "Reexport", "SparseArrays"] -git-tree-sha1 = "796eedcb42226861a51d92d28ee82d4985ee860b" +deps = ["CommonSolve", "LinearAlgebra", "LinearSolve", "Printf", "Reexport", "SparseArrays"] +git-tree-sha1 = "5aadf2440f5fd35f32336f5c6c0fa7e8fe64459a" uuid = "2169fc97-5a83-5252-b627-83903c6c433c" -version = "0.5.1" +version = "1.1.0" [[deps.AliasTables]] deps = ["PtrArrays", "Random"] @@ -91,7 +91,7 @@ version = "0.5.6" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.2" +version = "1.1.1" [[deps.ArnoldiMethod]] deps = ["LinearAlgebra", "Random", "StaticArrays"] @@ -101,9 +101,9 @@ version = "0.4.0" [[deps.ArrayInterface]] deps = ["Adapt", "LinearAlgebra"] -git-tree-sha1 = "017fcb757f8e921fb44ee063a7aafe5f89b86dd1" +git-tree-sha1 = "9606d7832795cbef89e06a550475be300364a8aa" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.18.0" +version = "7.19.0" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" @@ -143,7 +143,6 @@ weakdeps = ["SparseArrays"] [[deps.Artifacts]] uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" -version = "1.11.0" [[deps.AxisAlgorithms]] deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] @@ -153,17 +152,20 @@ version = "1.1.0" [[deps.BandedMatrices]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "PrecompileTools"] -git-tree-sha1 = "614c6aba1d562191d9832df2af24f594aa7ebf61" +git-tree-sha1 = "e35c672b239c5105f597963c33e740eeb46cf0ab" uuid = "aae01518-5342-5314-be14-df237901396f" -version = "1.9.3" -weakdeps = ["SparseArrays"] +version = "1.9.4" [deps.BandedMatrices.extensions] BandedMatricesSparseArraysExt = "SparseArrays" + CliqueTreesExt = "CliqueTrees" + + [deps.BandedMatrices.weakdeps] + CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" -version = "1.11.0" [[deps.BenchmarkTools]] deps = ["Compat", "JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] @@ -172,9 +174,9 @@ uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" version = "1.6.0" [[deps.Bijections]] -git-tree-sha1 = "d8b0439d2be438a5f2cd68ec158fe08a7b2595b7" +git-tree-sha1 = "a2d308fcd4c2fb90e943cf9cd2fbfa9c32b69733" uuid = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04" -version = "0.1.9" +version = "0.2.2" [[deps.BitFlags]] git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" @@ -189,9 +191,9 @@ version = "0.1.6" [[deps.BlockArrays]] deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] -git-tree-sha1 = "c633e7cea8a6eb9bed5d67e8fb184df5789b82e6" +git-tree-sha1 = "a8c0f363186263d75e97a41878d10dd842797561" uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -version = "1.5.0" +version = "1.6.3" weakdeps = ["Adapt", "BandedMatrices"] [deps.BlockArrays.extensions] @@ -200,12 +202,13 @@ weakdeps = ["Adapt", "BandedMatrices"] [[deps.BracketingNonlinearSolve]] deps = ["CommonSolve", "ConcreteStructs", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] -git-tree-sha1 = "47d6e355097ef6df3c39080a0045ecfd00ff514e" +git-tree-sha1 = "a9014924595b7a2c1dd14aac516e38fa10ada656" uuid = "70df07ce-3d50-431d-a3e7-ca6ddb60ac1e" -version = "1.1.1" -weakdeps = ["ForwardDiff"] +version = "1.3.0" +weakdeps = ["ChainRulesCore", "ForwardDiff"] [deps.BracketingNonlinearSolve.extensions] + BracketingNonlinearSolveChainRulesCoreExt = ["ChainRulesCore", "ForwardDiff"] BracketingNonlinearSolveForwardDiffExt = "ForwardDiff" [[deps.Bzip2_jll]] @@ -225,23 +228,17 @@ git-tree-sha1 = "5a97e67919535d6841172016c9530fd69494e5ec" uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" version = "0.2.6" -[[deps.CSTParser]] -deps = ["Tokenize"] -git-tree-sha1 = "0157e592151e39fa570645e2b2debcdfb8a0f112" -uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f" -version = "3.4.3" - [[deps.Cairo_jll]] deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "2ac646d71d0d24b44f3f8c84da8c9f4d70fb67df" +git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" -version = "1.18.4+0" +version = "1.18.5+0" [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "1713c74e00545bfe14605d2a2be1712de8fbcb58" +git-tree-sha1 = "06ee8d1aa558d2833aa799f6f0b31b30cada405f" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.25.1" +version = "1.25.2" weakdeps = ["SparseArrays"] [deps.ChainRulesCore.extensions] @@ -288,15 +285,15 @@ uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" version = "0.12.11" [[deps.Combinatorics]] -git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +git-tree-sha1 = "8010b6bb3388abe68d95743dcbea77650bb2eddf" uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -version = "1.0.2" +version = "1.0.3" [[deps.CommonMark]] -deps = ["Crayons", "PrecompileTools"] -git-tree-sha1 = "3faae67b8899797592335832fccf4b3c80bb04fa" +deps = ["PrecompileTools"] +git-tree-sha1 = "351d6f4eaf273b753001b2de4dffb8279b100769" uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" -version = "0.8.15" +version = "0.9.1" [[deps.CommonSolve]] git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" @@ -367,9 +364,9 @@ uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d" version = "1.10.2" [[deps.ConstructionBase]] -git-tree-sha1 = "76219f1ed5771adbb096743bff43fb5fdd4c1157" +git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.8" +version = "1.6.0" weakdeps = ["IntervalSets", "LinearAlgebra", "StaticArrays"] [deps.ConstructionBase.extensions] @@ -432,13 +429,12 @@ version = "1.0.0" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" -version = "1.11.0" [[deps.Dbus_jll]] deps = ["Artifacts", "Expat_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "fc173b380865f70627d7dd1190dc2fce6cc105af" +git-tree-sha1 = "473e9afc9cf30814eb67ffa5f2db7df82c3ad9fd" uuid = "ee1fde0b-3d02-5ea6-8484-8dfef6360eab" -version = "1.14.10+0" +version = "1.16.2+0" [[deps.DecFP]] deps = ["DecFP_jll", "Printf", "Random", "SpecialFunctions"] @@ -459,10 +455,10 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" version = "1.9.1" [[deps.DiffEqBase]] -deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "TruncatedStacktraces"] -git-tree-sha1 = "b68847ddc7b8f3c77a84521b0fd50375274a380b" +deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "TruncatedStacktraces"] +git-tree-sha1 = "2d87d7bd165c1ca0d11923a9fabe90a9d71e88a6" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.165.1" +version = "6.176.0" [deps.DiffEqBase.extensions] DiffEqBaseCUDAExt = "CUDA" @@ -475,6 +471,7 @@ version = "6.165.1" DiffEqBaseMPIExt = "MPI" DiffEqBaseMeasurementsExt = "Measurements" DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseMooncakeExt = "Mooncake" DiffEqBaseReverseDiffExt = "ReverseDiff" DiffEqBaseSparseArraysExt = "SparseArrays" DiffEqBaseTrackerExt = "Tracker" @@ -491,6 +488,7 @@ version = "6.165.1" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" @@ -498,15 +496,15 @@ version = "6.165.1" [[deps.DiffEqCallbacks]] deps = ["ConcreteStructs", "DataStructures", "DiffEqBase", "DifferentiationInterface", "Functors", "LinearAlgebra", "Markdown", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "c4966e57a993a181b6d613cf0d267c46fe49139d" +git-tree-sha1 = "80a782f3e65d4900dcf5f2cb71f5e19d9459c04a" uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" -version = "4.3.0" +version = "4.8.0" [[deps.DiffEqDevTools]] deps = ["DiffEqBase", "DiffEqNoiseProcess", "Distributed", "LinearAlgebra", "Logging", "NLsolve", "RecipesBase", "RecursiveArrayTools", "RootedTrees", "SciMLBase", "Statistics", "StructArrays"] -git-tree-sha1 = "47bec1e757e2325b1d16bf7d15e9b26165892c53" +git-tree-sha1 = "53aa030c02c786270542debbb577b53f6383796b" uuid = "f3b72e0c-5b89-59e1-b016-84e28bfd966d" -version = "2.47.0" +version = "2.48.0" [[deps.DiffEqNoiseProcess]] deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "ResettableStacks", "SciMLBase", "StaticArraysCore", "Statistics"] @@ -534,9 +532,9 @@ version = "1.15.1" [[deps.DifferentiationInterface]] deps = ["ADTypes", "LinearAlgebra"] -git-tree-sha1 = "cf6dcb4b21bdd893fd45be70791d6dc89ca16506" +git-tree-sha1 = "c8d85ecfcbaef899308706bebdd8b00107f3fb43" uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -version = "0.6.48" +version = "0.6.54" [deps.DifferentiationInterface.extensions] DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" @@ -546,6 +544,7 @@ version = "0.6.48" DifferentiationInterfaceFiniteDiffExt = "FiniteDiff" DifferentiationInterfaceFiniteDifferencesExt = "FiniteDifferences" DifferentiationInterfaceForwardDiffExt = ["ForwardDiff", "DiffResults"] + DifferentiationInterfaceGPUArraysCoreExt = "GPUArraysCore" DifferentiationInterfaceGTPSAExt = "GTPSA" DifferentiationInterfaceMooncakeExt = "Mooncake" DifferentiationInterfacePolyesterForwardDiffExt = ["PolyesterForwardDiff", "ForwardDiff", "DiffResults"] @@ -568,6 +567,7 @@ version = "0.6.48" FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" @@ -582,14 +582,19 @@ version = "0.6.48" [[deps.DispatchDoctor]] deps = ["MacroTools", "Preferences"] -git-tree-sha1 = "f311fe66bfe4e38b2f1c8d1081f06920092b57aa" +git-tree-sha1 = "f8768e80847f15f91b01a84df19ea0cf3661e51e" uuid = "8d63f2c5-f18a-4cf2-ba9d-b3f60fc568c8" -version = "0.4.19" -weakdeps = ["ChainRulesCore", "EnzymeCore"] +version = "0.4.20" [deps.DispatchDoctor.extensions] DispatchDoctorChainRulesCoreExt = "ChainRulesCore" DispatchDoctorEnzymeCoreExt = "EnzymeCore" + DispatchDoctorMooncakeExt = "Mooncake" + + [deps.DispatchDoctor.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" [[deps.Distances]] deps = ["LinearAlgebra", "Statistics", "StatsAPI"] @@ -605,13 +610,12 @@ weakdeps = ["ChainRulesCore", "SparseArrays"] [[deps.Distributed]] deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" -version = "1.11.0" [[deps.Distributions]] deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "0b4190661e8a4e51a842070e7dd4fae440ddb7f4" +git-tree-sha1 = "3e6d038b77f22791b8e3472b7c633acea1ecac06" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.118" +version = "0.25.120" [deps.Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" @@ -624,10 +628,9 @@ version = "0.25.118" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.3" +version = "0.9.5" [[deps.Documenter]] deps = ["ANSIColoredPrinters", "Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"] @@ -654,15 +657,15 @@ version = "1.6.0" [[deps.DynamicPolynomials]] deps = ["Future", "LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Reexport", "Test"] -git-tree-sha1 = "9a3ae38b460449cc9e7dd0cfb059c76028724627" +git-tree-sha1 = "98c4bb95af37e5d980129261fdd6dab0392c6607" uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07" -version = "0.6.1" +version = "0.6.2" [[deps.DynamicQuantities]] deps = ["DispatchDoctor", "PrecompileTools", "TestItems", "Tricks"] -git-tree-sha1 = "2cf4f27ea6997aabf4b3e3b97355af3d757efd6b" +git-tree-sha1 = "44ec2bcde862031866a9f43ee477eaa1ddb0cccc" uuid = "06fc5a27-2a28-4c7c-a15d-362465fb6821" -version = "1.7.0" +version = "1.8.0" [deps.DynamicQuantities.extensions] DynamicQuantitiesLinearAlgebraExt = "LinearAlgebra" @@ -677,14 +680,14 @@ version = "1.7.0" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.EnumX]] -git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" +git-tree-sha1 = "bddad79635af6aec424f53ed8aad5d7555dc6f00" uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" -version = "1.0.4" +version = "1.0.5" [[deps.EnzymeCore]] -git-tree-sha1 = "0cdb7af5c39e92d78a0ee8d0a447d32f7593137e" +git-tree-sha1 = "8272a687bca7b5c601c0c24fc0c71bff10aafdfd" uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" -version = "0.8.8" +version = "0.8.12" weakdeps = ["Adapt"] [deps.EnzymeCore.extensions] @@ -742,15 +745,15 @@ version = "4.4.4+1" [[deps.FFTW]] deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] -git-tree-sha1 = "7de7c78d681078f027389e067864a8d53bd7c3c9" +git-tree-sha1 = "797762812ed063b9b94f6cc7742bc8883bb5e69e" uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" -version = "1.8.1" +version = "1.9.0" [[deps.FFTW_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "4d81ed14783ec49ce9f2e168208a12ce1815aa25" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6d6219a004b8cf1e0b4dbe27a2860b8e04eba0be" uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" -version = "3.3.10+3" +version = "3.3.11+0" [[deps.FastBroadcast]] deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] @@ -770,15 +773,16 @@ uuid = "442a2c76-b920-505d-bb47-c5924d526838" version = "1.0.2" [[deps.FastPower]] -git-tree-sha1 = "58c3431137131577a7c379d00fea00be524338fb" +git-tree-sha1 = "5f7afd4b1a3969dc34d692da2ed856047325b06e" uuid = "a4df4552-cc26-4903-aec0-212e50a0e84b" -version = "1.1.1" +version = "1.1.3" [deps.FastPower.extensions] FastPowerEnzymeExt = "Enzyme" FastPowerForwardDiffExt = "ForwardDiff" FastPowerMeasurementsExt = "Measurements" FastPowerMonteCarloMeasurementsExt = "MonteCarloMeasurements" + FastPowerMooncakeExt = "Mooncake" FastPowerReverseDiffExt = "ReverseDiff" FastPowerTrackerExt = "Tracker" @@ -787,6 +791,7 @@ version = "1.1.1" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" @@ -814,7 +819,6 @@ weakdeps = ["HTTP"] [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" -version = "1.11.0" [[deps.FillArrays]] deps = ["LinearAlgebra"] @@ -865,9 +869,9 @@ version = "1.1.0" [[deps.Fontconfig_jll]] deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] -git-tree-sha1 = "21fac3c77d7b5a9fc03b0ec503aa1a6392c34d2b" +git-tree-sha1 = "301b5d5d731a0654825f1f2e906990f7141a106b" uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" -version = "2.15.0+0" +version = "2.16.0+0" [[deps.Format]] git-tree-sha1 = "9c68794ef81b08086aeb32eeaf33531668d5f5fc" @@ -886,15 +890,15 @@ weakdeps = ["StaticArrays"] [[deps.FreeType2_jll]] deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "786e968a8d2fb167f2e4880baba62e0e26bd8e4e" +git-tree-sha1 = "2c5512e11c791d1baed2049c5652441b28fc6a31" uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" -version = "2.13.3+1" +version = "2.13.4+0" [[deps.FriBidi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "846f7026a9decf3679419122b49f8a1fdb48d2d5" +git-tree-sha1 = "7a214fdac5ed5f59a22c2d9a885a16da1c74bbc7" uuid = "559328eb-81f9-559d-9380-de523a88c83c" -version = "1.0.16+0" +version = "1.0.17+0" [[deps.FunctionWrappers]] git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" @@ -916,7 +920,6 @@ version = "0.5.2" [[deps.Future]] deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" -version = "1.11.0" [[deps.GLFW_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] @@ -927,7 +930,7 @@ version = "3.4.0+2" [[deps.GMP_jll]] deps = ["Artifacts", "Libdl"] uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" -version = "6.3.0+0" +version = "6.2.1+6" [[deps.GPUArraysCore]] deps = ["Adapt"] @@ -937,15 +940,15 @@ version = "0.2.0" [[deps.GR]] deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] -git-tree-sha1 = "0ff136326605f8e06e9bcf085a356ab312eef18a" +git-tree-sha1 = "1828eb7275491981fa5f1752a5e126e8f26f8741" uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" -version = "0.73.13" +version = "0.73.17" [[deps.GR_jll]] deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] -git-tree-sha1 = "9cb62849057df859575fc1dda1e91b82f8609709" +git-tree-sha1 = "27299071cc29e409488ada41ec7643e0ab19091f" uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" -version = "0.73.13+0" +version = "0.73.17+0" [[deps.GenericFFT]] deps = ["AbstractFFTs", "FFTW", "LinearAlgebra", "Reexport"] @@ -955,15 +958,15 @@ version = "0.1.6" [[deps.GenericLinearAlgebra]] deps = ["LinearAlgebra", "Printf", "Random", "libblastrampoline_jll"] -git-tree-sha1 = "54ee4866eb8c982ee23cf79230ca0aaf916c382b" +git-tree-sha1 = "ad599869948d79efd63a030c970e2c6e21fecf4a" uuid = "14197337-ba66-59df-a3e3-ca00e7dcff7a" -version = "0.3.15" +version = "0.3.17" [[deps.GenericSchur]] deps = ["LinearAlgebra", "Printf"] -git-tree-sha1 = "af49a0851f8113fcfae2ef5027c6d49d0acec39b" +git-tree-sha1 = "f88e0ba1f6b42121a7c1dfe93a9687d8e164c91b" uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" -version = "0.5.4" +version = "0.5.5" [[deps.GeometricBase]] deps = ["OffsetArrays", "Test"] @@ -989,29 +992,29 @@ git-tree-sha1 = "78d18521b4ab8f77c1525208728e782d086900dd" uuid = "5a33fad7-5ce4-5983-9f5d-5f26ceab5c96" version = "0.2.5" -[[deps.Gettext_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" -uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" -version = "0.21.0+0" +[[deps.GettextRuntime_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll"] +git-tree-sha1 = "45288942190db7c5f760f59c04495064eedf9340" +uuid = "b0724c58-0f36-5564-988d-3bb0596ebc4a" +version = "0.22.4+0" [[deps.Git]] -deps = ["Git_jll"] -git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e" +deps = ["Git_jll", "JLLWrappers", "OpenSSH_jll"] +git-tree-sha1 = "2230a9cc32394b11a3b3aa807a382e3bbab1198c" uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" -version = "1.3.1" +version = "1.4.0" [[deps.Git_jll]] deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "399f4a308c804b446ae4c91eeafadb2fe2c54ff9" +git-tree-sha1 = "b981ed24de5855f20fce5b8cb767c179f93e4268" uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" -version = "2.47.1+0" +version = "2.50.0+0" [[deps.Glib_jll]] -deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "b0036b392358c80d2d2124746c2bf3d48d457938" +deps = ["Artifacts", "GettextRuntime_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "35fbd0cefb04a516104b8e183ce0df11b70a3f1a" uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" -version = "2.82.4+0" +version = "2.84.3+0" [[deps.Glob]] git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" @@ -1019,16 +1022,16 @@ uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" version = "1.3.1" [[deps.Graphite2_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "01979f9b37367603e2848ea225918a3b3861b606" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8a6dbda1fd736d60cc477d99f2e7a042acfa46e8" uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" -version = "1.3.14+1" +version = "1.3.15+0" [[deps.Graphs]] -deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "1dc470db8b1131cfc7fb4c115de89fe391b9e780" +deps = ["ArnoldiMethod", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] +git-tree-sha1 = "c5abfa0ae0aaee162a3fbb053c13ecda39be545b" uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.12.0" +version = "1.13.0" [[deps.Grisu]] git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" @@ -1049,15 +1052,15 @@ version = "1.14.6+0" [[deps.HTTP]] deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "c67b33b085f6e2faf8bf79a61962e7339a81129c" +git-tree-sha1 = "ed5e9c58612c4e081aecdb6e1a479e18462e041e" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.15" +version = "1.10.17" [[deps.HarfBuzz_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] -git-tree-sha1 = "55c53be97790242c29031e5cd45e8ac296dadda3" +git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813" uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" -version = "8.5.0+0" +version = "8.5.1+0" [[deps.Highlights]] deps = ["DocStringExtensions", "InteractiveUtils", "REPL"] @@ -1073,9 +1076,9 @@ version = "0.1.17" [[deps.Hwloc_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "f93a9ce66cd89c9ba7a4695a47fd93b4c6bc59fa" +git-tree-sha1 = "92f65c4d78ce8cdbb6b68daf88889950b0a99d11" uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" -version = "2.12.0+0" +version = "2.12.1+0" [[deps.HypergeometricFunctions]] deps = ["LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] @@ -1084,10 +1087,10 @@ uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" version = "0.3.28" [[deps.IJulia]] -deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Libdl", "Logging", "Markdown", "MbedTLS", "Pkg", "Printf", "REPL", "Random", "SoftGlobalScope", "Test", "UUIDs", "ZMQ"] -git-tree-sha1 = "1b1299f7d6617291f3d260e9f5b0250afdaac8c0" +deps = ["Base64", "Conda", "Dates", "InteractiveUtils", "JSON", "Logging", "Markdown", "MbedTLS", "Pkg", "Printf", "REPL", "Random", "SoftGlobalScope", "UUIDs", "ZMQ"] +git-tree-sha1 = "9e60d328aa8060368d6dadd24b644d0ebaf0c1cb" uuid = "7073ff75-c697-5162-941a-fcdaad2a7d2a" -version = "1.26.0" +version = "1.29.0" [[deps.IOCapture]] deps = ["Logging", "Random"] @@ -1155,22 +1158,22 @@ version = "2025.0.4+0" [[deps.InteractiveUtils]] deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" -version = "1.11.0" [[deps.Interpolations]] deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] -git-tree-sha1 = "88a101217d7cb38a7b481ccd50d21876e1d1b0e0" +git-tree-sha1 = "f2905febca224eade352a573e129ef43aa593354" uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" -version = "0.15.1" -weakdeps = ["Unitful"] +version = "0.16.1" +weakdeps = ["ForwardDiff", "Unitful"] [deps.Interpolations.extensions] + InterpolationsForwardDiffExt = "ForwardDiff" InterpolationsUnitfulExt = "Unitful" [[deps.IntervalSets]] -git-tree-sha1 = "dba9ddf07f77f60450fe5d2e2beb9854d9a49bd0" +git-tree-sha1 = "5fbb102dcb8b1a858111ae81d56682376130517d" uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.10" +version = "0.7.11" weakdeps = ["Random", "RecipesBase", "Statistics"] [deps.IntervalSets.extensions] @@ -1204,10 +1207,10 @@ uuid = "82899510-4779-5014-852e-03e436cf321d" version = "1.0.0" [[deps.JLFzf]] -deps = ["Pipe", "REPL", "Random", "fzf_jll"] -git-tree-sha1 = "71b48d857e86bf7a1838c4736545699974ce79a2" +deps = ["REPL", "Random", "fzf_jll"] +git-tree-sha1 = "82f7acdc599b65e0f8ccd270ffa1467c21cb647b" uuid = "1019f520-868f-41f5-a6de-eb00f4b6a39c" -version = "0.1.9" +version = "0.1.11" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] @@ -1234,23 +1237,28 @@ uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" version = "3.1.1+0" [[deps.JuliaFormatter]] -deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "PrecompileTools", "TOML", "Tokenize"] -git-tree-sha1 = "59cf7ad64f1b0708a4fa4369879d33bad3239b56" +deps = ["CommonMark", "Glob", "JuliaSyntax", "PrecompileTools", "TOML"] +git-tree-sha1 = "56b382cd34b1a80f63211a0b009461915915bf9e" uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" -version = "1.0.62" +version = "2.1.2" + +[[deps.JuliaSyntax]] +git-tree-sha1 = "937da4713526b96ac9a178e2035019d3b78ead4a" +uuid = "70703baa-626e-46a2-a12c-08ffd08c73b4" +version = "0.4.10" [[deps.JumpProcesses]] -deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "SymbolicIndexingInterface", "UnPack"] -git-tree-sha1 = "3ba034493e21efc9ba61268dc0faa0c383bb76a5" +deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "SymbolicIndexingInterface", "UnPack"] +git-tree-sha1 = "f8da88993c914357031daf0023f18748ff473924" uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" -version = "9.14.2" +version = "9.16.1" weakdeps = ["FastBroadcast"] [[deps.Krylov]] deps = ["LinearAlgebra", "Printf", "SparseArrays"] -git-tree-sha1 = "b29d37ce30fa401a4563b18880ab91f979a29734" +git-tree-sha1 = "b94257a1a8737099ca40bc7271a8b374033473ed" uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" -version = "0.9.10" +version = "0.10.1" [[deps.LAME_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1266,9 +1274,9 @@ version = "4.0.1+0" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929" +git-tree-sha1 = "eb62a3deb62fc6d8822c0c4bef73e4412419c5d8" uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" -version = "18.1.7+0" +version = "18.1.8+0" [[deps.LSODA]] deps = ["Compat", "DiffEqBase", "LSODA_jll", "LinearAlgebra", "Parameters", "Printf", "SciMLBase"] @@ -1295,19 +1303,21 @@ version = "1.4.0" [[deps.Latexify]] deps = ["Format", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Requires"] -git-tree-sha1 = "cd714447457c660382fe634710fb56eb255ee42e" +git-tree-sha1 = "4f34eaabe49ecb3fb0d58d6015e32fd31a733199" uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.6" +version = "0.16.8" [deps.Latexify.extensions] DataFramesExt = "DataFrames" SparseArraysExt = "SparseArrays" SymEngineExt = "SymEngine" + TectonicExt = "tectonic_jll" [deps.Latexify.weakdeps] DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" + tectonic_jll = "d7dd28d6-a5e6-559c-9131-7eb760cdacc5" [[deps.LayoutPointers]] deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] @@ -1336,7 +1346,6 @@ version = "2.6.1" [[deps.LazyArtifacts]] deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" -version = "1.11.0" [[deps.LeftChildRightSiblingTrees]] deps = ["AbstractTrees"] @@ -1352,17 +1361,16 @@ version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.6.0+0" +version = "8.4.0+0" [[deps.LibGit2]] deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -version = "1.11.0" [[deps.LibGit2_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.7.2+0" +version = "1.6.4+0" [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] @@ -1371,31 +1379,18 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" -version = "1.11.0" [[deps.Libffi_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "27ecae93dd25ee0909666e6835051dd684cc035e" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" -version = "3.2.2+2" - -[[deps.Libgcrypt_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll"] -git-tree-sha1 = "8be878062e0ffa2c3f67bb58a595375eda5de80b" -uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" -version = "1.11.0+0" +version = "3.4.7+0" [[deps.Libglvnd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"] -git-tree-sha1 = "ff3b4b9d35de638936a525ecd36e86a8bb919d11" +git-tree-sha1 = "d36c21b9e7c172a44a10484125024495e2625ac0" uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" -version = "1.7.0+0" - -[[deps.Libgpg_error_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "df37206100d39f79b3376afb6b9cee4970041c61" -uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" -version = "1.51.1+0" +version = "1.7.1+1" [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1405,9 +1400,9 @@ version = "1.18.0+0" [[deps.Libmount_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "89211ea35d9df5831fca5d33552c02bd33878419" +git-tree-sha1 = "a31572773ac1b745e0343fe5e2c8ddda7a37e997" uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -version = "2.40.3+0" +version = "2.41.0+0" [[deps.Libtiff_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] @@ -1417,9 +1412,9 @@ version = "4.7.1+0" [[deps.Libuuid_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e888ad02ce716b319e6bdb985d2ef300e7089889" +git-tree-sha1 = "321ccef73a96ba828cd51f2ab5b9f917fa73945a" uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -version = "2.40.3+0" +version = "2.41.0+0" [[deps.LineSearch]] deps = ["ADTypes", "CommonSolve", "ConcreteStructs", "FastClosures", "LinearAlgebra", "MaybeInplace", "SciMLBase", "SciMLJacobianOperators", "StaticArraysCore"] @@ -1433,20 +1428,19 @@ weakdeps = ["LineSearches"] [[deps.LineSearches]] deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] -git-tree-sha1 = "e4c3be53733db1051cc15ecf573b1042b3a712a1" +git-tree-sha1 = "4adee99b7262ad2a1a4bbbc59d993d24e55ea96f" uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" -version = "7.3.0" +version = "7.4.0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -version = "1.11.0" [[deps.LinearSolve]] deps = ["ArrayInterface", "ChainRulesCore", "ConcreteStructs", "DocStringExtensions", "EnumX", "GPUArraysCore", "InteractiveUtils", "Krylov", "LazyArrays", "Libdl", "LinearAlgebra", "MKL_jll", "Markdown", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "StaticArraysCore", "UnPack"] -git-tree-sha1 = "d6cb226ec0ce36a5d71795cf523370f2410ff95d" +git-tree-sha1 = "062c11f1d84ffc80d00fddaa515f7e37e8e9f9d5" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "3.6.0" +version = "3.18.2" [deps.LinearSolve.extensions] LinearSolveBandedMatricesExt = "BandedMatrices" @@ -1456,6 +1450,7 @@ version = "3.6.0" LinearSolveEnzymeExt = "EnzymeCore" LinearSolveFastAlmostBandedMatricesExt = "FastAlmostBandedMatrices" LinearSolveFastLapackInterfaceExt = "FastLapackInterface" + LinearSolveForwardDiffExt = "ForwardDiff" LinearSolveHYPREExt = "HYPRE" LinearSolveIterativeSolversExt = "IterativeSolvers" LinearSolveKernelAbstractionsExt = "KernelAbstractions" @@ -1474,6 +1469,7 @@ version = "3.6.0" EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" FastAlmostBandedMatrices = "9d29842c-ecb8-4973-b1e9-a27b1157504e" FastLapackInterface = "29a986be-02c6-4525-aec4-84b980013641" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" @@ -1502,7 +1498,6 @@ version = "0.3.29" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -version = "1.11.0" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] @@ -1512,9 +1507,9 @@ version = "1.1.0" [[deps.LoopVectorization]] deps = ["ArrayInterface", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] -git-tree-sha1 = "8084c25a250e00ae427a379a5b607e7aed96a2dd" +git-tree-sha1 = "e5afce7eaf5b5ca0d444bcb4dc4fd78c54cbbac0" uuid = "bdcacae8-1622-11e9-2a5c-532679323890" -version = "0.12.171" +version = "0.12.172" weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] [deps.LoopVectorization.extensions] @@ -1535,13 +1530,13 @@ version = "0.4.17" [[deps.MPFR_jll]] deps = ["Artifacts", "GMP_jll", "Libdl"] uuid = "3a97d323-0669-5f0c-9066-3539efd106a3" -version = "4.2.1+0" +version = "4.2.0+1" [[deps.MPICH_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "3aa3210044138a1749dbd350a9ba8680869eb503" +git-tree-sha1 = "d72d0ecc3f76998aac04e446547259b9ae4c265f" uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" -version = "4.3.0+1" +version = "4.3.1+0" [[deps.MPIPreferences]] deps = ["Libdl", "Preferences"] @@ -1551,14 +1546,14 @@ version = "0.1.11" [[deps.MPItrampoline_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "ff91ca13c7c472cef700f301c8d752bc2aaff1a8" +git-tree-sha1 = "e214f2a20bdd64c04cd3e4ff62d3c9be7e969a59" uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" -version = "5.5.3+0" +version = "5.5.4+0" [[deps.MacroTools]] -git-tree-sha1 = "72aebe0b5051e5143a079a4685a46da330a40472" +git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.15" +version = "0.5.16" [[deps.ManualMemory]] git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" @@ -1568,7 +1563,6 @@ version = "0.1.8" [[deps.Markdown]] deps = ["Base64"] uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" -version = "1.11.0" [[deps.MaybeInplace]] deps = ["ArrayInterface", "LinearAlgebra", "MacroTools"] @@ -1589,7 +1583,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.6+0" +version = "2.28.2+1" [[deps.Measures]] git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" @@ -1598,9 +1592,9 @@ version = "0.3.2" [[deps.MethodOfLines]] deps = ["Combinatorics", "DiffEqBase", "DomainSets", "IfElse", "Interpolations", "Latexify", "LinearAlgebra", "ModelingToolkit", "OrdinaryDiffEq", "PDEBase", "PrecompileTools", "RuntimeGeneratedFunctions", "SciMLBase", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "TermInterface"] -git-tree-sha1 = "f872370a39da2a79bcae3d7b311a8008de6f0f13" +git-tree-sha1 = "88a79939cb2df439648bb18cc6fa40086c6c31f7" uuid = "94925ecb-adb7-4558-8ed8-f975c56a0bf4" -version = "0.11.7" +version = "0.11.8" [[deps.MicrosoftMPI_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -1616,17 +1610,16 @@ version = "1.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" -version = "1.11.0" [[deps.ModelingToolkit]] -deps = ["AbstractTrees", "ArrayInterface", "BlockArrays", "Combinatorics", "CommonSolve", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffEqNoiseProcess", "DiffRules", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "DynamicQuantities", "EnumX", "ExprTools", "FindFirstFunctions", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "Graphs", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "Moshi", "NaNMath", "NonlinearSolve", "OffsetArrays", "OrderedCollections", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SCCNonlinearSolve", "SciMLBase", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] -git-tree-sha1 = "07376ec5c66232540dbcf1bc0f8ae37fcf4cac88" +deps = ["ADTypes", "AbstractTrees", "ArrayInterface", "BlockArrays", "ChainRulesCore", "Combinatorics", "CommonSolve", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffEqNoiseProcess", "DiffRules", "DifferentiationInterface", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "DynamicQuantities", "EnumX", "ExprTools", "FindFirstFunctions", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "Graphs", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "Moshi", "NaNMath", "NonlinearSolve", "OffsetArrays", "OrderedCollections", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SCCNonlinearSolve", "SciMLBase", "SciMLStructures", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] +git-tree-sha1 = "d3d0ccb19d271d20e9ea7a37c8e8bea8267e4567" uuid = "961ee093-0014-501f-94e3-6117800e7a78" -version = "9.68.0" +version = "9.80.6" [deps.ModelingToolkit.extensions] MTKBifurcationKitExt = "BifurcationKit" - MTKChainRulesCoreExt = "ChainRulesCore" + MTKCasADiDynamicOptExt = "CasADi" MTKDeepDiffsExt = "DeepDiffs" MTKFMIExt = "FMI" MTKInfiniteOptExt = "InfiniteOpt" @@ -1634,7 +1627,7 @@ version = "9.68.0" [deps.ModelingToolkit.weakdeps] BifurcationKit = "0f109fa4-8a5d-4b75-95aa-f515264e7665" - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + CasADi = "c49709b8-5c63-11e9-2fb2-69db5844192f" DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6" FMI = "14a09403-18e3-468f-ad8a-74f8dda2d9ac" InfiniteOpt = "20393b10-9daf-11e9-18c9-8db751c92c57" @@ -1642,13 +1635,13 @@ version = "9.68.0" [[deps.Moshi]] deps = ["ExproniconLite", "Jieko"] -git-tree-sha1 = "453de0fc2be3d11b9b93ca4d0fddd91196dcf1ed" +git-tree-sha1 = "d5198869af7a8aec7354dc8559ae71aba77a625a" uuid = "2e0e35c7-a2e4-4343-998d-7ef72827ed2d" -version = "0.3.5" +version = "0.3.6" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.12.12" +version = "2023.1.10" [[deps.MuladdMacro]] git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" @@ -1657,15 +1650,15 @@ version = "0.2.4" [[deps.MultivariatePolynomials]] deps = ["ChainRulesCore", "DataStructures", "LinearAlgebra", "MutableArithmetics"] -git-tree-sha1 = "8d39779e29f80aa6c071e7ac17101c6e31f075d7" +git-tree-sha1 = "fade91fe9bee7b142d332fc6ab3f0deea29f637b" uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" -version = "0.5.7" +version = "0.5.9" [[deps.Mustache]] deps = ["Printf", "Tables"] -git-tree-sha1 = "3b2db451a872b20519ebb0cec759d3d81a1c6bcb" +git-tree-sha1 = "3cbd5dda543bc59f2e482607ccf84b633724fc32" uuid = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70" -version = "1.0.20" +version = "1.0.21" [[deps.MutableArithmetics]] deps = ["LinearAlgebra", "SparseArrays", "Test"] @@ -1675,9 +1668,9 @@ version = "1.6.4" [[deps.NLSolversBase]] deps = ["ADTypes", "DifferentiationInterface", "Distributed", "FiniteDiff", "ForwardDiff"] -git-tree-sha1 = "1f78293864c5e48ecf97269b0e23d7be28eb1958" +git-tree-sha1 = "25a6638571a902ecfb1ae2a18fc1575f86b1d4df" uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" -version = "7.9.0" +version = "7.10.0" [[deps.NLsolve]] deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] @@ -1687,9 +1680,9 @@ version = "4.5.1" [[deps.NaNMath]] deps = ["OpenLibm_jll"] -git-tree-sha1 = "cc0a5deefdb12ab3a096f00a6d42133af4560d71" +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.1.2" +version = "1.1.3" [[deps.NetworkOptions]] uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" @@ -1697,9 +1690,9 @@ version = "1.2.0" [[deps.NonlinearSolve]] deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DiffEqBase", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "NonlinearSolveBase", "NonlinearSolveFirstOrder", "NonlinearSolveQuasiNewton", "NonlinearSolveSpectralMethods", "PrecompileTools", "Preferences", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseMatrixColorings", "StaticArraysCore", "SymbolicIndexingInterface"] -git-tree-sha1 = "eb1007ce104fc6704ac346859bc53976c44edc38" +git-tree-sha1 = "aeb6fb02e63b4d4f90337ed90ce54ceb4c0efe77" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "4.5.0" +version = "4.9.0" [deps.NonlinearSolve.extensions] NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" @@ -1729,9 +1722,9 @@ version = "4.5.0" [[deps.NonlinearSolveBase]] deps = ["ADTypes", "Adapt", "ArrayInterface", "CommonSolve", "Compat", "ConcreteStructs", "DifferentiationInterface", "EnzymeCore", "FastClosures", "LinearAlgebra", "Markdown", "MaybeInplace", "Preferences", "Printf", "RecursiveArrayTools", "SciMLBase", "SciMLJacobianOperators", "SciMLOperators", "StaticArraysCore", "SymbolicIndexingInterface", "TimerOutputs"] -git-tree-sha1 = "8a2437b5ead050301b6a6258f226e5137e511000" +git-tree-sha1 = "404d71dd057759f4d590191a643113485c4a482a" uuid = "be0214bd-f91f-a760-ac4e-3421ce2b2da0" -version = "1.5.0" +version = "1.12.0" weakdeps = ["BandedMatrices", "DiffEqBase", "ForwardDiff", "LineSearch", "LinearSolve", "SparseArrays", "SparseMatrixColorings"] [deps.NonlinearSolveBase.extensions] @@ -1745,15 +1738,15 @@ weakdeps = ["BandedMatrices", "DiffEqBase", "ForwardDiff", "LineSearch", "Linear [[deps.NonlinearSolveFirstOrder]] deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLJacobianOperators", "Setfield", "StaticArraysCore"] -git-tree-sha1 = "aade7ab02ee4c80ec30dc8a2874fc67155c935f1" +git-tree-sha1 = "9c8cd0a986518ba317af263549b48e34ac8f776d" uuid = "5959db7a-ea39-4486-b5fe-2dd0bf03d60d" -version = "1.3.0" +version = "1.5.0" [[deps.NonlinearSolveQuasiNewton]] deps = ["ArrayInterface", "CommonSolve", "ConcreteStructs", "DiffEqBase", "LinearAlgebra", "LinearSolve", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "SciMLOperators", "StaticArraysCore"] -git-tree-sha1 = "44a132cb32aeafcb35a6238fd91a2f3f8ff5c5b0" +git-tree-sha1 = "e3888bdbab6e0bfadbc3164ef4595e40e7b7e954" uuid = "9a2c21bd-3a47-402d-9113-8faf9a0ee114" -version = "1.2.0" +version = "1.6.0" weakdeps = ["ForwardDiff"] [deps.NonlinearSolveQuasiNewton.extensions] @@ -1761,9 +1754,9 @@ weakdeps = ["ForwardDiff"] [[deps.NonlinearSolveSpectralMethods]] deps = ["CommonSolve", "ConcreteStructs", "DiffEqBase", "LineSearch", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase"] -git-tree-sha1 = "f28b1ab17b5f15eb2b174eaf8813cf17f0b3e6c0" +git-tree-sha1 = "3398222199e4b9ca0b5840907fb509f28f1a2fdc" uuid = "26075421-4e9a-44e1-8bd1-420ed7ad02b2" -version = "1.1.0" +version = "1.2.0" weakdeps = ["ForwardDiff"] [deps.NonlinearSolveSpectralMethods.extensions] @@ -1788,9 +1781,9 @@ uuid = "c771fb93-2439-5ece-a3b3-58fecce82101" version = "0.0.1+0" [[deps.OffsetArrays]] -git-tree-sha1 = "a414039192a155fb38c4599a60110f0018c6ec82" +git-tree-sha1 = "117432e406b5c023f665fa73dc26e79ec3630151" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.16.0" +version = "1.17.0" weakdeps = ["Adapt"] [deps.OffsetArrays.extensions] @@ -1805,30 +1798,36 @@ version = "1.3.5+1" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.27+1" +version = "0.3.23+4" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" +version = "0.8.1+4" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML", "Zlib_jll"] -git-tree-sha1 = "da913f03f17b449951e0461da960229d4a3d1a8c" +git-tree-sha1 = "ec764453819f802fc1e144bfe750c454181bd66d" uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" -version = "5.0.7+1" +version = "5.0.8+0" + +[[deps.OpenSSH_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "OpenSSL_jll", "Zlib_jll"] +git-tree-sha1 = "cb7acd5d10aff809b4d0191dfe1956c2edf35800" +uuid = "9bd350c2-7e96-507f-8002-3f2e150b4e1b" +version = "10.0.1+0" [[deps.OpenSSL]] deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "38cb508d080d21dc1128f7fb04f20387ed4c0af4" +git-tree-sha1 = "f1a7e086c677df53e064e0fdd2c9d0b0833e3f6e" uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.4.3" +version = "1.5.0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "a9697f1d06cc3eb3fb3ad49cc67f2cfabaac31ea" +git-tree-sha1 = "9216a80ff3682833ac4b733caa8c00390620ba5d" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.0.16+0" +version = "3.5.0+0" [[deps.OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] @@ -1837,10 +1836,10 @@ uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" version = "0.5.6+0" [[deps.Optim]] -deps = ["Compat", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] -git-tree-sha1 = "c1f51f704f689f87f28b33836fd460ecf9b34583" +deps = ["Compat", "EnumX", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] +git-tree-sha1 = "61942645c38dd2b5b78e2082c9b51ab315315d10" uuid = "429524aa-4258-5aef-a3af-852621145aeb" -version = "1.11.0" +version = "1.13.2" [deps.Optim.extensions] OptimMOIExt = "MathOptInterface" @@ -1855,15 +1854,15 @@ uuid = "91d4177d-7536-5919-b921-800302f37372" version = "1.3.3+0" [[deps.OrderedCollections]] -git-tree-sha1 = "cc4054e898b852042d7b503313f7ad03de99c3dd" +git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.8.0" +version = "1.8.1" [[deps.OrdinaryDiffEq]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FillArrays", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "MacroTools", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqDefault", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqExplicitRK", "OrdinaryDiffEqExponentialRK", "OrdinaryDiffEqExtrapolation", "OrdinaryDiffEqFIRK", "OrdinaryDiffEqFeagin", "OrdinaryDiffEqFunctionMap", "OrdinaryDiffEqHighOrderRK", "OrdinaryDiffEqIMEXMultistep", "OrdinaryDiffEqLinear", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqNordsieck", "OrdinaryDiffEqPDIRK", "OrdinaryDiffEqPRK", "OrdinaryDiffEqQPRK", "OrdinaryDiffEqRKN", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqSSPRK", "OrdinaryDiffEqStabilizedIRK", "OrdinaryDiffEqStabilizedRK", "OrdinaryDiffEqSymplecticRK", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "Static", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "798f5e1a1f8b5a1bbba1e6134b77a77ccc509678" +deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FillArrays", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "MacroTools", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqAdamsBashforthMoulton", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqDefault", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqExplicitRK", "OrdinaryDiffEqExponentialRK", "OrdinaryDiffEqExtrapolation", "OrdinaryDiffEqFIRK", "OrdinaryDiffEqFeagin", "OrdinaryDiffEqFunctionMap", "OrdinaryDiffEqHighOrderRK", "OrdinaryDiffEqIMEXMultistep", "OrdinaryDiffEqLinear", "OrdinaryDiffEqLowOrderRK", "OrdinaryDiffEqLowStorageRK", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqNordsieck", "OrdinaryDiffEqPDIRK", "OrdinaryDiffEqPRK", "OrdinaryDiffEqQPRK", "OrdinaryDiffEqRKN", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqSDIRK", "OrdinaryDiffEqSSPRK", "OrdinaryDiffEqStabilizedIRK", "OrdinaryDiffEqStabilizedRK", "OrdinaryDiffEqSymplecticRK", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "Static", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] +git-tree-sha1 = "1c2b2df870944e0dc01454fd87479847c55fa26c" uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.92.0" +version = "6.98.0" [[deps.OrdinaryDiffEqAdamsBashforthMoulton]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqLowOrderRK", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] @@ -1873,15 +1872,15 @@ version = "1.2.0" [[deps.OrdinaryDiffEqBDF]] deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "OrdinaryDiffEqSDIRK", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "970ac761ae1c4249fc70d75760c328269a518585" +git-tree-sha1 = "9124a686af119063bb4d3a8f87044a8f312fcad9" uuid = "6ad6398a-0878-4a85-9266-38940aa047c8" -version = "1.3.0" +version = "1.6.0" [[deps.OrdinaryDiffEqCore]] deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "EnumX", "FastBroadcast", "FastClosures", "FastPower", "FillArrays", "FunctionWrappersWrappers", "InteractiveUtils", "LinearAlgebra", "Logging", "MacroTools", "MuladdMacro", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleUnPack", "Static", "StaticArrayInterface", "StaticArraysCore", "SymbolicIndexingInterface", "TruncatedStacktraces"] -git-tree-sha1 = "f47451c0ca3a2b0f11e966ed7731f2bd17d9b0e3" +git-tree-sha1 = "08dac9c6672a4548439048089bac293759a897fd" uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" -version = "1.19.0" +version = "1.26.1" weakdeps = ["EnzymeCore"] [deps.OrdinaryDiffEqCore.extensions] @@ -1889,15 +1888,15 @@ weakdeps = ["EnzymeCore"] [[deps.OrdinaryDiffEqDefault]] deps = ["ADTypes", "DiffEqBase", "EnumX", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqBDF", "OrdinaryDiffEqCore", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "PrecompileTools", "Preferences", "Reexport"] -git-tree-sha1 = "835c06684b6ff1b8904ceae4d18cc8fe45b9a7cc" +git-tree-sha1 = "8eeed32442874d1bdcc2192a874a73f1a9a07e31" uuid = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" -version = "1.3.0" +version = "1.4.0" [[deps.OrdinaryDiffEqDifferentiation]] -deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqCore", "SciMLBase", "SparseArrays", "SparseDiffTools", "StaticArrayInterface", "StaticArrays"] -git-tree-sha1 = "9a535370247496c1375ba6d08b0493c0d856d25b" +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEqCore", "SciMLBase", "SciMLOperators", "SparseArrays", "SparseMatrixColorings", "StaticArrayInterface", "StaticArrays"] +git-tree-sha1 = "efecf0c4cc44e16251b0e718f08b0876b2a82b80" uuid = "4302a76b-040a-498a-8c04-15b101fed76b" -version = "1.4.0" +version = "1.10.0" [[deps.OrdinaryDiffEqExplicitRK]] deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "TruncatedStacktraces"] @@ -1919,9 +1918,9 @@ version = "1.5.0" [[deps.OrdinaryDiffEqFIRK]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "FastGaussQuadrature", "FastPower", "LinearAlgebra", "LinearSolve", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Polyester", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators"] -git-tree-sha1 = "7dfc32df06db3d9d10128053c0e53deb213fb28d" +git-tree-sha1 = "0da8ec3491821262a3d2828e6370e76b51a770a3" uuid = "5960d6e9-dd7a-4743-88e7-cf307b64f125" -version = "1.8.0" +version = "1.12.0" [[deps.OrdinaryDiffEqFeagin]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] @@ -1948,10 +1947,10 @@ uuid = "9f002381-b378-40b7-97a6-27a27c83f129" version = "1.3.0" [[deps.OrdinaryDiffEqLinear]] -deps = ["DiffEqBase", "ExponentialUtilities", "LinearAlgebra", "OrdinaryDiffEqCore", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators"] -git-tree-sha1 = "0f81a77ede3da0dc714ea61e81c76b25db4ab87a" +deps = ["DiffEqBase", "ExponentialUtilities", "LinearAlgebra", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators"] +git-tree-sha1 = "940cef72ec8799d869ff1ba3dcf47cf7758e51cf" uuid = "521117fe-8c41-49f8-b3b6-30780b3f0fb5" -version = "1.1.0" +version = "1.3.0" [[deps.OrdinaryDiffEqLowOrderRK]] deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "RecursiveArrayTools", "Reexport", "SciMLBase", "Static"] @@ -1967,9 +1966,9 @@ version = "1.3.0" [[deps.OrdinaryDiffEqNonlinearSolve]] deps = ["ADTypes", "ArrayInterface", "DiffEqBase", "FastBroadcast", "FastClosures", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MuladdMacro", "NonlinearSolve", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "PreallocationTools", "RecursiveArrayTools", "SciMLBase", "SciMLOperators", "SciMLStructures", "SimpleNonlinearSolve", "StaticArrays"] -git-tree-sha1 = "1b89e3e84752a3cbd2c94db565e6ea7acb5279b2" +git-tree-sha1 = "ffdb0f5207b0e30f8b1edf99b3b9546d9c48ccaf" uuid = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" -version = "1.5.0" +version = "1.10.0" [[deps.OrdinaryDiffEqNordsieck]] deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqTsit5", "Polyester", "RecursiveArrayTools", "Reexport", "Static"] @@ -1979,9 +1978,9 @@ version = "1.1.0" [[deps.OrdinaryDiffEqPDIRK]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "Polyester", "Reexport", "StaticArrays"] -git-tree-sha1 = "f74b27b8b811a83d77a9cad6293e793ab0804cdc" +git-tree-sha1 = "ab9897e4bc8e3cf8e15f1cf61dbdd15d6a2341d7" uuid = "5dd0a6cf-3d4b-4314-aa06-06d4e299bc89" -version = "1.3.0" +version = "1.3.1" [[deps.OrdinaryDiffEqPRK]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "Reexport"] @@ -2002,10 +2001,10 @@ uuid = "af6ede74-add8-4cfd-b1df-9a4dbb109d7a" version = "1.1.0" [[deps.OrdinaryDiffEqRosenbrock]] -deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static"] -git-tree-sha1 = "a0d1e65771e087a84c398f20ea5f189043869997" +deps = ["ADTypes", "DiffEqBase", "DifferentiationInterface", "FastBroadcast", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "LinearSolve", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static"] +git-tree-sha1 = "1ce0096d920e95773220e818f29bf4b37ea2bb78" uuid = "43230ef6-c299-4910-a778-202eb28ce4ce" -version = "1.7.0" +version = "1.11.0" [[deps.OrdinaryDiffEqSDIRK]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "LinearAlgebra", "MacroTools", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "RecursiveArrayTools", "Reexport", "SciMLBase", "TruncatedStacktraces"] @@ -2015,9 +2014,9 @@ version = "1.3.0" [[deps.OrdinaryDiffEqSSPRK]] deps = ["DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "StaticArrays"] -git-tree-sha1 = "b97b9691437063ae7d9b1ef130e8b0d81415116f" +git-tree-sha1 = "651756c030df7a1d49ad484288937f8c398e8a08" uuid = "669c94d9-1f4b-4b64-b377-1aa079aa2388" -version = "1.2.1" +version = "1.3.0" [[deps.OrdinaryDiffEqStabilizedIRK]] deps = ["ADTypes", "DiffEqBase", "FastBroadcast", "MuladdMacro", "OrdinaryDiffEqCore", "OrdinaryDiffEqDifferentiation", "OrdinaryDiffEqNonlinearSolve", "RecursiveArrayTools", "Reexport", "StaticArrays"] @@ -2045,9 +2044,9 @@ version = "1.1.0" [[deps.OrdinaryDiffEqVerner]] deps = ["DiffEqBase", "FastBroadcast", "LinearAlgebra", "MuladdMacro", "OrdinaryDiffEqCore", "Polyester", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "Static", "TruncatedStacktraces"] -git-tree-sha1 = "81d7841e73e385b9925d5c8e4427f2adcdda55db" +git-tree-sha1 = "08f2d3be30874b6e2e937a06b501fb9811f7d8bd" uuid = "79d7bb75-1356-48c1-b8c0-6832512096c2" -version = "1.1.1" +version = "1.2.0" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] @@ -2062,21 +2061,15 @@ version = "0.1.17" [[deps.PDMats]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "966b85253e959ea89c53a9abebbf2e964fbf593b" +git-tree-sha1 = "f07c06228a1c670ae4c87d1276b92c7c597fdda0" uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.32" - -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] +version = "0.11.35" [[deps.Pango_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "3b31172c032a1def20c98dae3f2cdc9d10e3b561" +git-tree-sha1 = "275a9a6d85dc86c24d03d1837a0010226a96f540" uuid = "36c8627f-9965-5494-a995-c6b170f724f3" -version = "1.56.1+0" +version = "1.56.3+0" [[deps.ParameterizedFunctions]] deps = ["DataStructures", "DiffEqBase", "DocStringExtensions", "Latexify", "LinearAlgebra", "ModelingToolkit", "Reexport", "SciMLBase"] @@ -2092,14 +2085,9 @@ version = "0.12.3" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" +git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.1" - -[[deps.Pipe]] -git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" -uuid = "b98c9c47-44ae-5843-9183-064241ee97a0" -version = "1.3.0" +version = "2.8.3" [[deps.Pixman_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] @@ -2108,13 +2096,9 @@ uuid = "30392449-352a-5448-841d-b1acce4e97dc" version = "0.44.2+0" [[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.11.0" -weakdeps = ["REPL"] - - [deps.Pkg.extensions] - REPLExt = "REPL" +version = "1.10.0" [[deps.PlotThemes]] deps = ["PlotUtils", "Statistics"] @@ -2130,9 +2114,9 @@ version = "1.4.3" [[deps.Plots]] deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "TOML", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] -git-tree-sha1 = "24be21541580495368c35a6ccef1454e7b5015be" +git-tree-sha1 = "28ea788b78009c695eb0d637587c81d26bdf0e36" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" -version = "1.40.11" +version = "1.40.14" [deps.Plots.extensions] FileIOExt = "FileIO" @@ -2156,9 +2140,9 @@ version = "0.4.4" [[deps.Polyester]] deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] -git-tree-sha1 = "6d38fea02d983051776a856b7df75b30cf9a3c1f" +git-tree-sha1 = "6f7cd22a802094d239824c57d94c8e2d0f7cfc7d" uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" -version = "0.7.16" +version = "0.7.18" [[deps.PolyesterWeave]] deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] @@ -2190,9 +2174,9 @@ version = "0.2.4" [[deps.PreallocationTools]] deps = ["Adapt", "ArrayInterface", "ForwardDiff"] -git-tree-sha1 = "8765738bc5a6f1554cb61c5ddfae5bf279e8b110" +git-tree-sha1 = "6d98eace73d82e47f5b16c393de198836d9f790a" uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -version = "0.4.25" +version = "0.4.27" [deps.PreallocationTools.extensions] PreallocationToolsReverseDiffExt = "ReverseDiff" @@ -2229,11 +2213,10 @@ version = "0.5.7" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" -version = "1.11.0" [[deps.Profile]] +deps = ["Printf"] uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" -version = "1.11.0" [[deps.ProfileSVG]] deps = ["Colors", "FlameGraphs", "Profile", "UUIDs"] @@ -2243,9 +2226,9 @@ version = "0.2.2" [[deps.ProgressMeter]] deps = ["Distributed", "Printf"] -git-tree-sha1 = "8f6bc219586aef8baf0ff9a5fe16ee9c70cb65e4" +git-tree-sha1 = "13c5103482a8ed1536a54c08d0e742ae3dca2d42" uuid = "92933f4c-e287-5a05-a399-4b506db050ca" -version = "1.10.2" +version = "1.10.4" [[deps.PtrArrays]] git-tree-sha1 = "1d36ef11a9aaf1e8b74dacc6a731dd1de8fd493d" @@ -2254,27 +2237,27 @@ version = "1.3.0" [[deps.Qt6Base_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] -git-tree-sha1 = "492601870742dcd38f233b23c3ec629628c1d724" +git-tree-sha1 = "eb38d376097f47316fe089fc62cb7c6d85383a52" uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" -version = "6.7.1+1" +version = "6.8.2+1" [[deps.Qt6Declarative_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6ShaderTools_jll"] -git-tree-sha1 = "e5dd466bf2569fe08c91a2cc29c1003f4797ac3b" +git-tree-sha1 = "da7adf145cce0d44e892626e647f9dcbe9cb3e10" uuid = "629bc702-f1f5-5709-abd5-49b8460ea067" -version = "6.7.1+2" +version = "6.8.2+1" [[deps.Qt6ShaderTools_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll"] -git-tree-sha1 = "1a180aeced866700d4bebc3120ea1451201f16bc" +git-tree-sha1 = "9eca9fc3fe515d619ce004c83c31ffd3f85c7ccf" uuid = "ce943373-25bb-56aa-8eca-768745ed7b5a" -version = "6.7.1+1" +version = "6.8.2+1" [[deps.Qt6Wayland_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Qt6Base_jll", "Qt6Declarative_jll"] -git-tree-sha1 = "729927532d48cf79f49070341e1d918a65aba6b0" +git-tree-sha1 = "e1d5e16d0f65762396f9ca4644a5f4ddab8d452b" uuid = "e99dba38-086e-5de3-a5b1-6e4c66e897c3" -version = "6.7.1+1" +version = "6.8.2+1" [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] @@ -2305,20 +2288,18 @@ weakdeps = ["SparseArrays"] QuasiArraysSparseArraysExt = "SparseArrays" [[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "StyledStrings", "Unicode"] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" -version = "1.11.0" [[deps.Random]] deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -version = "1.11.0" [[deps.Random123]] deps = ["Random", "RandomNumbers"] -git-tree-sha1 = "4743b43e5a9c4a2ede372de7061eed81795b12e7" +git-tree-sha1 = "dbe5fd0b334694e905cb9fda73cd8554333c46e2" uuid = "74087812-796a-5b5d-8853-05524746bad3" -version = "1.7.0" +version = "1.7.1" [[deps.RandomNumbers]] deps = ["Random"] @@ -2361,9 +2342,9 @@ weakdeps = ["FillArrays", "LazyArrays", "LinearAlgebra"] [[deps.RecursiveArrayTools]] deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "35ac79a85c8086892258581d8b6df9cd8db5c91a" +git-tree-sha1 = "2e154f7d7e38db1af0a14ec751aba33360c3bef9" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "3.31.1" +version = "3.33.0" [deps.RecursiveArrayTools.extensions] RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" @@ -2446,15 +2427,15 @@ version = "0.4.6" [[deps.RuntimeGeneratedFunctions]] deps = ["ExprTools", "SHA", "Serialization"] -git-tree-sha1 = "04c968137612c4a5629fa531334bb81ad5680f00" +git-tree-sha1 = "86a8a8b783481e1ea6b9c91dd949cb32191f8ab4" uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" -version = "0.5.13" +version = "0.5.15" [[deps.SCCNonlinearSolve]] deps = ["CommonSolve", "PrecompileTools", "Reexport", "SciMLBase", "SymbolicIndexingInterface"] -git-tree-sha1 = "0caf35e2204c9045ca203b147b5dac4fa8e1cf20" +git-tree-sha1 = "6d70fbaa6f242fab7058eb4b66fd0a49dfcb38fb" uuid = "9dfe8606-65a1-4bb3-9748-cb89d1561431" -version = "1.0.0" +version = "1.3.0" [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" @@ -2472,10 +2453,10 @@ uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" version = "0.6.43" [[deps.SciMLBase]] -deps = ["ADTypes", "Accessors", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] -git-tree-sha1 = "796073854427ce00c1cb454911bf52b76523c44c" +deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"] +git-tree-sha1 = "31587e20cdea9fba3a689033313e658dfc9aae78" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.77.1" +version = "2.102.1" [deps.SciMLBase.extensions] SciMLBaseChainRulesCoreExt = "ChainRulesCore" @@ -2506,15 +2487,15 @@ version = "0.1.3" [[deps.SciMLJacobianOperators]] deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "ConstructionBase", "DifferentiationInterface", "FastClosures", "LinearAlgebra", "SciMLBase", "SciMLOperators"] -git-tree-sha1 = "f66048bb969e67bd7d1bdd03cd0b81219642bbd0" +git-tree-sha1 = "7da1216346ad79499d08d7e2a3dbf297dc80c829" uuid = "19f34311-ddf3-4b8b-af20-060888a46c0e" -version = "0.1.1" +version = "0.1.6" [[deps.SciMLOperators]] deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools"] -git-tree-sha1 = "6149620767866d4b0f0f7028639b6e661b6a1e44" +git-tree-sha1 = "3249fe77f322fe539e935ecb388c8290cd38a3fc" uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "0.3.12" +version = "1.3.1" weakdeps = ["SparseArrays", "StaticArraysCore"] [deps.SciMLOperators.extensions] @@ -2529,13 +2510,12 @@ version = "1.7.0" [[deps.Scratch]] deps = ["Dates"] -git-tree-sha1 = "3bac05bc7e74a75fd9cba4295cde4045d9fe2386" +git-tree-sha1 = "9b81b8393e50b7d4e6d0a9f14e192294d3b7c109" uuid = "6c6a2e73-6563-6170-7368-637461726353" -version = "1.2.1" +version = "1.3.0" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -version = "1.11.0" [[deps.Setfield]] deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] @@ -2546,7 +2526,6 @@ version = "1.1.2" [[deps.SharedArrays]] deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" -version = "1.11.0" [[deps.Showoff]] deps = ["Dates", "Grisu"] @@ -2561,9 +2540,9 @@ version = "1.2.0" [[deps.SimpleNonlinearSolve]] deps = ["ADTypes", "ArrayInterface", "BracketingNonlinearSolve", "CommonSolve", "ConcreteStructs", "DifferentiationInterface", "FastClosures", "FiniteDiff", "ForwardDiff", "LineSearch", "LinearAlgebra", "MaybeInplace", "NonlinearSolveBase", "PrecompileTools", "Reexport", "SciMLBase", "Setfield", "StaticArraysCore"] -git-tree-sha1 = "f42f8b8b728812e485ad099ee5e959d9b49cdb3d" +git-tree-sha1 = "7aaa5fe4617271b64fce0466d187f2a72edbd81a" uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" -version = "2.2.0" +version = "2.5.0" [deps.SimpleNonlinearSolve.extensions] SimpleNonlinearSolveChainRulesCoreExt = "ChainRulesCore" @@ -2596,7 +2575,6 @@ version = "1.1.0" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" -version = "1.11.0" [[deps.SoftGlobalScope]] deps = ["REPL"] @@ -2613,43 +2591,29 @@ version = "1.2.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.11.0" - -[[deps.SparseDiffTools]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "UnPack", "VertexSafeGraphs"] -git-tree-sha1 = "59bad850b1fc622051bf80a2be86c95b487e0243" -uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" -version = "2.24.0" - - [deps.SparseDiffTools.extensions] - SparseDiffToolsEnzymeExt = "Enzyme" - SparseDiffToolsPolyesterExt = "Polyester" - SparseDiffToolsPolyesterForwardDiffExt = "PolyesterForwardDiff" - SparseDiffToolsSymbolicsExt = "Symbolics" - SparseDiffToolsZygoteExt = "Zygote" - - [deps.SparseDiffTools.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588" - PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" - Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" +version = "1.10.0" [[deps.SparseMatrixColorings]] -deps = ["ADTypes", "DataStructures", "DocStringExtensions", "LinearAlgebra", "Random", "SparseArrays"] -git-tree-sha1 = "e0ae9189392572abe85bc9fd4ce35e772b1e1e10" +deps = ["ADTypes", "DocStringExtensions", "LinearAlgebra", "PrecompileTools", "Random", "SparseArrays"] +git-tree-sha1 = "9de43e0b9b976f1019bf7a879a686c4514520078" uuid = "0a514795-09f3-496d-8182-132a7b665d35" -version = "0.4.14" -weakdeps = ["Colors"] +version = "0.4.21" [deps.SparseMatrixColorings.extensions] + SparseMatrixColoringsCUDAExt = "CUDA" + SparseMatrixColoringsCliqueTreesExt = "CliqueTrees" SparseMatrixColoringsColorsExt = "Colors" + [deps.SparseMatrixColorings.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CliqueTrees = "60701a23-6482-424a-84db-faee86b9b1f8" + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" + [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "64cca0c26b4f31ba18f13f6c12af7c85f478cfde" +git-tree-sha1 = "41852b8679f78c8d8961eeadc8f62cef861a52e3" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.5.0" +version = "2.5.1" weakdeps = ["ChainRulesCore"] [deps.SpecialFunctions.extensions] @@ -2657,9 +2621,9 @@ weakdeps = ["ChainRulesCore"] [[deps.StableRNGs]] deps = ["Random"] -git-tree-sha1 = "83e6cce8324d49dfaf9ef059227f91ed4441a8e5" +git-tree-sha1 = "95af145932c2ed859b63329952ce8d633719f091" uuid = "860ef19b-820b-49d6-a774-d7a799459cd3" -version = "1.0.2" +version = "1.0.3" [[deps.Static]] deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools"] @@ -2695,32 +2659,27 @@ uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" version = "1.4.3" [[deps.Statistics]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.11.1" -weakdeps = ["SparseArrays"] - - [deps.Statistics.extensions] - SparseArraysExt = ["SparseArrays"] +version = "1.10.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] -git-tree-sha1 = "1ff449ad350c9c4cbc756624d6f8a8c3ef56d3ed" +git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff" uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.7.0" +version = "1.7.1" [[deps.StatsBase]] deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "29321314c920c26684834965ec2ce0dacc9cf8e5" +git-tree-sha1 = "b81c5035922cc89c2d9523afc6c54be512411466" uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.4" +version = "0.34.5" [[deps.StatsFuns]] deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "b423576adc27097764a90e163157bcfc9acf0f46" +git-tree-sha1 = "8e45cecc66f3b42633b8ce14d431e8e57a3e242e" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.3.2" +version = "1.5.0" weakdeps = ["ChainRulesCore", "InverseFunctions"] [deps.StatsFuns.extensions] @@ -2747,9 +2706,9 @@ version = "0.4.1" [[deps.StructArrays]] deps = ["ConstructionBase", "DataAPI", "Tables"] -git-tree-sha1 = "5a3a31c41e15a1e042d60f2f4942adccba05d3c9" +git-tree-sha1 = "8ad2e38cbb812e29348719cc63580ec1dfeb9de4" uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -version = "0.7.0" +version = "0.7.1" [deps.StructArrays.extensions] StructArraysAdaptExt = "Adapt" @@ -2766,10 +2725,6 @@ version = "0.7.0" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" -[[deps.StyledStrings]] -uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" -version = "1.11.0" - [[deps.SuiteSparse]] deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" @@ -2777,25 +2732,25 @@ uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.7.0+0" +version = "7.2.1+1" [[deps.Sundials]] deps = ["CEnum", "DataStructures", "DiffEqBase", "Libdl", "LinearAlgebra", "Logging", "PrecompileTools", "Reexport", "SciMLBase", "SparseArrays", "Sundials_jll"] -git-tree-sha1 = "c135b599cec3558be36eaf86ab1ce7e259ef9534" +git-tree-sha1 = "7c7a7ee705724b3c80d5451ac49779db36c6f758" uuid = "c3572dad-4567-51f8-b174-8c6c989267f4" -version = "4.27.0" +version = "4.28.0" [[deps.Sundials_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "SuiteSparse_jll", "libblastrampoline_jll"] -git-tree-sha1 = "91db7ed92c66f81435fe880947171f1212936b14" +git-tree-sha1 = "ba4d38faeb62de7ef47155ed321dce40a549c305" uuid = "fb77eaff-e24c-56d4-86b1-d163f2edb164" -version = "5.2.3+0" +version = "5.2.2+0" [[deps.SymbolicIndexingInterface]] -deps = ["Accessors", "ArrayInterface", "RuntimeGeneratedFunctions", "StaticArraysCore"] -git-tree-sha1 = "d6c04e26aa1c8f7d144e1a8c47f1c73d3013e289" +deps = ["Accessors", "ArrayInterface", "PrettyTables", "RuntimeGeneratedFunctions", "StaticArraysCore"] +git-tree-sha1 = "658f6d01bfe68d6bf47915bf5d868228138c7d71" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.38" +version = "0.3.41" [[deps.SymbolicLimits]] deps = ["SymbolicUtils"] @@ -2804,10 +2759,10 @@ uuid = "19f23fe9-fdab-4a78-91af-e7b7767979c3" version = "0.2.2" [[deps.SymbolicUtils]] -deps = ["AbstractTrees", "ArrayInterface", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "ExproniconLite", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "TaskLocalValues", "TermInterface", "TimerOutputs", "Unityper"] -git-tree-sha1 = "05f1e79aaa4830474cf05c5e6c088020a1d4ccfc" +deps = ["AbstractTrees", "ArrayInterface", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "ExproniconLite", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "TaskLocalValues", "TermInterface", "TimerOutputs", "Unityper", "WeakValueDicts"] +git-tree-sha1 = "fa63e8f55e99aee528951ba26544403b09645979" uuid = "d1185830-fcd6-423d-90d6-eec64667417b" -version = "3.21.0" +version = "3.29.0" [deps.SymbolicUtils.extensions] SymbolicUtilsLabelledArraysExt = "LabelledArrays" @@ -2819,9 +2774,9 @@ version = "3.21.0" [[deps.Symbolics]] deps = ["ADTypes", "ArrayInterface", "Bijections", "CommonWorldInvalidations", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "LaTeXStrings", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "OffsetArrays", "PrecompileTools", "Primes", "RecipesBase", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArraysCore", "SymbolicIndexingInterface", "SymbolicLimits", "SymbolicUtils", "TermInterface"] -git-tree-sha1 = "e7ef0402f159f982dad1d26bd7d9c9353d394f1d" +git-tree-sha1 = "df665535546bb07078ee42e0972527b5d6bd3f69" uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" -version = "6.31.1" +version = "6.43.0" [deps.Symbolics.extensions] SymbolicsForwardDiffExt = "ForwardDiff" @@ -2852,9 +2807,9 @@ version = "1.0.1" [[deps.Tables]] deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "598cd7c1f68d1e205689b1c2fe65a9f85846f297" +git-tree-sha1 = "f2c1efbc8f3a609aadf318094f8fc5204bdaf344" uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.12.0" +version = "1.12.1" [[deps.Tar]] deps = ["ArgTools", "SHA"] @@ -2880,7 +2835,6 @@ version = "2.0.0" [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -version = "1.11.0" [[deps.TestItems]] git-tree-sha1 = "42fd9023fef18b9b78c8343a4e2f3813ffbcefcb" @@ -2889,15 +2843,15 @@ version = "1.0.0" [[deps.ThreadingUtilities]] deps = ["ManualMemory"] -git-tree-sha1 = "eda08f7e9818eb53661b3deb74e3159460dfbc27" +git-tree-sha1 = "d969183d3d244b6c33796b5ed01ab97328f2db85" uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" -version = "0.5.2" +version = "0.5.5" [[deps.TimerOutputs]] deps = ["ExprTools", "Printf"] -git-tree-sha1 = "f57facfd1be61c42321765d3551b3df50f7e09f6" +git-tree-sha1 = "3748bd928e68c7c346b52125cf41fff0de6937d0" uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -version = "0.5.28" +version = "0.5.29" weakdeps = ["FlameGraphs"] [deps.TimerOutputs.extensions] @@ -2913,11 +2867,6 @@ weakdeps = ["StatsBase"] [deps.ToeplitzMatrices.extensions] ToeplitzMatricesStatsBaseExt = "StatsBase" -[[deps.Tokenize]] -git-tree-sha1 = "468b4685af4abe0e9fd4d7bf495a6554a6276e75" -uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624" -version = "0.5.29" - [[deps.TranscodingStreams]] git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" @@ -2941,14 +2890,13 @@ uuid = "781d530d-4396-4725-bb49-402e4bee1e77" version = "1.4.0" [[deps.URIs]] -git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" +git-tree-sha1 = "24c1c558881564e2217dcf7840a8b2e10caeb0f9" uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.5.1" +version = "1.6.0" [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" -version = "1.11.0" [[deps.UnPack]] git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" @@ -2957,7 +2905,6 @@ version = "1.0.2" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" -version = "1.11.0" [[deps.UnicodeFun]] deps = ["REPL"] @@ -2967,20 +2914,22 @@ version = "0.4.1" [[deps.Unitful]] deps = ["Dates", "LinearAlgebra", "Random"] -git-tree-sha1 = "c0667a8e676c53d390a09dc6870b3d8d6650e2bf" +git-tree-sha1 = "d2282232f8a4d71f79e85dc4dd45e5b12a6297fb" uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.22.0" -weakdeps = ["ConstructionBase", "InverseFunctions"] +version = "1.23.1" +weakdeps = ["ConstructionBase", "ForwardDiff", "InverseFunctions", "Printf"] [deps.Unitful.extensions] ConstructionBaseUnitfulExt = "ConstructionBase" + ForwardDiffExt = "ForwardDiff" InverseFunctionsUnitfulExt = "InverseFunctions" + PrintfExt = "Printf" [[deps.UnitfulLatexify]] deps = ["LaTeXStrings", "Latexify", "Unitful"] -git-tree-sha1 = "975c354fcd5f7e1ddcc1f1a23e6e091d99e99bc8" +git-tree-sha1 = "af305cc62419f9bd61b6644d19170a4d258c7967" uuid = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" -version = "1.6.4" +version = "1.7.0" [[deps.Unityper]] deps = ["ConstructionBase"] @@ -3004,12 +2953,6 @@ git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" uuid = "81def892-9a0e-5fdd-b105-ffc91e053289" version = "1.3.0" -[[deps.VertexSafeGraphs]] -deps = ["Graphs"] -git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" -uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" -version = "0.2.0" - [[deps.Vulkan_Loader_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] git-tree-sha1 = "2f0486047a07670caad3a81a075d2e518acc5c59" @@ -3017,16 +2960,15 @@ uuid = "a44049a8-05dd-5a78-86c9-5fde0876e88c" version = "1.3.243+0" [[deps.Wayland_jll]] -deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] -git-tree-sha1 = "85c7811eddec9e7f22615371c3cc81a504c508ee" +deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "XML2_jll"] +git-tree-sha1 = "53ab3e9c94f4343c68d5905565be63002e13ec8c" uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" -version = "1.21.0+2" +version = "1.23.1+1" -[[deps.Wayland_protocols_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "5db3e9d307d32baba7067b13fc7b5aa6edd4a19a" -uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" -version = "1.36.0+0" +[[deps.WeakValueDicts]] +git-tree-sha1 = "98528c2610a5479f091d470967a25becfd83edd0" +uuid = "897b6980-f191-5a31-bcb0-bf3c4585e0c1" +version = "0.1.0" [[deps.Weave]] deps = ["Base64", "Dates", "Highlights", "JSON", "Markdown", "Mustache", "Pkg", "Printf", "REPL", "RelocatableFolders", "Requires", "Serialization", "YAML"] @@ -3046,173 +2988,161 @@ git-tree-sha1 = "b8b243e47228b4a3877f1dd6aee0c5d56db7fcf4" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" version = "2.13.6+1" -[[deps.XSLT_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "XML2_jll", "Zlib_jll"] -git-tree-sha1 = "7d1671acbe47ac88e981868a078bd6b4e27c5191" -uuid = "aed1982a-8fda-507f-9586-7b0439959a61" -version = "1.1.42+0" - [[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "56c6604ec8b2d82cc4cfe01aa03b00426aac7e1f" +git-tree-sha1 = "fee71455b0aaa3440dfdd54a9a36ccef829be7d4" uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -version = "5.6.4+1" +version = "5.8.1+0" [[deps.Xorg_libICE_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "326b4fea307b0b39892b3e85fa451692eda8d46c" +git-tree-sha1 = "a3ea76ee3f4facd7a64684f9af25310825ee3668" uuid = "f67eecfb-183a-506d-b269-f58e52b52d7c" -version = "1.1.1+0" +version = "1.1.2+0" [[deps.Xorg_libSM_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libICE_jll"] -git-tree-sha1 = "3796722887072218eabafb494a13c963209754ce" +git-tree-sha1 = "9c7ad99c629a44f81e7799eb05ec2746abb5d588" uuid = "c834827a-8449-5923-a945-d239c165b7dd" -version = "1.2.4+0" +version = "1.2.6+0" [[deps.Xorg_libX11_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] -git-tree-sha1 = "9dafcee1d24c4f024e7edc92603cedba72118283" +git-tree-sha1 = "b5899b25d17bf1889d25906fb9deed5da0c15b3b" uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" -version = "1.8.6+3" +version = "1.8.12+0" [[deps.Xorg_libXau_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "e9216fdcd8514b7072b43653874fd688e4c6c003" +git-tree-sha1 = "aa1261ebbac3ccc8d16558ae6799524c450ed16b" uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" -version = "1.0.12+0" +version = "1.0.13+0" [[deps.Xorg_libXcursor_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "807c226eaf3651e7b2c468f687ac788291f9a89b" +git-tree-sha1 = "6c74ca84bbabc18c4547014765d194ff0b4dc9da" uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" -version = "1.2.3+0" +version = "1.2.4+0" [[deps.Xorg_libXdmcp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "89799ae67c17caa5b3b5a19b8469eeee474377db" +git-tree-sha1 = "52858d64353db33a56e13c341d7bf44cd0d7b309" uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" -version = "1.1.5+0" +version = "1.1.6+0" [[deps.Xorg_libXext_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "d7155fea91a4123ef59f42c4afb5ab3b4ca95058" +git-tree-sha1 = "a4c0ee07ad36bf8bbce1c3bb52d21fb1e0b987fb" uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" -version = "1.3.6+3" +version = "1.3.7+0" [[deps.Xorg_libXfixes_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "6fcc21d5aea1a0b7cce6cab3e62246abd1949b86" +git-tree-sha1 = "9caba99d38404b285db8801d5c45ef4f4f425a6d" uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" -version = "6.0.0+0" +version = "6.0.1+0" [[deps.Xorg_libXi_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] -git-tree-sha1 = "984b313b049c89739075b8e2a94407076de17449" +git-tree-sha1 = "a376af5c7ae60d29825164db40787f15c80c7c54" uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" -version = "1.8.2+0" +version = "1.8.3+0" [[deps.Xorg_libXinerama_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll"] -git-tree-sha1 = "a1a7eaf6c3b5b05cb903e35e8372049b107ac729" +git-tree-sha1 = "a5bc75478d323358a90dc36766f3c99ba7feb024" uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" -version = "1.1.5+0" +version = "1.1.6+0" [[deps.Xorg_libXrandr_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll", "Xorg_libXrender_jll"] -git-tree-sha1 = "b6f664b7b2f6a39689d822a6300b14df4668f0f4" +git-tree-sha1 = "aff463c82a773cb86061bce8d53a0d976854923e" uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" -version = "1.5.4+0" +version = "1.5.5+0" [[deps.Xorg_libXrender_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "a490c6212a0e90d2d55111ac956f7c4fa9c277a6" +git-tree-sha1 = "7ed9347888fac59a618302ee38216dd0379c480d" uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" -version = "0.9.11+1" - -[[deps.Xorg_libpthread_stubs_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c57201109a9e4c0585b208bb408bc41d205ac4e9" -uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" -version = "0.1.2+0" +version = "0.9.12+0" [[deps.Xorg_libxcb_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] -git-tree-sha1 = "1a74296303b6524a0472a8cb12d3d87a78eb3612" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXau_jll", "Xorg_libXdmcp_jll"] +git-tree-sha1 = "bfcaf7ec088eaba362093393fe11aa141fa15422" uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" -version = "1.17.0+3" +version = "1.17.1+0" [[deps.Xorg_libxkbfile_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] -git-tree-sha1 = "dbc53e4cf7701c6c7047c51e17d6e64df55dca94" +git-tree-sha1 = "e3150c7400c41e207012b41659591f083f3ef795" uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" -version = "1.1.2+1" +version = "1.1.3+0" [[deps.Xorg_xcb_util_cursor_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_jll", "Xorg_xcb_util_renderutil_jll"] -git-tree-sha1 = "04341cb870f29dcd5e39055f895c39d016e18ccd" +git-tree-sha1 = "c5bf2dad6a03dfef57ea0a170a1fe493601603f2" uuid = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" -version = "0.1.4+0" +version = "0.1.5+0" [[deps.Xorg_xcb_util_image_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "f4fc02e384b74418679983a97385644b67e1263b" uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] -git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll"] +git-tree-sha1 = "68da27247e7d8d8dafd1fcf0c3654ad6506f5f97" uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_keysyms_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "44ec54b0e2acd408b0fb361e1e9244c60c9c3dd4" uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" -version = "0.4.0+1" +version = "0.4.1+0" [[deps.Xorg_xcb_util_renderutil_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "5b0263b6d080716a02544c55fdff2c8d7f9a16a0" uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" -version = "0.3.9+1" +version = "0.3.10+0" [[deps.Xorg_xcb_util_wm_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] -git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_jll"] +git-tree-sha1 = "f233c83cad1fa0e70b7771e0e21b061a116f2763" uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" -version = "0.4.1+1" +version = "0.4.2+0" [[deps.Xorg_xkbcomp_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] -git-tree-sha1 = "ab2221d309eda71020cdda67a973aa582aa85d69" +git-tree-sha1 = "801a858fc9fb90c11ffddee1801bb06a738bda9b" uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" -version = "1.4.6+1" +version = "1.4.7+0" [[deps.Xorg_xkeyboard_config_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] -git-tree-sha1 = "691634e5453ad362044e2ad653e79f3ee3bb98c3" +git-tree-sha1 = "00af7ebdc563c9217ecc67776d1bbf037dbcebf4" uuid = "33bec58e-1273-512f-9401-5d533626f822" -version = "2.39.0+0" +version = "2.44.0+0" [[deps.Xorg_xtrans_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6dba04dbfb72ae3ebe5418ba33d087ba8aa8cb00" +git-tree-sha1 = "a63799ff68005991f9d9491b6e95bd3478d783cb" uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" -version = "1.5.1+0" +version = "1.6.0+0" [[deps.YAML]] deps = ["Base64", "Dates", "Printf", "StringEncodings"] -git-tree-sha1 = "b46894beba6c05cd185d174654479aaec09ea6b1" +git-tree-sha1 = "2f58ac39f64b41fb812340347525be3b590cce3b" uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" -version = "0.4.13" +version = "0.4.14" [[deps.ZMQ]] deps = ["FileWatching", "PrecompileTools", "Sockets", "ZeroMQ_jll"] -git-tree-sha1 = "33333bdded3835f81b9b6353da9243dc4ec62e0f" +git-tree-sha1 = "2d060e1f014c07561817bf6f3c0eb66b309e04bd" uuid = "c2297ded-f4af-51ae-bb23-16f91089e4e1" -version = "1.4.0" +version = "1.4.1" [[deps.ZeroMQ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "libsodium_jll"] @@ -3232,22 +3162,16 @@ uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" version = "1.5.7+1" [[deps.eudev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "gperf_jll"] -git-tree-sha1 = "431b678a28ebb559d224c0b6b6d01afce87c51ba" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c3b0e6196d50eab0c5ed34021aaa0bb463489510" uuid = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" -version = "3.2.9+0" +version = "3.2.14+0" [[deps.fzf_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6e50f145003024df4f5cb96c7fce79466741d601" +git-tree-sha1 = "b6a34e0e0960190ac2a4363a1bd003504772d631" uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" -version = "0.56.3+0" - -[[deps.gperf_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "0ba42241cb6809f1a278d0bcb976e0483c3f1f2d" -uuid = "1a1c6b14-54f6-533d-8383-74cd7377aa70" -version = "3.1.1+1" +version = "0.61.1+0" [[deps.libaec_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -3279,10 +3203,10 @@ uuid = "1183f4f0-6f2a-5f1a-908b-139f9cdfea6f" version = "0.2.2+0" [[deps.libevdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "141fe65dc3efabb0b1d5ba74e91f6ad26f84cc22" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "56d643b57b188d30cccc25e331d416d3d358e557" uuid = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" -version = "1.11.0+0" +version = "1.13.4+0" [[deps.libfdk_aac_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -3291,16 +3215,16 @@ uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" version = "2.0.3+0" [[deps.libinput_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "eudev_jll", "libevdev_jll", "mtdev_jll"] -git-tree-sha1 = "ad50e5b90f222cfe78aa3d5183a20a12de1322ce" +deps = ["Artifacts", "JLLWrappers", "Libdl", "eudev_jll", "libevdev_jll", "mtdev_jll"] +git-tree-sha1 = "91d05d7f4a9f67205bd6cf395e488009fe85b499" uuid = "36db933b-70db-51c0-b978-0f229ee0e533" -version = "1.18.0+0" +version = "1.28.1+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "068dfe202b0a05b8332f1e8e6b4080684b9c7700" +git-tree-sha1 = "cd155272a3738da6db765745b89e466fa64d0830" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.47+0" +version = "1.6.49+0" [[deps.libsodium_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -3315,15 +3239,15 @@ uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" version = "1.3.7+2" [[deps.mtdev_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "814e154bdb7be91d78b6802843f76b6ece642f11" +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b4d631fd51f2e9cdd93724ae25b2efc198b059b1" uuid = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" -version = "1.1.6+0" +version = "1.1.7+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.59.0+0" +version = "1.52.0+1" [[deps.oneTBB_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -3349,7 +3273,7 @@ uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" version = "3.5.0+0" [[deps.xkbcommon_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] -git-tree-sha1 = "63406453ed9b33a0df95d570816d5366c92b7809" +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "fbf139bce07a534df0e699dbb5f5cc9346f95cc1" uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" -version = "1.4.1+2" +version = "1.9.2+0" diff --git a/benchmarks/StiffSDE/Project.toml b/benchmarks/StiffSDE/Project.toml index 533528b90..72daea16a 100644 --- a/benchmarks/StiffSDE/Project.toml +++ b/benchmarks/StiffSDE/Project.toml @@ -13,7 +13,7 @@ StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" DiffEqDevTools = "2.30" DiffEqNoiseProcess = "4.3, 5.0" Plots = "1.4" -SDEProblemLibrary = "0.1" +SDEProblemLibrary = "0.1, 1" SciMLBenchmarks = "0.1" Statistics = "1" StochasticDiffEq = "6.50"