diff --git a/markdown/Jumps/Diffusion_CTRW.md b/markdown/Jumps/Diffusion_CTRW.md index ec362fb6f..c4928048b 100644 --- a/markdown/Jumps/Diffusion_CTRW.md +++ b/markdown/Jumps/Diffusion_CTRW.md @@ -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 @@ -19,21 +20,24 @@ spatial SSAs too here. ```julia 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) +u0 = jprob.u0(rn, N) +rates = [:K => 1 / (h * h)] +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, u0, (0.0, tf), rates; aggregator = 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") ``` ``` @@ -74,7 +78,9 @@ run_benchmark! (generic function with 1 method) nsims = 50 benchmarks = Vector{Vector{Float64}}() for method in methods - jump_prob = JumpProblem(rn, prob, method, save_positions=(false, false)) + jump_prob = JumpProblem( + rn, u0, (0.0, tf), rates; aggregator = method, save_positions = (false, false) + ) stepper = SSAStepper() t = Vector{Float64}(undef, nsims) run_benchmark!(t, jump_prob, stepper) @@ -84,17 +90,18 @@ 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) ``` ``` @@ -105,24 +112,24 @@ df = DataFrame(names=shortlabels, medtimes=medtimes, relmedtimes=(medtimes/medti 4 ⋯ ─────┼───────────────────────────────────────────────────────────────────── ───── - 1 │ Direct 7.04995 1.0 7.04973 0.00515773 0.0007 -316 ⋯ - 2 │ FRM 15.9036 2.25584 15.9138 0.0643626 0.0040 -444 - 3 │ SortingDirect 1.06543 0.151126 1.06522 0.00426768 0.0040 -063 - 4 │ NRM 0.743135 0.10541 0.743926 0.00313082 0.0042 -085 - 5 │ DirectCR 0.475098 0.0673902 0.475005 0.00141176 0.0029 -720 ⋯ - 6 │ RSSA 1.41678 0.200963 1.41675 0.00319636 0.0022 -561 - 7 │ RSSACR 0.393641 0.0558361 0.393271 0.00235362 0.0059 -847 - 8 │ Coevolve 0.865318 0.122741 0.866045 0.00273446 0.0031 -574 - 9 │ RDirect 0.408486 0.0579417 0.409129 0.00222711 0.0054 -435 ⋯ + 1 │ Direct 9.45822 1.0 9.45868 0.00757127 0.0008 +004 ⋯ + 2 │ FRM 22.1954 2.34668 22.2194 0.0715947 0.0032 +221 + 3 │ SortingDirect 1.43655 0.151884 1.43663 0.00523339 0.0036 +428 + 4 │ NRM 1.01202 0.106998 1.0134 0.00590352 0.0058 +254 + 5 │ DirectCR 0.663292 0.0701286 0.663935 0.00194931 0.0029 +36 ⋯ + 6 │ RSSA 1.91481 0.202449 1.91528 0.00546598 0.0028 +538 + 7 │ RSSACR 0.551969 0.0583586 0.553364 0.00457602 0.0082 +694 + 8 │ Coevolve 1.29751 0.137184 1.29903 0.00864847 0.0066 +576 + 9 │ RDirect 0.567072 0.0599555 0.567832 0.00390389 0.0068 +750 ⋯ 1 column om itted ``` @@ -132,10 +139,11 @@ itted # 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") ``` @@ -148,7 +156,6 @@ title!("256 Site 1D Diffusion CTRW") These benchmarks are a part of the SciMLBenchmarks.jl repository, found at: [https://github.com/SciML/SciMLBenchmarks.jl](https://github.com/SciML/SciMLBenchmarks.jl). For more information on high-performance scientific machine learning, check out the SciML Open Source Software Organization [https://sciml.ai](https://sciml.ai). To locally run this benchmark, do the following commands: - ``` using SciMLBenchmarks SciMLBenchmarks.weave_file("benchmarks/Jumps","Diffusion_CTRW.jmd") @@ -157,8 +164,8 @@ SciMLBenchmarks.weave_file("benchmarks/Jumps","Diffusion_CTRW.jmd") Computer Information: ``` -Julia Version 1.10.9 -Commit 5595d20a287 (2025-03-10 12:51 UTC) +Julia Version 1.10.12 +Commit d93beab124c (2026-08-15 10:29 UTC) Build Info: Official https://julialang.org/ release Platform Info: @@ -167,432 +174,372 @@ Platform Info: WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver2) -Threads: 1 default, 0 interactive, 1 GC (on 128 virtual cores) +Threads: 128 default, 0 interactive, 64 GC (on 128 virtual cores) Environment: - JULIA_CPU_THREADS = 128 - JULIA_DEPOT_PATH = /cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953 + JULIA_NUM_THREADS = auto ``` Package Information: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Project.toml` - [6e4b80f9] BenchmarkTools v1.6.0 - [479239e8] Catalyst v15.0.8 - [8f4d0f93] Conda v1.10.2 - [a93c6f00] DataFrames v1.7.0 - [0c46a032] DifferentialEquations v7.16.1 - [31c24e10] Distributions v0.25.120 - [86223c79] Graphs v1.12.1 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 - [91a5bcdd] Plots v1.40.13 +Status `/julia/github-runners/amdci1-1/_work/SciMLBenchmarks.jl/SciMLBenchmarks.jl/benchmarks/Jumps/Project.toml` + [6e4b80f9] BenchmarkTools v1.8.0 + [479239e8] Catalyst v16.4.0 + [8f4d0f93] Conda v1.10.3 + [a93c6f00] DataFrames v1.8.2 + [0c46a032] DifferentialEquations v8.1.1 + [31c24e10] Distributions v0.25.131 + [86223c79] Graphs v1.14.0 + [faf0f6d7] JumpProblemLibrary v2.0.3 + [ccbc3e58] JumpProcesses v9.30.1 + [961ee093] ModelingToolkit v11.40.0 + [1dea7af3] OrdinaryDiffEq v7.8.1 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 + [91a5bcdd] Plots v1.41.7 [438e738f] PyCall v1.96.4 - [b4db0fb7] ReactionNetworkImporters v0.16.1 - [31c91b34] SciMLBenchmarks v0.1.3 - [860ef19b] StableRNGs v1.0.3 - [f3b207a7] StatsPlots v0.15.7 - [c3572dad] Sundials v4.28.0 + [b4db0fb7] ReactionNetworkImporters v1.5.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [860ef19b] StableRNGs v1.0.4 + [f3b207a7] StatsPlots v0.15.8 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 [37e2e46d] LinearAlgebra [9a3f8284] Random [10745b16] Statistics v1.10.0 -Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated` +Info Packages marked with ⌃ have new versions available and may be upgradable. ``` And the full manifest: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Manifest.toml` - [47edcb42] ADTypes v1.14.0 +Status `/julia/github-runners/amdci1-1/_work/SciMLBenchmarks.jl/SciMLBenchmarks.jl/benchmarks/Jumps/Manifest.toml` + [47edcb42] ADTypes v1.24.0 + [14f7f29c] AMD v0.5.3 [621f4979] AbstractFFTs v1.5.0 + [6e696c72] AbstractPlutoDingetjes v1.4.0 [1520ce14] AbstractTrees v0.4.5 - [7d9f7c33] Accessors v0.1.42 - [79e6a3ab] Adapt v4.3.0 + [7d9f7c33] Accessors v0.1.45 + [79e6a3ab] Adapt v4.7.0 [66dad0bd] AliasTables v1.1.3 - [a95523ee] AlmostBlockDiagonals v0.1.10 [ec485272] ArnoldiMethod v0.4.0 [7d9fca2a] Arpack v0.5.4 - [4fba245c] ArrayInterface v7.19.0 - [4c555306] ArrayLayouts v1.11.1 + [4fba245c] ArrayInterface v7.30.0 + [4c555306] ArrayLayouts v1.12.2 [13072b0f] AxisAlgorithms v1.1.0 - [aae01518] BandedMatrices v1.9.4 - [6e4b80f9] BenchmarkTools v1.6.0 -⌅ [e2ed5e7c] Bijections v0.1.10 - [d1d4a3ce] BitFlags v0.1.9 - [62783981] BitTwiddlingConvenienceFunctions v0.1.6 - [8e7c35d0] BlockArrays v1.6.3 - [764a87c0] BoundaryValueDiffEq v5.17.0 - [7227322d] BoundaryValueDiffEqAscher v1.6.1 - [56b672f2] BoundaryValueDiffEqCore v1.9.0 - [85d9eb09] BoundaryValueDiffEqFIRK v1.7.0 - [1a22d4ce] BoundaryValueDiffEqMIRK v1.7.0 - [9255f1d6] BoundaryValueDiffEqMIRKN v1.6.1 - [ed55bfe0] BoundaryValueDiffEqShooting v1.7.0 - [70df07ce] BracketingNonlinearSolve v1.3.0 + [aae01518] BandedMatrices v1.12.0 + [6e4b80f9] BenchmarkTools v1.8.0 + [e2ed5e7c] Bijections v0.2.2 + [b2a6c25c] BinaryHeaps v1.1.0 + [caf10ac8] BipartiteGraphs v0.1.12 + [8e7c35d0] BlockArrays v1.10.0 + [70df07ce] BracketingNonlinearSolve v1.12.6 [fa961155] CEnum v0.5.0 - [2a0fbf3d] CPUSummary v0.2.6 - [479239e8] Catalyst v15.0.8 - [d360d2e6] ChainRulesCore v1.25.1 - [fb6a15b2] CloseOpenIntervals v0.1.13 + [479239e8] Catalyst v16.4.0 + [d360d2e6] ChainRulesCore v1.26.1 [aaaa29a8] Clustering v0.15.8 - [944b1d66] CodecZlib v0.7.8 - [35d6a980] ColorSchemes v3.29.0 + [35d6a980] ColorSchemes v3.31.0 [3da002f7] ColorTypes v0.12.1 [c3611d14] ColorVectorSpace v0.11.0 [5ae59095] Colors v0.13.1 - [861a8166] Combinatorics v1.0.3 - [a80b9123] CommonMark v0.9.1 - [38540f10] CommonSolve v0.2.4 +⌅ [861a8166] Combinatorics v1.0.2 + [38540f10] CommonSolve v0.2.14 [bbf7d656] CommonSubexpressions v0.3.1 - [f70d9fcc] CommonWorldInvalidations v1.0.0 - [34da2185] Compat v4.16.0 + [f70d9fcc] CommonWorldInvalidations v1.2.0 + [34da2185] Compat v4.18.1 [b152e2b5] CompositeTypes v0.1.4 [a33af91c] CompositionsBase v0.1.2 - [2569d6c7] ConcreteStructs v0.2.3 - [f0e56b4a] ConcurrentUtilities v2.5.0 - [8f4d0f93] Conda v1.10.2 - [187b0558] ConstructionBase v1.5.8 + [2569d6c7] ConcreteStructs v0.2.8 + [8f4d0f93] Conda v1.10.3 + [187b0558] ConstructionBase v1.6.0 [d38c429a] Contour v0.6.3 - [adafc99b] CpuId v0.3.1 - [a8cc5b0e] Crayons v4.1.1 + [a8cc5b0e] Crayons v4.2.0 [9a962f9c] DataAPI v1.16.0 - [a93c6f00] DataFrames v1.7.0 - [864edb3b] DataStructures v0.18.22 + [a93c6f00] DataFrames v1.8.2 + [864edb3b] DataStructures v0.19.6 [e2d170a0] DataValueInterfaces v1.0.0 - [bcd4f6db] DelayDiffEq v5.53.1 [8bb1440f] DelimitedFiles v1.9.1 - [2b5f629d] DiffEqBase v6.175.0 - [459566f4] DiffEqCallbacks v4.6.0 - [77a26b50] DiffEqNoiseProcess v5.24.1 + [2b5f629d] DiffEqBase v7.19.0 + [459566f4] DiffEqCallbacks v4.19.3 [163ba53b] DiffResults v1.1.0 - [b552c78f] DiffRules v1.15.1 - [0c46a032] DifferentialEquations v7.16.1 -⌅ [a0c0ee7d] DifferentiationInterface v0.6.54 - [8d63f2c5] DispatchDoctor v0.4.19 + [b552c78f] DiffRules v1.16.0 + [0c46a032] DifferentialEquations v8.1.1 + [a0c0ee7d] DifferentiationInterface v0.7.21 + [8d63f2c5] DispatchDoctor v0.4.28 [b4f34e82] Distances v0.10.12 - [31c24e10] Distributions v0.25.120 - [ffbed154] DocStringExtensions v0.9.4 - [5b8099bc] DomainSets v0.7.15 - [7c1d4256] DynamicPolynomials v0.6.2 - [06fc5a27] DynamicQuantities v1.8.0 - [4e289a0a] EnumX v1.0.5 -⌃ [f151be2c] EnzymeCore v0.8.10 - [460bff9d] ExceptionUnwrapping v0.1.11 - [d4d017d3] ExponentialUtilities v1.27.0 - [e2ba6199] ExprTools v0.1.10 + [31c24e10] Distributions v0.25.131 + [ffbed154] DocStringExtensions v0.9.5 + [5b8099bc] DomainSets v0.8.1 + [7c1d4256] DynamicPolynomials v0.6.7 + [06fc5a27] DynamicQuantities v1.13.0 + [4e289a0a] EnumX v1.0.7 + [f151be2c] EnzymeCore v0.8.21 + [e2ba6199] ExprTools v0.1.11 [55351af7] ExproniconLite v0.10.14 - [c87230d0] FFMPEG v0.4.2 - [7a1cc6ca] FFTW v1.8.1 - [9d29842c] FastAlmostBandedMatrices v0.1.5 - [7034ab61] FastBroadcast v0.3.5 + [c87230d0] FFMPEG v0.4.5 + [b86e33f2] FFTA v0.3.1 + [7034ab61] FastBroadcast v1.4.0 [9aa1b823] FastClosures v0.3.2 - [442a2c76] FastGaussQuadrature v1.0.2 - [a4df4552] FastPower v1.1.2 - [1a297f60] FillArrays v1.13.0 - [64ca27bc] FindFirstFunctions v1.4.1 - [6a86dc24] FiniteDiff v2.27.0 - [53c48c17] FixedPointNumbers v0.8.5 + [a4df4552] FastPower v1.5.0 + [1a297f60] FillArrays v1.17.0 + [64ca27bc] FindFirstFunctions v3.2.1 + [6a86dc24] FiniteDiff v2.33.0 +⌅ [53c48c17] FixedPointNumbers v0.8.6 [1fa38f19] Format v1.3.7 -⌅ [f6369f11] ForwardDiff v0.10.38 + [f6369f11] ForwardDiff v1.4.5 + [a85aefff] FunctionMaps v0.1.2 [069b7b12] FunctionWrappers v1.1.3 - [77dc65aa] FunctionWrappersWrappers v0.1.3 - [d9f16b24] Functors v0.5.2 + [77dc65aa] FunctionWrappersWrappers v1.13.0 [46192b85] GPUArraysCore v0.2.0 - [28b8d3ca] GR v0.73.16 - [c145ed77] GenericSchur v0.5.5 - [d7ba0133] Git v1.4.0 - [c27321d9] Glob v1.3.1 - [86223c79] Graphs v1.12.1 + [28b8d3ca] GR v0.73.27 + [a0844989] Gamma v1.2.0 + [d7ba0133] Git v1.5.0 + [86223c79] Graphs v1.14.0 [42e2da0e] Grisu v1.0.2 - [cd3eb016] HTTP v1.10.16 - [eafb193a] Highlights v0.5.3 - [34004b35] HypergeometricFunctions v0.3.28 -⌃ [7073ff75] IJulia v1.27.0 - [615f187c] IfElse v0.1.1 +⌅ [eafb193a] Highlights v0.5.3 + [34004b35] HypergeometricFunctions v0.3.30 + [7073ff75] IJulia v1.34.4 + [3263718b] ImplicitDiscreteSolve v2.2.0 [d25df0c9] Inflate v0.1.5 - [842dd82b] InlineStrings v1.4.3 - [18e54dd8] IntegerMathUtils v0.1.2 -⌅ [a98d9a8b] Interpolations v0.15.1 - [8197267c] IntervalSets v0.7.11 + [842dd82b] InlineStrings v1.4.5 + [18e54dd8] IntegerMathUtils v0.1.4 + [a98d9a8b] Interpolations v0.16.3 + [8197267c] IntervalSets v0.7.14 [3587e190] InverseFunctions v0.1.17 [41ab1584] InvertedIndices v1.3.1 - [92d709cd] IrrationalConstants v0.2.4 + [92d709cd] IrrationalConstants v0.2.6 [82899510] IteratorInterfaceExtensions v1.0.0 [1019f520] JLFzf v0.1.11 - [692b3bcd] JLLWrappers v1.7.0 - [682c06a0] JSON v0.21.4 + [692b3bcd] JLLWrappers v1.8.0 +⌅ [682c06a0] JSON v0.21.4 [ae98c720] Jieko v0.2.1 - [98e50ef6] JuliaFormatter v2.1.2 -⌅ [70703baa] JuliaSyntax v0.4.10 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 - [5ab0869b] KernelDensity v0.6.9 - [ba0b0d4f] Krylov v0.10.1 - [7f56f5a3] LSODA v0.7.5 - [b964fa9f] LaTeXStrings v1.4.0 - [23fbe1c1] Latexify v0.16.8 - [10f19ff3] LayoutPointers v0.1.17 - [5078a376] LazyArrays v2.6.1 - [2d8b4e74] LevyArea v1.0.0 - [87fe0de2] LineSearch v0.1.4 - [d3d80556] LineSearches v7.3.0 - [7ed4a6bd] LinearSolve v3.16.0 - [2ab3a3ac] LogExpFunctions v0.3.29 - [e6f89c97] LoggingExtras v1.1.0 - [d8e11817] MLStyle v0.4.17 + [faf0f6d7] JumpProblemLibrary v2.0.3 + [ccbc3e58] JumpProcesses v9.30.1 + [5ab0869b] KernelDensity v0.6.12 + [ba0b0d4f] Krylov v0.10.9 + [2faa5264] LHLFactorization v2.2.1 + [7f56f5a3] LSODA v1.2.0 + [b964fa9f] LaTeXStrings v1.4.1 + [23fbe1c1] Latexify v0.16.12 + [87fe0de2] LineSearch v0.1.16 + [7ed4a6bd] LinearSolve v5.14.1 + [2ab3a3ac] LogExpFunctions v1.0.1 + [e6f89c97] LoggingExtras v1.2.0 [1914dd2f] MacroTools v0.5.16 - [d125e4d3] ManualMemory v0.1.8 - [a3b82374] MatrixFactorizations v3.0.1 - [bb5d69b7] MaybeInplace v0.1.4 - [739be429] MbedTLS v1.1.9 - [442fdcdd] Measures v0.3.2 + [bb5d69b7] MaybeInplace v0.1.8 + [442fdcdd] Measures v0.3.3 [e1d29d7a] Missings v1.2.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [2e0e35c7] Moshi v0.3.5 - [46d2c3a1] MuladdMacro v0.2.4 - [102ac46a] MultivariatePolynomials v0.5.9 - [6f286f6a] MultivariateStats v0.10.3 - [ffc61752] Mustache v1.0.20 - [d8a4904e] MutableArithmetics v1.6.4 - [d41bc354] NLSolversBase v7.9.1 - [2774e3e8] NLsolve v4.5.1 - [77ba4419] NaNMath v1.1.3 - [b8a86587] NearestNeighbors v0.4.21 - [8913a72c] NonlinearSolve v4.9.0 - [be0214bd] NonlinearSolveBase v1.12.0 - [5959db7a] NonlinearSolveFirstOrder v1.5.0 - [9a2c21bd] NonlinearSolveQuasiNewton v1.6.0 - [26075421] NonlinearSolveSpectralMethods v1.2.0 + [961ee093] ModelingToolkit v11.40.0 +⌃ [7771a370] ModelingToolkitBase v1.68.0 + [6bb917b9] ModelingToolkitTearing v1.20.6 + [2e0e35c7] Moshi v0.3.12 + [46d2c3a1] MuladdMacro v0.2.7 + [102ac46a] MultivariatePolynomials v0.5.19 + [6f286f6a] MultivariateStats v0.10.5 + [ffc61752] Mustache v1.0.21 + [d8a4904e] MutableArithmetics v1.8.0 + [77ba4419] NaNMath v1.1.4 + [b8a86587] NearestNeighbors v0.4.29 + [8913a72c] NonlinearSolve v4.28.1 + [be0214bd] NonlinearSolveBase v2.48.2 + [5959db7a] NonlinearSolveFirstOrder v2.4.1 + [9a2c21bd] NonlinearSolveQuasiNewton v1.15.2 + [26075421] NonlinearSolveSpectralMethods v1.8.1 [510215fc] Observables v0.5.5 [6fe1bfb0] OffsetArrays v1.17.0 - [4d8831e6] OpenSSL v1.5.0 - [429524aa] Optim v1.12.0 - [bac558e1] OrderedCollections v1.8.1 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [89bda076] OrdinaryDiffEqAdamsBashforthMoulton v1.2.0 - [6ad6398a] OrdinaryDiffEqBDF v1.5.1 - [bbf590c4] OrdinaryDiffEqCore v1.26.0 - [50262376] OrdinaryDiffEqDefault v1.4.0 - [4302a76b] OrdinaryDiffEqDifferentiation v1.9.1 - [9286f039] OrdinaryDiffEqExplicitRK v1.1.0 - [e0540318] OrdinaryDiffEqExponentialRK v1.4.0 - [becaefa8] OrdinaryDiffEqExtrapolation v1.5.0 - [5960d6e9] OrdinaryDiffEqFIRK v1.12.0 - [101fe9f7] OrdinaryDiffEqFeagin v1.1.0 - [d3585ca7] OrdinaryDiffEqFunctionMap v1.1.1 - [d28bc4f8] OrdinaryDiffEqHighOrderRK v1.1.0 - [9f002381] OrdinaryDiffEqIMEXMultistep v1.3.0 - [521117fe] OrdinaryDiffEqLinear v1.3.0 - [1344f307] OrdinaryDiffEqLowOrderRK v1.2.0 - [b0944070] OrdinaryDiffEqLowStorageRK v1.3.0 - [127b3ac7] OrdinaryDiffEqNonlinearSolve v1.10.0 - [c9986a66] OrdinaryDiffEqNordsieck v1.1.0 - [5dd0a6cf] OrdinaryDiffEqPDIRK v1.3.1 - [5b33eab2] OrdinaryDiffEqPRK v1.1.0 - [04162be5] OrdinaryDiffEqQPRK v1.1.0 - [af6ede74] OrdinaryDiffEqRKN v1.1.0 - [43230ef6] OrdinaryDiffEqRosenbrock v1.10.1 - [2d112036] OrdinaryDiffEqSDIRK v1.3.0 - [669c94d9] OrdinaryDiffEqSSPRK v1.3.0 - [e3e12d00] OrdinaryDiffEqStabilizedIRK v1.3.0 - [358294b1] OrdinaryDiffEqStabilizedRK v1.1.0 - [fa646aed] OrdinaryDiffEqSymplecticRK v1.3.0 - [b1df2697] OrdinaryDiffEqTsit5 v1.1.0 - [79d7bb75] OrdinaryDiffEqVerner v1.2.0 - [90014a1f] PDMats v0.11.35 - [d96e819e] Parameters v0.12.3 - [69de0a69] Parsers v2.8.3 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 +⌅ [bac558e1] OrderedCollections v1.8.2 + [1dea7af3] OrdinaryDiffEq v7.8.1 + [6ad6398a] OrdinaryDiffEqBDF v2.4.5 + [bbf590c4] OrdinaryDiffEqCore v4.15.2 + [50262376] OrdinaryDiffEqDefault v2.6.0 + [4302a76b] OrdinaryDiffEqDifferentiation v3.11.0 + [127b3ac7] OrdinaryDiffEqNonlinearSolve v2.9.2 + [43230ef6] OrdinaryDiffEqRosenbrock v2.7.1 + [b4bd8bb3] OrdinaryDiffEqRosenbrockTableaus v2.4.2 + [2d112036] OrdinaryDiffEqSDIRK v2.9.1 + [b1df2697] OrdinaryDiffEqTsit5 v2.1.4 + [79d7bb75] OrdinaryDiffEqVerner v2.4.1 + [90014a1f] PDMats v0.11.41 +⌅ [d96e819e] Parameters v0.12.3 +⌅ [69de0a69] Parsers v2.8.7 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 [ccf2f8ad] PlotThemes v3.3.0 - [995b91a9] PlotUtils v1.4.3 - [91a5bcdd] Plots v1.40.13 - [e409e4f3] PoissonRandom v0.4.4 - [f517fe37] Polyester v0.7.18 - [1d0040c9] PolyesterWeave v0.2.2 + [995b91a9] PlotUtils v1.4.4 + [91a5bcdd] Plots v1.41.7 + [e409e4f3] PoissonRandom v0.4.13 [2dfb63ee] PooledArrays v1.4.3 - [85a6dd25] PositiveFactorizations v0.2.4 - [d236fae5] PreallocationTools v0.4.27 + [d236fae5] PreallocationTools v1.7.1 ⌅ [aea7be01] PrecompileTools v1.2.1 - [21216c6a] Preferences v1.4.3 - [08abe8d2] PrettyTables v2.4.0 + [21216c6a] Preferences v1.5.2 + [08abe8d2] PrettyTables v3.4.8 [27ebfcd6] Primes v0.5.7 - [43287f4e] PtrArrays v1.3.0 + [43287f4e] PtrArrays v1.4.0 + [0c0d3e7f] PureKLU v1.4.1 [438e738f] PyCall v1.96.4 - [1fd47b50] QuadGK v2.11.2 - [74087812] Random123 v1.7.1 - [e6cf234a] RandomNumbers v1.6.0 + [1fd47b50] QuadGK v2.11.3 [c84ed2f1] Ratios v0.4.5 - [b4db0fb7] ReactionNetworkImporters v0.16.1 + [b4db0fb7] ReactionNetworkImporters v1.5.0 + [988b38a3] ReadOnlyArrays v0.2.0 + [795d4caa] ReadOnlyDicts v1.0.1 [3cdcf5f2] RecipesBase v1.3.4 [01d81517] RecipesPipeline v0.6.12 - [731186ca] RecursiveArrayTools v3.33.0 + [731186ca] RecursiveArrayTools v4.5.1 [189a3867] Reexport v1.2.2 [05181044] RelocatableFolders v1.0.1 [ae029012] Requires v1.3.1 - [ae5879a3] ResettableStacks v1.1.1 - [79098fc4] Rmath v0.8.0 - [7e49a35a] RuntimeGeneratedFunctions v0.5.15 - [9dfe8606] SCCNonlinearSolve v1.2.0 - [94e857df] SIMDTypes v0.1.0 - [0bca4576] SciMLBase v2.96.0 - [31c91b34] SciMLBenchmarks v0.1.3 - [19f34311] SciMLJacobianOperators v0.1.6 -⌃ [c0aeaf25] SciMLOperators v0.4.0 - [53ae85a6] SciMLStructures v1.7.0 - [6c6a2e73] Scratch v1.2.1 - [91c51154] SentinelArrays v1.4.8 + [9fe22ead] RespecializeParams v1.3.0 + [79098fc4] Rmath v0.9.0 + [f2b01f46] Roots v3.0.7 + [7e49a35a] RuntimeGeneratedFunctions v0.5.25 + [9dfe8606] SCCNonlinearSolve v1.15.1 + [0bca4576] SciMLBase v3.50.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [19f34311] SciMLJacobianOperators v0.1.18 + [a6db7da4] SciMLLogging v2.1.0 + [c0aeaf25] SciMLOperators v1.30.0 + [431bcebd] SciMLPublic v1.3.0 + [53ae85a6] SciMLStructures v1.10.5 + [6c6a2e73] Scratch v1.3.0 + [91c51154] SentinelArrays v1.4.10 [efcf1570] Setfield v1.1.2 [992d4aef] Showoff v1.0.3 - [777ac1f9] SimpleBufferStream v1.2.0 - [727e6d20] SimpleNonlinearSolve v2.5.0 - [699a6c99] SimpleTraits v0.9.4 - [ce78b400] SimpleUnPack v1.1.0 - [b85f4697] SoftGlobalScope v1.1.0 - [a2af1166] SortingAlgorithms v1.2.1 - [9f842d2f] SparseConnectivityTracer v0.6.18 - [0a514795] SparseMatrixColorings v0.4.20 - [276daf66] SpecialFunctions v2.5.1 - [860ef19b] StableRNGs v1.0.3 - [aedffcd0] Static v1.2.0 - [0d7ed370] StaticArrayInterface v1.8.0 - [90137ffa] StaticArrays v1.9.13 - [1e83bf80] StaticArraysCore v1.4.3 - [82ae8749] StatsAPI v1.7.1 - [2913bbd2] StatsBase v0.34.5 - [4c63d2b9] StatsFuns v1.5.0 - [f3b207a7] StatsPlots v0.15.7 - [9672c7b4] SteadyStateDiffEq v2.5.0 - [789caeaf] StochasticDiffEq v6.80.0 - [7792a7ef] StrideArraysCore v0.5.7 + [727e6d20] SimpleNonlinearSolve v2.14.1 + [699a6c99] SimpleTraits v0.9.6 + [a2af1166] SortingAlgorithms v1.2.3 + [a57abbd0] SparseColumnPivotedQR v2.1.7 + [0a514795] SparseMatrixColorings v0.4.27 + [276daf66] SpecialFunctions v2.9.0 + [860ef19b] StableRNGs v1.0.4 + [0c0c59c1] StarAlgebras v0.3.0 + [64909d44] StateSelection v1.11.1 + [90137ffa] StaticArrays v1.9.19 + [1e83bf80] StaticArraysCore v1.4.4 + [82ae8749] StatsAPI v1.8.0 + [2913bbd2] StatsBase v0.34.13 + [4c63d2b9] StatsFuns v2.2.1 + [f3b207a7] StatsPlots v0.15.8 [69024149] StringEncodings v0.3.7 - [892a3eda] StringManipulation v0.4.1 - [c3572dad] Sundials v4.28.0 - [2efcf032] SymbolicIndexingInterface v0.3.40 - [19f23fe9] SymbolicLimits v0.2.2 - [d1185830] SymbolicUtils v3.29.0 - [0c5d862f] Symbolics v6.40.0 + [892a3eda] StringManipulation v0.5.0 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 + [19f23fe9] SymbolicLimits v1.2.0 +⌅ [d1185830] SymbolicUtils v4.45.0 + [0c5d862f] Symbolics v7.39.0 [ab02a1b2] TableOperations v1.2.0 [3783bdb8] TableTraits v1.0.1 - [bd369af6] Tables v1.12.0 - [ed4db957] TaskLocalValues v0.1.2 + [bd369af6] Tables v1.14.0 + [ed4db957] TaskLocalValues v0.1.3 [62fd8b95] TensorCore v0.1.1 [8ea1fca8] TermInterface v2.0.0 - [1c621080] TestItems v1.0.0 - [8290d209] ThreadingUtilities v0.5.4 - [a759f4b9] TimerOutputs v0.5.29 - [3bb67fe8] TranscodingStreams v0.11.3 - [410a4b4d] Tricks v0.1.10 + [1c621080] TestItems v1.1.0 + [a759f4b9] TimerOutputs v1.2.0 + [410a4b4d] Tricks v0.1.13 [781d530d] TruncatedStacktraces v1.4.0 - [5c2747f8] URIs v1.5.2 [3a884ed6] UnPack v1.0.2 [1cfade01] UnicodeFun v0.4.1 - [1986cc42] Unitful v1.22.1 - [45397f5d] UnitfulLatexify v1.7.0 - [a7c27f48] Unityper v0.1.6 [41fe7b60] Unzip v0.2.0 [81def892] VersionParsing v1.3.0 - [897b6980] WeakValueDicts v0.1.0 + [d30d5f5c] WeakCacheSets v0.1.0 [44d3d7a6] Weave v0.10.12 - [cc8bc4a8] Widgets v0.6.7 - [efce3f68] WoodburyMatrices v1.0.0 - [ddb6d928] YAML v0.4.14 - [c2297ded] ZMQ v1.4.0 -⌅ [68821587] Arpack_jll v3.5.1+1 + [cc8bc4a8] Widgets v0.6.8 + [efce3f68] WoodburyMatrices v1.1.0 + [ddb6d928] YAML v0.4.16 + [c2297ded] ZMQ v1.5.1 +⌅ [68821587] Arpack_jll v3.5.2+0 [6e34b625] Bzip2_jll v1.0.9+0 - [83423d85] Cairo_jll v1.18.5+0 + [83423d85] Cairo_jll v1.18.7+0 [ee1fde0b] Dbus_jll v1.16.2+0 [2702e6a9] EpollShim_jll v0.0.20230411+1 - [2e619515] Expat_jll v2.6.5+0 -⌅ [b22a6f82] FFMPEG_jll v4.4.4+1 - [f5851436] FFTW_jll v3.3.11+0 - [a3f928ae] Fontconfig_jll v2.16.0+0 - [d7e528f0] FreeType2_jll v2.13.4+0 + [2e619515] Expat_jll v2.8.3+0 +⌅ [b22a6f82] FFMPEG_jll v8.1.2+0 + [a3f928ae] Fontconfig_jll v2.17.1+0 + [d7e528f0] FreeType2_jll v2.14.3+1 [559328eb] FriBidi_jll v1.0.17+0 - [0656b61e] GLFW_jll v3.4.0+2 - [d2c73de3] GR_jll v0.73.16+0 - [78b55507] Gettext_jll v0.21.0+0 - [f8c6e375] Git_jll v2.49.0+0 - [7746bdde] Glib_jll v2.84.0+0 - [3b182d85] Graphite2_jll v1.3.15+0 - [2e76f6c2] HarfBuzz_jll v8.5.1+0 - [1d5cc7b8] IntelOpenMP_jll v2025.0.4+0 - [aacddb02] JpegTurbo_jll v3.1.1+0 - [c1c5ebd0] LAME_jll v3.100.2+0 - [88015f11] LERC_jll v4.0.1+0 - [1d63c593] LLVMOpenMP_jll v18.1.8+0 + [0656b61e] GLFW_jll v3.5.1+0 + [d2c73de3] GR_jll v0.73.27+0 +⌅ [b0724c58] GettextRuntime_jll v0.22.4+0 + [61579ee1] Ghostscript_jll v9.55.1+0 + [020c3dae] Git_LFS_jll v3.7.1+0 + [f8c6e375] Git_jll v2.55.0+0 + [7746bdde] Glib_jll v2.88.3+0 + [3b182d85] Graphite2_jll v1.3.16+0 + [2e76f6c2] HarfBuzz_jll v100.14003.0+0 + [1d5cc7b8] IntelOpenMP_jll v2025.2.0+0 + [aacddb02] JpegTurbo_jll v3.2.0+1 + [c1c5ebd0] LAME_jll v3.100.3+0 + [88015f11] LERC_jll v4.1.0+0 + [1d63c593] LLVMOpenMP_jll v22.1.7+0 [aae0fff6] LSODA_jll v0.1.2+0 - [dd4b983a] LZO_jll v2.10.3+0 - [e9f186c6] Libffi_jll v3.4.7+0 +⌅ [e9f186c6] Libffi_jll v3.4.7+0 [7e76a0d4] Libglvnd_jll v1.7.1+1 [94ce4f54] Libiconv_jll v1.18.0+0 - [4b2f31a3] Libmount_jll v2.41.0+0 - [89763e89] Libtiff_jll v4.7.1+0 - [38a345b3] Libuuid_jll v2.41.0+0 - [856f044c] MKL_jll v2025.0.1+1 - [e7412a2a] Ogg_jll v1.3.5+1 - [9bd350c2] OpenSSH_jll v10.0.1+0 - [458c3c95] OpenSSL_jll v3.5.0+0 + [4b2f31a3] Libmount_jll v2.42.0+0 + [89763e89] Libtiff_jll v4.7.3+0 + [38a345b3] Libuuid_jll v2.42.0+0 + [856f044c] MKL_jll v2025.2.0+0 + [e7412a2a] Ogg_jll v1.3.6+0 +⌅ [656ef2d0] OpenBLAS32_jll v0.3.24+0 + [9bd350c2] OpenSSH_jll v10.5.1+0 + [458c3c95] OpenSSL_jll v3.5.8+0 [efe28fd5] OpenSpecFun_jll v0.5.6+0 - [91d4177d] Opus_jll v1.3.3+0 - [36c8627f] Pango_jll v1.56.3+0 -⌅ [30392449] Pixman_jll v0.44.2+0 - [c0090381] Qt6Base_jll v6.8.2+1 - [629bc702] Qt6Declarative_jll v6.8.2+1 - [ce943373] Qt6ShaderTools_jll v6.8.2+1 - [e99dba38] Qt6Wayland_jll v6.8.2+0 - [f50d1b31] Rmath_jll v0.5.1+0 -⌅ [fb77eaff] Sundials_jll v5.2.2+0 + [91d4177d] Opus_jll v1.6.1+0 + [36c8627f] Pango_jll v1.58.2+0 + [30392449] Pixman_jll v0.46.4+0 + [c0090381] Qt6Base_jll v6.10.2+2 + [629bc702] Qt6Declarative_jll v6.10.2+2 + [ce943373] Qt6ShaderTools_jll v6.10.2+1 + [6de9746b] Qt6Svg_jll v6.10.2+0 + [e99dba38] Qt6Wayland_jll v6.10.2+1 + [f50d1b31] Rmath_jll v0.5.2+0 +⌅ [ca45d3f4] SuiteSparse32_jll v5.10.1+0 + [fb77eaff] Sundials_jll v7.5.0+0 [a44049a8] Vulkan_Loader_jll v1.3.243+0 - [a2964d1f] Wayland_jll v1.23.1+0 - [2381bf8a] Wayland_protocols_jll v1.36.0+0 -⌅ [02c8fc9c] XML2_jll v2.13.6+1 - [ffd25f8a] XZ_jll v5.8.1+0 + [a2964d1f] Wayland_jll v1.24.0+0 + [ffd25f8a] XZ_jll v5.8.3+0 [f67eecfb] Xorg_libICE_jll v1.1.2+0 [c834827a] Xorg_libSM_jll v1.2.6+0 - [4f6342f7] Xorg_libX11_jll v1.8.12+0 + [4f6342f7] Xorg_libX11_jll v1.8.13+0 [0c0b7dd1] Xorg_libXau_jll v1.0.13+0 [935fb764] Xorg_libXcursor_jll v1.2.4+0 [a3789734] Xorg_libXdmcp_jll v1.1.6+0 - [1082639a] Xorg_libXext_jll v1.3.7+0 - [d091e8ba] Xorg_libXfixes_jll v6.0.1+0 - [a51aa0fd] Xorg_libXi_jll v1.8.3+0 - [d1454406] Xorg_libXinerama_jll v1.1.6+0 - [ec84b674] Xorg_libXrandr_jll v1.5.5+0 + [1082639a] Xorg_libXext_jll v1.3.8+0 + [d091e8ba] Xorg_libXfixes_jll v6.0.2+0 + [a51aa0fd] Xorg_libXi_jll v1.8.4+0 + [d1454406] Xorg_libXinerama_jll v1.1.7+0 + [ec84b674] Xorg_libXrandr_jll v1.5.6+0 [ea2f1a96] Xorg_libXrender_jll v0.9.12+0 + [a65dc6b1] Xorg_libpciaccess_jll v0.19.0+0 [c7cfdc94] Xorg_libxcb_jll v1.17.1+0 - [cc61e674] Xorg_libxkbfile_jll v1.1.3+0 - [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0 - [12413925] Xorg_xcb_util_image_jll v0.4.0+1 - [2def613f] Xorg_xcb_util_jll v0.4.0+1 - [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1 - [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1 - [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1 + [cc61e674] Xorg_libxkbfile_jll v1.2.0+0 + [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.6+0 + [12413925] Xorg_xcb_util_image_jll v0.4.1+0 + [2def613f] Xorg_xcb_util_jll v0.4.1+0 + [975044d2] Xorg_xcb_util_keysyms_jll v0.4.1+0 + [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.10+0 + [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.2+0 [35661453] Xorg_xkbcomp_jll v1.4.7+0 - [33bec58e] Xorg_xkeyboard_config_jll v2.44.0+0 + [33bec58e] Xorg_xkeyboard_config_jll v2.47.0+2 [c5fb5394] Xorg_xtrans_jll v1.6.0+0 [8f1865be] ZeroMQ_jll v4.3.6+0 [3161d3a3] Zstd_jll v1.5.7+1 - [35ca27e7] eudev_jll v3.2.9+0 - [214eeab7] fzf_jll v0.61.1+0 - [1a1c6b14] gperf_jll v3.3.0+0 - [a4ae2306] libaom_jll v3.11.0+0 - [0ac62f75] libass_jll v0.15.2+0 + [35ca27e7] eudev_jll v3.2.14+0 +⌅ [214eeab7] fzf_jll v0.61.1+0 + [a4ae2306] libaom_jll v3.14.1+0 + [0ac62f75] libass_jll v0.17.5+0 [1183f4f0] libdecor_jll v0.2.2+0 - [2db6ffa8] libevdev_jll v1.11.0+0 - [f638f0a6] libfdk_aac_jll v2.0.3+0 - [36db933b] libinput_jll v1.18.0+0 - [b53b4c65] libpng_jll v1.6.48+0 + [8e53e030] libdrm_jll v2.4.134+0 + [2db6ffa8] libevdev_jll v1.13.4+0 + [f638f0a6] libfdk_aac_jll v2.0.4+0 + [36db933b] libinput_jll v1.28.1+0 + [b53b4c65] libpng_jll v1.6.58+0 [a9144af2] libsodium_jll v1.0.21+0 - [f27f6e37] libvorbis_jll v1.3.7+2 - [009596ad] mtdev_jll v1.1.6+0 - [1317d2d5] oneTBB_jll v2022.0.0+0 -⌅ [1270edf5] x264_jll v2021.5.5+0 -⌅ [dfaa095f] x265_jll v3.5.0+0 - [d8fb68d0] xkbcommon_jll v1.8.1+0 + [9a156e7d] libva_jll v2.23.0+0 + [f27f6e37] libvorbis_jll v1.3.8+0 + [009596ad] mtdev_jll v1.1.7+0 + [1317d2d5] oneTBB_jll v2022.3.0+0 +⌅ [1270edf5] x264_jll v10164.0.1+0 + [dfaa095f] x265_jll v4.1.0+0 + [d8fb68d0] xkbcommon_jll v1.13.0+0 [0dad84c5] ArgTools v1.1.1 [56f22d72] Artifacts [2a0f44e3] Base64 diff --git a/markdown/Jumps/EGFR_Benchmark.md b/markdown/Jumps/EGFR_Benchmark.md index a970188db..362cbfb82 100644 --- a/markdown/Jumps/EGFR_Benchmark.md +++ b/markdown/Jumps/EGFR_Benchmark.md @@ -3,7 +3,8 @@ author: ~ title: "EGFR Network Benchmark" --- ```julia -using JumpProcesses, Plots, StableRNGs, BenchmarkTools, ReactionNetworkImporters, StatsPlots, Catalyst +using JumpProcesses, Plots, StableRNGs, BenchmarkTools, ReactionNetworkImporters, + StatsPlots, Catalyst ``` @@ -14,62 +15,72 @@ 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)) +egfr_net = complete(loadrxnetwork(BNGNetwork(), joinpath(@__DIR__, "Data/egfr_net.net"))) +egfr_u0 = Catalyst.get_u0_map(egfr_net) +egfr_parameters = Catalyst.get_parameter_map(egfr_net) -plt = plot(title="Dimer concentrations") +plt = plot(title = "Dimer concentrations") for alg in algs - jprob = JumpProblem(complete(egfr_net.rn), dprob, alg) + jprob = JumpProblem( + egfr_net, egfr_u0, (0.0, tf), egfr_parameters; + aggregator = alg, u0_eltype = Int64 + ) sol = solve(jprob, SSAStepper(), saveat = tf/200) - plot!(plt, sol, idxs = :Dimers, label="$alg") + plot!(plt, sol, idxs = :Dimers, label = "$alg") end plot!(plt) ``` ``` +Scanning blocks...done Parsing parameters...done Creating parameters...done Parsing species...done -Creating species...done -Creating species and parameters for evaluating expressions...done -Parsing and adding reactions...done +Creating variables...done +Setting up expression bindings...done Parsing groups...done +Parsing functions...done +Parsing and adding reactions...done ``` ![](figures/EGFR_Benchmark_2_1.png) + 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] + u0 = Catalyst.get_u0_map(model) + parameters = Catalyst.get_parameter_map(model) 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)) + jprob = JumpProblem( + model, u0, (0.0, end_time), parameters; + aggregator = alg, rng, save_positions = (false, false), u0_eltype = Int64 + ) - 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 ``` @@ -81,9 +92,10 @@ benchmark_and_bar_plot (generic function with 1 method) -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()] @@ -104,17 +116,15 @@ Benchmarking RSSACR ### 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. - - ## Appendix These benchmarks are a part of the SciMLBenchmarks.jl repository, found at: [https://github.com/SciML/SciMLBenchmarks.jl](https://github.com/SciML/SciMLBenchmarks.jl). For more information on high-performance scientific machine learning, check out the SciML Open Source Software Organization [https://sciml.ai](https://sciml.ai). To locally run this benchmark, do the following commands: - ``` using SciMLBenchmarks SciMLBenchmarks.weave_file("benchmarks/Jumps","EGFR_Benchmark.jmd") @@ -123,8 +133,8 @@ SciMLBenchmarks.weave_file("benchmarks/Jumps","EGFR_Benchmark.jmd") Computer Information: ``` -Julia Version 1.10.9 -Commit 5595d20a287 (2025-03-10 12:51 UTC) +Julia Version 1.10.12 +Commit d93beab124c (2026-08-15 10:29 UTC) Build Info: Official https://julialang.org/ release Platform Info: @@ -133,432 +143,372 @@ Platform Info: WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver2) -Threads: 1 default, 0 interactive, 1 GC (on 128 virtual cores) +Threads: 128 default, 0 interactive, 64 GC (on 128 virtual cores) Environment: - JULIA_CPU_THREADS = 128 - JULIA_DEPOT_PATH = /cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953 + JULIA_NUM_THREADS = auto ``` Package Information: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Project.toml` - [6e4b80f9] BenchmarkTools v1.6.0 - [479239e8] Catalyst v15.0.8 - [8f4d0f93] Conda v1.10.2 - [a93c6f00] DataFrames v1.7.0 - [0c46a032] DifferentialEquations v7.16.1 - [31c24e10] Distributions v0.25.120 - [86223c79] Graphs v1.12.1 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 - [91a5bcdd] Plots v1.40.13 +Status `/julia/github-runners/amdci1-1/_work/SciMLBenchmarks.jl/SciMLBenchmarks.jl/benchmarks/Jumps/Project.toml` + [6e4b80f9] BenchmarkTools v1.8.0 + [479239e8] Catalyst v16.4.0 + [8f4d0f93] Conda v1.10.3 + [a93c6f00] DataFrames v1.8.2 + [0c46a032] DifferentialEquations v8.1.1 + [31c24e10] Distributions v0.25.131 + [86223c79] Graphs v1.14.0 + [faf0f6d7] JumpProblemLibrary v2.0.3 + [ccbc3e58] JumpProcesses v9.30.1 + [961ee093] ModelingToolkit v11.40.0 + [1dea7af3] OrdinaryDiffEq v7.8.1 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 + [91a5bcdd] Plots v1.41.7 [438e738f] PyCall v1.96.4 - [b4db0fb7] ReactionNetworkImporters v0.16.1 - [31c91b34] SciMLBenchmarks v0.1.3 - [860ef19b] StableRNGs v1.0.3 - [f3b207a7] StatsPlots v0.15.7 - [c3572dad] Sundials v4.28.0 + [b4db0fb7] ReactionNetworkImporters v1.5.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [860ef19b] StableRNGs v1.0.4 + [f3b207a7] StatsPlots v0.15.8 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 [37e2e46d] LinearAlgebra [9a3f8284] Random [10745b16] Statistics v1.10.0 -Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated` +Info Packages marked with ⌃ have new versions available and may be upgradable. ``` And the full manifest: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Manifest.toml` - [47edcb42] ADTypes v1.14.0 +Status `/julia/github-runners/amdci1-1/_work/SciMLBenchmarks.jl/SciMLBenchmarks.jl/benchmarks/Jumps/Manifest.toml` + [47edcb42] ADTypes v1.24.0 + [14f7f29c] AMD v0.5.3 [621f4979] AbstractFFTs v1.5.0 + [6e696c72] AbstractPlutoDingetjes v1.4.0 [1520ce14] AbstractTrees v0.4.5 - [7d9f7c33] Accessors v0.1.42 - [79e6a3ab] Adapt v4.3.0 + [7d9f7c33] Accessors v0.1.45 + [79e6a3ab] Adapt v4.7.0 [66dad0bd] AliasTables v1.1.3 - [a95523ee] AlmostBlockDiagonals v0.1.10 [ec485272] ArnoldiMethod v0.4.0 [7d9fca2a] Arpack v0.5.4 - [4fba245c] ArrayInterface v7.19.0 - [4c555306] ArrayLayouts v1.11.1 + [4fba245c] ArrayInterface v7.30.0 + [4c555306] ArrayLayouts v1.12.2 [13072b0f] AxisAlgorithms v1.1.0 - [aae01518] BandedMatrices v1.9.4 - [6e4b80f9] BenchmarkTools v1.6.0 -⌅ [e2ed5e7c] Bijections v0.1.10 - [d1d4a3ce] BitFlags v0.1.9 - [62783981] BitTwiddlingConvenienceFunctions v0.1.6 - [8e7c35d0] BlockArrays v1.6.3 - [764a87c0] BoundaryValueDiffEq v5.17.0 - [7227322d] BoundaryValueDiffEqAscher v1.6.1 - [56b672f2] BoundaryValueDiffEqCore v1.9.0 - [85d9eb09] BoundaryValueDiffEqFIRK v1.7.0 - [1a22d4ce] BoundaryValueDiffEqMIRK v1.7.0 - [9255f1d6] BoundaryValueDiffEqMIRKN v1.6.1 - [ed55bfe0] BoundaryValueDiffEqShooting v1.7.0 - [70df07ce] BracketingNonlinearSolve v1.3.0 + [aae01518] BandedMatrices v1.12.0 + [6e4b80f9] BenchmarkTools v1.8.0 + [e2ed5e7c] Bijections v0.2.2 + [b2a6c25c] BinaryHeaps v1.1.0 + [caf10ac8] BipartiteGraphs v0.1.12 + [8e7c35d0] BlockArrays v1.10.0 + [70df07ce] BracketingNonlinearSolve v1.12.6 [fa961155] CEnum v0.5.0 - [2a0fbf3d] CPUSummary v0.2.6 - [479239e8] Catalyst v15.0.8 - [d360d2e6] ChainRulesCore v1.25.1 - [fb6a15b2] CloseOpenIntervals v0.1.13 + [479239e8] Catalyst v16.4.0 + [d360d2e6] ChainRulesCore v1.26.1 [aaaa29a8] Clustering v0.15.8 - [944b1d66] CodecZlib v0.7.8 - [35d6a980] ColorSchemes v3.29.0 + [35d6a980] ColorSchemes v3.31.0 [3da002f7] ColorTypes v0.12.1 [c3611d14] ColorVectorSpace v0.11.0 [5ae59095] Colors v0.13.1 - [861a8166] Combinatorics v1.0.3 - [a80b9123] CommonMark v0.9.1 - [38540f10] CommonSolve v0.2.4 +⌅ [861a8166] Combinatorics v1.0.2 + [38540f10] CommonSolve v0.2.14 [bbf7d656] CommonSubexpressions v0.3.1 - [f70d9fcc] CommonWorldInvalidations v1.0.0 - [34da2185] Compat v4.16.0 + [f70d9fcc] CommonWorldInvalidations v1.2.0 + [34da2185] Compat v4.18.1 [b152e2b5] CompositeTypes v0.1.4 [a33af91c] CompositionsBase v0.1.2 - [2569d6c7] ConcreteStructs v0.2.3 - [f0e56b4a] ConcurrentUtilities v2.5.0 - [8f4d0f93] Conda v1.10.2 - [187b0558] ConstructionBase v1.5.8 + [2569d6c7] ConcreteStructs v0.2.8 + [8f4d0f93] Conda v1.10.3 + [187b0558] ConstructionBase v1.6.0 [d38c429a] Contour v0.6.3 - [adafc99b] CpuId v0.3.1 - [a8cc5b0e] Crayons v4.1.1 + [a8cc5b0e] Crayons v4.2.0 [9a962f9c] DataAPI v1.16.0 - [a93c6f00] DataFrames v1.7.0 - [864edb3b] DataStructures v0.18.22 + [a93c6f00] DataFrames v1.8.2 + [864edb3b] DataStructures v0.19.6 [e2d170a0] DataValueInterfaces v1.0.0 - [bcd4f6db] DelayDiffEq v5.53.1 [8bb1440f] DelimitedFiles v1.9.1 - [2b5f629d] DiffEqBase v6.175.0 - [459566f4] DiffEqCallbacks v4.6.0 - [77a26b50] DiffEqNoiseProcess v5.24.1 + [2b5f629d] DiffEqBase v7.19.0 + [459566f4] DiffEqCallbacks v4.19.3 [163ba53b] DiffResults v1.1.0 - [b552c78f] DiffRules v1.15.1 - [0c46a032] DifferentialEquations v7.16.1 -⌅ [a0c0ee7d] DifferentiationInterface v0.6.54 - [8d63f2c5] DispatchDoctor v0.4.19 + [b552c78f] DiffRules v1.16.0 + [0c46a032] DifferentialEquations v8.1.1 + [a0c0ee7d] DifferentiationInterface v0.7.21 + [8d63f2c5] DispatchDoctor v0.4.28 [b4f34e82] Distances v0.10.12 - [31c24e10] Distributions v0.25.120 - [ffbed154] DocStringExtensions v0.9.4 - [5b8099bc] DomainSets v0.7.15 - [7c1d4256] DynamicPolynomials v0.6.2 - [06fc5a27] DynamicQuantities v1.8.0 - [4e289a0a] EnumX v1.0.5 -⌃ [f151be2c] EnzymeCore v0.8.10 - [460bff9d] ExceptionUnwrapping v0.1.11 - [d4d017d3] ExponentialUtilities v1.27.0 - [e2ba6199] ExprTools v0.1.10 + [31c24e10] Distributions v0.25.131 + [ffbed154] DocStringExtensions v0.9.5 + [5b8099bc] DomainSets v0.8.1 + [7c1d4256] DynamicPolynomials v0.6.7 + [06fc5a27] DynamicQuantities v1.13.0 + [4e289a0a] EnumX v1.0.7 + [f151be2c] EnzymeCore v0.8.21 + [e2ba6199] ExprTools v0.1.11 [55351af7] ExproniconLite v0.10.14 - [c87230d0] FFMPEG v0.4.2 - [7a1cc6ca] FFTW v1.8.1 - [9d29842c] FastAlmostBandedMatrices v0.1.5 - [7034ab61] FastBroadcast v0.3.5 + [c87230d0] FFMPEG v0.4.5 + [b86e33f2] FFTA v0.3.1 + [7034ab61] FastBroadcast v1.4.0 [9aa1b823] FastClosures v0.3.2 - [442a2c76] FastGaussQuadrature v1.0.2 - [a4df4552] FastPower v1.1.2 - [1a297f60] FillArrays v1.13.0 - [64ca27bc] FindFirstFunctions v1.4.1 - [6a86dc24] FiniteDiff v2.27.0 - [53c48c17] FixedPointNumbers v0.8.5 + [a4df4552] FastPower v1.5.0 + [1a297f60] FillArrays v1.17.0 + [64ca27bc] FindFirstFunctions v3.2.1 + [6a86dc24] FiniteDiff v2.33.0 +⌅ [53c48c17] FixedPointNumbers v0.8.6 [1fa38f19] Format v1.3.7 -⌅ [f6369f11] ForwardDiff v0.10.38 + [f6369f11] ForwardDiff v1.4.5 + [a85aefff] FunctionMaps v0.1.2 [069b7b12] FunctionWrappers v1.1.3 - [77dc65aa] FunctionWrappersWrappers v0.1.3 - [d9f16b24] Functors v0.5.2 + [77dc65aa] FunctionWrappersWrappers v1.13.0 [46192b85] GPUArraysCore v0.2.0 - [28b8d3ca] GR v0.73.16 - [c145ed77] GenericSchur v0.5.5 - [d7ba0133] Git v1.4.0 - [c27321d9] Glob v1.3.1 - [86223c79] Graphs v1.12.1 + [28b8d3ca] GR v0.73.27 + [a0844989] Gamma v1.2.0 + [d7ba0133] Git v1.5.0 + [86223c79] Graphs v1.14.0 [42e2da0e] Grisu v1.0.2 - [cd3eb016] HTTP v1.10.16 - [eafb193a] Highlights v0.5.3 - [34004b35] HypergeometricFunctions v0.3.28 -⌃ [7073ff75] IJulia v1.27.0 - [615f187c] IfElse v0.1.1 +⌅ [eafb193a] Highlights v0.5.3 + [34004b35] HypergeometricFunctions v0.3.30 + [7073ff75] IJulia v1.34.4 + [3263718b] ImplicitDiscreteSolve v2.2.0 [d25df0c9] Inflate v0.1.5 - [842dd82b] InlineStrings v1.4.3 - [18e54dd8] IntegerMathUtils v0.1.2 -⌅ [a98d9a8b] Interpolations v0.15.1 - [8197267c] IntervalSets v0.7.11 + [842dd82b] InlineStrings v1.4.5 + [18e54dd8] IntegerMathUtils v0.1.4 + [a98d9a8b] Interpolations v0.16.3 + [8197267c] IntervalSets v0.7.14 [3587e190] InverseFunctions v0.1.17 [41ab1584] InvertedIndices v1.3.1 - [92d709cd] IrrationalConstants v0.2.4 + [92d709cd] IrrationalConstants v0.2.6 [82899510] IteratorInterfaceExtensions v1.0.0 [1019f520] JLFzf v0.1.11 - [692b3bcd] JLLWrappers v1.7.0 - [682c06a0] JSON v0.21.4 + [692b3bcd] JLLWrappers v1.8.0 +⌅ [682c06a0] JSON v0.21.4 [ae98c720] Jieko v0.2.1 - [98e50ef6] JuliaFormatter v2.1.2 -⌅ [70703baa] JuliaSyntax v0.4.10 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 - [5ab0869b] KernelDensity v0.6.9 - [ba0b0d4f] Krylov v0.10.1 - [7f56f5a3] LSODA v0.7.5 - [b964fa9f] LaTeXStrings v1.4.0 - [23fbe1c1] Latexify v0.16.8 - [10f19ff3] LayoutPointers v0.1.17 - [5078a376] LazyArrays v2.6.1 - [2d8b4e74] LevyArea v1.0.0 - [87fe0de2] LineSearch v0.1.4 - [d3d80556] LineSearches v7.3.0 - [7ed4a6bd] LinearSolve v3.16.0 - [2ab3a3ac] LogExpFunctions v0.3.29 - [e6f89c97] LoggingExtras v1.1.0 - [d8e11817] MLStyle v0.4.17 + [faf0f6d7] JumpProblemLibrary v2.0.3 + [ccbc3e58] JumpProcesses v9.30.1 + [5ab0869b] KernelDensity v0.6.12 + [ba0b0d4f] Krylov v0.10.9 + [2faa5264] LHLFactorization v2.2.1 + [7f56f5a3] LSODA v1.2.0 + [b964fa9f] LaTeXStrings v1.4.1 + [23fbe1c1] Latexify v0.16.12 + [87fe0de2] LineSearch v0.1.16 + [7ed4a6bd] LinearSolve v5.14.1 + [2ab3a3ac] LogExpFunctions v1.0.1 + [e6f89c97] LoggingExtras v1.2.0 [1914dd2f] MacroTools v0.5.16 - [d125e4d3] ManualMemory v0.1.8 - [a3b82374] MatrixFactorizations v3.0.1 - [bb5d69b7] MaybeInplace v0.1.4 - [739be429] MbedTLS v1.1.9 - [442fdcdd] Measures v0.3.2 + [bb5d69b7] MaybeInplace v0.1.8 + [442fdcdd] Measures v0.3.3 [e1d29d7a] Missings v1.2.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [2e0e35c7] Moshi v0.3.5 - [46d2c3a1] MuladdMacro v0.2.4 - [102ac46a] MultivariatePolynomials v0.5.9 - [6f286f6a] MultivariateStats v0.10.3 - [ffc61752] Mustache v1.0.20 - [d8a4904e] MutableArithmetics v1.6.4 - [d41bc354] NLSolversBase v7.9.1 - [2774e3e8] NLsolve v4.5.1 - [77ba4419] NaNMath v1.1.3 - [b8a86587] NearestNeighbors v0.4.21 - [8913a72c] NonlinearSolve v4.9.0 - [be0214bd] NonlinearSolveBase v1.12.0 - [5959db7a] NonlinearSolveFirstOrder v1.5.0 - [9a2c21bd] NonlinearSolveQuasiNewton v1.6.0 - [26075421] NonlinearSolveSpectralMethods v1.2.0 + [961ee093] ModelingToolkit v11.40.0 +⌃ [7771a370] ModelingToolkitBase v1.68.0 + [6bb917b9] ModelingToolkitTearing v1.20.6 + [2e0e35c7] Moshi v0.3.12 + [46d2c3a1] MuladdMacro v0.2.7 + [102ac46a] MultivariatePolynomials v0.5.19 + [6f286f6a] MultivariateStats v0.10.5 + [ffc61752] Mustache v1.0.21 + [d8a4904e] MutableArithmetics v1.8.0 + [77ba4419] NaNMath v1.1.4 + [b8a86587] NearestNeighbors v0.4.29 + [8913a72c] NonlinearSolve v4.28.1 + [be0214bd] NonlinearSolveBase v2.48.2 + [5959db7a] NonlinearSolveFirstOrder v2.4.1 + [9a2c21bd] NonlinearSolveQuasiNewton v1.15.2 + [26075421] NonlinearSolveSpectralMethods v1.8.1 [510215fc] Observables v0.5.5 [6fe1bfb0] OffsetArrays v1.17.0 - [4d8831e6] OpenSSL v1.5.0 - [429524aa] Optim v1.12.0 - [bac558e1] OrderedCollections v1.8.1 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [89bda076] OrdinaryDiffEqAdamsBashforthMoulton v1.2.0 - [6ad6398a] OrdinaryDiffEqBDF v1.5.1 - [bbf590c4] OrdinaryDiffEqCore v1.26.0 - [50262376] OrdinaryDiffEqDefault v1.4.0 - [4302a76b] OrdinaryDiffEqDifferentiation v1.9.1 - [9286f039] OrdinaryDiffEqExplicitRK v1.1.0 - [e0540318] OrdinaryDiffEqExponentialRK v1.4.0 - [becaefa8] OrdinaryDiffEqExtrapolation v1.5.0 - [5960d6e9] OrdinaryDiffEqFIRK v1.12.0 - [101fe9f7] OrdinaryDiffEqFeagin v1.1.0 - [d3585ca7] OrdinaryDiffEqFunctionMap v1.1.1 - [d28bc4f8] OrdinaryDiffEqHighOrderRK v1.1.0 - [9f002381] OrdinaryDiffEqIMEXMultistep v1.3.0 - [521117fe] OrdinaryDiffEqLinear v1.3.0 - [1344f307] OrdinaryDiffEqLowOrderRK v1.2.0 - [b0944070] OrdinaryDiffEqLowStorageRK v1.3.0 - [127b3ac7] OrdinaryDiffEqNonlinearSolve v1.10.0 - [c9986a66] OrdinaryDiffEqNordsieck v1.1.0 - [5dd0a6cf] OrdinaryDiffEqPDIRK v1.3.1 - [5b33eab2] OrdinaryDiffEqPRK v1.1.0 - [04162be5] OrdinaryDiffEqQPRK v1.1.0 - [af6ede74] OrdinaryDiffEqRKN v1.1.0 - [43230ef6] OrdinaryDiffEqRosenbrock v1.10.1 - [2d112036] OrdinaryDiffEqSDIRK v1.3.0 - [669c94d9] OrdinaryDiffEqSSPRK v1.3.0 - [e3e12d00] OrdinaryDiffEqStabilizedIRK v1.3.0 - [358294b1] OrdinaryDiffEqStabilizedRK v1.1.0 - [fa646aed] OrdinaryDiffEqSymplecticRK v1.3.0 - [b1df2697] OrdinaryDiffEqTsit5 v1.1.0 - [79d7bb75] OrdinaryDiffEqVerner v1.2.0 - [90014a1f] PDMats v0.11.35 - [d96e819e] Parameters v0.12.3 - [69de0a69] Parsers v2.8.3 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 +⌅ [bac558e1] OrderedCollections v1.8.2 + [1dea7af3] OrdinaryDiffEq v7.8.1 + [6ad6398a] OrdinaryDiffEqBDF v2.4.5 + [bbf590c4] OrdinaryDiffEqCore v4.15.2 + [50262376] OrdinaryDiffEqDefault v2.6.0 + [4302a76b] OrdinaryDiffEqDifferentiation v3.11.0 + [127b3ac7] OrdinaryDiffEqNonlinearSolve v2.9.2 + [43230ef6] OrdinaryDiffEqRosenbrock v2.7.1 + [b4bd8bb3] OrdinaryDiffEqRosenbrockTableaus v2.4.2 + [2d112036] OrdinaryDiffEqSDIRK v2.9.1 + [b1df2697] OrdinaryDiffEqTsit5 v2.1.4 + [79d7bb75] OrdinaryDiffEqVerner v2.4.1 + [90014a1f] PDMats v0.11.41 +⌅ [d96e819e] Parameters v0.12.3 +⌅ [69de0a69] Parsers v2.8.7 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 [ccf2f8ad] PlotThemes v3.3.0 - [995b91a9] PlotUtils v1.4.3 - [91a5bcdd] Plots v1.40.13 - [e409e4f3] PoissonRandom v0.4.4 - [f517fe37] Polyester v0.7.18 - [1d0040c9] PolyesterWeave v0.2.2 + [995b91a9] PlotUtils v1.4.4 + [91a5bcdd] Plots v1.41.7 + [e409e4f3] PoissonRandom v0.4.13 [2dfb63ee] PooledArrays v1.4.3 - [85a6dd25] PositiveFactorizations v0.2.4 - [d236fae5] PreallocationTools v0.4.27 + [d236fae5] PreallocationTools v1.7.1 ⌅ [aea7be01] PrecompileTools v1.2.1 - [21216c6a] Preferences v1.4.3 - [08abe8d2] PrettyTables v2.4.0 + [21216c6a] Preferences v1.5.2 + [08abe8d2] PrettyTables v3.4.8 [27ebfcd6] Primes v0.5.7 - [43287f4e] PtrArrays v1.3.0 + [43287f4e] PtrArrays v1.4.0 + [0c0d3e7f] PureKLU v1.4.1 [438e738f] PyCall v1.96.4 - [1fd47b50] QuadGK v2.11.2 - [74087812] Random123 v1.7.1 - [e6cf234a] RandomNumbers v1.6.0 + [1fd47b50] QuadGK v2.11.3 [c84ed2f1] Ratios v0.4.5 - [b4db0fb7] ReactionNetworkImporters v0.16.1 + [b4db0fb7] ReactionNetworkImporters v1.5.0 + [988b38a3] ReadOnlyArrays v0.2.0 + [795d4caa] ReadOnlyDicts v1.0.1 [3cdcf5f2] RecipesBase v1.3.4 [01d81517] RecipesPipeline v0.6.12 - [731186ca] RecursiveArrayTools v3.33.0 + [731186ca] RecursiveArrayTools v4.5.1 [189a3867] Reexport v1.2.2 [05181044] RelocatableFolders v1.0.1 [ae029012] Requires v1.3.1 - [ae5879a3] ResettableStacks v1.1.1 - [79098fc4] Rmath v0.8.0 - [7e49a35a] RuntimeGeneratedFunctions v0.5.15 - [9dfe8606] SCCNonlinearSolve v1.2.0 - [94e857df] SIMDTypes v0.1.0 - [0bca4576] SciMLBase v2.96.0 - [31c91b34] SciMLBenchmarks v0.1.3 - [19f34311] SciMLJacobianOperators v0.1.6 -⌃ [c0aeaf25] SciMLOperators v0.4.0 - [53ae85a6] SciMLStructures v1.7.0 - [6c6a2e73] Scratch v1.2.1 - [91c51154] SentinelArrays v1.4.8 + [9fe22ead] RespecializeParams v1.3.0 + [79098fc4] Rmath v0.9.0 + [f2b01f46] Roots v3.0.7 + [7e49a35a] RuntimeGeneratedFunctions v0.5.25 + [9dfe8606] SCCNonlinearSolve v1.15.1 + [0bca4576] SciMLBase v3.50.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [19f34311] SciMLJacobianOperators v0.1.18 + [a6db7da4] SciMLLogging v2.1.0 + [c0aeaf25] SciMLOperators v1.30.0 + [431bcebd] SciMLPublic v1.3.0 + [53ae85a6] SciMLStructures v1.10.5 + [6c6a2e73] Scratch v1.3.0 + [91c51154] SentinelArrays v1.4.10 [efcf1570] Setfield v1.1.2 [992d4aef] Showoff v1.0.3 - [777ac1f9] SimpleBufferStream v1.2.0 - [727e6d20] SimpleNonlinearSolve v2.5.0 - [699a6c99] SimpleTraits v0.9.4 - [ce78b400] SimpleUnPack v1.1.0 - [b85f4697] SoftGlobalScope v1.1.0 - [a2af1166] SortingAlgorithms v1.2.1 - [9f842d2f] SparseConnectivityTracer v0.6.18 - [0a514795] SparseMatrixColorings v0.4.20 - [276daf66] SpecialFunctions v2.5.1 - [860ef19b] StableRNGs v1.0.3 - [aedffcd0] Static v1.2.0 - [0d7ed370] StaticArrayInterface v1.8.0 - [90137ffa] StaticArrays v1.9.13 - [1e83bf80] StaticArraysCore v1.4.3 - [82ae8749] StatsAPI v1.7.1 - [2913bbd2] StatsBase v0.34.5 - [4c63d2b9] StatsFuns v1.5.0 - [f3b207a7] StatsPlots v0.15.7 - [9672c7b4] SteadyStateDiffEq v2.5.0 - [789caeaf] StochasticDiffEq v6.80.0 - [7792a7ef] StrideArraysCore v0.5.7 + [727e6d20] SimpleNonlinearSolve v2.14.1 + [699a6c99] SimpleTraits v0.9.6 + [a2af1166] SortingAlgorithms v1.2.3 + [a57abbd0] SparseColumnPivotedQR v2.1.7 + [0a514795] SparseMatrixColorings v0.4.27 + [276daf66] SpecialFunctions v2.9.0 + [860ef19b] StableRNGs v1.0.4 + [0c0c59c1] StarAlgebras v0.3.0 + [64909d44] StateSelection v1.11.1 + [90137ffa] StaticArrays v1.9.19 + [1e83bf80] StaticArraysCore v1.4.4 + [82ae8749] StatsAPI v1.8.0 + [2913bbd2] StatsBase v0.34.13 + [4c63d2b9] StatsFuns v2.2.1 + [f3b207a7] StatsPlots v0.15.8 [69024149] StringEncodings v0.3.7 - [892a3eda] StringManipulation v0.4.1 - [c3572dad] Sundials v4.28.0 - [2efcf032] SymbolicIndexingInterface v0.3.40 - [19f23fe9] SymbolicLimits v0.2.2 - [d1185830] SymbolicUtils v3.29.0 - [0c5d862f] Symbolics v6.40.0 + [892a3eda] StringManipulation v0.5.0 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 + [19f23fe9] SymbolicLimits v1.2.0 +⌅ [d1185830] SymbolicUtils v4.45.0 + [0c5d862f] Symbolics v7.39.0 [ab02a1b2] TableOperations v1.2.0 [3783bdb8] TableTraits v1.0.1 - [bd369af6] Tables v1.12.0 - [ed4db957] TaskLocalValues v0.1.2 + [bd369af6] Tables v1.14.0 + [ed4db957] TaskLocalValues v0.1.3 [62fd8b95] TensorCore v0.1.1 [8ea1fca8] TermInterface v2.0.0 - [1c621080] TestItems v1.0.0 - [8290d209] ThreadingUtilities v0.5.4 - [a759f4b9] TimerOutputs v0.5.29 - [3bb67fe8] TranscodingStreams v0.11.3 - [410a4b4d] Tricks v0.1.10 + [1c621080] TestItems v1.1.0 + [a759f4b9] TimerOutputs v1.2.0 + [410a4b4d] Tricks v0.1.13 [781d530d] TruncatedStacktraces v1.4.0 - [5c2747f8] URIs v1.5.2 [3a884ed6] UnPack v1.0.2 [1cfade01] UnicodeFun v0.4.1 - [1986cc42] Unitful v1.22.1 - [45397f5d] UnitfulLatexify v1.7.0 - [a7c27f48] Unityper v0.1.6 [41fe7b60] Unzip v0.2.0 [81def892] VersionParsing v1.3.0 - [897b6980] WeakValueDicts v0.1.0 + [d30d5f5c] WeakCacheSets v0.1.0 [44d3d7a6] Weave v0.10.12 - [cc8bc4a8] Widgets v0.6.7 - [efce3f68] WoodburyMatrices v1.0.0 - [ddb6d928] YAML v0.4.14 - [c2297ded] ZMQ v1.4.0 -⌅ [68821587] Arpack_jll v3.5.1+1 + [cc8bc4a8] Widgets v0.6.8 + [efce3f68] WoodburyMatrices v1.1.0 + [ddb6d928] YAML v0.4.16 + [c2297ded] ZMQ v1.5.1 +⌅ [68821587] Arpack_jll v3.5.2+0 [6e34b625] Bzip2_jll v1.0.9+0 - [83423d85] Cairo_jll v1.18.5+0 + [83423d85] Cairo_jll v1.18.7+0 [ee1fde0b] Dbus_jll v1.16.2+0 [2702e6a9] EpollShim_jll v0.0.20230411+1 - [2e619515] Expat_jll v2.6.5+0 -⌅ [b22a6f82] FFMPEG_jll v4.4.4+1 - [f5851436] FFTW_jll v3.3.11+0 - [a3f928ae] Fontconfig_jll v2.16.0+0 - [d7e528f0] FreeType2_jll v2.13.4+0 + [2e619515] Expat_jll v2.8.3+0 +⌅ [b22a6f82] FFMPEG_jll v8.1.2+0 + [a3f928ae] Fontconfig_jll v2.17.1+0 + [d7e528f0] FreeType2_jll v2.14.3+1 [559328eb] FriBidi_jll v1.0.17+0 - [0656b61e] GLFW_jll v3.4.0+2 - [d2c73de3] GR_jll v0.73.16+0 - [78b55507] Gettext_jll v0.21.0+0 - [f8c6e375] Git_jll v2.49.0+0 - [7746bdde] Glib_jll v2.84.0+0 - [3b182d85] Graphite2_jll v1.3.15+0 - [2e76f6c2] HarfBuzz_jll v8.5.1+0 - [1d5cc7b8] IntelOpenMP_jll v2025.0.4+0 - [aacddb02] JpegTurbo_jll v3.1.1+0 - [c1c5ebd0] LAME_jll v3.100.2+0 - [88015f11] LERC_jll v4.0.1+0 - [1d63c593] LLVMOpenMP_jll v18.1.8+0 + [0656b61e] GLFW_jll v3.5.1+0 + [d2c73de3] GR_jll v0.73.27+0 +⌅ [b0724c58] GettextRuntime_jll v0.22.4+0 + [61579ee1] Ghostscript_jll v9.55.1+0 + [020c3dae] Git_LFS_jll v3.7.1+0 + [f8c6e375] Git_jll v2.55.0+0 + [7746bdde] Glib_jll v2.88.3+0 + [3b182d85] Graphite2_jll v1.3.16+0 + [2e76f6c2] HarfBuzz_jll v100.14003.0+0 + [1d5cc7b8] IntelOpenMP_jll v2025.2.0+0 + [aacddb02] JpegTurbo_jll v3.2.0+1 + [c1c5ebd0] LAME_jll v3.100.3+0 + [88015f11] LERC_jll v4.1.0+0 + [1d63c593] LLVMOpenMP_jll v22.1.7+0 [aae0fff6] LSODA_jll v0.1.2+0 - [dd4b983a] LZO_jll v2.10.3+0 - [e9f186c6] Libffi_jll v3.4.7+0 +⌅ [e9f186c6] Libffi_jll v3.4.7+0 [7e76a0d4] Libglvnd_jll v1.7.1+1 [94ce4f54] Libiconv_jll v1.18.0+0 - [4b2f31a3] Libmount_jll v2.41.0+0 - [89763e89] Libtiff_jll v4.7.1+0 - [38a345b3] Libuuid_jll v2.41.0+0 - [856f044c] MKL_jll v2025.0.1+1 - [e7412a2a] Ogg_jll v1.3.5+1 - [9bd350c2] OpenSSH_jll v10.0.1+0 - [458c3c95] OpenSSL_jll v3.5.0+0 + [4b2f31a3] Libmount_jll v2.42.0+0 + [89763e89] Libtiff_jll v4.7.3+0 + [38a345b3] Libuuid_jll v2.42.0+0 + [856f044c] MKL_jll v2025.2.0+0 + [e7412a2a] Ogg_jll v1.3.6+0 +⌅ [656ef2d0] OpenBLAS32_jll v0.3.24+0 + [9bd350c2] OpenSSH_jll v10.5.1+0 + [458c3c95] OpenSSL_jll v3.5.8+0 [efe28fd5] OpenSpecFun_jll v0.5.6+0 - [91d4177d] Opus_jll v1.3.3+0 - [36c8627f] Pango_jll v1.56.3+0 -⌅ [30392449] Pixman_jll v0.44.2+0 - [c0090381] Qt6Base_jll v6.8.2+1 - [629bc702] Qt6Declarative_jll v6.8.2+1 - [ce943373] Qt6ShaderTools_jll v6.8.2+1 - [e99dba38] Qt6Wayland_jll v6.8.2+0 - [f50d1b31] Rmath_jll v0.5.1+0 -⌅ [fb77eaff] Sundials_jll v5.2.2+0 + [91d4177d] Opus_jll v1.6.1+0 + [36c8627f] Pango_jll v1.58.2+0 + [30392449] Pixman_jll v0.46.4+0 + [c0090381] Qt6Base_jll v6.10.2+2 + [629bc702] Qt6Declarative_jll v6.10.2+2 + [ce943373] Qt6ShaderTools_jll v6.10.2+1 + [6de9746b] Qt6Svg_jll v6.10.2+0 + [e99dba38] Qt6Wayland_jll v6.10.2+1 + [f50d1b31] Rmath_jll v0.5.2+0 +⌅ [ca45d3f4] SuiteSparse32_jll v5.10.1+0 + [fb77eaff] Sundials_jll v7.5.0+0 [a44049a8] Vulkan_Loader_jll v1.3.243+0 - [a2964d1f] Wayland_jll v1.23.1+0 - [2381bf8a] Wayland_protocols_jll v1.36.0+0 -⌅ [02c8fc9c] XML2_jll v2.13.6+1 - [ffd25f8a] XZ_jll v5.8.1+0 + [a2964d1f] Wayland_jll v1.24.0+0 + [ffd25f8a] XZ_jll v5.8.3+0 [f67eecfb] Xorg_libICE_jll v1.1.2+0 [c834827a] Xorg_libSM_jll v1.2.6+0 - [4f6342f7] Xorg_libX11_jll v1.8.12+0 + [4f6342f7] Xorg_libX11_jll v1.8.13+0 [0c0b7dd1] Xorg_libXau_jll v1.0.13+0 [935fb764] Xorg_libXcursor_jll v1.2.4+0 [a3789734] Xorg_libXdmcp_jll v1.1.6+0 - [1082639a] Xorg_libXext_jll v1.3.7+0 - [d091e8ba] Xorg_libXfixes_jll v6.0.1+0 - [a51aa0fd] Xorg_libXi_jll v1.8.3+0 - [d1454406] Xorg_libXinerama_jll v1.1.6+0 - [ec84b674] Xorg_libXrandr_jll v1.5.5+0 + [1082639a] Xorg_libXext_jll v1.3.8+0 + [d091e8ba] Xorg_libXfixes_jll v6.0.2+0 + [a51aa0fd] Xorg_libXi_jll v1.8.4+0 + [d1454406] Xorg_libXinerama_jll v1.1.7+0 + [ec84b674] Xorg_libXrandr_jll v1.5.6+0 [ea2f1a96] Xorg_libXrender_jll v0.9.12+0 + [a65dc6b1] Xorg_libpciaccess_jll v0.19.0+0 [c7cfdc94] Xorg_libxcb_jll v1.17.1+0 - [cc61e674] Xorg_libxkbfile_jll v1.1.3+0 - [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0 - [12413925] Xorg_xcb_util_image_jll v0.4.0+1 - [2def613f] Xorg_xcb_util_jll v0.4.0+1 - [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1 - [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1 - [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1 + [cc61e674] Xorg_libxkbfile_jll v1.2.0+0 + [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.6+0 + [12413925] Xorg_xcb_util_image_jll v0.4.1+0 + [2def613f] Xorg_xcb_util_jll v0.4.1+0 + [975044d2] Xorg_xcb_util_keysyms_jll v0.4.1+0 + [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.10+0 + [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.2+0 [35661453] Xorg_xkbcomp_jll v1.4.7+0 - [33bec58e] Xorg_xkeyboard_config_jll v2.44.0+0 + [33bec58e] Xorg_xkeyboard_config_jll v2.47.0+2 [c5fb5394] Xorg_xtrans_jll v1.6.0+0 [8f1865be] ZeroMQ_jll v4.3.6+0 [3161d3a3] Zstd_jll v1.5.7+1 - [35ca27e7] eudev_jll v3.2.9+0 - [214eeab7] fzf_jll v0.61.1+0 - [1a1c6b14] gperf_jll v3.3.0+0 - [a4ae2306] libaom_jll v3.11.0+0 - [0ac62f75] libass_jll v0.15.2+0 + [35ca27e7] eudev_jll v3.2.14+0 +⌅ [214eeab7] fzf_jll v0.61.1+0 + [a4ae2306] libaom_jll v3.14.1+0 + [0ac62f75] libass_jll v0.17.5+0 [1183f4f0] libdecor_jll v0.2.2+0 - [2db6ffa8] libevdev_jll v1.11.0+0 - [f638f0a6] libfdk_aac_jll v2.0.3+0 - [36db933b] libinput_jll v1.18.0+0 - [b53b4c65] libpng_jll v1.6.48+0 + [8e53e030] libdrm_jll v2.4.134+0 + [2db6ffa8] libevdev_jll v1.13.4+0 + [f638f0a6] libfdk_aac_jll v2.0.4+0 + [36db933b] libinput_jll v1.28.1+0 + [b53b4c65] libpng_jll v1.6.58+0 [a9144af2] libsodium_jll v1.0.21+0 - [f27f6e37] libvorbis_jll v1.3.7+2 - [009596ad] mtdev_jll v1.1.6+0 - [1317d2d5] oneTBB_jll v2022.0.0+0 -⌅ [1270edf5] x264_jll v2021.5.5+0 -⌅ [dfaa095f] x265_jll v3.5.0+0 - [d8fb68d0] xkbcommon_jll v1.8.1+0 + [9a156e7d] libva_jll v2.23.0+0 + [f27f6e37] libvorbis_jll v1.3.8+0 + [009596ad] mtdev_jll v1.1.7+0 + [1317d2d5] oneTBB_jll v2022.3.0+0 +⌅ [1270edf5] x264_jll v10164.0.1+0 + [dfaa095f] x265_jll v4.1.0+0 + [d8fb68d0] xkbcommon_jll v1.13.0+0 [0dad84c5] ArgTools v1.1.1 [56f22d72] Artifacts [2a0f44e3] Base64 diff --git a/markdown/Jumps/Mendes_multistate_example.md b/markdown/Jumps/Mendes_multistate_example.md index d1e93a047..ff78682f6 100644 --- a/markdown/Jumps/Mendes_multistate_example.md +++ b/markdown/Jumps/Mendes_multistate_example.md @@ -20,9 +20,10 @@ fmt = :png Our model is + ```julia jprob = JumpProblemLibrary.prob_jump_multistate -rn = jprob.network +rn = jprob.network reactions(rn) ``` @@ -53,43 +54,47 @@ 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 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, jprob.u0, (0.0, tf), jprob.rates; + aggregator = 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) ``` ![](figures/Mendes_multistate_example_4_1.png) @@ -117,7 +122,10 @@ run_benchmark! (generic function with 1 method) nsims = 100 benchmarks = Vector{Vector{Float64}}() for method in methods - jump_prob = JumpProblem(rn, prob, method, save_positions=(false, false)) + jump_prob = JumpProblem( + rn, jprob.u0, (0.0, tf), jprob.rates; + aggregator = method, save_positions = (false, false) + ) stepper = SSAStepper() time = Vector{Float64}(undef, nsims) run_benchmark!(time, jump_prob, stepper) @@ -127,9 +135,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]) @@ -137,12 +145,14 @@ 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") ``` @@ -155,7 +165,6 @@ title!("Multistate Model") These benchmarks are a part of the SciMLBenchmarks.jl repository, found at: [https://github.com/SciML/SciMLBenchmarks.jl](https://github.com/SciML/SciMLBenchmarks.jl). For more information on high-performance scientific machine learning, check out the SciML Open Source Software Organization [https://sciml.ai](https://sciml.ai). To locally run this benchmark, do the following commands: - ``` using SciMLBenchmarks SciMLBenchmarks.weave_file("benchmarks/Jumps","Mendes_multistate_example.jmd") @@ -164,8 +173,8 @@ SciMLBenchmarks.weave_file("benchmarks/Jumps","Mendes_multistate_example.jmd") Computer Information: ``` -Julia Version 1.10.9 -Commit 5595d20a287 (2025-03-10 12:51 UTC) +Julia Version 1.10.12 +Commit d93beab124c (2026-08-15 10:29 UTC) Build Info: Official https://julialang.org/ release Platform Info: @@ -174,432 +183,372 @@ Platform Info: WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver2) -Threads: 1 default, 0 interactive, 1 GC (on 128 virtual cores) +Threads: 128 default, 0 interactive, 64 GC (on 128 virtual cores) Environment: - JULIA_CPU_THREADS = 128 - JULIA_DEPOT_PATH = /cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953 + JULIA_NUM_THREADS = auto ``` Package Information: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Project.toml` - [6e4b80f9] BenchmarkTools v1.6.0 - [479239e8] Catalyst v15.0.8 - [8f4d0f93] Conda v1.10.2 - [a93c6f00] DataFrames v1.7.0 - [0c46a032] DifferentialEquations v7.16.1 - [31c24e10] Distributions v0.25.120 - [86223c79] Graphs v1.12.1 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 - [91a5bcdd] Plots v1.40.13 +Status `/julia/github-runners/amdci1-1/_work/SciMLBenchmarks.jl/SciMLBenchmarks.jl/benchmarks/Jumps/Project.toml` + [6e4b80f9] BenchmarkTools v1.8.0 + [479239e8] Catalyst v16.4.0 + [8f4d0f93] Conda v1.10.3 + [a93c6f00] DataFrames v1.8.2 + [0c46a032] DifferentialEquations v8.1.1 + [31c24e10] Distributions v0.25.131 + [86223c79] Graphs v1.14.0 + [faf0f6d7] JumpProblemLibrary v2.0.3 + [ccbc3e58] JumpProcesses v9.30.1 + [961ee093] ModelingToolkit v11.40.0 + [1dea7af3] OrdinaryDiffEq v7.8.1 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 + [91a5bcdd] Plots v1.41.7 [438e738f] PyCall v1.96.4 - [b4db0fb7] ReactionNetworkImporters v0.16.1 - [31c91b34] SciMLBenchmarks v0.1.3 - [860ef19b] StableRNGs v1.0.3 - [f3b207a7] StatsPlots v0.15.7 - [c3572dad] Sundials v4.28.0 + [b4db0fb7] ReactionNetworkImporters v1.5.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [860ef19b] StableRNGs v1.0.4 + [f3b207a7] StatsPlots v0.15.8 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 [37e2e46d] LinearAlgebra [9a3f8284] Random [10745b16] Statistics v1.10.0 -Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated` +Info Packages marked with ⌃ have new versions available and may be upgradable. ``` And the full manifest: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Manifest.toml` - [47edcb42] ADTypes v1.14.0 +Status `/julia/github-runners/amdci1-1/_work/SciMLBenchmarks.jl/SciMLBenchmarks.jl/benchmarks/Jumps/Manifest.toml` + [47edcb42] ADTypes v1.24.0 + [14f7f29c] AMD v0.5.3 [621f4979] AbstractFFTs v1.5.0 + [6e696c72] AbstractPlutoDingetjes v1.4.0 [1520ce14] AbstractTrees v0.4.5 - [7d9f7c33] Accessors v0.1.42 - [79e6a3ab] Adapt v4.3.0 + [7d9f7c33] Accessors v0.1.45 + [79e6a3ab] Adapt v4.7.0 [66dad0bd] AliasTables v1.1.3 - [a95523ee] AlmostBlockDiagonals v0.1.10 [ec485272] ArnoldiMethod v0.4.0 [7d9fca2a] Arpack v0.5.4 - [4fba245c] ArrayInterface v7.19.0 - [4c555306] ArrayLayouts v1.11.1 + [4fba245c] ArrayInterface v7.30.0 + [4c555306] ArrayLayouts v1.12.2 [13072b0f] AxisAlgorithms v1.1.0 - [aae01518] BandedMatrices v1.9.4 - [6e4b80f9] BenchmarkTools v1.6.0 -⌅ [e2ed5e7c] Bijections v0.1.10 - [d1d4a3ce] BitFlags v0.1.9 - [62783981] BitTwiddlingConvenienceFunctions v0.1.6 - [8e7c35d0] BlockArrays v1.6.3 - [764a87c0] BoundaryValueDiffEq v5.17.0 - [7227322d] BoundaryValueDiffEqAscher v1.6.1 - [56b672f2] BoundaryValueDiffEqCore v1.9.0 - [85d9eb09] BoundaryValueDiffEqFIRK v1.7.0 - [1a22d4ce] BoundaryValueDiffEqMIRK v1.7.0 - [9255f1d6] BoundaryValueDiffEqMIRKN v1.6.1 - [ed55bfe0] BoundaryValueDiffEqShooting v1.7.0 - [70df07ce] BracketingNonlinearSolve v1.3.0 + [aae01518] BandedMatrices v1.12.0 + [6e4b80f9] BenchmarkTools v1.8.0 + [e2ed5e7c] Bijections v0.2.2 + [b2a6c25c] BinaryHeaps v1.1.0 + [caf10ac8] BipartiteGraphs v0.1.12 + [8e7c35d0] BlockArrays v1.10.0 + [70df07ce] BracketingNonlinearSolve v1.12.6 [fa961155] CEnum v0.5.0 - [2a0fbf3d] CPUSummary v0.2.6 - [479239e8] Catalyst v15.0.8 - [d360d2e6] ChainRulesCore v1.25.1 - [fb6a15b2] CloseOpenIntervals v0.1.13 + [479239e8] Catalyst v16.4.0 + [d360d2e6] ChainRulesCore v1.26.1 [aaaa29a8] Clustering v0.15.8 - [944b1d66] CodecZlib v0.7.8 - [35d6a980] ColorSchemes v3.29.0 + [35d6a980] ColorSchemes v3.31.0 [3da002f7] ColorTypes v0.12.1 [c3611d14] ColorVectorSpace v0.11.0 [5ae59095] Colors v0.13.1 - [861a8166] Combinatorics v1.0.3 - [a80b9123] CommonMark v0.9.1 - [38540f10] CommonSolve v0.2.4 +⌅ [861a8166] Combinatorics v1.0.2 + [38540f10] CommonSolve v0.2.14 [bbf7d656] CommonSubexpressions v0.3.1 - [f70d9fcc] CommonWorldInvalidations v1.0.0 - [34da2185] Compat v4.16.0 + [f70d9fcc] CommonWorldInvalidations v1.2.0 + [34da2185] Compat v4.18.1 [b152e2b5] CompositeTypes v0.1.4 [a33af91c] CompositionsBase v0.1.2 - [2569d6c7] ConcreteStructs v0.2.3 - [f0e56b4a] ConcurrentUtilities v2.5.0 - [8f4d0f93] Conda v1.10.2 - [187b0558] ConstructionBase v1.5.8 + [2569d6c7] ConcreteStructs v0.2.8 + [8f4d0f93] Conda v1.10.3 + [187b0558] ConstructionBase v1.6.0 [d38c429a] Contour v0.6.3 - [adafc99b] CpuId v0.3.1 - [a8cc5b0e] Crayons v4.1.1 + [a8cc5b0e] Crayons v4.2.0 [9a962f9c] DataAPI v1.16.0 - [a93c6f00] DataFrames v1.7.0 - [864edb3b] DataStructures v0.18.22 + [a93c6f00] DataFrames v1.8.2 + [864edb3b] DataStructures v0.19.6 [e2d170a0] DataValueInterfaces v1.0.0 - [bcd4f6db] DelayDiffEq v5.53.1 [8bb1440f] DelimitedFiles v1.9.1 - [2b5f629d] DiffEqBase v6.175.0 - [459566f4] DiffEqCallbacks v4.6.0 - [77a26b50] DiffEqNoiseProcess v5.24.1 + [2b5f629d] DiffEqBase v7.19.0 + [459566f4] DiffEqCallbacks v4.19.3 [163ba53b] DiffResults v1.1.0 - [b552c78f] DiffRules v1.15.1 - [0c46a032] DifferentialEquations v7.16.1 -⌅ [a0c0ee7d] DifferentiationInterface v0.6.54 - [8d63f2c5] DispatchDoctor v0.4.19 + [b552c78f] DiffRules v1.16.0 + [0c46a032] DifferentialEquations v8.1.1 + [a0c0ee7d] DifferentiationInterface v0.7.21 + [8d63f2c5] DispatchDoctor v0.4.28 [b4f34e82] Distances v0.10.12 - [31c24e10] Distributions v0.25.120 - [ffbed154] DocStringExtensions v0.9.4 - [5b8099bc] DomainSets v0.7.15 - [7c1d4256] DynamicPolynomials v0.6.2 - [06fc5a27] DynamicQuantities v1.8.0 - [4e289a0a] EnumX v1.0.5 -⌃ [f151be2c] EnzymeCore v0.8.10 - [460bff9d] ExceptionUnwrapping v0.1.11 - [d4d017d3] ExponentialUtilities v1.27.0 - [e2ba6199] ExprTools v0.1.10 + [31c24e10] Distributions v0.25.131 + [ffbed154] DocStringExtensions v0.9.5 + [5b8099bc] DomainSets v0.8.1 + [7c1d4256] DynamicPolynomials v0.6.7 + [06fc5a27] DynamicQuantities v1.13.0 + [4e289a0a] EnumX v1.0.7 + [f151be2c] EnzymeCore v0.8.21 + [e2ba6199] ExprTools v0.1.11 [55351af7] ExproniconLite v0.10.14 - [c87230d0] FFMPEG v0.4.2 - [7a1cc6ca] FFTW v1.8.1 - [9d29842c] FastAlmostBandedMatrices v0.1.5 - [7034ab61] FastBroadcast v0.3.5 + [c87230d0] FFMPEG v0.4.5 + [b86e33f2] FFTA v0.3.1 + [7034ab61] FastBroadcast v1.4.0 [9aa1b823] FastClosures v0.3.2 - [442a2c76] FastGaussQuadrature v1.0.2 - [a4df4552] FastPower v1.1.2 - [1a297f60] FillArrays v1.13.0 - [64ca27bc] FindFirstFunctions v1.4.1 - [6a86dc24] FiniteDiff v2.27.0 - [53c48c17] FixedPointNumbers v0.8.5 + [a4df4552] FastPower v1.5.0 + [1a297f60] FillArrays v1.17.0 + [64ca27bc] FindFirstFunctions v3.2.1 + [6a86dc24] FiniteDiff v2.33.0 +⌅ [53c48c17] FixedPointNumbers v0.8.6 [1fa38f19] Format v1.3.7 -⌅ [f6369f11] ForwardDiff v0.10.38 + [f6369f11] ForwardDiff v1.4.5 + [a85aefff] FunctionMaps v0.1.2 [069b7b12] FunctionWrappers v1.1.3 - [77dc65aa] FunctionWrappersWrappers v0.1.3 - [d9f16b24] Functors v0.5.2 + [77dc65aa] FunctionWrappersWrappers v1.13.0 [46192b85] GPUArraysCore v0.2.0 - [28b8d3ca] GR v0.73.16 - [c145ed77] GenericSchur v0.5.5 - [d7ba0133] Git v1.4.0 - [c27321d9] Glob v1.3.1 - [86223c79] Graphs v1.12.1 + [28b8d3ca] GR v0.73.27 + [a0844989] Gamma v1.2.0 + [d7ba0133] Git v1.5.0 + [86223c79] Graphs v1.14.0 [42e2da0e] Grisu v1.0.2 - [cd3eb016] HTTP v1.10.16 - [eafb193a] Highlights v0.5.3 - [34004b35] HypergeometricFunctions v0.3.28 -⌃ [7073ff75] IJulia v1.27.0 - [615f187c] IfElse v0.1.1 +⌅ [eafb193a] Highlights v0.5.3 + [34004b35] HypergeometricFunctions v0.3.30 + [7073ff75] IJulia v1.34.4 + [3263718b] ImplicitDiscreteSolve v2.2.0 [d25df0c9] Inflate v0.1.5 - [842dd82b] InlineStrings v1.4.3 - [18e54dd8] IntegerMathUtils v0.1.2 -⌅ [a98d9a8b] Interpolations v0.15.1 - [8197267c] IntervalSets v0.7.11 + [842dd82b] InlineStrings v1.4.5 + [18e54dd8] IntegerMathUtils v0.1.4 + [a98d9a8b] Interpolations v0.16.3 + [8197267c] IntervalSets v0.7.14 [3587e190] InverseFunctions v0.1.17 [41ab1584] InvertedIndices v1.3.1 - [92d709cd] IrrationalConstants v0.2.4 + [92d709cd] IrrationalConstants v0.2.6 [82899510] IteratorInterfaceExtensions v1.0.0 [1019f520] JLFzf v0.1.11 - [692b3bcd] JLLWrappers v1.7.0 - [682c06a0] JSON v0.21.4 + [692b3bcd] JLLWrappers v1.8.0 +⌅ [682c06a0] JSON v0.21.4 [ae98c720] Jieko v0.2.1 - [98e50ef6] JuliaFormatter v2.1.2 -⌅ [70703baa] JuliaSyntax v0.4.10 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 - [5ab0869b] KernelDensity v0.6.9 - [ba0b0d4f] Krylov v0.10.1 - [7f56f5a3] LSODA v0.7.5 - [b964fa9f] LaTeXStrings v1.4.0 - [23fbe1c1] Latexify v0.16.8 - [10f19ff3] LayoutPointers v0.1.17 - [5078a376] LazyArrays v2.6.1 - [2d8b4e74] LevyArea v1.0.0 - [87fe0de2] LineSearch v0.1.4 - [d3d80556] LineSearches v7.3.0 - [7ed4a6bd] LinearSolve v3.16.0 - [2ab3a3ac] LogExpFunctions v0.3.29 - [e6f89c97] LoggingExtras v1.1.0 - [d8e11817] MLStyle v0.4.17 + [faf0f6d7] JumpProblemLibrary v2.0.3 + [ccbc3e58] JumpProcesses v9.30.1 + [5ab0869b] KernelDensity v0.6.12 + [ba0b0d4f] Krylov v0.10.9 + [2faa5264] LHLFactorization v2.2.1 + [7f56f5a3] LSODA v1.2.0 + [b964fa9f] LaTeXStrings v1.4.1 + [23fbe1c1] Latexify v0.16.12 + [87fe0de2] LineSearch v0.1.16 + [7ed4a6bd] LinearSolve v5.14.1 + [2ab3a3ac] LogExpFunctions v1.0.1 + [e6f89c97] LoggingExtras v1.2.0 [1914dd2f] MacroTools v0.5.16 - [d125e4d3] ManualMemory v0.1.8 - [a3b82374] MatrixFactorizations v3.0.1 - [bb5d69b7] MaybeInplace v0.1.4 - [739be429] MbedTLS v1.1.9 - [442fdcdd] Measures v0.3.2 + [bb5d69b7] MaybeInplace v0.1.8 + [442fdcdd] Measures v0.3.3 [e1d29d7a] Missings v1.2.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [2e0e35c7] Moshi v0.3.5 - [46d2c3a1] MuladdMacro v0.2.4 - [102ac46a] MultivariatePolynomials v0.5.9 - [6f286f6a] MultivariateStats v0.10.3 - [ffc61752] Mustache v1.0.20 - [d8a4904e] MutableArithmetics v1.6.4 - [d41bc354] NLSolversBase v7.9.1 - [2774e3e8] NLsolve v4.5.1 - [77ba4419] NaNMath v1.1.3 - [b8a86587] NearestNeighbors v0.4.21 - [8913a72c] NonlinearSolve v4.9.0 - [be0214bd] NonlinearSolveBase v1.12.0 - [5959db7a] NonlinearSolveFirstOrder v1.5.0 - [9a2c21bd] NonlinearSolveQuasiNewton v1.6.0 - [26075421] NonlinearSolveSpectralMethods v1.2.0 + [961ee093] ModelingToolkit v11.40.0 +⌃ [7771a370] ModelingToolkitBase v1.68.0 + [6bb917b9] ModelingToolkitTearing v1.20.6 + [2e0e35c7] Moshi v0.3.12 + [46d2c3a1] MuladdMacro v0.2.7 + [102ac46a] MultivariatePolynomials v0.5.19 + [6f286f6a] MultivariateStats v0.10.5 + [ffc61752] Mustache v1.0.21 + [d8a4904e] MutableArithmetics v1.8.0 + [77ba4419] NaNMath v1.1.4 + [b8a86587] NearestNeighbors v0.4.29 + [8913a72c] NonlinearSolve v4.28.1 + [be0214bd] NonlinearSolveBase v2.48.2 + [5959db7a] NonlinearSolveFirstOrder v2.4.1 + [9a2c21bd] NonlinearSolveQuasiNewton v1.15.2 + [26075421] NonlinearSolveSpectralMethods v1.8.1 [510215fc] Observables v0.5.5 [6fe1bfb0] OffsetArrays v1.17.0 - [4d8831e6] OpenSSL v1.5.0 - [429524aa] Optim v1.12.0 - [bac558e1] OrderedCollections v1.8.1 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [89bda076] OrdinaryDiffEqAdamsBashforthMoulton v1.2.0 - [6ad6398a] OrdinaryDiffEqBDF v1.5.1 - [bbf590c4] OrdinaryDiffEqCore v1.26.0 - [50262376] OrdinaryDiffEqDefault v1.4.0 - [4302a76b] OrdinaryDiffEqDifferentiation v1.9.1 - [9286f039] OrdinaryDiffEqExplicitRK v1.1.0 - [e0540318] OrdinaryDiffEqExponentialRK v1.4.0 - [becaefa8] OrdinaryDiffEqExtrapolation v1.5.0 - [5960d6e9] OrdinaryDiffEqFIRK v1.12.0 - [101fe9f7] OrdinaryDiffEqFeagin v1.1.0 - [d3585ca7] OrdinaryDiffEqFunctionMap v1.1.1 - [d28bc4f8] OrdinaryDiffEqHighOrderRK v1.1.0 - [9f002381] OrdinaryDiffEqIMEXMultistep v1.3.0 - [521117fe] OrdinaryDiffEqLinear v1.3.0 - [1344f307] OrdinaryDiffEqLowOrderRK v1.2.0 - [b0944070] OrdinaryDiffEqLowStorageRK v1.3.0 - [127b3ac7] OrdinaryDiffEqNonlinearSolve v1.10.0 - [c9986a66] OrdinaryDiffEqNordsieck v1.1.0 - [5dd0a6cf] OrdinaryDiffEqPDIRK v1.3.1 - [5b33eab2] OrdinaryDiffEqPRK v1.1.0 - [04162be5] OrdinaryDiffEqQPRK v1.1.0 - [af6ede74] OrdinaryDiffEqRKN v1.1.0 - [43230ef6] OrdinaryDiffEqRosenbrock v1.10.1 - [2d112036] OrdinaryDiffEqSDIRK v1.3.0 - [669c94d9] OrdinaryDiffEqSSPRK v1.3.0 - [e3e12d00] OrdinaryDiffEqStabilizedIRK v1.3.0 - [358294b1] OrdinaryDiffEqStabilizedRK v1.1.0 - [fa646aed] OrdinaryDiffEqSymplecticRK v1.3.0 - [b1df2697] OrdinaryDiffEqTsit5 v1.1.0 - [79d7bb75] OrdinaryDiffEqVerner v1.2.0 - [90014a1f] PDMats v0.11.35 - [d96e819e] Parameters v0.12.3 - [69de0a69] Parsers v2.8.3 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 +⌅ [bac558e1] OrderedCollections v1.8.2 + [1dea7af3] OrdinaryDiffEq v7.8.1 + [6ad6398a] OrdinaryDiffEqBDF v2.4.5 + [bbf590c4] OrdinaryDiffEqCore v4.15.2 + [50262376] OrdinaryDiffEqDefault v2.6.0 + [4302a76b] OrdinaryDiffEqDifferentiation v3.11.0 + [127b3ac7] OrdinaryDiffEqNonlinearSolve v2.9.2 + [43230ef6] OrdinaryDiffEqRosenbrock v2.7.1 + [b4bd8bb3] OrdinaryDiffEqRosenbrockTableaus v2.4.2 + [2d112036] OrdinaryDiffEqSDIRK v2.9.1 + [b1df2697] OrdinaryDiffEqTsit5 v2.1.4 + [79d7bb75] OrdinaryDiffEqVerner v2.4.1 + [90014a1f] PDMats v0.11.41 +⌅ [d96e819e] Parameters v0.12.3 +⌅ [69de0a69] Parsers v2.8.7 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 [ccf2f8ad] PlotThemes v3.3.0 - [995b91a9] PlotUtils v1.4.3 - [91a5bcdd] Plots v1.40.13 - [e409e4f3] PoissonRandom v0.4.4 - [f517fe37] Polyester v0.7.18 - [1d0040c9] PolyesterWeave v0.2.2 + [995b91a9] PlotUtils v1.4.4 + [91a5bcdd] Plots v1.41.7 + [e409e4f3] PoissonRandom v0.4.13 [2dfb63ee] PooledArrays v1.4.3 - [85a6dd25] PositiveFactorizations v0.2.4 - [d236fae5] PreallocationTools v0.4.27 + [d236fae5] PreallocationTools v1.7.1 ⌅ [aea7be01] PrecompileTools v1.2.1 - [21216c6a] Preferences v1.4.3 - [08abe8d2] PrettyTables v2.4.0 + [21216c6a] Preferences v1.5.2 + [08abe8d2] PrettyTables v3.4.8 [27ebfcd6] Primes v0.5.7 - [43287f4e] PtrArrays v1.3.0 + [43287f4e] PtrArrays v1.4.0 + [0c0d3e7f] PureKLU v1.4.1 [438e738f] PyCall v1.96.4 - [1fd47b50] QuadGK v2.11.2 - [74087812] Random123 v1.7.1 - [e6cf234a] RandomNumbers v1.6.0 + [1fd47b50] QuadGK v2.11.3 [c84ed2f1] Ratios v0.4.5 - [b4db0fb7] ReactionNetworkImporters v0.16.1 + [b4db0fb7] ReactionNetworkImporters v1.5.0 + [988b38a3] ReadOnlyArrays v0.2.0 + [795d4caa] ReadOnlyDicts v1.0.1 [3cdcf5f2] RecipesBase v1.3.4 [01d81517] RecipesPipeline v0.6.12 - [731186ca] RecursiveArrayTools v3.33.0 + [731186ca] RecursiveArrayTools v4.5.1 [189a3867] Reexport v1.2.2 [05181044] RelocatableFolders v1.0.1 [ae029012] Requires v1.3.1 - [ae5879a3] ResettableStacks v1.1.1 - [79098fc4] Rmath v0.8.0 - [7e49a35a] RuntimeGeneratedFunctions v0.5.15 - [9dfe8606] SCCNonlinearSolve v1.2.0 - [94e857df] SIMDTypes v0.1.0 - [0bca4576] SciMLBase v2.96.0 - [31c91b34] SciMLBenchmarks v0.1.3 - [19f34311] SciMLJacobianOperators v0.1.6 -⌃ [c0aeaf25] SciMLOperators v0.4.0 - [53ae85a6] SciMLStructures v1.7.0 - [6c6a2e73] Scratch v1.2.1 - [91c51154] SentinelArrays v1.4.8 + [9fe22ead] RespecializeParams v1.3.0 + [79098fc4] Rmath v0.9.0 + [f2b01f46] Roots v3.0.7 + [7e49a35a] RuntimeGeneratedFunctions v0.5.25 + [9dfe8606] SCCNonlinearSolve v1.15.1 + [0bca4576] SciMLBase v3.50.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [19f34311] SciMLJacobianOperators v0.1.18 + [a6db7da4] SciMLLogging v2.1.0 + [c0aeaf25] SciMLOperators v1.30.0 + [431bcebd] SciMLPublic v1.3.0 + [53ae85a6] SciMLStructures v1.10.5 + [6c6a2e73] Scratch v1.3.0 + [91c51154] SentinelArrays v1.4.10 [efcf1570] Setfield v1.1.2 [992d4aef] Showoff v1.0.3 - [777ac1f9] SimpleBufferStream v1.2.0 - [727e6d20] SimpleNonlinearSolve v2.5.0 - [699a6c99] SimpleTraits v0.9.4 - [ce78b400] SimpleUnPack v1.1.0 - [b85f4697] SoftGlobalScope v1.1.0 - [a2af1166] SortingAlgorithms v1.2.1 - [9f842d2f] SparseConnectivityTracer v0.6.18 - [0a514795] SparseMatrixColorings v0.4.20 - [276daf66] SpecialFunctions v2.5.1 - [860ef19b] StableRNGs v1.0.3 - [aedffcd0] Static v1.2.0 - [0d7ed370] StaticArrayInterface v1.8.0 - [90137ffa] StaticArrays v1.9.13 - [1e83bf80] StaticArraysCore v1.4.3 - [82ae8749] StatsAPI v1.7.1 - [2913bbd2] StatsBase v0.34.5 - [4c63d2b9] StatsFuns v1.5.0 - [f3b207a7] StatsPlots v0.15.7 - [9672c7b4] SteadyStateDiffEq v2.5.0 - [789caeaf] StochasticDiffEq v6.80.0 - [7792a7ef] StrideArraysCore v0.5.7 + [727e6d20] SimpleNonlinearSolve v2.14.1 + [699a6c99] SimpleTraits v0.9.6 + [a2af1166] SortingAlgorithms v1.2.3 + [a57abbd0] SparseColumnPivotedQR v2.1.7 + [0a514795] SparseMatrixColorings v0.4.27 + [276daf66] SpecialFunctions v2.9.0 + [860ef19b] StableRNGs v1.0.4 + [0c0c59c1] StarAlgebras v0.3.0 + [64909d44] StateSelection v1.11.1 + [90137ffa] StaticArrays v1.9.19 + [1e83bf80] StaticArraysCore v1.4.4 + [82ae8749] StatsAPI v1.8.0 + [2913bbd2] StatsBase v0.34.13 + [4c63d2b9] StatsFuns v2.2.1 + [f3b207a7] StatsPlots v0.15.8 [69024149] StringEncodings v0.3.7 - [892a3eda] StringManipulation v0.4.1 - [c3572dad] Sundials v4.28.0 - [2efcf032] SymbolicIndexingInterface v0.3.40 - [19f23fe9] SymbolicLimits v0.2.2 - [d1185830] SymbolicUtils v3.29.0 - [0c5d862f] Symbolics v6.40.0 + [892a3eda] StringManipulation v0.5.0 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 + [19f23fe9] SymbolicLimits v1.2.0 +⌅ [d1185830] SymbolicUtils v4.45.0 + [0c5d862f] Symbolics v7.39.0 [ab02a1b2] TableOperations v1.2.0 [3783bdb8] TableTraits v1.0.1 - [bd369af6] Tables v1.12.0 - [ed4db957] TaskLocalValues v0.1.2 + [bd369af6] Tables v1.14.0 + [ed4db957] TaskLocalValues v0.1.3 [62fd8b95] TensorCore v0.1.1 [8ea1fca8] TermInterface v2.0.0 - [1c621080] TestItems v1.0.0 - [8290d209] ThreadingUtilities v0.5.4 - [a759f4b9] TimerOutputs v0.5.29 - [3bb67fe8] TranscodingStreams v0.11.3 - [410a4b4d] Tricks v0.1.10 + [1c621080] TestItems v1.1.0 + [a759f4b9] TimerOutputs v1.2.0 + [410a4b4d] Tricks v0.1.13 [781d530d] TruncatedStacktraces v1.4.0 - [5c2747f8] URIs v1.5.2 [3a884ed6] UnPack v1.0.2 [1cfade01] UnicodeFun v0.4.1 - [1986cc42] Unitful v1.22.1 - [45397f5d] UnitfulLatexify v1.7.0 - [a7c27f48] Unityper v0.1.6 [41fe7b60] Unzip v0.2.0 [81def892] VersionParsing v1.3.0 - [897b6980] WeakValueDicts v0.1.0 + [d30d5f5c] WeakCacheSets v0.1.0 [44d3d7a6] Weave v0.10.12 - [cc8bc4a8] Widgets v0.6.7 - [efce3f68] WoodburyMatrices v1.0.0 - [ddb6d928] YAML v0.4.14 - [c2297ded] ZMQ v1.4.0 -⌅ [68821587] Arpack_jll v3.5.1+1 + [cc8bc4a8] Widgets v0.6.8 + [efce3f68] WoodburyMatrices v1.1.0 + [ddb6d928] YAML v0.4.16 + [c2297ded] ZMQ v1.5.1 +⌅ [68821587] Arpack_jll v3.5.2+0 [6e34b625] Bzip2_jll v1.0.9+0 - [83423d85] Cairo_jll v1.18.5+0 + [83423d85] Cairo_jll v1.18.7+0 [ee1fde0b] Dbus_jll v1.16.2+0 [2702e6a9] EpollShim_jll v0.0.20230411+1 - [2e619515] Expat_jll v2.6.5+0 -⌅ [b22a6f82] FFMPEG_jll v4.4.4+1 - [f5851436] FFTW_jll v3.3.11+0 - [a3f928ae] Fontconfig_jll v2.16.0+0 - [d7e528f0] FreeType2_jll v2.13.4+0 + [2e619515] Expat_jll v2.8.3+0 +⌅ [b22a6f82] FFMPEG_jll v8.1.2+0 + [a3f928ae] Fontconfig_jll v2.17.1+0 + [d7e528f0] FreeType2_jll v2.14.3+1 [559328eb] FriBidi_jll v1.0.17+0 - [0656b61e] GLFW_jll v3.4.0+2 - [d2c73de3] GR_jll v0.73.16+0 - [78b55507] Gettext_jll v0.21.0+0 - [f8c6e375] Git_jll v2.49.0+0 - [7746bdde] Glib_jll v2.84.0+0 - [3b182d85] Graphite2_jll v1.3.15+0 - [2e76f6c2] HarfBuzz_jll v8.5.1+0 - [1d5cc7b8] IntelOpenMP_jll v2025.0.4+0 - [aacddb02] JpegTurbo_jll v3.1.1+0 - [c1c5ebd0] LAME_jll v3.100.2+0 - [88015f11] LERC_jll v4.0.1+0 - [1d63c593] LLVMOpenMP_jll v18.1.8+0 + [0656b61e] GLFW_jll v3.5.1+0 + [d2c73de3] GR_jll v0.73.27+0 +⌅ [b0724c58] GettextRuntime_jll v0.22.4+0 + [61579ee1] Ghostscript_jll v9.55.1+0 + [020c3dae] Git_LFS_jll v3.7.1+0 + [f8c6e375] Git_jll v2.55.0+0 + [7746bdde] Glib_jll v2.88.3+0 + [3b182d85] Graphite2_jll v1.3.16+0 + [2e76f6c2] HarfBuzz_jll v100.14003.0+0 + [1d5cc7b8] IntelOpenMP_jll v2025.2.0+0 + [aacddb02] JpegTurbo_jll v3.2.0+1 + [c1c5ebd0] LAME_jll v3.100.3+0 + [88015f11] LERC_jll v4.1.0+0 + [1d63c593] LLVMOpenMP_jll v22.1.7+0 [aae0fff6] LSODA_jll v0.1.2+0 - [dd4b983a] LZO_jll v2.10.3+0 - [e9f186c6] Libffi_jll v3.4.7+0 +⌅ [e9f186c6] Libffi_jll v3.4.7+0 [7e76a0d4] Libglvnd_jll v1.7.1+1 [94ce4f54] Libiconv_jll v1.18.0+0 - [4b2f31a3] Libmount_jll v2.41.0+0 - [89763e89] Libtiff_jll v4.7.1+0 - [38a345b3] Libuuid_jll v2.41.0+0 - [856f044c] MKL_jll v2025.0.1+1 - [e7412a2a] Ogg_jll v1.3.5+1 - [9bd350c2] OpenSSH_jll v10.0.1+0 - [458c3c95] OpenSSL_jll v3.5.0+0 + [4b2f31a3] Libmount_jll v2.42.0+0 + [89763e89] Libtiff_jll v4.7.3+0 + [38a345b3] Libuuid_jll v2.42.0+0 + [856f044c] MKL_jll v2025.2.0+0 + [e7412a2a] Ogg_jll v1.3.6+0 +⌅ [656ef2d0] OpenBLAS32_jll v0.3.24+0 + [9bd350c2] OpenSSH_jll v10.5.1+0 + [458c3c95] OpenSSL_jll v3.5.8+0 [efe28fd5] OpenSpecFun_jll v0.5.6+0 - [91d4177d] Opus_jll v1.3.3+0 - [36c8627f] Pango_jll v1.56.3+0 -⌅ [30392449] Pixman_jll v0.44.2+0 - [c0090381] Qt6Base_jll v6.8.2+1 - [629bc702] Qt6Declarative_jll v6.8.2+1 - [ce943373] Qt6ShaderTools_jll v6.8.2+1 - [e99dba38] Qt6Wayland_jll v6.8.2+0 - [f50d1b31] Rmath_jll v0.5.1+0 -⌅ [fb77eaff] Sundials_jll v5.2.2+0 + [91d4177d] Opus_jll v1.6.1+0 + [36c8627f] Pango_jll v1.58.2+0 + [30392449] Pixman_jll v0.46.4+0 + [c0090381] Qt6Base_jll v6.10.2+2 + [629bc702] Qt6Declarative_jll v6.10.2+2 + [ce943373] Qt6ShaderTools_jll v6.10.2+1 + [6de9746b] Qt6Svg_jll v6.10.2+0 + [e99dba38] Qt6Wayland_jll v6.10.2+1 + [f50d1b31] Rmath_jll v0.5.2+0 +⌅ [ca45d3f4] SuiteSparse32_jll v5.10.1+0 + [fb77eaff] Sundials_jll v7.5.0+0 [a44049a8] Vulkan_Loader_jll v1.3.243+0 - [a2964d1f] Wayland_jll v1.23.1+0 - [2381bf8a] Wayland_protocols_jll v1.36.0+0 -⌅ [02c8fc9c] XML2_jll v2.13.6+1 - [ffd25f8a] XZ_jll v5.8.1+0 + [a2964d1f] Wayland_jll v1.24.0+0 + [ffd25f8a] XZ_jll v5.8.3+0 [f67eecfb] Xorg_libICE_jll v1.1.2+0 [c834827a] Xorg_libSM_jll v1.2.6+0 - [4f6342f7] Xorg_libX11_jll v1.8.12+0 + [4f6342f7] Xorg_libX11_jll v1.8.13+0 [0c0b7dd1] Xorg_libXau_jll v1.0.13+0 [935fb764] Xorg_libXcursor_jll v1.2.4+0 [a3789734] Xorg_libXdmcp_jll v1.1.6+0 - [1082639a] Xorg_libXext_jll v1.3.7+0 - [d091e8ba] Xorg_libXfixes_jll v6.0.1+0 - [a51aa0fd] Xorg_libXi_jll v1.8.3+0 - [d1454406] Xorg_libXinerama_jll v1.1.6+0 - [ec84b674] Xorg_libXrandr_jll v1.5.5+0 + [1082639a] Xorg_libXext_jll v1.3.8+0 + [d091e8ba] Xorg_libXfixes_jll v6.0.2+0 + [a51aa0fd] Xorg_libXi_jll v1.8.4+0 + [d1454406] Xorg_libXinerama_jll v1.1.7+0 + [ec84b674] Xorg_libXrandr_jll v1.5.6+0 [ea2f1a96] Xorg_libXrender_jll v0.9.12+0 + [a65dc6b1] Xorg_libpciaccess_jll v0.19.0+0 [c7cfdc94] Xorg_libxcb_jll v1.17.1+0 - [cc61e674] Xorg_libxkbfile_jll v1.1.3+0 - [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0 - [12413925] Xorg_xcb_util_image_jll v0.4.0+1 - [2def613f] Xorg_xcb_util_jll v0.4.0+1 - [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1 - [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1 - [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1 + [cc61e674] Xorg_libxkbfile_jll v1.2.0+0 + [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.6+0 + [12413925] Xorg_xcb_util_image_jll v0.4.1+0 + [2def613f] Xorg_xcb_util_jll v0.4.1+0 + [975044d2] Xorg_xcb_util_keysyms_jll v0.4.1+0 + [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.10+0 + [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.2+0 [35661453] Xorg_xkbcomp_jll v1.4.7+0 - [33bec58e] Xorg_xkeyboard_config_jll v2.44.0+0 + [33bec58e] Xorg_xkeyboard_config_jll v2.47.0+2 [c5fb5394] Xorg_xtrans_jll v1.6.0+0 [8f1865be] ZeroMQ_jll v4.3.6+0 [3161d3a3] Zstd_jll v1.5.7+1 - [35ca27e7] eudev_jll v3.2.9+0 - [214eeab7] fzf_jll v0.61.1+0 - [1a1c6b14] gperf_jll v3.3.0+0 - [a4ae2306] libaom_jll v3.11.0+0 - [0ac62f75] libass_jll v0.15.2+0 + [35ca27e7] eudev_jll v3.2.14+0 +⌅ [214eeab7] fzf_jll v0.61.1+0 + [a4ae2306] libaom_jll v3.14.1+0 + [0ac62f75] libass_jll v0.17.5+0 [1183f4f0] libdecor_jll v0.2.2+0 - [2db6ffa8] libevdev_jll v1.11.0+0 - [f638f0a6] libfdk_aac_jll v2.0.3+0 - [36db933b] libinput_jll v1.18.0+0 - [b53b4c65] libpng_jll v1.6.48+0 + [8e53e030] libdrm_jll v2.4.134+0 + [2db6ffa8] libevdev_jll v1.13.4+0 + [f638f0a6] libfdk_aac_jll v2.0.4+0 + [36db933b] libinput_jll v1.28.1+0 + [b53b4c65] libpng_jll v1.6.58+0 [a9144af2] libsodium_jll v1.0.21+0 - [f27f6e37] libvorbis_jll v1.3.7+2 - [009596ad] mtdev_jll v1.1.6+0 - [1317d2d5] oneTBB_jll v2022.0.0+0 -⌅ [1270edf5] x264_jll v2021.5.5+0 -⌅ [dfaa095f] x265_jll v3.5.0+0 - [d8fb68d0] xkbcommon_jll v1.8.1+0 + [9a156e7d] libva_jll v2.23.0+0 + [f27f6e37] libvorbis_jll v1.3.8+0 + [009596ad] mtdev_jll v1.1.7+0 + [1317d2d5] oneTBB_jll v2022.3.0+0 +⌅ [1270edf5] x264_jll v10164.0.1+0 + [dfaa095f] x265_jll v4.1.0+0 + [d8fb68d0] xkbcommon_jll v1.13.0+0 [0dad84c5] ArgTools v1.1.1 [56f22d72] Artifacts [2a0f44e3] Base64 diff --git a/markdown/Jumps/MultivariateHawkes.md b/markdown/Jumps/MultivariateHawkes.md deleted file mode 100644 index 4a2ba98eb..000000000 --- a/markdown/Jumps/MultivariateHawkes.md +++ /dev/null @@ -1,1411 +0,0 @@ ---- -author: "Guilherme Zagatti" -title: "Multivariate Hawkes Model" ---- -```julia -using JumpProcesses, Graphs, Statistics, BenchmarkTools, Plots -using OrdinaryDiffEq: Tsit5 -fmt = :png -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) - &= \sum_{j \in E_i} \sum_{t_{n_j} < t} \alpha \exp \left[-\beta (t - t_{N_i} + t_{N_i} - t_{n_j}) \right] \\ - &= \exp \left[ -\beta (t - t_{N_i}) \right] \sum_{j \in E_i} \sum_{t_{n_j} \leq t_{N_i}} \alpha \exp \left[-\beta (t_{N_i} - t_{n_j}) \right] \\ - &= \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) -``` - -In Julia, we define a factory for the conditional intensity ``\lambda_i`` which returns the brute-force or recursive versions of the intensity given node ``i`` and network ``g``. - -```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] - return urate[i] - end - - @inline @inbounds function rate_brute(u, p, t) - λ, α, β, h, urate = p - 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 - end - urate[i] = λ + x - return urate[i] - end - - if use_recursion - return rate_recursion - else - return rate_brute - end - -end -``` - -``` -hawkes_rate (generic function with 1 method) -``` - - - - - -Given the rate factory, we can create a jump factory which will create all the jumps in our model. - -```julia -function hawkes_jump(i::Int, g; use_recursion = false) - rate = hawkes_rate(i, g; use_recursion) - urate = rate - @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 - for j in g[i] - ϕ[j] *= exp(-β*(integrator.t - h[j])) - ϕ[j] += α - h[j] = integrator.t - end - integrator.u[i] += 1 - end - @inbounds function affect_brute!(integrator) - push!(integrator.p[4][i], integrator.t) - integrator.u[i] += 1 - end - return VariableRateJump( - rate, - use_recursion ? affect_recursion! : affect_brute!; - lrate, - urate, - rateinterval, - ) -end - -function hawkes_jump(u, g; use_recursion = false) - return [hawkes_jump(i, g; use_recursion) for i = 1:length(u)] -end -``` - -``` -hawkes_jump (generic function with 2 methods) -``` - - - - - -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 - nothing -end - -function hawkes_problem( - 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) - jprob = JumpProblem(oprob, agg, jumps...; save_positions = save_positions) - return jprob -end -``` - -``` -hawkes_problem (generic function with 1 method) -``` - - - - - -The `Coevolve()` aggregator knows how to handle the `SSAStepper`, so it accepts a `DiscreteProblem`. - -```julia -function hawkes_problem( - 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) - return jprob -end -``` - -``` -hawkes_problem (generic function with 2 methods) -``` - - - - - -Lets solve the problems defined so far. We sample a random graph sampled from the Erdős-Rényi model. This model assumes that the probability of an edge between two nodes is independent of other edges, which we fix at ``0.2``. For illustration purposes, we fix ``V = 10``. - -```julia -V = 10 -G = erdos_renyi(V, 0.2, seed = 9103) -g = [neighbors(G, i) for i = 1:nv(G)] -``` - -``` -10-element Vector{Vector{Int64}}: - [4, 7] - [8, 9] - [4, 5] - [1, 3] - [3] - [] - [1, 8, 9] - [2, 7] - [2, 7, 10] - [9] -``` - - - - - -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)] -p = (0.5, 0.1, 2.0) -``` - -``` -(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)"), -] - -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) - 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)) -end -``` - -![](figures/MultivariateHawkes_8_1.png) - - - -## Alternative libraries - -We benchmark `JumpProcesses.jl` against `PiecewiseDeterministicMarkovProcesses.jl` and Python `Tick` library. - -In order to compare with the `PiecewiseDeterministicMarkovProcesses.jl`, we need to reformulate our jump problem as a Piecewise Deterministic Markov Process (PDMP). In this setting, we have two options. - -The simple version only requires the conditional intensity. Like above, we define a brute-force and recursive approach. Following the library's specification we define the following functions. - -```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 -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 - end - x += ϕij - end - end - rate[i] = λ + x - end - if issum - return sum(rate) - end - 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 -end - -function hawkes_affect_simple_brute!(xc, xd, p, t, i::Int64) - push!(p[4][i], t) -end -``` - -``` -hawkes_affect_simple_brute! (generic function with 1 method) -``` - - - - - -Since this is a library for PDMP, we also need to define the ODE problem. In the simple version, we simply set it to zero. - -```julia -function hawkes_drate_simple(dxc, xc, xd, p, t) - dxc .= 0 -end -``` - -``` -hawkes_drate_simple (generic function with 1 method) -``` - - - - - -Next, we create a factory for the Multivariate Hawkes `PDMPCHVSimple` problem. - -```julia -import LinearAlgebra: I -using PiecewiseDeterministicMarkovProcesses -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) - 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) - else - jprob = PDMPProblem(hawkes_drate_simple, hawkes_rate_simple_brute, - hawkes_affect_simple_brute!, nu, xc0, xd0, p, tspan) - end - return jprob -end - -push!(algorithms, (PDMPCHVSimple(), CHV(Tsit5()), false, "PDMPCHVSimple (brute-force)")); -push!(algorithms, (PDMPCHVSimple(), CHV(Tsit5()), true, "PDMPCHVSimple (recursive)")); -``` - - - - -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} - &= -\beta \sum_{j \in E_i} \sum_{t_{n_j} < t} \alpha \exp \left[-\beta (t - t_{n_j}) \right] \\ - &= -\beta \left( \lambda_i^\ast (t) - \lambda \right) -\end{split} -``` - -```julia -function hawkes_drate_full(dxc, xc, xd, p, t) - λ, α, β, _, _, g = p - for i = 1:length(g) - dxc[i] = -β * (xc[i] - λ) - end -end -``` - -``` -hawkes_drate_full (generic function with 1 method) -``` - - - - - -Next, we need to define the intensity rate and the jumps according to library's specification. - -```julia -function hawkes_rate_full(rate, xc, xd, p, t, issum::Bool) - λ, α, β, _, _, g = p - if issum - return sum(@view(xc[1:length(g)])) - end - rate[1:length(g)] .= @view xc[1:length(g)] - return 0.0 -end - -function hawkes_affect_full!(xc, xd, p, t, i::Int64) - λ, α, β, _, _, g = p - for j in g[i] - xc[i] += α - end -end -``` - -``` -hawkes_affect_full! (generic function with 1 method) -``` - - - - - -Finally, we create a factory for the Multivariate Hawkes `PDMPCHVFull` problem. - -```julia -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, -) - xd0 = Array{Int}(u) - xc0 = [p[1] for i = 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) - return jprob -end - -push!(algorithms, (PDMPCHVFull(), CHV(Tsit5()), true, "PDMPCHVFull")); -``` - - - - -The Python `Tick` library can be accessed with the `PyCall.jl`. We install the required Python dependencies with `Conda.jl` and define a factory for the Multivariate Hawkes `PyTick` problem. - -```julia -const BENCHMARK_PYTHON::Bool = tryparse(Bool, get(ENV, "SCIMLBENCHMARK_PYTHON", "true")) -const REBUILD_PYCALL::Bool = tryparse(Bool, get(ENV, "SCIMLBENCHMARK_REBUILD_PYCALL", "true")) - -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) - - # 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")); -end -``` - -``` -Channels: - - conda-forge -Platform: linux-64 -Collecting package metadata (repodata.json): ...working... done -Solving environment: ...working... failed -Error: failed process: Process(setenv(`/cache/julia-buildkite-plugin/depots -/5b300254-1738-4989-ae0a-f4d2d937f953/conda/3/x86_64/bin/conda install -q - -y python=3.8`,["BUILDKITE_UNBLOCKER_TEAMS=juliagpu-full-access:sciml-full-a -ccess", "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/21581/bus", "BUILDKIT -E_PULL_REQUEST_REPO=", "BUILDKITE_SOURCE=webhook", "BUILDKITE_PLUGIN_COPPER -MIND_INPUTS_0=benchmarks/Jumps", "BUILDKITE_GIT_CLONE_FLAGS=-v", "BUILDKITE -_PLUGIN_CRYPTIC_BASE64_AGENT_PUBLIC_KEY_SECRET=LS0tLS1CRUdJTiBQVUJMSUMgS0VZ -LS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF0WHNKMzF -GbTFKN29IYzlveGZaWQpKY3FxRk5yaXRMUUhxaDVJUHNGS3YySis1K1FVQkZNYURjMHI3czZ3ND -NSMDFobkVNT1lYNDAreUVDT3h5bHErClo3dHdxWlNxS2U1MThwc0RyeWRna0xJNzRnQUVZWWNTZ -GdvTGt4YWpWNy9rb0hFTDgrczRKdFRVNUJ6d1RFdXAKTllTZGNQOFhQSmJLekY1RE5qdWJmeFA5 -ZjdSN2x6SUx2NWl2Z2lxZTVtbUxGd1lwb0hTRVFVNXRlT09IQStLYwpjUDZ3K2d1Q0VxMUZFb0N -2MDRyaTFXaWpVZXorMytEWVM4UCtROGRxMGJYUWZUS1Vyc0thMkdnLzVmZ0h5Z0R1CmRHT2Zsdz -UvVEljR3VVbGNsd1hZb2tTRkpSWUJFa2pUOXBCZ2JNNEcyL2tXNGFmZ3d4bHNuN3VsUW5QNDZVL -zEKZFFJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg==", "BUILDKITE_ENV_FILE=/ -tmp/job-env-01972aee-952f-4edf-9681-772a5d47bdbe861539779", "BUILDKITE_BUIL -D_NUMBER=3409", "BUILDKITE_GIT_CLONE_MIRROR_FLAGS=-v", "BUILDKITE_AGENT_DEB -UG=false", "BUILDKITE_AGENT_META_DATA_QUEUE=juliaecosystem", "BUILDKITE_PLU -GINS_PATH=/etc/buildkite-agent/plugins", "BUILDKITE_COMMAND_EVAL=true", "BU -ILDKITE_AGENT_META_DATA_SANDBOX_CAPABLE=true", "BUILDKITE_ORGANIZATION_SLUG -=julialang", "BUILDKITE_PLUGIN_COPPERMIND_INPUTS_1=src/**/*.jl", "BUILDKITE -_PIPELINE_PROVIDER=github", "BUILDKITE_AGENT_EXPERIMENT=resolve-commit-afte -r-checkout", "BUILDKITE_CONFIG_PATH=/etc/buildkite-agent/buildkite-agent.cf -g", "BUILDKITE_PIPELINE_TEAMS=sciml-full-access", "BUILDKITE_AGENT_META_DAT -A_CRYPTIC_CAPABLE=true", "BUILDKITE_AGENT_ACCESS_TOKEN=bkaj_eyJhbGciOiJIUzU -xMiJ9.eyJzdWIiOiIwMTk3MmFlZS05NTJmLTRlZGYtOTY4MS03NzJhNWQ0N2JkYmUiLCJhdWQiO -iIwMTk3MmQ5OC1iZTBiLTQ3ZDEtOTU4Ni05YjcwMzA1YjU2ZTAiLCJpc3MiOiJidWlsZGtpdGUi -LCJleHAiOjE3NDk0MjUwNzQsImlhdCI6MTc0ODgxNjY3NCwib3JnYW5pemF0aW9uX2lkIjoiZDQ -wOTgyM2MtNWZhNy00MWM4LTkwMzMtNzI2OWM1ZmRlNGYzIn0.K6PY1ZRJs8NbsdNVkdOENuXUKa -y1IClQ9Rppd_ZuAjDZ6AlKy6o-Em9c5InmY7Fp-8JuBhkgWXNkVBP0mnyHWA", "BUILDKITE_P -ULL_REQUEST_LABELS=", "BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET -=IPfgsEMt4nBS7nNc8v6kB5ewad0H+7c6nfMpufYSwFa9T5fxQEizYeOYH8pb8Eb+61bXsY+peS -3jbUDPcMxVTeYreoxiwLWVwW6Ut+kiX4ywwYSQ+PiH3cWKtFdIxmqXfpp/MrukL6caZb+JjfgdV -KSrKUR4HikI8txHZSgmRcQnwb6wUDT6Z0ehBVjzuE9LzrmqzPcjYWlOvUo1unLdFwoqjzAXoNe7 -bVMprEbhjPO9ULe2vXAxsL1Rl0XUW3fMfozC1pmfZQzO7GJCp61vH9WiFoTjXrGnNdPL6wfUZXZ -Q3ui1Y4o3Y5ZnxeIE7RddRfituWJlkkw5D2J0nRg8nQ==", "BUILDKITE_PLUGIN_COPPERMIN -D_S3_PREFIX=s3://julialang-buildkite-artifacts/scimlbenchmarks", "BUILDKITE -_BUILD_CREATOR_EMAIL=accounts@chrisrackauckas.com", "XKB_CONFIG_ROOT=/cache -/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifac -ts/23d821271a00e164eb2b5c273985da44f9a831a1/share/X11/xkb", "BUILDKITE_SSH_ -KEYSCAN=true", "BUILDKITE_UNBLOCKER_EMAIL=accounts@chrisrackauckas.com", "B -UILDKITE_PROJECT_SLUG=julialang/scimlbenchmarks-dot-jl", "BUILDKITE_INITIAL -_JOB_ID=01972aec-7855-409e-ab37-8d23dd60ba67", "BUILDKITE_BIN_PATH=/usr/bin -", "PWD=/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl", -"GRDIR=/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d93 -7f953/artifacts/9d01ece285704bef6238fd8461f65f1b63aeaece", "BUILDKITE_GIT_C -HECKOUT_FLAGS=-f", "BUILDKITE_COMPUTE_TYPE=self-hosted", "BUILDKITE_GIT_SUB -MODULES=true", "BUILDKITE_AGENT_META_DATA_OS=linux", "CI=true", "BUILDKITE_ -STEP_KEY=benchmark-benchmarks-Jumps", "BUILDKITE_STEP_IDENTIFIER=benchmark- -benchmarks-Jumps", "BUILDKITE_PLUGIN_COPPERMIND_OUTPUTS_0=markdown/**/figur -es/*.png", "CONDA_PREFIX=/cache/julia-buildkite-plugin/depots/5b300254-1738 --4989-ae0a-f4d2d937f953/conda/3/x86_64", "BUILDKITE_PLUGIN_COPPERMIND_INPUT -S_2=./*.toml", "BUILDKITE_PLUGIN_COPPERMIND_OUTPUTS_3=markdown/**/*.svg", " -BUILDKITE_AGENT_PID=2", "BUILDKITE_LAST_HOOK_EXIT_STATUS=0", "BUILDKITE_AGE -NT_META_DATA_EXCLUSIVE=true", "BUILDKITE_PLUGIN_COPPERMIND_OUTPUTS_6=script -/**/*.jl", "BUILDKITE_BUILD_CREATOR=Christopher Rackauckas", "BUILDKITE_UNB -LOCKER=Christopher Rackauckas", "BUILDKITE_REBUILT_FROM_BUILD_ID=", "OPENBL -AS_DEFAULT_NUM_THREADS=1", "BUILDKITE_BRANCH=master", "JULIA_DEPOT_PATH=/ca -che/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953", "B -UILDKITE_PLUGIN_COPPERMIND_OUTPUTS_5=pdf/**/*.pdf", "BUILDKITE_AGENT_DEBUG_ -HTTP=false", "SHELL=/shells/bash", "BUILDKITE=true", "BUILDKITE_PLUGIN_CRYP -TIC_PRIVILEGED=true", "BUILDKITE_HOOKS_PATH=/hooks", "BUILDKITE_PIPELINE_DE -FAULT_BRANCH=master", "BUILDKITE_PLUGIN_NAME=COPPERMIND", "BUILDKITE_REBUIL -T_FROM_BUILD_NUMBER=", "HOME=/root", "BUILDKITE_PLUGIN_COPPERMIND_OUTPUTS_4 -=notebook/**/*.ipynb", "BUILDKITE_S3_DEFAULT_REGION=us-east-1", "BUILDKITE_ -TRIGGERED_FROM_BUILD_PIPELINE_SLUG=", "BUILDKITE_BUILD_CHECKOUT_PATH=/cache -/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl", "BUILDKITE_SCR -IPT_PATH=# Clear out these secrets as they're not needed during the actual -build\nBUILDKITE_S3_ACCESS_KEY_ID=\"\" BUILDKITE_S3_SECRET_ACCESS_KEY=\"\" -./.buildkite/build_benchmark.sh \"benchmarks/Jumps\"\n", "INVOCATION_ID=4cc -4229329854fe0bfb6afa2496b48ef", "BUILDKITE_PLUGIN_COPPERMIND_OUTPUTS_2=mark -down/**/*.pdf", "LANG=en_US.UTF-8", "BUILDKITE_PIPELINE_NAME=SciMLBenchmark -s.jl", "SHLVL=3", "XDG_RUNTIME_DIR=/run/user/21581", "OLDPWD=/cache/julia-b -uildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953", "FONTCONFIG_F -ILE=/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f9 -53/artifacts/2a6bae048c28452d329375cbb7479499115e45ad/etc/fonts/fonts.conf" -, "BUILDKITE_PLUGIN_CONFIGURATION={\"inputs\":[\"benchmarks/Jumps\",\"src/* -*/*.jl\",\"./*.toml\"],\"outputs\":[\"markdown/**/figures/*.png\",\"markdow -n/**/*.md\",\"markdown/**/*.pdf\",\"markdown/**/*.svg\",\"notebook/**/*.ipy -nb\",\"pdf/**/*.pdf\",\"script/**/*.jl\"],\"s3_prefix\":\"s3://julialang-bu -ildkite-artifacts/scimlbenchmarks\"}", "BUILDKITE_BUILD_PATH=/cache/build", - "BUILDKITE_BUILD_AUTHOR_EMAIL=accounts@chrisrackauckas.com", "BUILDKITE_TI -MEOUT=10080", "BUILDKITE_GIT_MIRRORS_PATH=/cache/repos", "BUILDKITE_STRICT_ -SINGLE_HOOKS=false", "BUILDKITE_LABEL=:hammer: benchmarks/Jumps", "FONTCONF -IG_PATH=/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d9 -37f953/artifacts/2a6bae048c28452d329375cbb7479499115e45ad/etc/fonts", "JOUR -NAL_STREAM=8:970893541", "BUILDKITE_AGENT_META_DATA_SANDBOX_JL=true", "BUIL -DKITE_BUILD_CREATOR_TEAMS=juliagpu-full-access:sciml-full-access", "BUILDKI -TE_PROJECT_PROVIDER=github", "QT_ACCESSIBILITY=1", "BUILDKITE_S3_SECRET_ACC -ESS_KEY=", "GKS_USE_CAIRO_PNG=true", "BUILDKITE_REPO_MIRROR=/cache/repos/ht -tps---github-com-SciML-SciMLBenchmarks-jl-git", "GIT_TERMINAL_PROMPT=0", "B -UILDKITE_JOB_ID=01972aee-952f-4edf-9681-772a5d47bdbe", "SYSTEMD_EXEC_PID=17 -97210", "BUILDKITE_REDACTED_VARS=*_PASSWORD,*_SECRET,*_TOKEN,*_PRIVATE_KEY, -*_ACCESS_KEY,*_SECRET_KEY,*_CONNECTION_STRING", "BUILDKITE_BUILD_AUTHOR=Chr -istopher Rackauckas", "USER=sabae", "GKSwstype=100", "BUILDKITE_REPO=https: -//github.com/SciML/SciMLBenchmarks.jl.git", "BUILDKITE_GIT_FETCH_FLAGS=-v - --prune --tags", "BUILDKITE_LOCAL_HOOKS_ENABLED=true", "MANAGERPID=59175", " -BUILDKITE_S3_ACCESS_KEY_ID=", "BUILDKITE_GIT_MIRRORS_LOCK_TIMEOUT=300", "BU -ILDKITE_AGENT_ID=01972d98-be0b-47d1-9586-9b70305b56e0", "BUILDKITE_GIT_MIRR -ORS_SKIP_UPDATE=false", "BUILDKITE_ARTIFACT_PATHS=", "BUILDKITE_BUILD_URL=h -ttps://buildkite.com/julialang/scimlbenchmarks-dot-jl/builds/3409", "BUILDK -ITE_MESSAGE=Merge pull request #1259 from SciML/jumps\n\nBump jumps tests", - "BUILDKITE_RETRY_COUNT=0", "LOGNAME=sabae", "JULIA_CPU_THREADS=128", "BUIL -DKITE_PLUGIN_JULIA_CACHE_DIR=/cache/julia-buildkite-plugin", "BUILDKITE_PLU -GIN_COPPERMIND_INPUT_HASH=5db57f718fd34b05f3c8371a16d76dab965bb0c2290233f4f -83648e323d053cb", "BUILDKITE_PLUGIN_CRYPTIC_BASE64_AGENT_PRIVATE_KEY_SECRET -=LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcFFJQkFBS0NBUUVBdFhzSjMxRm -0xSjdvSGM5b3hmWllKY3FxRk5yaXRMUUhxaDVJUHNGS3YySis1K1FVCkJGTWFEYzByN3M2dzQzU -jAxaG5FTU9ZWDQwK3lFQ094eWxxK1o3dHdxWlNxS2U1MThwc0RyeWRna0xJNzRnQUUKWVljU2Rn -b0xreGFqVjcva29IRUw4K3M0SnRUVTVCendURXVwTllTZGNQOFhQSmJLekY1RE5qdWJmeFA5Zjd -SNwpseklMdjVpdmdpcWU1bW1MRndZcG9IU0VRVTV0ZU9PSEErS2NjUDZ3K2d1Q0VxMUZFb0N2MD -RyaTFXaWpVZXorCjMrRFlTOFArUThkcTBiWFFmVEtVcnNLYTJHZy81ZmdIeWdEdWRHT2ZsdzUvV -EljR3VVbGNsd1hZb2tTRkpSWUIKRWtqVDlwQmdiTTRHMi9rVzRhZmd3eGxzbjd1bFFuUDQ2VS8x -ZFFJREFRQUJBb0lCQVFDTU5sVjRUbUlPWC8raQpHSDh3ZzVXekRSTy9MU1greXlFbzFHQ282NW9 -lcDdDNDVNUjZXdUpFUzRKbjdSVkpoczVHSkg0cDhYdi9TYkdmCk9wVEFiTCt6VVdSSUFPNC9tMW -RSYTJhN1NzY1d4RDN6N0dOMkhtK3E5elBlSHAxd3pIZU5aZ29BR0htM3RyUU0KMGpidUczN09OS -G1YdGQ1MEYyVHo1TmcwN0hURkJwV3hMMjJwNm9aZzgyUEk0OXIrdUpWWmZ5MU5HZVRnaFA4cgp2 -dVRVTVJIcldZa25YbUR1eDVSMHNIdDFoU2FvTXBFbSsrMWc1V09rSzZDTGFJbEV0ZitWVVBvR0p -iYlNYRzNJCmo5N1h5a3NGUDhGZ24wMWx4ZktGV1p4MXlnTVdsUm00SFNCTWVkc1FpWStqeG5Sd3 -BtRnh5L2pIOVhFTUppT0wKQSsvVFdCbUJBb0dCQU52cXROQjRuVS9zODIxTU9oalRPTmtFOGNJO -ENxV1BRRTZXcEFOYVY5UkVVcGVCZzhmMgpjTXg2VFMweE9EU0JRUk9PRnNEUG9pc1E0VVRGQmFi -alBLTU41d2IzNFVKYmN4V0ZwcGlLUHJMa09Zdmtqb01VCkNSb1pKK05Lb253RWh5bWJ0TG0yMHh -mUUZCamY1R1QvMHJZUWcxUkN1OVllSmE0Z3NWYWtSNGh4QW9HQkFOTkIKMzhxenJhTTBDeHhrSn -ZkVmlTY3g2MFowN2g4OHFISy9SV2dVK3ZZaitwZy9ibXBwMmdiUXZkYTJxaS84UEl2OApSb0Jwc -mY2Y285TmdSa2JmY05xZmFnM1Z5SDhBNW1iUE1nK0s4YmFuKzlwU003WkREVW1sdU03R3ZRSW5O -VnBCCnBJcE1uWEk5eDZSSFlpOFF2MHhXOXcyUmpmS09TbElYZFlITjZwOUZBb0dCQUp0NXdwMkV -PRXR5VE9NZnVnOGsKL1pMSVlSY2VGYlRZb3ZFc3BRWE4wRHc4bFZ1UmNCWmx6M2R3bTdGd2s3am -pESndEbjJodklzcHBvNmxYMVZnWQpYUjAxemZocU5QSVI3em52QkVuaHF0UVViKzdNQmtqN1dEZ -0FRdWY1TXdpVXR1NGVxOVdFUUpjY1A2a2FXTUZpCjc1aFI4bGNXMnU5VTN2VE5Iak1QNzVheEFv -R0JBSm5HdExsZlMwQ21USVF4SHZBaE1rSDJvMVZaSGxCY25oMVEKdjV3QTBhRkVGVkNuczU4QVN -EVjMwd2d0VlBxeTkvdkoraVBWU1ZNeUFFcUlKUC9IKytVWDcySDh3UUk1ekh6Lwp5MmZtOHdYTG -g1ZW5DSDllbFppTGFsZ1I4RmxWNHc4OUF5R3NuVnNnUDJlRWtxTEI1UTRUcTZnVDBLakVETE51C -jRobEhvOGFsQW9HQUhBVGltTGRkS0JFTkN2MXZyNnZ0d3JCZGRCbWlGSWFwaVcvMk5acWxCTFp1 -bEp6MEwzdCsKM3FvSUF0Uisxd2xpWkQwZGJnRGdVeVRMcnN5Y1RDSkZIczNIZTFXb3NCSzcxTml -ncFZhWEVzWnFpOHNENjlvUQo2QkFnaEdvbnNGbTEydzhhRGNDdm92WUxLTlhVV1BFT1c0akdvd2 -k0Tmx4NGZidHlkYXpIUEdnPQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=", "BUILD -KITE_PIPELINE_SLUG=scimlbenchmarks-dot-jl", "BUILDKITE_SHELL=/bin/bash -e - -c", "BUILDKITE_UNBLOCKER_ID=e8e997cc-aa1b-4cc5-8244-2786f678c8d6", "BUILDKI -TE_PLUGINS_ENABLED=true", "LANGUAGE=en_US", "GKS_FONTPATH=/cache/julia-buil -dkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/9d01ece2 -85704bef6238fd8461f65f1b63aeaece", "BUILDKITE_AGENT_NAME=exclusive-amdci1.0 -", "BUILDKITE_STEP_ID=01972aee-9502-491a-bb55-f9b5c4c2f5ac", "BUILDKITE_PLU -GIN_COPPERMIND_OUTPUTS_1=markdown/**/*.md", "BUILDKITE_TAG=", "OPENBLAS_MAI -N_FREE=1", "PATH=/cache/julia-buildkite-plugin/julia_installs/bin/linux/x64 -/1.10/julia-1.10-latest-linux-x86_64/bin:/usr/local/sbin:/usr/local/bin:/us -r/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/bin:/ -usr/local/bin:/usr/bin:/bin", "GKS_ENCODING=utf8", "BUILDKITE_AGENT_META_DA -TA_NUM_CPUS=128", "BUILDKITE_TRIGGERED_FROM_BUILD_NUMBER=", "BUILDKITE_AGEN -T_META_DATA_CONFIG_GITSHA=2a413ab3", "BUILDKITE_COMMAND=# Clear out these s -ecrets as they're not needed during the actual build\nBUILDKITE_S3_ACCESS_K -EY_ID=\"\" BUILDKITE_S3_SECRET_ACCESS_KEY=\"\" ./.buildkite/build_benchmark -.sh \"benchmarks/Jumps\"\n", "LIBDECOR_PLUGIN_DIR=/cache/julia-buildkite-pl -ugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/38e215c51e5c0f77 -bc7a8813ba4586632a8fc750/lib/libdecor/plugins-1", "BUILDKITE_PLUGIN_VALIDAT -ION=false", "BUILDKITE_AGENT_META_DATA_ARCH=x86_64", "BUILDKITE_COMMIT_RESO -LVED=true", "CONDARC=/cache/julia-buildkite-plugin/depots/5b300254-1738-498 -9-ae0a-f4d2d937f953/conda/3/x86_64/condarc-julia.yml", "FORCE_SANDBOX_MODE= -unprivileged", "BUILDKITE_TRIGGERED_FROM_BUILD_ID=", "TERM=xterm-256color", - "PYTHONIOENCODING=UTF-8", "BUILDKITE_PULL_REQUEST_BASE_BRANCH=", "BUILDKIT -E_PIPELINE_ID=5b300254-1738-4989-ae0a-f4d2d937f953", "_=/cache/julia-buildk -ite-plugin/julia_installs/bin/linux/x64/1.10/julia-1.10-latest-linux-x86_64 -/bin/julia", "BUILDKITE_BUILD_ID=01972aec-7845-4aa2-b22d-b17b13f3e399", "BU -ILDKITE_AGENT_ENDPOINT=https://shard-009.agent.buildkite.com/v3", "BUILDKIT -E_PLUGINS=[{\"github.com/staticfloat/cryptic-buildkite-plugin#v2\":{\"files -\":[\".buildkite/secrets/token.toml\"],\"variables\":[\"BUILDKITE_S3_ACCESS -_KEY_ID=\\\"U2FsdGVkX1+x3xs1ZRRZRt3FmwFQmYYKnpV7o8xKkX5Ib6y0o5fv0+rskVAj+JK -u\\\"\",\"BUILDKITE_S3_SECRET_ACCESS_KEY=\\\"U2FsdGVkX1+LWh1yX7LsMBlecEJLc0 -8eJrgOhurhd47CY1/jS3wCGVCQmS1t6f2j70spBoFdfc9kn2naj8HH5A==\\\"\",\"BUILDKIT -E_S3_DEFAULT_REGION=\\\"U2FsdGVkX18ccoE9FmtkwsCm1x0MLMBlN/FLcAyKkY4=\\\"\"] -}},{\"github.com/JuliaCI/julia-buildkite-plugin#v1\":{\"version\":\"1.10\"} -},{\"github.com/staticfloat/sandbox-buildkite-plugin\":{\"gid\":1000,\"uid\ -":1000,\"rootfs_url\":\"https://github.com/thazhemadam/openmodelica-rootfs- -image/releases/download/v1.23.0/rootfs-openmodelica-v1.23.0.amd64.tar.gz\", -\"workspaces\":[\"/cache/julia-buildkite-plugin:/cache/julia-buildkite-plug -in\"],\"rootfs_treehash\":\"82970243dc4f188e599a976abc20951f4aba2912\"}},{\ -"github.com/staticfloat/coppermind-buildkite-plugin#v1\":{\"inputs\":[\"ben -chmarks/Jumps\",\"src/**/*.jl\",\"./*.toml\"],\"outputs\":[\"markdown/**/fi -gures/*.png\",\"markdown/**/*.md\",\"markdown/**/*.pdf\",\"markdown/**/*.sv -g\",\"notebook/**/*.ipynb\",\"pdf/**/*.pdf\",\"script/**/*.jl\"],\"s3_prefi -x\":\"s3://julialang-buildkite-artifacts/scimlbenchmarks\"}}]", "BUILDKITE_ -SOCKETS_PATH=/root/.buildkite-agent/sockets", "SANDBOX_PERSISTENCE_DIR=/cac -he/sandbox_persistence", "BUILDKITE_GIT_CLEAN_FLAGS=-ffxdq", "BUILDKITE_COM -MIT=848ec8038b09c87176e24a8b86bead39044aff63", "BUILDKITE_PULL_REQUEST=fals -e", "BUILDKITE_ORGANIZATION_ID=d409823c-5fa7-41c8-9033-7269c5fde4f3", "GKS_ -QT=env LD_LIBRARY_PATH=/cache/julia-buildkite-plugin/depots/5b300254-1738-4 -989-ae0a-f4d2d937f953/artifacts/715b660f53eb83c33e199a44ececfd8dc03f2a27/li -b:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953 -/artifacts/5acd766faaca59c3c1f3cfa67e2bf6dcf1e3e883/lib:/cache/julia-buildk -ite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/d4c2f2966f -2932e4870b0488c3b8a6b92b6641a9/lib:/cache/julia-buildkite-plugin/julia_inst -alls/bin/linux/x64/1.10/julia-1.10-latest-linux-x86_64/bin/../lib/julia:/ca -che/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/arti -facts/7f882b869c126a717e15be05453b83bd9135eab0/lib:/cache/julia-buildkite-p -lugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/dc526f26fb179a3 -f68eb13fcbe5d2d2a5aa7eeac/lib:/cache/julia-buildkite-plugin/depots/5b300254 --1738-4989-ae0a-f4d2d937f953/artifacts/1d90be1fb2a7f5023513bdcbb8abf7727ded -6044/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d -937f953/artifacts/f8704eb01ec7508ae1f125b7ff89647997ed80cb/lib:/cache/julia --buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/e85 -74c15e0152044b131e5d6956374f4b0bacce7/lib:/cache/julia-buildkite-plugin/dep -ots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/4e7928c9107faa32c07a9cda -6bb7097690f3cdbb/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-498 -9-ae0a-f4d2d937f953/artifacts/94475b26c9b6ff3bed68391232c55fd81a4a64b4/lib: -/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/a -rtifacts/f5e52a42c85b68d1f7ee821d9d8c13a44c377956/lib:/cache/julia-buildkit -e-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/96bc7b9ddb31 -9d1a051535c85184aa2bf42dbd8b/lib:/cache/julia-buildkite-plugin/depots/5b300 -254-1738-4989-ae0a-f4d2d937f953/artifacts/2a6bae048c28452d329375cbb74794991 -15e45ad/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4 -d2d937f953/artifacts/0a1006d282bce91b5cd408c714cbb95d3bb4f515/lib:/cache/ju -lia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/ -59eff635528e6914e1a96db241e950195574903b/lib:/cache/julia-buildkite-plugin/ -depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/299dd9a174ebc497df2cf -4d30f1c6d10948c60ef/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738- -4989-ae0a-f4d2d937f953/artifacts/f0557b9a3c2c4667444e8fc63c1fc9c2c5cb9e63/l -ib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f95 -3/artifacts/6da9d8475fd9fd2867e3bd1f46f3913c800a316f/lib:/cache/julia-build -kite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/a3f956e67 -72ef4da35e128fd2a4477cf16fd3c84/lib:/cache/julia-buildkite-plugin/depots/5b -300254-1738-4989-ae0a-f4d2d937f953/artifacts/e2512e1cd411449b9bede7b4294c74 -09c9973345/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a --f4d2d937f953/artifacts/ed48bfcf31d2d5ebdc0a681d1ed07e1e9f9f0377/lib:/cache -/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifac -ts/b8a470e4553346122607f94ec60d83c77f061cd6/lib:/cache/julia-buildkite-plug -in/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/eb13375496c29fe521 -01a0e6710c54ff87aa0e20/lib:/cache/julia-buildkite-plugin/depots/5b300254-17 -38-4989-ae0a-f4d2d937f953/artifacts/5c030ff72c13f84fbbc8f93a146e34c6219a026 -1/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937 -f953/artifacts/bd1f25e7053ebc00ee7d82f3c5ec4cf1e9a51e17/lib:/cache/julia-bu -ildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/cf5d5f -8a6109be3f9c460a39768f57a3e53ff11d/lib:/cache/julia-buildkite-plugin/depots -/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/c8a20a2030f10b70947d8d2a6bf -f7f8b5f343fe9/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-a -e0a-f4d2d937f953/artifacts/0631e2a6a31b5692eec7a575836451b16b734ec0/lib:/ca -che/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/arti -facts/4abd0521d210cb9e48ea5e711873ba34dc05fc70/lib:/cache/julia-buildkite-p -lugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/0b5269206a6849e -48487ed04136c30b1f12443e7/lib:/cache/julia-buildkite-plugin/depots/5b300254 --1738-4989-ae0a-f4d2d937f953/artifacts/587de110e5f58fd435dc35b294df31bb7a75 -f692/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d -937f953/artifacts/fc239b3ff5739aeab252bd154fa4dd045fefe629/lib:/cache/julia --buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/a69 -6e1e3e6b8d3c2c4b67609357ebc5c35eabde1/lib:/cache/julia-buildkite-plugin/dep -ots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/85dab0a3f6b9cc2e5d61165e -e376bf46260812a4/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-498 -9-ae0a-f4d2d937f953/artifacts/5b83972689fb7dea5e89326f1c0ba60d68e962fb/lib: -/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/a -rtifacts/d007148a0838385ad09a5cc9f703679ddaffcf0b/lib:/cache/julia-buildkit -e-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/1156a1c62f59 -f758df3cda780d59a6c9cb3d7ae8/lib:/cache/julia-buildkite-plugin/depots/5b300 -254-1738-4989-ae0a-f4d2d937f953/artifacts/36e9b0d89deb511d38dc1f51d370e2b44 -5dd33ea/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4 -d2d937f953/artifacts/7882cd1425db289a3e1703b83c7e8678e7f397d9/lib:/cache/ju -lia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/ -52d9b3e9e3507f7b2cf723af43d0e7f095e2edc7/lib:/cache/julia-buildkite-plugin/ -depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/5b34e010ca7a3d88eeebe -cbc7a5b39ad72e33323/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738- -4989-ae0a-f4d2d937f953/artifacts/38e215c51e5c0f77bc7a8813ba4586632a8fc750/l -ib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f95 -3/artifacts/65c5e10af6182e66ace3d62ab4d99114f9009e7e/lib:/cache/julia-build -kite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/353f5c4e0 -91a41ba8da5297d1b4d13652aa7f775/lib:/cache/julia-buildkite-plugin/depots/5b -300254-1738-4989-ae0a-f4d2d937f953/artifacts/5cb2f5f8a13f3117c7770ed28b896e -ff85315555/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a --f4d2d937f953/artifacts/04915d2401d6f1b7b5e37382a0776ee2d20d343b/lib:/cache -/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifac -ts/f493bc948a41fd60ba4a5864a7127c7a2c8f863b/lib:/cache/julia-buildkite-plug -in/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/55f9376d5c77106b48 -13c4fb45a6b37a77d4d823/lib:/cache/julia-buildkite-plugin/depots/5b300254-17 -38-4989-ae0a-f4d2d937f953/artifacts/d03aca19e34a4289ab7f118cf0b212ca46eb49b -e/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937 -f953/artifacts/e3e8d2abb72b0145ee6de4b7be33e5a5c67e5f59/lib:/cache/julia-bu -ildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/45a076 -ac2b0b5e528159c96142254106709ec982/lib:/cache/julia-buildkite-plugin/depots -/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/4db1e58d71ac6bbb35ecc832033 -264c630d5d3b3/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-a -e0a-f4d2d937f953/artifacts/21ed7b5e888fb9b18f44ba3f4652f14d8beda78c/lib:/ca -che/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/arti -facts/872754c2f795d19a3e2e205b2bbaea659f28d11e/lib:/cache/julia-buildkite-p -lugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/7da37be2742b3d1 -cfe1c14bf5bbd85aed4887f46/lib:/cache/julia-buildkite-plugin/depots/5b300254 --1738-4989-ae0a-f4d2d937f953/artifacts/c35cb3f6f3043a4e962fd56b61ad91b4adb5 -57f7/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d -937f953/artifacts/13befbe35cffe7da192c7001ece18b4be3aa3720/lib:/cache/julia --buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/cac -d8c147f866d6672e1aca9bb01fb919a81e96a/lib:/cache/julia-buildkite-plugin/dep -ots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/b7dc5dce963737414a564aca -8d4b82ee388f4fa1/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-498 -9-ae0a-f4d2d937f953/artifacts/0d364e900393f710a03a5bafe2852d76e4d2c2cd/lib: -/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/a -rtifacts/1a2adcee7d99fea18ead33c350332626b262e29a/lib:/cache/julia-buildkit -e-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/40eea58ff37e -cc8fb6f21f41079a33b511b3ff92/lib:/cache/julia-buildkite-plugin/depots/5b300 -254-1738-4989-ae0a-f4d2d937f953/artifacts/79cc5446ced978de84b6e673e01da0ebf -dd6e4a5/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4 -d2d937f953/artifacts/443e05ab3771707793cdec96039306b08738a626/lib:/cache/ju -lia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/ -0ecdcf67bd5c1db95253c03ab63d57e40d0b4886/lib:/cache/julia-buildkite-plugin/ -depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/f03dd5ac03468009d5a99 -bbfcdf336c2dc372de4/lib:/cache/julia-buildkite-plugin/depots/5b300254-1738- -4989-ae0a-f4d2d937f953/artifacts/8b45e0c5c7fbecd1e34f024cdc22fec4be4c7807/l -ib:/cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f95 -3/artifacts/9d01ece285704bef6238fd8461f65f1b63aeaece/lib:/cache/julia-build -kite-plugin/julia_installs/bin/linux/x64/1.10/julia-1.10-latest-linux-x86_6 -4/bin/../lib/julia:/cache/julia-buildkite-plugin/julia_installs/bin/linux/x -64/1.10/julia-1.10-latest-linux-x86_64/bin/../lib /cache/julia-buildkite-pl -ugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953/artifacts/9d01ece285704bef -6238fd8461f65f1b63aeaece/bin/gksqt"]), ProcessExited(1)) [1] -``` - - - - - -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) - 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)) -end -``` - -![](figures/MultivariateHawkes_16_1.png) - - - -# Correctness: QQ-Plots - -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]) -``` - -```julia -function hawkes_Λ(i::Int, g, p) - @inline @inbounds function Λ(t, h) - λ, α, β = p - x = λ * t - for j in g[i] - for _t in h[j] - if _t >= t - break - end - x += (α / β) * (1 - exp(-β * (t - _t))) - end - end - return x - end - return Λ -end - -function hawkes_Λ(g, p) - return [hawkes_Λ(i, g, p) for i = 1:length(g)] -end - -Λ = hawkes_Λ(g, p) -``` - -``` -10-element Vector{Main.var"##WeaveSandBox#225".var"#Λ#33"{Int64, Vector{Vec -tor{Int64}}, Tuple{Float64, Float64, Float64}}}: - (::Main.var"##WeaveSandBox#225".var"#Λ#33"{Int64, Vector{Vector{Int64}}, T -uple{Float64, Float64, Float64}}) (generic function with 1 method) - (::Main.var"##WeaveSandBox#225".var"#Λ#33"{Int64, Vector{Vector{Int64}}, T -uple{Float64, Float64, Float64}}) (generic function with 1 method) - (::Main.var"##WeaveSandBox#225".var"#Λ#33"{Int64, Vector{Vector{Int64}}, T -uple{Float64, Float64, Float64}}) (generic function with 1 method) - (::Main.var"##WeaveSandBox#225".var"#Λ#33"{Int64, Vector{Vector{Int64}}, T -uple{Float64, Float64, Float64}}) (generic function with 1 method) - (::Main.var"##WeaveSandBox#225".var"#Λ#33"{Int64, Vector{Vector{Int64}}, T -uple{Float64, Float64, Float64}}) (generic function with 1 method) - (::Main.var"##WeaveSandBox#225".var"#Λ#33"{Int64, Vector{Vector{Int64}}, T -uple{Float64, Float64, Float64}}) (generic function with 1 method) - (::Main.var"##WeaveSandBox#225".var"#Λ#33"{Int64, Vector{Vector{Int64}}, T -uple{Float64, Float64, Float64}}) (generic function with 1 method) - (::Main.var"##WeaveSandBox#225".var"#Λ#33"{Int64, Vector{Vector{Int64}}, T -uple{Float64, Float64, Float64}}) (generic function with 1 method) - (::Main.var"##WeaveSandBox#225".var"#Λ#33"{Int64, Vector{Vector{Int64}}, T -uple{Float64, Float64, Float64}}) (generic function with 1 method) - (::Main.var"##WeaveSandBox#225".var"#Λ#33"{Int64, Vector{Vector{Int64}}, T -uple{Float64, Float64, Float64}}) (generic function with 1 method) -``` - - - - - -We need a method for extracting the history from a simulation run. Below, we define such functions for each type of algorithm. - -```julia -""" -Given an ODE solution `sol`, recover the timestamp in which events occurred. It -returns a vector with the history of each process in `sol`. - -It assumes that `JumpProblem` was initialized with `save_positions` equal to -`(true, false)`, `(false, true)` or `(true, true)` such the system's state is -saved before and/or after the jump occurs; and, that `sol.u` is a -non-decreasing series that counts the total number of events observed as a -function of time. -""" -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 - h = Vector{typeof(t)}(undef, k) - @inbounds for i = 1:k - h[i] = t[mask[:, i]] - end - return h -end - -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) - else - u = sol.u - end - return histories(u, sol.t) -end - -function histories(sol::S) where {S<:PDMP.PDMPResult} - return histories(sol.xd.u, sol.time) -end - -function histories(sols) - map(histories, sols) -end -``` - -``` -histories (generic function with 4 methods) -``` - - - - - -We also need to compute the quantiles of the empirical distribution given a history of events `hs`, the compensator `Λ` and the target quantiles `quant`. - -```julia -import Distributions: Exponential - -""" -Computes the empirical and expected quantiles given a history of events `hs`, -the compensator `Λ` and the target quantiles `quant`. - -The history `hs` is a vector with the history of each process. Alternatively, -the function also takes a vector of histories containing the histories from -multiple runs. - -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 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) - _Δ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] - end - Δs[k] = reduce(vcat, _Δs) - end - empirical_quant = map((_Δs) -> quantile(_Δs, quant), Δs) - expected_quant = quantile(Exponential(1.0), quant) - return empirical_quant, expected_quant -end - -""" -Compute the compensator `Λ` value for each timestamp recorded in history `hs`. - -The history `hs` is a vector with the history of each process. Alternatively, -the function also takes a vector of histories containing the histories from -multiple runs. - -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}} - _hs = similar(hs) - @inbounds for n = 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} - @inbounds hsk = hs[k] - @inbounds Λk = Λ[k] - _hs = similar(hsk) - @inbounds for n = 1:length(hsk) - _hs[n] = Λk(hsk[n], hs) - end - return _hs -end - -function apply_Λ(hs::V, Λ) where {V<:Vector{<:Vector{<:Number}}} - _hs = similar(hs) - @inbounds for k = 1:length(_hs) - _hs[k] = apply_Λ(hs[k], Λ) - end - return _hs -end - -function apply_Λ(hs::V, Λ::A) where {V<:Vector{<:Vector{<:Number}},A<:Array} - _hs = similar(hs) - @inbounds for k = 1:length(_hs) - _hs[k] = apply_Λ(k, hs, Λ) - end - return _hs -end - -function apply_Λ(hs::V, Λ) where {V<:Vector{<:Vector{<:Vector{<:Number}}}} - return map((_hs) -> apply_Λ(_hs, Λ), hs) -end -``` - -``` -apply_Λ (generic function with 5 methods) -``` - - - - - -We can construct QQ-plots with a Plot recipe as following. - -```julia -@userplot QQPlot -@recipe function f(x::QQPlot) - empirical_quant, expected_quant = x.args - max_empirical_quant = maximum(maximum, empirical_quant) - max_expected_quant = maximum(expected_quant) - upperlim = ceil(maximum([max_empirical_quant, max_expected_quant])) - @series begin - seriestype := :line - linecolor := :lightgray - label --> "" - (x) -> x - end - @series begin - seriestype := :scatter - aspect_ratio := :equal - xlims := (0.0, upperlim) - ylims := (0.0, upperlim) - xaxis --> "Expected" - yaxis --> "Empirical" - markerstrokewidth --> 0 - markerstrokealpha --> 0 - markersize --> 1.5 - size --> (400, 500) - label --> permutedims(["quantiles $i" for i = 1:length(empirical_quant)]) - expected_quant, empirical_quant - end -end -``` - - - - -Now, we simulate all of the algorithms we defined in the previous Section ``250`` times to produce their QQ-plots. - -```julia -let fig = [] - for (i, (algo, stepper, use_recursion, label)) in enumerate(algorithms) - @info label - if algo isa PyTick - _p = (p[1], p[2], p[3]) - 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 - elseif algo isa PDMPCHVFull - _p = (p[1], p[2], p[3], nothing, nothing, g) - else - if use_recursion - h = zeros(eltype(tspan), nv(G)) - ϕ = zeros(eltype(tspan), nv(G)) - urate = 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) - 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) - if algo isa PyTick - jump_prob.reset() - jump_prob.simulate() - runs[n] = jump_prob.timestamps - else - if ~(algo isa PDMPCHVFull) - if use_recursion - h .= 0 - ϕ .= 0 - else - for _h in h empty!(_h) end - end - if ~(algo isa PDMPCHVSimple) - urate .= 0 - end - end - runs[n] = histories(solve(jump_prob, stepper)) - end - end - qqs = qq(runs, Λ) - 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)) -end -``` - -![](figures/MultivariateHawkes_21_1.png) - - - -# Benchmarking performance - -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. - -```julia -tspan = (0.0, 25.0) -p = (0.5, 0.1, 5.0) -Vs = append!([1], 5:5:95) -Gs = [erdos_renyi(V, 0.2, seed = 6221) for V in Vs] - -bs = Vector{Vector{BenchmarkTools.Trial}}() - -for (algo, stepper, use_recursion, label) in algorithms - @info label - global _stepper = stepper - 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)] - 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) - else - 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) - else - if use_recursion - global h = zeros(eltype(tspan), nv(G)) - global urate = zeros(eltype(tspan), nv(G)) - 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 urate = zeros(eltype(tspan), nv(G)) - _p = (p[1], p[2], p[3], h, urate) - end - end - 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, - ) - else - if algo isa PDMPCHVFull - @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,) - else - @benchmark(solve(jump_prob, _stepper), - 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, - ) - else - @benchmark( - solve(jump_prob, _stepper), - setup = ([empty!(_h) for _h in h]; urate .= 0), - samples = 50, - evals = 1, - seconds = 10, - ) - end - end - end - catch e - BenchmarkTools.Trial( - BenchmarkTools.Parameters(samples = 50, evals = 1, seconds = 10), - ) - end - push!(_bs, trial) - if (nv(G) == 1 || nv(G) % 10 == 0) - 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 -end -``` - -``` -algo=Direct (brute-force), V = 1, length = 50, median time = 98.719 μs -algo=Direct (brute-force), V = 10, length = 50, median time = 10.733 ms -algo=Direct (brute-force), V = 20, length = 50, median time = 84.722 ms -algo=Direct (brute-force), V = 30, length = 37, median time = 275.204 ms -algo=Direct (brute-force), V = 40, length = 7, median time = 1.551 s -algo=Direct (brute-force), V = 50, length = 4, median time = 3.240 s -algo=Direct (brute-force), V = 60, length = 2, median time = 5.686 s -algo=Direct (brute-force), V = 70, length = 1, median time = 10.190 s -algo=Direct (brute-force), V = 80, length = 1, median time = 15.298 s -algo=Direct (brute-force), V = 90, length = 1, median time = 20.870 s -algo=Coevolve (brute-force), V = 1, length = 50, median time = 3.340 μs -algo=Coevolve (brute-force), V = 10, length = 50, median time = 207.068 μs -algo=Coevolve (brute-force), V = 20, length = 50, median time = 1.310 ms -algo=Coevolve (brute-force), V = 30, length = 50, median time = 3.151 ms -algo=Coevolve (brute-force), V = 40, length = 50, median time = 8.119 ms -algo=Coevolve (brute-force), V = 50, length = 50, median time = 17.098 ms -algo=Coevolve (brute-force), V = 60, length = 50, median time = 29.820 ms -algo=Coevolve (brute-force), V = 70, length = 50, median time = 50.014 ms -algo=Coevolve (brute-force), V = 80, length = 50, median time = 73.230 ms -algo=Coevolve (brute-force), V = 90, length = 50, median time = 122.305 ms -algo=Direct (recursive), V = 1, length = 50, median time = 92.914 μs -algo=Direct (recursive), V = 10, length = 50, median time = 4.804 ms -algo=Direct (recursive), V = 20, length = 50, median time = 24.125 ms -algo=Direct (recursive), V = 30, length = 50, median time = 69.895 ms -algo=Direct (recursive), V = 40, length = 11, median time = 979.790 ms -algo=Direct (recursive), V = 50, length = 6, median time = 1.800 s -algo=Direct (recursive), V = 60, length = 4, median time = 3.087 s -algo=Direct (recursive), V = 70, length = 2, median time = 5.412 s -algo=Direct (recursive), V = 80, length = 2, median time = 8.048 s -algo=Direct (recursive), V = 90, length = 1, median time = 11.911 s -algo=Coevolve (recursive), V = 1, length = 50, median time = 3.830 μs -algo=Coevolve (recursive), V = 10, length = 50, median time = 74.740 μs -algo=Coevolve (recursive), V = 20, length = 50, median time = 263.803 μs -algo=Coevolve (recursive), V = 30, length = 50, median time = 493.786 μs -algo=Coevolve (recursive), V = 40, length = 50, median time = 899.168 μs -algo=Coevolve (recursive), V = 50, length = 50, median time = 1.485 ms -algo=Coevolve (recursive), V = 60, length = 50, median time = 2.202 ms -algo=Coevolve (recursive), V = 70, length = 50, median time = 3.112 ms -algo=Coevolve (recursive), V = 80, length = 50, median time = 4.023 ms -algo=Coevolve (recursive), V = 90, length = 50, median time = 5.461 ms -algo=PDMPCHVSimple (brute-force), V = 1, length = 50, median time = 71.079 -μs -algo=PDMPCHVSimple (brute-force), V = 10, length = 50, median time = 5.005 -ms -algo=PDMPCHVSimple (brute-force), V = 20, length = 50, median time = 41.739 - ms -algo=PDMPCHVSimple (brute-force), V = 30, length = 50, median time = 113.93 -7 ms -algo=PDMPCHVSimple (brute-force), V = 40, length = 35, median time = 285.70 -5 ms -algo=PDMPCHVSimple (brute-force), V = 50, length = 17, median time = 602.09 -8 ms -algo=PDMPCHVSimple (brute-force), V = 60, length = 10, median time = 1.083 -s -algo=PDMPCHVSimple (brute-force), V = 70, length = 6, median time = 1.898 s -algo=PDMPCHVSimple (brute-force), V = 80, length = 4, median time = 2.879 s -algo=PDMPCHVSimple (brute-force), V = 90, length = 3, median time = 4.524 s -algo=PDMPCHVSimple (recursive), V = 1, length = 50, median time = 71.570 μs -algo=PDMPCHVSimple (recursive), V = 10, length = 50, median time = 343.667 -μs -algo=PDMPCHVSimple (recursive), V = 20, length = 50, median time = 800.223 -μs -algo=PDMPCHVSimple (recursive), V = 30, length = 50, median time = 1.507 ms -algo=PDMPCHVSimple (recursive), V = 40, length = 50, median time = 2.474 ms -algo=PDMPCHVSimple (recursive), V = 50, length = 50, median time = 3.620 ms -algo=PDMPCHVSimple (recursive), V = 60, length = 50, median time = 5.083 ms -algo=PDMPCHVSimple (recursive), V = 70, length = 50, median time = 7.069 ms -algo=PDMPCHVSimple (recursive), V = 80, length = 50, median time = 9.347 ms -algo=PDMPCHVSimple (recursive), V = 90, length = 50, median time = 12.089 m -s -algo=PDMPCHVFull, V = 1, length = 50, median time = 70.070 μs -algo=PDMPCHVFull, V = 10, length = 50, median time = 482.171 μs -algo=PDMPCHVFull, V = 20, length = 50, median time = 739.314 μs -algo=PDMPCHVFull, V = 30, length = 50, median time = 1.216 ms -algo=PDMPCHVFull, V = 40, length = 50, median time = 1.531 ms -algo=PDMPCHVFull, V = 50, length = 50, median time = 1.891 ms -algo=PDMPCHVFull, V = 60, length = 50, median time = 2.557 ms -algo=PDMPCHVFull, V = 70, length = 50, median time = 3.099 ms -algo=PDMPCHVFull, V = 80, length = 50, median time = 3.716 ms -algo=PDMPCHVFull, V = 90, length = 50, median time = 4.443 ms -``` - - - -```julia -let fig = plot( - yscale = :log10, - xlabel = "V", - ylabel = "Time (ns)", - legend_position = :outertopright, -) - for (i, (algo, stepper, use_recursion, label)) in enumerate(algorithms) - _bs, _Vs = [], [] - for (j, b) in enumerate(bs[i]) - if length(b) == 50 - push!(_bs, median(b.times)) - push!(_Vs, Vs[j]) - end - end - plot!(_Vs, _bs, label=label) - end - title!("Simulations, 50 samples: nodes × time") -end -``` - -![](figures/MultivariateHawkes_23_1.png) - - - -# References - -[1] D. J. Daley and D. Vere-Jones. An Introduction to the Theory of Point Processes: Volume I: Elementary Theory and Methods. Probability and Its Applications, An Introduction to the Theory of Point Processes. Springer-Verlag, 2 edition. doi:10.1007/b97277. - -[2] Patrick J. Laub, Young Lee, and Thomas Taimre. The Elements of Hawkes Processes. Springer International Publishing. doi:10.1007/978-3-030-84639-8. diff --git a/markdown/Jumps/NegFeedback_GeneExpr.md b/markdown/Jumps/NegFeedback_GeneExpr.md index 2df7f704a..4145dbea1 100644 --- a/markdown/Jumps/NegFeedback_GeneExpr.md +++ b/markdown/Jumps/NegFeedback_GeneExpr.md @@ -17,6 +17,7 @@ fmt = :png Our model is + ```julia rn = prob_jump_dnarepressor.network reactions(rn) @@ -39,17 +40,20 @@ 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] +tf = prob_jump_dnarepressor.tstop +ploth = plot(reuse = false) +for (i, method) in enumerate(methods) + jump_prob = JumpProblem( + rn, prob_jump_dnarepressor.u0, (0.0, tf), prob_jump_dnarepressor.rates; + aggregator = 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) ``` ![](figures/NegFeedback_GeneExpr_3_1.png) @@ -77,9 +81,12 @@ run_benchmark! (generic function with 1 method) 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_jump_dnarepressor.u0, (0.0, tf), prob_jump_dnarepressor.rates; + aggregator = 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 @@ -99,20 +106,22 @@ println(medtimes/medtimes[1]) ``` ``` -[1.0, 1.168571579808871, 0.8909985219448436, 1.6444116892582443, 1.72871783 -804913, 1.771105039638752, 3.3619565704234238, 2.4499456417731778, 1.874385 -6706013606] +[1.0, 1.2665766032258163, 0.9578719615024534, 1.7313847711463575, 1.8682014 +04623731, 1.8700326607037758, 3.4663832616180317, 2.741449818094213, 1.9279 +726272196929] ``` ```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") ``` @@ -125,7 +134,6 @@ title!("Negative Feedback Gene Expression Model") These benchmarks are a part of the SciMLBenchmarks.jl repository, found at: [https://github.com/SciML/SciMLBenchmarks.jl](https://github.com/SciML/SciMLBenchmarks.jl). For more information on high-performance scientific machine learning, check out the SciML Open Source Software Organization [https://sciml.ai](https://sciml.ai). To locally run this benchmark, do the following commands: - ``` using SciMLBenchmarks SciMLBenchmarks.weave_file("benchmarks/Jumps","NegFeedback_GeneExpr.jmd") @@ -134,8 +142,8 @@ SciMLBenchmarks.weave_file("benchmarks/Jumps","NegFeedback_GeneExpr.jmd") Computer Information: ``` -Julia Version 1.10.9 -Commit 5595d20a287 (2025-03-10 12:51 UTC) +Julia Version 1.10.12 +Commit d93beab124c (2026-08-15 10:29 UTC) Build Info: Official https://julialang.org/ release Platform Info: @@ -144,432 +152,372 @@ Platform Info: WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver2) -Threads: 1 default, 0 interactive, 1 GC (on 128 virtual cores) +Threads: 128 default, 0 interactive, 64 GC (on 128 virtual cores) Environment: - JULIA_CPU_THREADS = 128 - JULIA_DEPOT_PATH = /cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953 + JULIA_NUM_THREADS = auto ``` Package Information: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Project.toml` - [6e4b80f9] BenchmarkTools v1.6.0 - [479239e8] Catalyst v15.0.8 - [8f4d0f93] Conda v1.10.2 - [a93c6f00] DataFrames v1.7.0 - [0c46a032] DifferentialEquations v7.16.1 - [31c24e10] Distributions v0.25.120 - [86223c79] Graphs v1.12.1 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 - [91a5bcdd] Plots v1.40.13 +Status `/julia/github-runners/amdci1-1/_work/SciMLBenchmarks.jl/SciMLBenchmarks.jl/benchmarks/Jumps/Project.toml` + [6e4b80f9] BenchmarkTools v1.8.0 + [479239e8] Catalyst v16.4.0 + [8f4d0f93] Conda v1.10.3 + [a93c6f00] DataFrames v1.8.2 + [0c46a032] DifferentialEquations v8.1.1 + [31c24e10] Distributions v0.25.131 + [86223c79] Graphs v1.14.0 + [faf0f6d7] JumpProblemLibrary v2.0.3 + [ccbc3e58] JumpProcesses v9.30.1 + [961ee093] ModelingToolkit v11.40.0 + [1dea7af3] OrdinaryDiffEq v7.8.1 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 + [91a5bcdd] Plots v1.41.7 [438e738f] PyCall v1.96.4 - [b4db0fb7] ReactionNetworkImporters v0.16.1 - [31c91b34] SciMLBenchmarks v0.1.3 - [860ef19b] StableRNGs v1.0.3 - [f3b207a7] StatsPlots v0.15.7 - [c3572dad] Sundials v4.28.0 + [b4db0fb7] ReactionNetworkImporters v1.5.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [860ef19b] StableRNGs v1.0.4 + [f3b207a7] StatsPlots v0.15.8 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 [37e2e46d] LinearAlgebra [9a3f8284] Random [10745b16] Statistics v1.10.0 -Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated` +Info Packages marked with ⌃ have new versions available and may be upgradable. ``` And the full manifest: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Manifest.toml` - [47edcb42] ADTypes v1.14.0 +Status `/julia/github-runners/amdci1-1/_work/SciMLBenchmarks.jl/SciMLBenchmarks.jl/benchmarks/Jumps/Manifest.toml` + [47edcb42] ADTypes v1.24.0 + [14f7f29c] AMD v0.5.3 [621f4979] AbstractFFTs v1.5.0 + [6e696c72] AbstractPlutoDingetjes v1.4.0 [1520ce14] AbstractTrees v0.4.5 - [7d9f7c33] Accessors v0.1.42 - [79e6a3ab] Adapt v4.3.0 + [7d9f7c33] Accessors v0.1.45 + [79e6a3ab] Adapt v4.7.0 [66dad0bd] AliasTables v1.1.3 - [a95523ee] AlmostBlockDiagonals v0.1.10 [ec485272] ArnoldiMethod v0.4.0 [7d9fca2a] Arpack v0.5.4 - [4fba245c] ArrayInterface v7.19.0 - [4c555306] ArrayLayouts v1.11.1 + [4fba245c] ArrayInterface v7.30.0 + [4c555306] ArrayLayouts v1.12.2 [13072b0f] AxisAlgorithms v1.1.0 - [aae01518] BandedMatrices v1.9.4 - [6e4b80f9] BenchmarkTools v1.6.0 -⌅ [e2ed5e7c] Bijections v0.1.10 - [d1d4a3ce] BitFlags v0.1.9 - [62783981] BitTwiddlingConvenienceFunctions v0.1.6 - [8e7c35d0] BlockArrays v1.6.3 - [764a87c0] BoundaryValueDiffEq v5.17.0 - [7227322d] BoundaryValueDiffEqAscher v1.6.1 - [56b672f2] BoundaryValueDiffEqCore v1.9.0 - [85d9eb09] BoundaryValueDiffEqFIRK v1.7.0 - [1a22d4ce] BoundaryValueDiffEqMIRK v1.7.0 - [9255f1d6] BoundaryValueDiffEqMIRKN v1.6.1 - [ed55bfe0] BoundaryValueDiffEqShooting v1.7.0 - [70df07ce] BracketingNonlinearSolve v1.3.0 + [aae01518] BandedMatrices v1.12.0 + [6e4b80f9] BenchmarkTools v1.8.0 + [e2ed5e7c] Bijections v0.2.2 + [b2a6c25c] BinaryHeaps v1.1.0 + [caf10ac8] BipartiteGraphs v0.1.12 + [8e7c35d0] BlockArrays v1.10.0 + [70df07ce] BracketingNonlinearSolve v1.12.6 [fa961155] CEnum v0.5.0 - [2a0fbf3d] CPUSummary v0.2.6 - [479239e8] Catalyst v15.0.8 - [d360d2e6] ChainRulesCore v1.25.1 - [fb6a15b2] CloseOpenIntervals v0.1.13 + [479239e8] Catalyst v16.4.0 + [d360d2e6] ChainRulesCore v1.26.1 [aaaa29a8] Clustering v0.15.8 - [944b1d66] CodecZlib v0.7.8 - [35d6a980] ColorSchemes v3.29.0 + [35d6a980] ColorSchemes v3.31.0 [3da002f7] ColorTypes v0.12.1 [c3611d14] ColorVectorSpace v0.11.0 [5ae59095] Colors v0.13.1 - [861a8166] Combinatorics v1.0.3 - [a80b9123] CommonMark v0.9.1 - [38540f10] CommonSolve v0.2.4 +⌅ [861a8166] Combinatorics v1.0.2 + [38540f10] CommonSolve v0.2.14 [bbf7d656] CommonSubexpressions v0.3.1 - [f70d9fcc] CommonWorldInvalidations v1.0.0 - [34da2185] Compat v4.16.0 + [f70d9fcc] CommonWorldInvalidations v1.2.0 + [34da2185] Compat v4.18.1 [b152e2b5] CompositeTypes v0.1.4 [a33af91c] CompositionsBase v0.1.2 - [2569d6c7] ConcreteStructs v0.2.3 - [f0e56b4a] ConcurrentUtilities v2.5.0 - [8f4d0f93] Conda v1.10.2 - [187b0558] ConstructionBase v1.5.8 + [2569d6c7] ConcreteStructs v0.2.8 + [8f4d0f93] Conda v1.10.3 + [187b0558] ConstructionBase v1.6.0 [d38c429a] Contour v0.6.3 - [adafc99b] CpuId v0.3.1 - [a8cc5b0e] Crayons v4.1.1 + [a8cc5b0e] Crayons v4.2.0 [9a962f9c] DataAPI v1.16.0 - [a93c6f00] DataFrames v1.7.0 - [864edb3b] DataStructures v0.18.22 + [a93c6f00] DataFrames v1.8.2 + [864edb3b] DataStructures v0.19.6 [e2d170a0] DataValueInterfaces v1.0.0 - [bcd4f6db] DelayDiffEq v5.53.1 [8bb1440f] DelimitedFiles v1.9.1 - [2b5f629d] DiffEqBase v6.175.0 - [459566f4] DiffEqCallbacks v4.6.0 - [77a26b50] DiffEqNoiseProcess v5.24.1 + [2b5f629d] DiffEqBase v7.19.0 + [459566f4] DiffEqCallbacks v4.19.3 [163ba53b] DiffResults v1.1.0 - [b552c78f] DiffRules v1.15.1 - [0c46a032] DifferentialEquations v7.16.1 -⌅ [a0c0ee7d] DifferentiationInterface v0.6.54 - [8d63f2c5] DispatchDoctor v0.4.19 + [b552c78f] DiffRules v1.16.0 + [0c46a032] DifferentialEquations v8.1.1 + [a0c0ee7d] DifferentiationInterface v0.7.21 + [8d63f2c5] DispatchDoctor v0.4.28 [b4f34e82] Distances v0.10.12 - [31c24e10] Distributions v0.25.120 - [ffbed154] DocStringExtensions v0.9.4 - [5b8099bc] DomainSets v0.7.15 - [7c1d4256] DynamicPolynomials v0.6.2 - [06fc5a27] DynamicQuantities v1.8.0 - [4e289a0a] EnumX v1.0.5 -⌃ [f151be2c] EnzymeCore v0.8.10 - [460bff9d] ExceptionUnwrapping v0.1.11 - [d4d017d3] ExponentialUtilities v1.27.0 - [e2ba6199] ExprTools v0.1.10 + [31c24e10] Distributions v0.25.131 + [ffbed154] DocStringExtensions v0.9.5 + [5b8099bc] DomainSets v0.8.1 + [7c1d4256] DynamicPolynomials v0.6.7 + [06fc5a27] DynamicQuantities v1.13.0 + [4e289a0a] EnumX v1.0.7 + [f151be2c] EnzymeCore v0.8.21 + [e2ba6199] ExprTools v0.1.11 [55351af7] ExproniconLite v0.10.14 - [c87230d0] FFMPEG v0.4.2 - [7a1cc6ca] FFTW v1.8.1 - [9d29842c] FastAlmostBandedMatrices v0.1.5 - [7034ab61] FastBroadcast v0.3.5 + [c87230d0] FFMPEG v0.4.5 + [b86e33f2] FFTA v0.3.1 + [7034ab61] FastBroadcast v1.4.0 [9aa1b823] FastClosures v0.3.2 - [442a2c76] FastGaussQuadrature v1.0.2 - [a4df4552] FastPower v1.1.2 - [1a297f60] FillArrays v1.13.0 - [64ca27bc] FindFirstFunctions v1.4.1 - [6a86dc24] FiniteDiff v2.27.0 - [53c48c17] FixedPointNumbers v0.8.5 + [a4df4552] FastPower v1.5.0 + [1a297f60] FillArrays v1.17.0 + [64ca27bc] FindFirstFunctions v3.2.1 + [6a86dc24] FiniteDiff v2.33.0 +⌅ [53c48c17] FixedPointNumbers v0.8.6 [1fa38f19] Format v1.3.7 -⌅ [f6369f11] ForwardDiff v0.10.38 + [f6369f11] ForwardDiff v1.4.5 + [a85aefff] FunctionMaps v0.1.2 [069b7b12] FunctionWrappers v1.1.3 - [77dc65aa] FunctionWrappersWrappers v0.1.3 - [d9f16b24] Functors v0.5.2 + [77dc65aa] FunctionWrappersWrappers v1.13.0 [46192b85] GPUArraysCore v0.2.0 - [28b8d3ca] GR v0.73.16 - [c145ed77] GenericSchur v0.5.5 - [d7ba0133] Git v1.4.0 - [c27321d9] Glob v1.3.1 - [86223c79] Graphs v1.12.1 + [28b8d3ca] GR v0.73.27 + [a0844989] Gamma v1.2.0 + [d7ba0133] Git v1.5.0 + [86223c79] Graphs v1.14.0 [42e2da0e] Grisu v1.0.2 - [cd3eb016] HTTP v1.10.16 - [eafb193a] Highlights v0.5.3 - [34004b35] HypergeometricFunctions v0.3.28 -⌃ [7073ff75] IJulia v1.27.0 - [615f187c] IfElse v0.1.1 +⌅ [eafb193a] Highlights v0.5.3 + [34004b35] HypergeometricFunctions v0.3.30 + [7073ff75] IJulia v1.34.4 + [3263718b] ImplicitDiscreteSolve v2.2.0 [d25df0c9] Inflate v0.1.5 - [842dd82b] InlineStrings v1.4.3 - [18e54dd8] IntegerMathUtils v0.1.2 -⌅ [a98d9a8b] Interpolations v0.15.1 - [8197267c] IntervalSets v0.7.11 + [842dd82b] InlineStrings v1.4.5 + [18e54dd8] IntegerMathUtils v0.1.4 + [a98d9a8b] Interpolations v0.16.3 + [8197267c] IntervalSets v0.7.14 [3587e190] InverseFunctions v0.1.17 [41ab1584] InvertedIndices v1.3.1 - [92d709cd] IrrationalConstants v0.2.4 + [92d709cd] IrrationalConstants v0.2.6 [82899510] IteratorInterfaceExtensions v1.0.0 [1019f520] JLFzf v0.1.11 - [692b3bcd] JLLWrappers v1.7.0 - [682c06a0] JSON v0.21.4 + [692b3bcd] JLLWrappers v1.8.0 +⌅ [682c06a0] JSON v0.21.4 [ae98c720] Jieko v0.2.1 - [98e50ef6] JuliaFormatter v2.1.2 -⌅ [70703baa] JuliaSyntax v0.4.10 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 - [5ab0869b] KernelDensity v0.6.9 - [ba0b0d4f] Krylov v0.10.1 - [7f56f5a3] LSODA v0.7.5 - [b964fa9f] LaTeXStrings v1.4.0 - [23fbe1c1] Latexify v0.16.8 - [10f19ff3] LayoutPointers v0.1.17 - [5078a376] LazyArrays v2.6.1 - [2d8b4e74] LevyArea v1.0.0 - [87fe0de2] LineSearch v0.1.4 - [d3d80556] LineSearches v7.3.0 - [7ed4a6bd] LinearSolve v3.16.0 - [2ab3a3ac] LogExpFunctions v0.3.29 - [e6f89c97] LoggingExtras v1.1.0 - [d8e11817] MLStyle v0.4.17 + [faf0f6d7] JumpProblemLibrary v2.0.3 + [ccbc3e58] JumpProcesses v9.30.1 + [5ab0869b] KernelDensity v0.6.12 + [ba0b0d4f] Krylov v0.10.9 + [2faa5264] LHLFactorization v2.2.1 + [7f56f5a3] LSODA v1.2.0 + [b964fa9f] LaTeXStrings v1.4.1 + [23fbe1c1] Latexify v0.16.12 + [87fe0de2] LineSearch v0.1.16 + [7ed4a6bd] LinearSolve v5.14.1 + [2ab3a3ac] LogExpFunctions v1.0.1 + [e6f89c97] LoggingExtras v1.2.0 [1914dd2f] MacroTools v0.5.16 - [d125e4d3] ManualMemory v0.1.8 - [a3b82374] MatrixFactorizations v3.0.1 - [bb5d69b7] MaybeInplace v0.1.4 - [739be429] MbedTLS v1.1.9 - [442fdcdd] Measures v0.3.2 + [bb5d69b7] MaybeInplace v0.1.8 + [442fdcdd] Measures v0.3.3 [e1d29d7a] Missings v1.2.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [2e0e35c7] Moshi v0.3.5 - [46d2c3a1] MuladdMacro v0.2.4 - [102ac46a] MultivariatePolynomials v0.5.9 - [6f286f6a] MultivariateStats v0.10.3 - [ffc61752] Mustache v1.0.20 - [d8a4904e] MutableArithmetics v1.6.4 - [d41bc354] NLSolversBase v7.9.1 - [2774e3e8] NLsolve v4.5.1 - [77ba4419] NaNMath v1.1.3 - [b8a86587] NearestNeighbors v0.4.21 - [8913a72c] NonlinearSolve v4.9.0 - [be0214bd] NonlinearSolveBase v1.12.0 - [5959db7a] NonlinearSolveFirstOrder v1.5.0 - [9a2c21bd] NonlinearSolveQuasiNewton v1.6.0 - [26075421] NonlinearSolveSpectralMethods v1.2.0 + [961ee093] ModelingToolkit v11.40.0 +⌃ [7771a370] ModelingToolkitBase v1.68.0 + [6bb917b9] ModelingToolkitTearing v1.20.6 + [2e0e35c7] Moshi v0.3.12 + [46d2c3a1] MuladdMacro v0.2.7 + [102ac46a] MultivariatePolynomials v0.5.19 + [6f286f6a] MultivariateStats v0.10.5 + [ffc61752] Mustache v1.0.21 + [d8a4904e] MutableArithmetics v1.8.0 + [77ba4419] NaNMath v1.1.4 + [b8a86587] NearestNeighbors v0.4.29 + [8913a72c] NonlinearSolve v4.28.1 + [be0214bd] NonlinearSolveBase v2.48.2 + [5959db7a] NonlinearSolveFirstOrder v2.4.1 + [9a2c21bd] NonlinearSolveQuasiNewton v1.15.2 + [26075421] NonlinearSolveSpectralMethods v1.8.1 [510215fc] Observables v0.5.5 [6fe1bfb0] OffsetArrays v1.17.0 - [4d8831e6] OpenSSL v1.5.0 - [429524aa] Optim v1.12.0 - [bac558e1] OrderedCollections v1.8.1 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [89bda076] OrdinaryDiffEqAdamsBashforthMoulton v1.2.0 - [6ad6398a] OrdinaryDiffEqBDF v1.5.1 - [bbf590c4] OrdinaryDiffEqCore v1.26.0 - [50262376] OrdinaryDiffEqDefault v1.4.0 - [4302a76b] OrdinaryDiffEqDifferentiation v1.9.1 - [9286f039] OrdinaryDiffEqExplicitRK v1.1.0 - [e0540318] OrdinaryDiffEqExponentialRK v1.4.0 - [becaefa8] OrdinaryDiffEqExtrapolation v1.5.0 - [5960d6e9] OrdinaryDiffEqFIRK v1.12.0 - [101fe9f7] OrdinaryDiffEqFeagin v1.1.0 - [d3585ca7] OrdinaryDiffEqFunctionMap v1.1.1 - [d28bc4f8] OrdinaryDiffEqHighOrderRK v1.1.0 - [9f002381] OrdinaryDiffEqIMEXMultistep v1.3.0 - [521117fe] OrdinaryDiffEqLinear v1.3.0 - [1344f307] OrdinaryDiffEqLowOrderRK v1.2.0 - [b0944070] OrdinaryDiffEqLowStorageRK v1.3.0 - [127b3ac7] OrdinaryDiffEqNonlinearSolve v1.10.0 - [c9986a66] OrdinaryDiffEqNordsieck v1.1.0 - [5dd0a6cf] OrdinaryDiffEqPDIRK v1.3.1 - [5b33eab2] OrdinaryDiffEqPRK v1.1.0 - [04162be5] OrdinaryDiffEqQPRK v1.1.0 - [af6ede74] OrdinaryDiffEqRKN v1.1.0 - [43230ef6] OrdinaryDiffEqRosenbrock v1.10.1 - [2d112036] OrdinaryDiffEqSDIRK v1.3.0 - [669c94d9] OrdinaryDiffEqSSPRK v1.3.0 - [e3e12d00] OrdinaryDiffEqStabilizedIRK v1.3.0 - [358294b1] OrdinaryDiffEqStabilizedRK v1.1.0 - [fa646aed] OrdinaryDiffEqSymplecticRK v1.3.0 - [b1df2697] OrdinaryDiffEqTsit5 v1.1.0 - [79d7bb75] OrdinaryDiffEqVerner v1.2.0 - [90014a1f] PDMats v0.11.35 - [d96e819e] Parameters v0.12.3 - [69de0a69] Parsers v2.8.3 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 +⌅ [bac558e1] OrderedCollections v1.8.2 + [1dea7af3] OrdinaryDiffEq v7.8.1 + [6ad6398a] OrdinaryDiffEqBDF v2.4.5 + [bbf590c4] OrdinaryDiffEqCore v4.15.2 + [50262376] OrdinaryDiffEqDefault v2.6.0 + [4302a76b] OrdinaryDiffEqDifferentiation v3.11.0 + [127b3ac7] OrdinaryDiffEqNonlinearSolve v2.9.2 + [43230ef6] OrdinaryDiffEqRosenbrock v2.7.1 + [b4bd8bb3] OrdinaryDiffEqRosenbrockTableaus v2.4.2 + [2d112036] OrdinaryDiffEqSDIRK v2.9.1 + [b1df2697] OrdinaryDiffEqTsit5 v2.1.4 + [79d7bb75] OrdinaryDiffEqVerner v2.4.1 + [90014a1f] PDMats v0.11.41 +⌅ [d96e819e] Parameters v0.12.3 +⌅ [69de0a69] Parsers v2.8.7 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 [ccf2f8ad] PlotThemes v3.3.0 - [995b91a9] PlotUtils v1.4.3 - [91a5bcdd] Plots v1.40.13 - [e409e4f3] PoissonRandom v0.4.4 - [f517fe37] Polyester v0.7.18 - [1d0040c9] PolyesterWeave v0.2.2 + [995b91a9] PlotUtils v1.4.4 + [91a5bcdd] Plots v1.41.7 + [e409e4f3] PoissonRandom v0.4.13 [2dfb63ee] PooledArrays v1.4.3 - [85a6dd25] PositiveFactorizations v0.2.4 - [d236fae5] PreallocationTools v0.4.27 + [d236fae5] PreallocationTools v1.7.1 ⌅ [aea7be01] PrecompileTools v1.2.1 - [21216c6a] Preferences v1.4.3 - [08abe8d2] PrettyTables v2.4.0 + [21216c6a] Preferences v1.5.2 + [08abe8d2] PrettyTables v3.4.8 [27ebfcd6] Primes v0.5.7 - [43287f4e] PtrArrays v1.3.0 + [43287f4e] PtrArrays v1.4.0 + [0c0d3e7f] PureKLU v1.4.1 [438e738f] PyCall v1.96.4 - [1fd47b50] QuadGK v2.11.2 - [74087812] Random123 v1.7.1 - [e6cf234a] RandomNumbers v1.6.0 + [1fd47b50] QuadGK v2.11.3 [c84ed2f1] Ratios v0.4.5 - [b4db0fb7] ReactionNetworkImporters v0.16.1 + [b4db0fb7] ReactionNetworkImporters v1.5.0 + [988b38a3] ReadOnlyArrays v0.2.0 + [795d4caa] ReadOnlyDicts v1.0.1 [3cdcf5f2] RecipesBase v1.3.4 [01d81517] RecipesPipeline v0.6.12 - [731186ca] RecursiveArrayTools v3.33.0 + [731186ca] RecursiveArrayTools v4.5.1 [189a3867] Reexport v1.2.2 [05181044] RelocatableFolders v1.0.1 [ae029012] Requires v1.3.1 - [ae5879a3] ResettableStacks v1.1.1 - [79098fc4] Rmath v0.8.0 - [7e49a35a] RuntimeGeneratedFunctions v0.5.15 - [9dfe8606] SCCNonlinearSolve v1.2.0 - [94e857df] SIMDTypes v0.1.0 - [0bca4576] SciMLBase v2.96.0 - [31c91b34] SciMLBenchmarks v0.1.3 - [19f34311] SciMLJacobianOperators v0.1.6 -⌃ [c0aeaf25] SciMLOperators v0.4.0 - [53ae85a6] SciMLStructures v1.7.0 - [6c6a2e73] Scratch v1.2.1 - [91c51154] SentinelArrays v1.4.8 + [9fe22ead] RespecializeParams v1.3.0 + [79098fc4] Rmath v0.9.0 + [f2b01f46] Roots v3.0.7 + [7e49a35a] RuntimeGeneratedFunctions v0.5.25 + [9dfe8606] SCCNonlinearSolve v1.15.1 + [0bca4576] SciMLBase v3.50.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [19f34311] SciMLJacobianOperators v0.1.18 + [a6db7da4] SciMLLogging v2.1.0 + [c0aeaf25] SciMLOperators v1.30.0 + [431bcebd] SciMLPublic v1.3.0 + [53ae85a6] SciMLStructures v1.10.5 + [6c6a2e73] Scratch v1.3.0 + [91c51154] SentinelArrays v1.4.10 [efcf1570] Setfield v1.1.2 [992d4aef] Showoff v1.0.3 - [777ac1f9] SimpleBufferStream v1.2.0 - [727e6d20] SimpleNonlinearSolve v2.5.0 - [699a6c99] SimpleTraits v0.9.4 - [ce78b400] SimpleUnPack v1.1.0 - [b85f4697] SoftGlobalScope v1.1.0 - [a2af1166] SortingAlgorithms v1.2.1 - [9f842d2f] SparseConnectivityTracer v0.6.18 - [0a514795] SparseMatrixColorings v0.4.20 - [276daf66] SpecialFunctions v2.5.1 - [860ef19b] StableRNGs v1.0.3 - [aedffcd0] Static v1.2.0 - [0d7ed370] StaticArrayInterface v1.8.0 - [90137ffa] StaticArrays v1.9.13 - [1e83bf80] StaticArraysCore v1.4.3 - [82ae8749] StatsAPI v1.7.1 - [2913bbd2] StatsBase v0.34.5 - [4c63d2b9] StatsFuns v1.5.0 - [f3b207a7] StatsPlots v0.15.7 - [9672c7b4] SteadyStateDiffEq v2.5.0 - [789caeaf] StochasticDiffEq v6.80.0 - [7792a7ef] StrideArraysCore v0.5.7 + [727e6d20] SimpleNonlinearSolve v2.14.1 + [699a6c99] SimpleTraits v0.9.6 + [a2af1166] SortingAlgorithms v1.2.3 + [a57abbd0] SparseColumnPivotedQR v2.1.7 + [0a514795] SparseMatrixColorings v0.4.27 + [276daf66] SpecialFunctions v2.9.0 + [860ef19b] StableRNGs v1.0.4 + [0c0c59c1] StarAlgebras v0.3.0 + [64909d44] StateSelection v1.11.1 + [90137ffa] StaticArrays v1.9.19 + [1e83bf80] StaticArraysCore v1.4.4 + [82ae8749] StatsAPI v1.8.0 + [2913bbd2] StatsBase v0.34.13 + [4c63d2b9] StatsFuns v2.2.1 + [f3b207a7] StatsPlots v0.15.8 [69024149] StringEncodings v0.3.7 - [892a3eda] StringManipulation v0.4.1 - [c3572dad] Sundials v4.28.0 - [2efcf032] SymbolicIndexingInterface v0.3.40 - [19f23fe9] SymbolicLimits v0.2.2 - [d1185830] SymbolicUtils v3.29.0 - [0c5d862f] Symbolics v6.40.0 + [892a3eda] StringManipulation v0.5.0 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 + [19f23fe9] SymbolicLimits v1.2.0 +⌅ [d1185830] SymbolicUtils v4.45.0 + [0c5d862f] Symbolics v7.39.0 [ab02a1b2] TableOperations v1.2.0 [3783bdb8] TableTraits v1.0.1 - [bd369af6] Tables v1.12.0 - [ed4db957] TaskLocalValues v0.1.2 + [bd369af6] Tables v1.14.0 + [ed4db957] TaskLocalValues v0.1.3 [62fd8b95] TensorCore v0.1.1 [8ea1fca8] TermInterface v2.0.0 - [1c621080] TestItems v1.0.0 - [8290d209] ThreadingUtilities v0.5.4 - [a759f4b9] TimerOutputs v0.5.29 - [3bb67fe8] TranscodingStreams v0.11.3 - [410a4b4d] Tricks v0.1.10 + [1c621080] TestItems v1.1.0 + [a759f4b9] TimerOutputs v1.2.0 + [410a4b4d] Tricks v0.1.13 [781d530d] TruncatedStacktraces v1.4.0 - [5c2747f8] URIs v1.5.2 [3a884ed6] UnPack v1.0.2 [1cfade01] UnicodeFun v0.4.1 - [1986cc42] Unitful v1.22.1 - [45397f5d] UnitfulLatexify v1.7.0 - [a7c27f48] Unityper v0.1.6 [41fe7b60] Unzip v0.2.0 [81def892] VersionParsing v1.3.0 - [897b6980] WeakValueDicts v0.1.0 + [d30d5f5c] WeakCacheSets v0.1.0 [44d3d7a6] Weave v0.10.12 - [cc8bc4a8] Widgets v0.6.7 - [efce3f68] WoodburyMatrices v1.0.0 - [ddb6d928] YAML v0.4.14 - [c2297ded] ZMQ v1.4.0 -⌅ [68821587] Arpack_jll v3.5.1+1 + [cc8bc4a8] Widgets v0.6.8 + [efce3f68] WoodburyMatrices v1.1.0 + [ddb6d928] YAML v0.4.16 + [c2297ded] ZMQ v1.5.1 +⌅ [68821587] Arpack_jll v3.5.2+0 [6e34b625] Bzip2_jll v1.0.9+0 - [83423d85] Cairo_jll v1.18.5+0 + [83423d85] Cairo_jll v1.18.7+0 [ee1fde0b] Dbus_jll v1.16.2+0 [2702e6a9] EpollShim_jll v0.0.20230411+1 - [2e619515] Expat_jll v2.6.5+0 -⌅ [b22a6f82] FFMPEG_jll v4.4.4+1 - [f5851436] FFTW_jll v3.3.11+0 - [a3f928ae] Fontconfig_jll v2.16.0+0 - [d7e528f0] FreeType2_jll v2.13.4+0 + [2e619515] Expat_jll v2.8.3+0 +⌅ [b22a6f82] FFMPEG_jll v8.1.2+0 + [a3f928ae] Fontconfig_jll v2.17.1+0 + [d7e528f0] FreeType2_jll v2.14.3+1 [559328eb] FriBidi_jll v1.0.17+0 - [0656b61e] GLFW_jll v3.4.0+2 - [d2c73de3] GR_jll v0.73.16+0 - [78b55507] Gettext_jll v0.21.0+0 - [f8c6e375] Git_jll v2.49.0+0 - [7746bdde] Glib_jll v2.84.0+0 - [3b182d85] Graphite2_jll v1.3.15+0 - [2e76f6c2] HarfBuzz_jll v8.5.1+0 - [1d5cc7b8] IntelOpenMP_jll v2025.0.4+0 - [aacddb02] JpegTurbo_jll v3.1.1+0 - [c1c5ebd0] LAME_jll v3.100.2+0 - [88015f11] LERC_jll v4.0.1+0 - [1d63c593] LLVMOpenMP_jll v18.1.8+0 + [0656b61e] GLFW_jll v3.5.1+0 + [d2c73de3] GR_jll v0.73.27+0 +⌅ [b0724c58] GettextRuntime_jll v0.22.4+0 + [61579ee1] Ghostscript_jll v9.55.1+0 + [020c3dae] Git_LFS_jll v3.7.1+0 + [f8c6e375] Git_jll v2.55.0+0 + [7746bdde] Glib_jll v2.88.3+0 + [3b182d85] Graphite2_jll v1.3.16+0 + [2e76f6c2] HarfBuzz_jll v100.14003.0+0 + [1d5cc7b8] IntelOpenMP_jll v2025.2.0+0 + [aacddb02] JpegTurbo_jll v3.2.0+1 + [c1c5ebd0] LAME_jll v3.100.3+0 + [88015f11] LERC_jll v4.1.0+0 + [1d63c593] LLVMOpenMP_jll v22.1.7+0 [aae0fff6] LSODA_jll v0.1.2+0 - [dd4b983a] LZO_jll v2.10.3+0 - [e9f186c6] Libffi_jll v3.4.7+0 +⌅ [e9f186c6] Libffi_jll v3.4.7+0 [7e76a0d4] Libglvnd_jll v1.7.1+1 [94ce4f54] Libiconv_jll v1.18.0+0 - [4b2f31a3] Libmount_jll v2.41.0+0 - [89763e89] Libtiff_jll v4.7.1+0 - [38a345b3] Libuuid_jll v2.41.0+0 - [856f044c] MKL_jll v2025.0.1+1 - [e7412a2a] Ogg_jll v1.3.5+1 - [9bd350c2] OpenSSH_jll v10.0.1+0 - [458c3c95] OpenSSL_jll v3.5.0+0 + [4b2f31a3] Libmount_jll v2.42.0+0 + [89763e89] Libtiff_jll v4.7.3+0 + [38a345b3] Libuuid_jll v2.42.0+0 + [856f044c] MKL_jll v2025.2.0+0 + [e7412a2a] Ogg_jll v1.3.6+0 +⌅ [656ef2d0] OpenBLAS32_jll v0.3.24+0 + [9bd350c2] OpenSSH_jll v10.5.1+0 + [458c3c95] OpenSSL_jll v3.5.8+0 [efe28fd5] OpenSpecFun_jll v0.5.6+0 - [91d4177d] Opus_jll v1.3.3+0 - [36c8627f] Pango_jll v1.56.3+0 -⌅ [30392449] Pixman_jll v0.44.2+0 - [c0090381] Qt6Base_jll v6.8.2+1 - [629bc702] Qt6Declarative_jll v6.8.2+1 - [ce943373] Qt6ShaderTools_jll v6.8.2+1 - [e99dba38] Qt6Wayland_jll v6.8.2+0 - [f50d1b31] Rmath_jll v0.5.1+0 -⌅ [fb77eaff] Sundials_jll v5.2.2+0 + [91d4177d] Opus_jll v1.6.1+0 + [36c8627f] Pango_jll v1.58.2+0 + [30392449] Pixman_jll v0.46.4+0 + [c0090381] Qt6Base_jll v6.10.2+2 + [629bc702] Qt6Declarative_jll v6.10.2+2 + [ce943373] Qt6ShaderTools_jll v6.10.2+1 + [6de9746b] Qt6Svg_jll v6.10.2+0 + [e99dba38] Qt6Wayland_jll v6.10.2+1 + [f50d1b31] Rmath_jll v0.5.2+0 +⌅ [ca45d3f4] SuiteSparse32_jll v5.10.1+0 + [fb77eaff] Sundials_jll v7.5.0+0 [a44049a8] Vulkan_Loader_jll v1.3.243+0 - [a2964d1f] Wayland_jll v1.23.1+0 - [2381bf8a] Wayland_protocols_jll v1.36.0+0 -⌅ [02c8fc9c] XML2_jll v2.13.6+1 - [ffd25f8a] XZ_jll v5.8.1+0 + [a2964d1f] Wayland_jll v1.24.0+0 + [ffd25f8a] XZ_jll v5.8.3+0 [f67eecfb] Xorg_libICE_jll v1.1.2+0 [c834827a] Xorg_libSM_jll v1.2.6+0 - [4f6342f7] Xorg_libX11_jll v1.8.12+0 + [4f6342f7] Xorg_libX11_jll v1.8.13+0 [0c0b7dd1] Xorg_libXau_jll v1.0.13+0 [935fb764] Xorg_libXcursor_jll v1.2.4+0 [a3789734] Xorg_libXdmcp_jll v1.1.6+0 - [1082639a] Xorg_libXext_jll v1.3.7+0 - [d091e8ba] Xorg_libXfixes_jll v6.0.1+0 - [a51aa0fd] Xorg_libXi_jll v1.8.3+0 - [d1454406] Xorg_libXinerama_jll v1.1.6+0 - [ec84b674] Xorg_libXrandr_jll v1.5.5+0 + [1082639a] Xorg_libXext_jll v1.3.8+0 + [d091e8ba] Xorg_libXfixes_jll v6.0.2+0 + [a51aa0fd] Xorg_libXi_jll v1.8.4+0 + [d1454406] Xorg_libXinerama_jll v1.1.7+0 + [ec84b674] Xorg_libXrandr_jll v1.5.6+0 [ea2f1a96] Xorg_libXrender_jll v0.9.12+0 + [a65dc6b1] Xorg_libpciaccess_jll v0.19.0+0 [c7cfdc94] Xorg_libxcb_jll v1.17.1+0 - [cc61e674] Xorg_libxkbfile_jll v1.1.3+0 - [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0 - [12413925] Xorg_xcb_util_image_jll v0.4.0+1 - [2def613f] Xorg_xcb_util_jll v0.4.0+1 - [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1 - [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1 - [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1 + [cc61e674] Xorg_libxkbfile_jll v1.2.0+0 + [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.6+0 + [12413925] Xorg_xcb_util_image_jll v0.4.1+0 + [2def613f] Xorg_xcb_util_jll v0.4.1+0 + [975044d2] Xorg_xcb_util_keysyms_jll v0.4.1+0 + [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.10+0 + [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.2+0 [35661453] Xorg_xkbcomp_jll v1.4.7+0 - [33bec58e] Xorg_xkeyboard_config_jll v2.44.0+0 + [33bec58e] Xorg_xkeyboard_config_jll v2.47.0+2 [c5fb5394] Xorg_xtrans_jll v1.6.0+0 [8f1865be] ZeroMQ_jll v4.3.6+0 [3161d3a3] Zstd_jll v1.5.7+1 - [35ca27e7] eudev_jll v3.2.9+0 - [214eeab7] fzf_jll v0.61.1+0 - [1a1c6b14] gperf_jll v3.3.0+0 - [a4ae2306] libaom_jll v3.11.0+0 - [0ac62f75] libass_jll v0.15.2+0 + [35ca27e7] eudev_jll v3.2.14+0 +⌅ [214eeab7] fzf_jll v0.61.1+0 + [a4ae2306] libaom_jll v3.14.1+0 + [0ac62f75] libass_jll v0.17.5+0 [1183f4f0] libdecor_jll v0.2.2+0 - [2db6ffa8] libevdev_jll v1.11.0+0 - [f638f0a6] libfdk_aac_jll v2.0.3+0 - [36db933b] libinput_jll v1.18.0+0 - [b53b4c65] libpng_jll v1.6.48+0 + [8e53e030] libdrm_jll v2.4.134+0 + [2db6ffa8] libevdev_jll v1.13.4+0 + [f638f0a6] libfdk_aac_jll v2.0.4+0 + [36db933b] libinput_jll v1.28.1+0 + [b53b4c65] libpng_jll v1.6.58+0 [a9144af2] libsodium_jll v1.0.21+0 - [f27f6e37] libvorbis_jll v1.3.7+2 - [009596ad] mtdev_jll v1.1.6+0 - [1317d2d5] oneTBB_jll v2022.0.0+0 -⌅ [1270edf5] x264_jll v2021.5.5+0 -⌅ [dfaa095f] x265_jll v3.5.0+0 - [d8fb68d0] xkbcommon_jll v1.8.1+0 + [9a156e7d] libva_jll v2.23.0+0 + [f27f6e37] libvorbis_jll v1.3.8+0 + [009596ad] mtdev_jll v1.1.7+0 + [1317d2d5] oneTBB_jll v2022.3.0+0 +⌅ [1270edf5] x264_jll v10164.0.1+0 + [dfaa095f] x265_jll v4.1.0+0 + [d8fb68d0] xkbcommon_jll v1.13.0+0 [0dad84c5] ArgTools v1.1.1 [56f22d72] Artifacts [2a0f44e3] Base64 diff --git a/markdown/Jumps/NegFeedback_GeneExpr_Marchetti.md b/markdown/Jumps/NegFeedback_GeneExpr_Marchetti.md index a6c1ca789..be22a9784 100644 --- a/markdown/Jumps/NegFeedback_GeneExpr_Marchetti.md +++ b/markdown/Jumps/NegFeedback_GeneExpr_Marchetti.md @@ -16,6 +16,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). @@ -44,28 +45,31 @@ reactions(rn) ```julia -u0f = [1000., 0., 0., 0., 0.] -odeprob = ODEProblem(rn, u0f, (0.,tf), rnpar) +u0f = [variable => Float64(value) for (variable, value) in u0] +odeprob = ODEProblem(rn, u0f, (0.0, tf), rnpar) solution = solve(odeprob, Tsit5()) -plot(solution, format=fmt) +plot(solution, format = fmt) ``` ![](figures/NegFeedback_GeneExpr_Marchetti_3_1.png) ```julia -tf = 4000. -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) +tf = 4000.0 +methods = (Direct(), FRM(), SortingDirect(), NRM(), DirectCR(), + RSSA(), RSSACR(), Coevolve(), RDirect()) +shortlabels = [string(leg)[15:(end - 2)] for leg in methods] +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, u0, (0.0, tf), rnpar; + aggregator = 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) ``` ![](figures/NegFeedback_GeneExpr_Marchetti_4_1.png) @@ -99,7 +103,10 @@ run_benchmark! (generic function with 1 method) nsims = 200 benchmarks = Vector{Vector{Float64}}() for method in methods - jump_prob = JumpProblem(rn, prob, method, save_positions=(false, false)) + jump_prob = JumpProblem( + rn, u0, (0.0, tf), rnpar; + aggregator = method, save_positions = (false, false) + ) stepper = SSAStepper() t = Vector{Float64}(undef, nsims) run_benchmark!(t, jump_prob, stepper) @@ -119,11 +126,13 @@ 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") ``` @@ -136,7 +145,6 @@ title!("Marchetti Gene Expression Model") These benchmarks are a part of the SciMLBenchmarks.jl repository, found at: [https://github.com/SciML/SciMLBenchmarks.jl](https://github.com/SciML/SciMLBenchmarks.jl). For more information on high-performance scientific machine learning, check out the SciML Open Source Software Organization [https://sciml.ai](https://sciml.ai). To locally run this benchmark, do the following commands: - ``` using SciMLBenchmarks SciMLBenchmarks.weave_file("benchmarks/Jumps","NegFeedback_GeneExpr_Marchetti.jmd") @@ -145,8 +153,8 @@ SciMLBenchmarks.weave_file("benchmarks/Jumps","NegFeedback_GeneExpr_Marchetti.jm Computer Information: ``` -Julia Version 1.10.9 -Commit 5595d20a287 (2025-03-10 12:51 UTC) +Julia Version 1.10.12 +Commit d93beab124c (2026-08-15 10:29 UTC) Build Info: Official https://julialang.org/ release Platform Info: @@ -155,432 +163,372 @@ Platform Info: WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver2) -Threads: 1 default, 0 interactive, 1 GC (on 128 virtual cores) +Threads: 128 default, 0 interactive, 64 GC (on 128 virtual cores) Environment: - JULIA_CPU_THREADS = 128 - JULIA_DEPOT_PATH = /cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953 + JULIA_NUM_THREADS = auto ``` Package Information: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Project.toml` - [6e4b80f9] BenchmarkTools v1.6.0 - [479239e8] Catalyst v15.0.8 - [8f4d0f93] Conda v1.10.2 - [a93c6f00] DataFrames v1.7.0 - [0c46a032] DifferentialEquations v7.16.1 - [31c24e10] Distributions v0.25.120 - [86223c79] Graphs v1.12.1 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 - [91a5bcdd] Plots v1.40.13 +Status `/julia/github-runners/amdci1-1/_work/SciMLBenchmarks.jl/SciMLBenchmarks.jl/benchmarks/Jumps/Project.toml` + [6e4b80f9] BenchmarkTools v1.8.0 + [479239e8] Catalyst v16.4.0 + [8f4d0f93] Conda v1.10.3 + [a93c6f00] DataFrames v1.8.2 + [0c46a032] DifferentialEquations v8.1.1 + [31c24e10] Distributions v0.25.131 + [86223c79] Graphs v1.14.0 + [faf0f6d7] JumpProblemLibrary v2.0.3 + [ccbc3e58] JumpProcesses v9.30.1 + [961ee093] ModelingToolkit v11.40.0 + [1dea7af3] OrdinaryDiffEq v7.8.1 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 + [91a5bcdd] Plots v1.41.7 [438e738f] PyCall v1.96.4 - [b4db0fb7] ReactionNetworkImporters v0.16.1 - [31c91b34] SciMLBenchmarks v0.1.3 - [860ef19b] StableRNGs v1.0.3 - [f3b207a7] StatsPlots v0.15.7 - [c3572dad] Sundials v4.28.0 + [b4db0fb7] ReactionNetworkImporters v1.5.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [860ef19b] StableRNGs v1.0.4 + [f3b207a7] StatsPlots v0.15.8 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 [37e2e46d] LinearAlgebra [9a3f8284] Random [10745b16] Statistics v1.10.0 -Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated` +Info Packages marked with ⌃ have new versions available and may be upgradable. ``` And the full manifest: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Manifest.toml` - [47edcb42] ADTypes v1.14.0 +Status `/julia/github-runners/amdci1-1/_work/SciMLBenchmarks.jl/SciMLBenchmarks.jl/benchmarks/Jumps/Manifest.toml` + [47edcb42] ADTypes v1.24.0 + [14f7f29c] AMD v0.5.3 [621f4979] AbstractFFTs v1.5.0 + [6e696c72] AbstractPlutoDingetjes v1.4.0 [1520ce14] AbstractTrees v0.4.5 - [7d9f7c33] Accessors v0.1.42 - [79e6a3ab] Adapt v4.3.0 + [7d9f7c33] Accessors v0.1.45 + [79e6a3ab] Adapt v4.7.0 [66dad0bd] AliasTables v1.1.3 - [a95523ee] AlmostBlockDiagonals v0.1.10 [ec485272] ArnoldiMethod v0.4.0 [7d9fca2a] Arpack v0.5.4 - [4fba245c] ArrayInterface v7.19.0 - [4c555306] ArrayLayouts v1.11.1 + [4fba245c] ArrayInterface v7.30.0 + [4c555306] ArrayLayouts v1.12.2 [13072b0f] AxisAlgorithms v1.1.0 - [aae01518] BandedMatrices v1.9.4 - [6e4b80f9] BenchmarkTools v1.6.0 -⌅ [e2ed5e7c] Bijections v0.1.10 - [d1d4a3ce] BitFlags v0.1.9 - [62783981] BitTwiddlingConvenienceFunctions v0.1.6 - [8e7c35d0] BlockArrays v1.6.3 - [764a87c0] BoundaryValueDiffEq v5.17.0 - [7227322d] BoundaryValueDiffEqAscher v1.6.1 - [56b672f2] BoundaryValueDiffEqCore v1.9.0 - [85d9eb09] BoundaryValueDiffEqFIRK v1.7.0 - [1a22d4ce] BoundaryValueDiffEqMIRK v1.7.0 - [9255f1d6] BoundaryValueDiffEqMIRKN v1.6.1 - [ed55bfe0] BoundaryValueDiffEqShooting v1.7.0 - [70df07ce] BracketingNonlinearSolve v1.3.0 + [aae01518] BandedMatrices v1.12.0 + [6e4b80f9] BenchmarkTools v1.8.0 + [e2ed5e7c] Bijections v0.2.2 + [b2a6c25c] BinaryHeaps v1.1.0 + [caf10ac8] BipartiteGraphs v0.1.12 + [8e7c35d0] BlockArrays v1.10.0 + [70df07ce] BracketingNonlinearSolve v1.12.6 [fa961155] CEnum v0.5.0 - [2a0fbf3d] CPUSummary v0.2.6 - [479239e8] Catalyst v15.0.8 - [d360d2e6] ChainRulesCore v1.25.1 - [fb6a15b2] CloseOpenIntervals v0.1.13 + [479239e8] Catalyst v16.4.0 + [d360d2e6] ChainRulesCore v1.26.1 [aaaa29a8] Clustering v0.15.8 - [944b1d66] CodecZlib v0.7.8 - [35d6a980] ColorSchemes v3.29.0 + [35d6a980] ColorSchemes v3.31.0 [3da002f7] ColorTypes v0.12.1 [c3611d14] ColorVectorSpace v0.11.0 [5ae59095] Colors v0.13.1 - [861a8166] Combinatorics v1.0.3 - [a80b9123] CommonMark v0.9.1 - [38540f10] CommonSolve v0.2.4 +⌅ [861a8166] Combinatorics v1.0.2 + [38540f10] CommonSolve v0.2.14 [bbf7d656] CommonSubexpressions v0.3.1 - [f70d9fcc] CommonWorldInvalidations v1.0.0 - [34da2185] Compat v4.16.0 + [f70d9fcc] CommonWorldInvalidations v1.2.0 + [34da2185] Compat v4.18.1 [b152e2b5] CompositeTypes v0.1.4 [a33af91c] CompositionsBase v0.1.2 - [2569d6c7] ConcreteStructs v0.2.3 - [f0e56b4a] ConcurrentUtilities v2.5.0 - [8f4d0f93] Conda v1.10.2 - [187b0558] ConstructionBase v1.5.8 + [2569d6c7] ConcreteStructs v0.2.8 + [8f4d0f93] Conda v1.10.3 + [187b0558] ConstructionBase v1.6.0 [d38c429a] Contour v0.6.3 - [adafc99b] CpuId v0.3.1 - [a8cc5b0e] Crayons v4.1.1 + [a8cc5b0e] Crayons v4.2.0 [9a962f9c] DataAPI v1.16.0 - [a93c6f00] DataFrames v1.7.0 - [864edb3b] DataStructures v0.18.22 + [a93c6f00] DataFrames v1.8.2 + [864edb3b] DataStructures v0.19.6 [e2d170a0] DataValueInterfaces v1.0.0 - [bcd4f6db] DelayDiffEq v5.53.1 [8bb1440f] DelimitedFiles v1.9.1 - [2b5f629d] DiffEqBase v6.175.0 - [459566f4] DiffEqCallbacks v4.6.0 - [77a26b50] DiffEqNoiseProcess v5.24.1 + [2b5f629d] DiffEqBase v7.19.0 + [459566f4] DiffEqCallbacks v4.19.3 [163ba53b] DiffResults v1.1.0 - [b552c78f] DiffRules v1.15.1 - [0c46a032] DifferentialEquations v7.16.1 -⌅ [a0c0ee7d] DifferentiationInterface v0.6.54 - [8d63f2c5] DispatchDoctor v0.4.19 + [b552c78f] DiffRules v1.16.0 + [0c46a032] DifferentialEquations v8.1.1 + [a0c0ee7d] DifferentiationInterface v0.7.21 + [8d63f2c5] DispatchDoctor v0.4.28 [b4f34e82] Distances v0.10.12 - [31c24e10] Distributions v0.25.120 - [ffbed154] DocStringExtensions v0.9.4 - [5b8099bc] DomainSets v0.7.15 - [7c1d4256] DynamicPolynomials v0.6.2 - [06fc5a27] DynamicQuantities v1.8.0 - [4e289a0a] EnumX v1.0.5 -⌃ [f151be2c] EnzymeCore v0.8.10 - [460bff9d] ExceptionUnwrapping v0.1.11 - [d4d017d3] ExponentialUtilities v1.27.0 - [e2ba6199] ExprTools v0.1.10 + [31c24e10] Distributions v0.25.131 + [ffbed154] DocStringExtensions v0.9.5 + [5b8099bc] DomainSets v0.8.1 + [7c1d4256] DynamicPolynomials v0.6.7 + [06fc5a27] DynamicQuantities v1.13.0 + [4e289a0a] EnumX v1.0.7 + [f151be2c] EnzymeCore v0.8.21 + [e2ba6199] ExprTools v0.1.11 [55351af7] ExproniconLite v0.10.14 - [c87230d0] FFMPEG v0.4.2 - [7a1cc6ca] FFTW v1.8.1 - [9d29842c] FastAlmostBandedMatrices v0.1.5 - [7034ab61] FastBroadcast v0.3.5 + [c87230d0] FFMPEG v0.4.5 + [b86e33f2] FFTA v0.3.1 + [7034ab61] FastBroadcast v1.4.0 [9aa1b823] FastClosures v0.3.2 - [442a2c76] FastGaussQuadrature v1.0.2 - [a4df4552] FastPower v1.1.2 - [1a297f60] FillArrays v1.13.0 - [64ca27bc] FindFirstFunctions v1.4.1 - [6a86dc24] FiniteDiff v2.27.0 - [53c48c17] FixedPointNumbers v0.8.5 + [a4df4552] FastPower v1.5.0 + [1a297f60] FillArrays v1.17.0 + [64ca27bc] FindFirstFunctions v3.2.1 + [6a86dc24] FiniteDiff v2.33.0 +⌅ [53c48c17] FixedPointNumbers v0.8.6 [1fa38f19] Format v1.3.7 -⌅ [f6369f11] ForwardDiff v0.10.38 + [f6369f11] ForwardDiff v1.4.5 + [a85aefff] FunctionMaps v0.1.2 [069b7b12] FunctionWrappers v1.1.3 - [77dc65aa] FunctionWrappersWrappers v0.1.3 - [d9f16b24] Functors v0.5.2 + [77dc65aa] FunctionWrappersWrappers v1.13.0 [46192b85] GPUArraysCore v0.2.0 - [28b8d3ca] GR v0.73.16 - [c145ed77] GenericSchur v0.5.5 - [d7ba0133] Git v1.4.0 - [c27321d9] Glob v1.3.1 - [86223c79] Graphs v1.12.1 + [28b8d3ca] GR v0.73.27 + [a0844989] Gamma v1.2.0 + [d7ba0133] Git v1.5.0 + [86223c79] Graphs v1.14.0 [42e2da0e] Grisu v1.0.2 - [cd3eb016] HTTP v1.10.16 - [eafb193a] Highlights v0.5.3 - [34004b35] HypergeometricFunctions v0.3.28 -⌃ [7073ff75] IJulia v1.27.0 - [615f187c] IfElse v0.1.1 +⌅ [eafb193a] Highlights v0.5.3 + [34004b35] HypergeometricFunctions v0.3.30 + [7073ff75] IJulia v1.34.4 + [3263718b] ImplicitDiscreteSolve v2.2.0 [d25df0c9] Inflate v0.1.5 - [842dd82b] InlineStrings v1.4.3 - [18e54dd8] IntegerMathUtils v0.1.2 -⌅ [a98d9a8b] Interpolations v0.15.1 - [8197267c] IntervalSets v0.7.11 + [842dd82b] InlineStrings v1.4.5 + [18e54dd8] IntegerMathUtils v0.1.4 + [a98d9a8b] Interpolations v0.16.3 + [8197267c] IntervalSets v0.7.14 [3587e190] InverseFunctions v0.1.17 [41ab1584] InvertedIndices v1.3.1 - [92d709cd] IrrationalConstants v0.2.4 + [92d709cd] IrrationalConstants v0.2.6 [82899510] IteratorInterfaceExtensions v1.0.0 [1019f520] JLFzf v0.1.11 - [692b3bcd] JLLWrappers v1.7.0 - [682c06a0] JSON v0.21.4 + [692b3bcd] JLLWrappers v1.8.0 +⌅ [682c06a0] JSON v0.21.4 [ae98c720] Jieko v0.2.1 - [98e50ef6] JuliaFormatter v2.1.2 -⌅ [70703baa] JuliaSyntax v0.4.10 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 - [5ab0869b] KernelDensity v0.6.9 - [ba0b0d4f] Krylov v0.10.1 - [7f56f5a3] LSODA v0.7.5 - [b964fa9f] LaTeXStrings v1.4.0 - [23fbe1c1] Latexify v0.16.8 - [10f19ff3] LayoutPointers v0.1.17 - [5078a376] LazyArrays v2.6.1 - [2d8b4e74] LevyArea v1.0.0 - [87fe0de2] LineSearch v0.1.4 - [d3d80556] LineSearches v7.3.0 - [7ed4a6bd] LinearSolve v3.16.0 - [2ab3a3ac] LogExpFunctions v0.3.29 - [e6f89c97] LoggingExtras v1.1.0 - [d8e11817] MLStyle v0.4.17 + [faf0f6d7] JumpProblemLibrary v2.0.3 + [ccbc3e58] JumpProcesses v9.30.1 + [5ab0869b] KernelDensity v0.6.12 + [ba0b0d4f] Krylov v0.10.9 + [2faa5264] LHLFactorization v2.2.1 + [7f56f5a3] LSODA v1.2.0 + [b964fa9f] LaTeXStrings v1.4.1 + [23fbe1c1] Latexify v0.16.12 + [87fe0de2] LineSearch v0.1.16 + [7ed4a6bd] LinearSolve v5.14.1 + [2ab3a3ac] LogExpFunctions v1.0.1 + [e6f89c97] LoggingExtras v1.2.0 [1914dd2f] MacroTools v0.5.16 - [d125e4d3] ManualMemory v0.1.8 - [a3b82374] MatrixFactorizations v3.0.1 - [bb5d69b7] MaybeInplace v0.1.4 - [739be429] MbedTLS v1.1.9 - [442fdcdd] Measures v0.3.2 + [bb5d69b7] MaybeInplace v0.1.8 + [442fdcdd] Measures v0.3.3 [e1d29d7a] Missings v1.2.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [2e0e35c7] Moshi v0.3.5 - [46d2c3a1] MuladdMacro v0.2.4 - [102ac46a] MultivariatePolynomials v0.5.9 - [6f286f6a] MultivariateStats v0.10.3 - [ffc61752] Mustache v1.0.20 - [d8a4904e] MutableArithmetics v1.6.4 - [d41bc354] NLSolversBase v7.9.1 - [2774e3e8] NLsolve v4.5.1 - [77ba4419] NaNMath v1.1.3 - [b8a86587] NearestNeighbors v0.4.21 - [8913a72c] NonlinearSolve v4.9.0 - [be0214bd] NonlinearSolveBase v1.12.0 - [5959db7a] NonlinearSolveFirstOrder v1.5.0 - [9a2c21bd] NonlinearSolveQuasiNewton v1.6.0 - [26075421] NonlinearSolveSpectralMethods v1.2.0 + [961ee093] ModelingToolkit v11.40.0 +⌃ [7771a370] ModelingToolkitBase v1.68.0 + [6bb917b9] ModelingToolkitTearing v1.20.6 + [2e0e35c7] Moshi v0.3.12 + [46d2c3a1] MuladdMacro v0.2.7 + [102ac46a] MultivariatePolynomials v0.5.19 + [6f286f6a] MultivariateStats v0.10.5 + [ffc61752] Mustache v1.0.21 + [d8a4904e] MutableArithmetics v1.8.0 + [77ba4419] NaNMath v1.1.4 + [b8a86587] NearestNeighbors v0.4.29 + [8913a72c] NonlinearSolve v4.28.1 + [be0214bd] NonlinearSolveBase v2.48.2 + [5959db7a] NonlinearSolveFirstOrder v2.4.1 + [9a2c21bd] NonlinearSolveQuasiNewton v1.15.2 + [26075421] NonlinearSolveSpectralMethods v1.8.1 [510215fc] Observables v0.5.5 [6fe1bfb0] OffsetArrays v1.17.0 - [4d8831e6] OpenSSL v1.5.0 - [429524aa] Optim v1.12.0 - [bac558e1] OrderedCollections v1.8.1 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [89bda076] OrdinaryDiffEqAdamsBashforthMoulton v1.2.0 - [6ad6398a] OrdinaryDiffEqBDF v1.5.1 - [bbf590c4] OrdinaryDiffEqCore v1.26.0 - [50262376] OrdinaryDiffEqDefault v1.4.0 - [4302a76b] OrdinaryDiffEqDifferentiation v1.9.1 - [9286f039] OrdinaryDiffEqExplicitRK v1.1.0 - [e0540318] OrdinaryDiffEqExponentialRK v1.4.0 - [becaefa8] OrdinaryDiffEqExtrapolation v1.5.0 - [5960d6e9] OrdinaryDiffEqFIRK v1.12.0 - [101fe9f7] OrdinaryDiffEqFeagin v1.1.0 - [d3585ca7] OrdinaryDiffEqFunctionMap v1.1.1 - [d28bc4f8] OrdinaryDiffEqHighOrderRK v1.1.0 - [9f002381] OrdinaryDiffEqIMEXMultistep v1.3.0 - [521117fe] OrdinaryDiffEqLinear v1.3.0 - [1344f307] OrdinaryDiffEqLowOrderRK v1.2.0 - [b0944070] OrdinaryDiffEqLowStorageRK v1.3.0 - [127b3ac7] OrdinaryDiffEqNonlinearSolve v1.10.0 - [c9986a66] OrdinaryDiffEqNordsieck v1.1.0 - [5dd0a6cf] OrdinaryDiffEqPDIRK v1.3.1 - [5b33eab2] OrdinaryDiffEqPRK v1.1.0 - [04162be5] OrdinaryDiffEqQPRK v1.1.0 - [af6ede74] OrdinaryDiffEqRKN v1.1.0 - [43230ef6] OrdinaryDiffEqRosenbrock v1.10.1 - [2d112036] OrdinaryDiffEqSDIRK v1.3.0 - [669c94d9] OrdinaryDiffEqSSPRK v1.3.0 - [e3e12d00] OrdinaryDiffEqStabilizedIRK v1.3.0 - [358294b1] OrdinaryDiffEqStabilizedRK v1.1.0 - [fa646aed] OrdinaryDiffEqSymplecticRK v1.3.0 - [b1df2697] OrdinaryDiffEqTsit5 v1.1.0 - [79d7bb75] OrdinaryDiffEqVerner v1.2.0 - [90014a1f] PDMats v0.11.35 - [d96e819e] Parameters v0.12.3 - [69de0a69] Parsers v2.8.3 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 +⌅ [bac558e1] OrderedCollections v1.8.2 + [1dea7af3] OrdinaryDiffEq v7.8.1 + [6ad6398a] OrdinaryDiffEqBDF v2.4.5 + [bbf590c4] OrdinaryDiffEqCore v4.15.2 + [50262376] OrdinaryDiffEqDefault v2.6.0 + [4302a76b] OrdinaryDiffEqDifferentiation v3.11.0 + [127b3ac7] OrdinaryDiffEqNonlinearSolve v2.9.2 + [43230ef6] OrdinaryDiffEqRosenbrock v2.7.1 + [b4bd8bb3] OrdinaryDiffEqRosenbrockTableaus v2.4.2 + [2d112036] OrdinaryDiffEqSDIRK v2.9.1 + [b1df2697] OrdinaryDiffEqTsit5 v2.1.4 + [79d7bb75] OrdinaryDiffEqVerner v2.4.1 + [90014a1f] PDMats v0.11.41 +⌅ [d96e819e] Parameters v0.12.3 +⌅ [69de0a69] Parsers v2.8.7 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 [ccf2f8ad] PlotThemes v3.3.0 - [995b91a9] PlotUtils v1.4.3 - [91a5bcdd] Plots v1.40.13 - [e409e4f3] PoissonRandom v0.4.4 - [f517fe37] Polyester v0.7.18 - [1d0040c9] PolyesterWeave v0.2.2 + [995b91a9] PlotUtils v1.4.4 + [91a5bcdd] Plots v1.41.7 + [e409e4f3] PoissonRandom v0.4.13 [2dfb63ee] PooledArrays v1.4.3 - [85a6dd25] PositiveFactorizations v0.2.4 - [d236fae5] PreallocationTools v0.4.27 + [d236fae5] PreallocationTools v1.7.1 ⌅ [aea7be01] PrecompileTools v1.2.1 - [21216c6a] Preferences v1.4.3 - [08abe8d2] PrettyTables v2.4.0 + [21216c6a] Preferences v1.5.2 + [08abe8d2] PrettyTables v3.4.8 [27ebfcd6] Primes v0.5.7 - [43287f4e] PtrArrays v1.3.0 + [43287f4e] PtrArrays v1.4.0 + [0c0d3e7f] PureKLU v1.4.1 [438e738f] PyCall v1.96.4 - [1fd47b50] QuadGK v2.11.2 - [74087812] Random123 v1.7.1 - [e6cf234a] RandomNumbers v1.6.0 + [1fd47b50] QuadGK v2.11.3 [c84ed2f1] Ratios v0.4.5 - [b4db0fb7] ReactionNetworkImporters v0.16.1 + [b4db0fb7] ReactionNetworkImporters v1.5.0 + [988b38a3] ReadOnlyArrays v0.2.0 + [795d4caa] ReadOnlyDicts v1.0.1 [3cdcf5f2] RecipesBase v1.3.4 [01d81517] RecipesPipeline v0.6.12 - [731186ca] RecursiveArrayTools v3.33.0 + [731186ca] RecursiveArrayTools v4.5.1 [189a3867] Reexport v1.2.2 [05181044] RelocatableFolders v1.0.1 [ae029012] Requires v1.3.1 - [ae5879a3] ResettableStacks v1.1.1 - [79098fc4] Rmath v0.8.0 - [7e49a35a] RuntimeGeneratedFunctions v0.5.15 - [9dfe8606] SCCNonlinearSolve v1.2.0 - [94e857df] SIMDTypes v0.1.0 - [0bca4576] SciMLBase v2.96.0 - [31c91b34] SciMLBenchmarks v0.1.3 - [19f34311] SciMLJacobianOperators v0.1.6 -⌃ [c0aeaf25] SciMLOperators v0.4.0 - [53ae85a6] SciMLStructures v1.7.0 - [6c6a2e73] Scratch v1.2.1 - [91c51154] SentinelArrays v1.4.8 + [9fe22ead] RespecializeParams v1.3.0 + [79098fc4] Rmath v0.9.0 + [f2b01f46] Roots v3.0.7 + [7e49a35a] RuntimeGeneratedFunctions v0.5.25 + [9dfe8606] SCCNonlinearSolve v1.15.1 + [0bca4576] SciMLBase v3.50.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [19f34311] SciMLJacobianOperators v0.1.18 + [a6db7da4] SciMLLogging v2.1.0 + [c0aeaf25] SciMLOperators v1.30.0 + [431bcebd] SciMLPublic v1.3.0 + [53ae85a6] SciMLStructures v1.10.5 + [6c6a2e73] Scratch v1.3.0 + [91c51154] SentinelArrays v1.4.10 [efcf1570] Setfield v1.1.2 [992d4aef] Showoff v1.0.3 - [777ac1f9] SimpleBufferStream v1.2.0 - [727e6d20] SimpleNonlinearSolve v2.5.0 - [699a6c99] SimpleTraits v0.9.4 - [ce78b400] SimpleUnPack v1.1.0 - [b85f4697] SoftGlobalScope v1.1.0 - [a2af1166] SortingAlgorithms v1.2.1 - [9f842d2f] SparseConnectivityTracer v0.6.18 - [0a514795] SparseMatrixColorings v0.4.20 - [276daf66] SpecialFunctions v2.5.1 - [860ef19b] StableRNGs v1.0.3 - [aedffcd0] Static v1.2.0 - [0d7ed370] StaticArrayInterface v1.8.0 - [90137ffa] StaticArrays v1.9.13 - [1e83bf80] StaticArraysCore v1.4.3 - [82ae8749] StatsAPI v1.7.1 - [2913bbd2] StatsBase v0.34.5 - [4c63d2b9] StatsFuns v1.5.0 - [f3b207a7] StatsPlots v0.15.7 - [9672c7b4] SteadyStateDiffEq v2.5.0 - [789caeaf] StochasticDiffEq v6.80.0 - [7792a7ef] StrideArraysCore v0.5.7 + [727e6d20] SimpleNonlinearSolve v2.14.1 + [699a6c99] SimpleTraits v0.9.6 + [a2af1166] SortingAlgorithms v1.2.3 + [a57abbd0] SparseColumnPivotedQR v2.1.7 + [0a514795] SparseMatrixColorings v0.4.27 + [276daf66] SpecialFunctions v2.9.0 + [860ef19b] StableRNGs v1.0.4 + [0c0c59c1] StarAlgebras v0.3.0 + [64909d44] StateSelection v1.11.1 + [90137ffa] StaticArrays v1.9.19 + [1e83bf80] StaticArraysCore v1.4.4 + [82ae8749] StatsAPI v1.8.0 + [2913bbd2] StatsBase v0.34.13 + [4c63d2b9] StatsFuns v2.2.1 + [f3b207a7] StatsPlots v0.15.8 [69024149] StringEncodings v0.3.7 - [892a3eda] StringManipulation v0.4.1 - [c3572dad] Sundials v4.28.0 - [2efcf032] SymbolicIndexingInterface v0.3.40 - [19f23fe9] SymbolicLimits v0.2.2 - [d1185830] SymbolicUtils v3.29.0 - [0c5d862f] Symbolics v6.40.0 + [892a3eda] StringManipulation v0.5.0 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 + [19f23fe9] SymbolicLimits v1.2.0 +⌅ [d1185830] SymbolicUtils v4.45.0 + [0c5d862f] Symbolics v7.39.0 [ab02a1b2] TableOperations v1.2.0 [3783bdb8] TableTraits v1.0.1 - [bd369af6] Tables v1.12.0 - [ed4db957] TaskLocalValues v0.1.2 + [bd369af6] Tables v1.14.0 + [ed4db957] TaskLocalValues v0.1.3 [62fd8b95] TensorCore v0.1.1 [8ea1fca8] TermInterface v2.0.0 - [1c621080] TestItems v1.0.0 - [8290d209] ThreadingUtilities v0.5.4 - [a759f4b9] TimerOutputs v0.5.29 - [3bb67fe8] TranscodingStreams v0.11.3 - [410a4b4d] Tricks v0.1.10 + [1c621080] TestItems v1.1.0 + [a759f4b9] TimerOutputs v1.2.0 + [410a4b4d] Tricks v0.1.13 [781d530d] TruncatedStacktraces v1.4.0 - [5c2747f8] URIs v1.5.2 [3a884ed6] UnPack v1.0.2 [1cfade01] UnicodeFun v0.4.1 - [1986cc42] Unitful v1.22.1 - [45397f5d] UnitfulLatexify v1.7.0 - [a7c27f48] Unityper v0.1.6 [41fe7b60] Unzip v0.2.0 [81def892] VersionParsing v1.3.0 - [897b6980] WeakValueDicts v0.1.0 + [d30d5f5c] WeakCacheSets v0.1.0 [44d3d7a6] Weave v0.10.12 - [cc8bc4a8] Widgets v0.6.7 - [efce3f68] WoodburyMatrices v1.0.0 - [ddb6d928] YAML v0.4.14 - [c2297ded] ZMQ v1.4.0 -⌅ [68821587] Arpack_jll v3.5.1+1 + [cc8bc4a8] Widgets v0.6.8 + [efce3f68] WoodburyMatrices v1.1.0 + [ddb6d928] YAML v0.4.16 + [c2297ded] ZMQ v1.5.1 +⌅ [68821587] Arpack_jll v3.5.2+0 [6e34b625] Bzip2_jll v1.0.9+0 - [83423d85] Cairo_jll v1.18.5+0 + [83423d85] Cairo_jll v1.18.7+0 [ee1fde0b] Dbus_jll v1.16.2+0 [2702e6a9] EpollShim_jll v0.0.20230411+1 - [2e619515] Expat_jll v2.6.5+0 -⌅ [b22a6f82] FFMPEG_jll v4.4.4+1 - [f5851436] FFTW_jll v3.3.11+0 - [a3f928ae] Fontconfig_jll v2.16.0+0 - [d7e528f0] FreeType2_jll v2.13.4+0 + [2e619515] Expat_jll v2.8.3+0 +⌅ [b22a6f82] FFMPEG_jll v8.1.2+0 + [a3f928ae] Fontconfig_jll v2.17.1+0 + [d7e528f0] FreeType2_jll v2.14.3+1 [559328eb] FriBidi_jll v1.0.17+0 - [0656b61e] GLFW_jll v3.4.0+2 - [d2c73de3] GR_jll v0.73.16+0 - [78b55507] Gettext_jll v0.21.0+0 - [f8c6e375] Git_jll v2.49.0+0 - [7746bdde] Glib_jll v2.84.0+0 - [3b182d85] Graphite2_jll v1.3.15+0 - [2e76f6c2] HarfBuzz_jll v8.5.1+0 - [1d5cc7b8] IntelOpenMP_jll v2025.0.4+0 - [aacddb02] JpegTurbo_jll v3.1.1+0 - [c1c5ebd0] LAME_jll v3.100.2+0 - [88015f11] LERC_jll v4.0.1+0 - [1d63c593] LLVMOpenMP_jll v18.1.8+0 + [0656b61e] GLFW_jll v3.5.1+0 + [d2c73de3] GR_jll v0.73.27+0 +⌅ [b0724c58] GettextRuntime_jll v0.22.4+0 + [61579ee1] Ghostscript_jll v9.55.1+0 + [020c3dae] Git_LFS_jll v3.7.1+0 + [f8c6e375] Git_jll v2.55.0+0 + [7746bdde] Glib_jll v2.88.3+0 + [3b182d85] Graphite2_jll v1.3.16+0 + [2e76f6c2] HarfBuzz_jll v100.14003.0+0 + [1d5cc7b8] IntelOpenMP_jll v2025.2.0+0 + [aacddb02] JpegTurbo_jll v3.2.0+1 + [c1c5ebd0] LAME_jll v3.100.3+0 + [88015f11] LERC_jll v4.1.0+0 + [1d63c593] LLVMOpenMP_jll v22.1.7+0 [aae0fff6] LSODA_jll v0.1.2+0 - [dd4b983a] LZO_jll v2.10.3+0 - [e9f186c6] Libffi_jll v3.4.7+0 +⌅ [e9f186c6] Libffi_jll v3.4.7+0 [7e76a0d4] Libglvnd_jll v1.7.1+1 [94ce4f54] Libiconv_jll v1.18.0+0 - [4b2f31a3] Libmount_jll v2.41.0+0 - [89763e89] Libtiff_jll v4.7.1+0 - [38a345b3] Libuuid_jll v2.41.0+0 - [856f044c] MKL_jll v2025.0.1+1 - [e7412a2a] Ogg_jll v1.3.5+1 - [9bd350c2] OpenSSH_jll v10.0.1+0 - [458c3c95] OpenSSL_jll v3.5.0+0 + [4b2f31a3] Libmount_jll v2.42.0+0 + [89763e89] Libtiff_jll v4.7.3+0 + [38a345b3] Libuuid_jll v2.42.0+0 + [856f044c] MKL_jll v2025.2.0+0 + [e7412a2a] Ogg_jll v1.3.6+0 +⌅ [656ef2d0] OpenBLAS32_jll v0.3.24+0 + [9bd350c2] OpenSSH_jll v10.5.1+0 + [458c3c95] OpenSSL_jll v3.5.8+0 [efe28fd5] OpenSpecFun_jll v0.5.6+0 - [91d4177d] Opus_jll v1.3.3+0 - [36c8627f] Pango_jll v1.56.3+0 -⌅ [30392449] Pixman_jll v0.44.2+0 - [c0090381] Qt6Base_jll v6.8.2+1 - [629bc702] Qt6Declarative_jll v6.8.2+1 - [ce943373] Qt6ShaderTools_jll v6.8.2+1 - [e99dba38] Qt6Wayland_jll v6.8.2+0 - [f50d1b31] Rmath_jll v0.5.1+0 -⌅ [fb77eaff] Sundials_jll v5.2.2+0 + [91d4177d] Opus_jll v1.6.1+0 + [36c8627f] Pango_jll v1.58.2+0 + [30392449] Pixman_jll v0.46.4+0 + [c0090381] Qt6Base_jll v6.10.2+2 + [629bc702] Qt6Declarative_jll v6.10.2+2 + [ce943373] Qt6ShaderTools_jll v6.10.2+1 + [6de9746b] Qt6Svg_jll v6.10.2+0 + [e99dba38] Qt6Wayland_jll v6.10.2+1 + [f50d1b31] Rmath_jll v0.5.2+0 +⌅ [ca45d3f4] SuiteSparse32_jll v5.10.1+0 + [fb77eaff] Sundials_jll v7.5.0+0 [a44049a8] Vulkan_Loader_jll v1.3.243+0 - [a2964d1f] Wayland_jll v1.23.1+0 - [2381bf8a] Wayland_protocols_jll v1.36.0+0 -⌅ [02c8fc9c] XML2_jll v2.13.6+1 - [ffd25f8a] XZ_jll v5.8.1+0 + [a2964d1f] Wayland_jll v1.24.0+0 + [ffd25f8a] XZ_jll v5.8.3+0 [f67eecfb] Xorg_libICE_jll v1.1.2+0 [c834827a] Xorg_libSM_jll v1.2.6+0 - [4f6342f7] Xorg_libX11_jll v1.8.12+0 + [4f6342f7] Xorg_libX11_jll v1.8.13+0 [0c0b7dd1] Xorg_libXau_jll v1.0.13+0 [935fb764] Xorg_libXcursor_jll v1.2.4+0 [a3789734] Xorg_libXdmcp_jll v1.1.6+0 - [1082639a] Xorg_libXext_jll v1.3.7+0 - [d091e8ba] Xorg_libXfixes_jll v6.0.1+0 - [a51aa0fd] Xorg_libXi_jll v1.8.3+0 - [d1454406] Xorg_libXinerama_jll v1.1.6+0 - [ec84b674] Xorg_libXrandr_jll v1.5.5+0 + [1082639a] Xorg_libXext_jll v1.3.8+0 + [d091e8ba] Xorg_libXfixes_jll v6.0.2+0 + [a51aa0fd] Xorg_libXi_jll v1.8.4+0 + [d1454406] Xorg_libXinerama_jll v1.1.7+0 + [ec84b674] Xorg_libXrandr_jll v1.5.6+0 [ea2f1a96] Xorg_libXrender_jll v0.9.12+0 + [a65dc6b1] Xorg_libpciaccess_jll v0.19.0+0 [c7cfdc94] Xorg_libxcb_jll v1.17.1+0 - [cc61e674] Xorg_libxkbfile_jll v1.1.3+0 - [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0 - [12413925] Xorg_xcb_util_image_jll v0.4.0+1 - [2def613f] Xorg_xcb_util_jll v0.4.0+1 - [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1 - [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1 - [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1 + [cc61e674] Xorg_libxkbfile_jll v1.2.0+0 + [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.6+0 + [12413925] Xorg_xcb_util_image_jll v0.4.1+0 + [2def613f] Xorg_xcb_util_jll v0.4.1+0 + [975044d2] Xorg_xcb_util_keysyms_jll v0.4.1+0 + [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.10+0 + [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.2+0 [35661453] Xorg_xkbcomp_jll v1.4.7+0 - [33bec58e] Xorg_xkeyboard_config_jll v2.44.0+0 + [33bec58e] Xorg_xkeyboard_config_jll v2.47.0+2 [c5fb5394] Xorg_xtrans_jll v1.6.0+0 [8f1865be] ZeroMQ_jll v4.3.6+0 [3161d3a3] Zstd_jll v1.5.7+1 - [35ca27e7] eudev_jll v3.2.9+0 - [214eeab7] fzf_jll v0.61.1+0 - [1a1c6b14] gperf_jll v3.3.0+0 - [a4ae2306] libaom_jll v3.11.0+0 - [0ac62f75] libass_jll v0.15.2+0 + [35ca27e7] eudev_jll v3.2.14+0 +⌅ [214eeab7] fzf_jll v0.61.1+0 + [a4ae2306] libaom_jll v3.14.1+0 + [0ac62f75] libass_jll v0.17.5+0 [1183f4f0] libdecor_jll v0.2.2+0 - [2db6ffa8] libevdev_jll v1.11.0+0 - [f638f0a6] libfdk_aac_jll v2.0.3+0 - [36db933b] libinput_jll v1.18.0+0 - [b53b4c65] libpng_jll v1.6.48+0 + [8e53e030] libdrm_jll v2.4.134+0 + [2db6ffa8] libevdev_jll v1.13.4+0 + [f638f0a6] libfdk_aac_jll v2.0.4+0 + [36db933b] libinput_jll v1.28.1+0 + [b53b4c65] libpng_jll v1.6.58+0 [a9144af2] libsodium_jll v1.0.21+0 - [f27f6e37] libvorbis_jll v1.3.7+2 - [009596ad] mtdev_jll v1.1.6+0 - [1317d2d5] oneTBB_jll v2022.0.0+0 -⌅ [1270edf5] x264_jll v2021.5.5+0 -⌅ [dfaa095f] x265_jll v3.5.0+0 - [d8fb68d0] xkbcommon_jll v1.8.1+0 + [9a156e7d] libva_jll v2.23.0+0 + [f27f6e37] libvorbis_jll v1.3.8+0 + [009596ad] mtdev_jll v1.1.7+0 + [1317d2d5] oneTBB_jll v2022.3.0+0 +⌅ [1270edf5] x264_jll v10164.0.1+0 + [dfaa095f] x265_jll v4.1.0+0 + [d8fb68d0] xkbcommon_jll v1.13.0+0 [0dad84c5] ArgTools v1.1.1 [56f22d72] Artifacts [2a0f44e3] Base64 diff --git a/markdown/Jumps/Spatial_Signaling_Sanft.md b/markdown/Jumps/Spatial_Signaling_Sanft.md index 38846e681..83720dad6 100644 --- a/markdown/Jumps/Spatial_Signaling_Sanft.md +++ b/markdown/Jumps/Spatial_Signaling_Sanft.md @@ -4,20 +4,23 @@ title: "Spatial Signaling Model from Sanft and Othmer (2015)" --- ```julia using Catalyst, JumpProcesses, BenchmarkTools, Plots, Random +using SymbolicIndexingInterface: parameter_values ``` # 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 +stochastic simulation algorithms (SSAs). Below, the value `N` will denote the number of subvolumes along one dimension of a cubic grid, representing the 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 @@ -32,29 +35,30 @@ micromolar_to_invcubicmicrometer (generic function with 1 method) 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 ``` ``` -Model ##ReactionSystem#231: -Unknowns (8): see unknowns(##ReactionSystem#231) +Model ##ReactionSystem#234: +Unknowns (8): see unknowns(##ReactionSystem#234) EA(t) A(t) EB(t) B(t) ⋮ -Parameters (4): see parameters(##ReactionSystem#231) +Parameters (4): see parameters(##ReactionSystem#234) k₁ ka kd @@ -64,9 +68,11 @@ Parameters (4): see parameters(##ReactionSystem#231) + 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) @@ -113,19 +119,23 @@ transport_model (generic function with 1 method) + 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 - setdefaults!(rn, [:k₁ => 150, :ka => kaval, :kd => 3.82, :k₄ => 6.0]) + parameters = [:k₁ => 150, :ka => kaval, :kd => 3.82, :k₄ => 6.0] # 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)) + u0wm = species(rn) .=> vec(sum(u0, dims = 2)) + jprobwm = JumpProblem( + rn, u0wm, (0.0, end_time), parameters; + aggregator = Direct(), save_positions = (false, false) + ) majumps = jprobwm.massaction_jump - majumps, dprobwm, jprobwm, u0wm + return majumps, parameter_values(jprobwm), jprobwm, u0wm end ``` @@ -138,27 +148,29 @@ wellmixed_model (generic function with 1 method) # 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) +majumps, parameters_wm, 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)) +majumps, parameters_wm, jprobwm, u0wm = wellmixed_model(rn, u0, end_time, h) +dprob = DiscreteProblem(u0, (0.0, end_time), copy(parameters_wm)) 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])") ``` ![](figures/Spatial_Signaling_Sanft_6_1.png) @@ -166,11 +178,13 @@ plot!(plt, spatial_sol.t, Ntot, label="Spatial", # 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 @@ -188,7 +202,9 @@ 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) @@ -198,15 +214,15 @@ 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) # we create a well-mixed model within a domain of the size of *one* voxel, h - majumps, dprobwm, jprobwm, u0wm = wellmixed_model(rn, u0, end_time, h) + majumps, parameters_wm, jprobwm, u0wm = wellmixed_model(rn, u0, end_time, h) # the spatial problem - dprob = DiscreteProblem(u0, (0.0, end_time), copy(dprobwm.p)) + dprob = DiscreteProblem(u0, (0.0, end_time), copy(parameters_wm)) @show N @@ -218,9 +234,9 @@ 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=3 seconds=300 bench_dict[name, N] = run(b) end end @@ -234,7 +250,9 @@ benchmark_and_save! (generic function with 1 method) + 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)]) @@ -244,7 +262,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) @@ -254,15 +272,15 @@ 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 ``` @@ -273,8 +291,10 @@ fetch_and_plot (generic function with 1 method) + 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()] @@ -323,7 +343,9 @@ plt=fetch_and_plot(bench_dict, domain_len) ![](figures/Spatial_Signaling_Sanft_11_1.png) + 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 @@ -371,8 +393,8 @@ 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). ## Appendix @@ -398,432 +420,373 @@ Platform Info: WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver2) -Threads: 1 default, 0 interactive, 1 GC (on 128 virtual cores) +Threads: 128 default, 0 interactive, 64 GC (on 128 virtual cores) Environment: - JULIA_CPU_THREADS = 128 - JULIA_DEPOT_PATH = /cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4d2d937f953 + JULIA_LOAD_PATH = @:/home/crackauc/sandbox/tmp_20260825_180339_53321/jumps-refresh:@stdlib + JULIA_PKG_PRECOMPILE_AUTO = 0 ``` Package Information: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Project.toml` - [6e4b80f9] BenchmarkTools v1.6.0 - [479239e8] Catalyst v15.0.8 - [8f4d0f93] Conda v1.10.2 - [a93c6f00] DataFrames v1.7.0 - [0c46a032] DifferentialEquations v7.16.1 - [31c24e10] Distributions v0.25.120 - [86223c79] Graphs v1.12.1 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 - [91a5bcdd] Plots v1.40.13 +Status `~/sandbox/tmp_20260825_180339_53321/jumps-refresh/benchmarks/Jumps/Project.toml` + [6e4b80f9] BenchmarkTools v1.8.0 + [479239e8] Catalyst v16.4.0 + [8f4d0f93] Conda v1.10.3 + [a93c6f00] DataFrames v1.8.2 + [0c46a032] DifferentialEquations v8.1.1 + [31c24e10] Distributions v0.25.131 + [86223c79] Graphs v1.14.0 + [faf0f6d7] JumpProblemLibrary v2.0.3 +⌃ [ccbc3e58] JumpProcesses v9.30.1 + [961ee093] ModelingToolkit v11.40.0 + [1dea7af3] OrdinaryDiffEq v7.8.1 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 + [91a5bcdd] Plots v1.41.7 [438e738f] PyCall v1.96.4 - [b4db0fb7] ReactionNetworkImporters v0.16.1 - [31c91b34] SciMLBenchmarks v0.1.3 - [860ef19b] StableRNGs v1.0.3 - [f3b207a7] StatsPlots v0.15.7 - [c3572dad] Sundials v4.28.0 + [b4db0fb7] ReactionNetworkImporters v1.5.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [860ef19b] StableRNGs v1.0.4 + [f3b207a7] StatsPlots v0.15.8 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 [37e2e46d] LinearAlgebra [9a3f8284] Random [10745b16] Statistics v1.10.0 -Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated` +Info Packages marked with ⌃ have new versions available and may be upgradable. ``` And the full manifest: ``` -Status `/cache/build/exclusive-amdci1-0/julialang/scimlbenchmarks-dot-jl/benchmarks/Jumps/Manifest.toml` - [47edcb42] ADTypes v1.14.0 +Status `~/sandbox/tmp_20260825_180339_53321/jumps-refresh/benchmarks/Jumps/Manifest.toml` + [47edcb42] ADTypes v1.24.0 + [14f7f29c] AMD v0.5.3 [621f4979] AbstractFFTs v1.5.0 + [6e696c72] AbstractPlutoDingetjes v1.4.0 [1520ce14] AbstractTrees v0.4.5 - [7d9f7c33] Accessors v0.1.42 - [79e6a3ab] Adapt v4.3.0 + [7d9f7c33] Accessors v0.1.45 + [79e6a3ab] Adapt v4.7.0 [66dad0bd] AliasTables v1.1.3 - [a95523ee] AlmostBlockDiagonals v0.1.10 [ec485272] ArnoldiMethod v0.4.0 [7d9fca2a] Arpack v0.5.4 - [4fba245c] ArrayInterface v7.19.0 - [4c555306] ArrayLayouts v1.11.1 + [4fba245c] ArrayInterface v7.30.0 + [4c555306] ArrayLayouts v1.12.2 [13072b0f] AxisAlgorithms v1.1.0 - [aae01518] BandedMatrices v1.9.4 - [6e4b80f9] BenchmarkTools v1.6.0 -⌅ [e2ed5e7c] Bijections v0.1.10 - [d1d4a3ce] BitFlags v0.1.9 - [62783981] BitTwiddlingConvenienceFunctions v0.1.6 - [8e7c35d0] BlockArrays v1.6.3 - [764a87c0] BoundaryValueDiffEq v5.17.0 - [7227322d] BoundaryValueDiffEqAscher v1.6.1 - [56b672f2] BoundaryValueDiffEqCore v1.9.0 - [85d9eb09] BoundaryValueDiffEqFIRK v1.7.0 - [1a22d4ce] BoundaryValueDiffEqMIRK v1.7.0 - [9255f1d6] BoundaryValueDiffEqMIRKN v1.6.1 - [ed55bfe0] BoundaryValueDiffEqShooting v1.7.0 - [70df07ce] BracketingNonlinearSolve v1.3.0 + [aae01518] BandedMatrices v1.12.0 + [6e4b80f9] BenchmarkTools v1.8.0 + [e2ed5e7c] Bijections v0.2.2 + [b2a6c25c] BinaryHeaps v1.1.0 + [caf10ac8] BipartiteGraphs v0.1.12 + [8e7c35d0] BlockArrays v1.10.0 + [70df07ce] BracketingNonlinearSolve v1.12.6 [fa961155] CEnum v0.5.0 - [2a0fbf3d] CPUSummary v0.2.6 - [479239e8] Catalyst v15.0.8 - [d360d2e6] ChainRulesCore v1.25.1 - [fb6a15b2] CloseOpenIntervals v0.1.13 + [479239e8] Catalyst v16.4.0 + [d360d2e6] ChainRulesCore v1.26.1 [aaaa29a8] Clustering v0.15.8 - [944b1d66] CodecZlib v0.7.8 - [35d6a980] ColorSchemes v3.29.0 + [35d6a980] ColorSchemes v3.31.0 [3da002f7] ColorTypes v0.12.1 [c3611d14] ColorVectorSpace v0.11.0 [5ae59095] Colors v0.13.1 - [861a8166] Combinatorics v1.0.3 - [a80b9123] CommonMark v0.9.1 - [38540f10] CommonSolve v0.2.4 +⌅ [861a8166] Combinatorics v1.0.2 + [38540f10] CommonSolve v0.2.14 [bbf7d656] CommonSubexpressions v0.3.1 - [f70d9fcc] CommonWorldInvalidations v1.0.0 - [34da2185] Compat v4.16.0 + [f70d9fcc] CommonWorldInvalidations v1.2.0 + [34da2185] Compat v4.18.1 [b152e2b5] CompositeTypes v0.1.4 [a33af91c] CompositionsBase v0.1.2 - [2569d6c7] ConcreteStructs v0.2.3 - [f0e56b4a] ConcurrentUtilities v2.5.0 - [8f4d0f93] Conda v1.10.2 - [187b0558] ConstructionBase v1.5.8 + [2569d6c7] ConcreteStructs v0.2.8 + [8f4d0f93] Conda v1.10.3 + [187b0558] ConstructionBase v1.6.0 [d38c429a] Contour v0.6.3 - [adafc99b] CpuId v0.3.1 - [a8cc5b0e] Crayons v4.1.1 + [a8cc5b0e] Crayons v4.2.0 [9a962f9c] DataAPI v1.16.0 - [a93c6f00] DataFrames v1.7.0 - [864edb3b] DataStructures v0.18.22 + [a93c6f00] DataFrames v1.8.2 + [864edb3b] DataStructures v0.19.6 [e2d170a0] DataValueInterfaces v1.0.0 - [bcd4f6db] DelayDiffEq v5.53.1 [8bb1440f] DelimitedFiles v1.9.1 - [2b5f629d] DiffEqBase v6.175.0 - [459566f4] DiffEqCallbacks v4.6.0 - [77a26b50] DiffEqNoiseProcess v5.24.1 +⌃ [2b5f629d] DiffEqBase v7.19.0 + [459566f4] DiffEqCallbacks v4.19.3 [163ba53b] DiffResults v1.1.0 - [b552c78f] DiffRules v1.15.1 - [0c46a032] DifferentialEquations v7.16.1 -⌅ [a0c0ee7d] DifferentiationInterface v0.6.54 - [8d63f2c5] DispatchDoctor v0.4.19 + [b552c78f] DiffRules v1.16.0 + [0c46a032] DifferentialEquations v8.1.1 + [a0c0ee7d] DifferentiationInterface v0.7.21 + [8d63f2c5] DispatchDoctor v0.4.28 [b4f34e82] Distances v0.10.12 - [31c24e10] Distributions v0.25.120 - [ffbed154] DocStringExtensions v0.9.4 - [5b8099bc] DomainSets v0.7.15 - [7c1d4256] DynamicPolynomials v0.6.2 - [06fc5a27] DynamicQuantities v1.8.0 - [4e289a0a] EnumX v1.0.5 -⌃ [f151be2c] EnzymeCore v0.8.10 - [460bff9d] ExceptionUnwrapping v0.1.11 - [d4d017d3] ExponentialUtilities v1.27.0 - [e2ba6199] ExprTools v0.1.10 + [31c24e10] Distributions v0.25.131 + [ffbed154] DocStringExtensions v0.9.5 + [5b8099bc] DomainSets v0.8.1 + [7c1d4256] DynamicPolynomials v0.6.7 + [06fc5a27] DynamicQuantities v1.13.0 + [4e289a0a] EnumX v1.0.7 + [f151be2c] EnzymeCore v0.8.21 + [e2ba6199] ExprTools v0.1.11 [55351af7] ExproniconLite v0.10.14 - [c87230d0] FFMPEG v0.4.2 - [7a1cc6ca] FFTW v1.8.1 - [9d29842c] FastAlmostBandedMatrices v0.1.5 - [7034ab61] FastBroadcast v0.3.5 + [c87230d0] FFMPEG v0.4.5 + [b86e33f2] FFTA v0.3.1 + [7034ab61] FastBroadcast v1.4.0 [9aa1b823] FastClosures v0.3.2 - [442a2c76] FastGaussQuadrature v1.0.2 - [a4df4552] FastPower v1.1.2 - [1a297f60] FillArrays v1.13.0 - [64ca27bc] FindFirstFunctions v1.4.1 - [6a86dc24] FiniteDiff v2.27.0 - [53c48c17] FixedPointNumbers v0.8.5 + [a4df4552] FastPower v1.5.0 + [1a297f60] FillArrays v1.17.0 + [64ca27bc] FindFirstFunctions v3.2.1 + [6a86dc24] FiniteDiff v2.33.0 +⌅ [53c48c17] FixedPointNumbers v0.8.6 [1fa38f19] Format v1.3.7 -⌅ [f6369f11] ForwardDiff v0.10.38 + [f6369f11] ForwardDiff v1.4.5 + [a85aefff] FunctionMaps v0.1.2 [069b7b12] FunctionWrappers v1.1.3 - [77dc65aa] FunctionWrappersWrappers v0.1.3 - [d9f16b24] Functors v0.5.2 + [77dc65aa] FunctionWrappersWrappers v1.13.0 [46192b85] GPUArraysCore v0.2.0 - [28b8d3ca] GR v0.73.16 - [c145ed77] GenericSchur v0.5.5 - [d7ba0133] Git v1.4.0 - [c27321d9] Glob v1.3.1 - [86223c79] Graphs v1.12.1 + [28b8d3ca] GR v0.73.27 + [a0844989] Gamma v1.2.0 + [d7ba0133] Git v1.5.0 + [86223c79] Graphs v1.14.0 [42e2da0e] Grisu v1.0.2 - [cd3eb016] HTTP v1.10.16 - [eafb193a] Highlights v0.5.3 - [34004b35] HypergeometricFunctions v0.3.28 -⌃ [7073ff75] IJulia v1.27.0 - [615f187c] IfElse v0.1.1 +⌅ [eafb193a] Highlights v0.5.3 + [34004b35] HypergeometricFunctions v0.3.30 + [7073ff75] IJulia v1.34.4 + [3263718b] ImplicitDiscreteSolve v2.2.0 [d25df0c9] Inflate v0.1.5 - [842dd82b] InlineStrings v1.4.3 - [18e54dd8] IntegerMathUtils v0.1.2 -⌅ [a98d9a8b] Interpolations v0.15.1 - [8197267c] IntervalSets v0.7.11 + [842dd82b] InlineStrings v1.4.5 + [18e54dd8] IntegerMathUtils v0.1.4 + [a98d9a8b] Interpolations v0.16.3 + [8197267c] IntervalSets v0.7.14 [3587e190] InverseFunctions v0.1.17 [41ab1584] InvertedIndices v1.3.1 - [92d709cd] IrrationalConstants v0.2.4 + [92d709cd] IrrationalConstants v0.2.6 [82899510] IteratorInterfaceExtensions v1.0.0 [1019f520] JLFzf v0.1.11 - [692b3bcd] JLLWrappers v1.7.0 - [682c06a0] JSON v0.21.4 + [692b3bcd] JLLWrappers v1.8.0 +⌅ [682c06a0] JSON v0.21.4 [ae98c720] Jieko v0.2.1 - [98e50ef6] JuliaFormatter v2.1.2 -⌅ [70703baa] JuliaSyntax v0.4.10 - [faf0f6d7] JumpProblemLibrary v1.1.0 - [ccbc3e58] JumpProcesses v9.15.0 - [5ab0869b] KernelDensity v0.6.9 - [ba0b0d4f] Krylov v0.10.1 - [7f56f5a3] LSODA v0.7.5 - [b964fa9f] LaTeXStrings v1.4.0 - [23fbe1c1] Latexify v0.16.8 - [10f19ff3] LayoutPointers v0.1.17 - [5078a376] LazyArrays v2.6.1 - [2d8b4e74] LevyArea v1.0.0 - [87fe0de2] LineSearch v0.1.4 - [d3d80556] LineSearches v7.3.0 - [7ed4a6bd] LinearSolve v3.16.0 - [2ab3a3ac] LogExpFunctions v0.3.29 - [e6f89c97] LoggingExtras v1.1.0 - [d8e11817] MLStyle v0.4.17 + [faf0f6d7] JumpProblemLibrary v2.0.3 +⌃ [ccbc3e58] JumpProcesses v9.30.1 + [5ab0869b] KernelDensity v0.6.12 + [ba0b0d4f] Krylov v0.10.9 + [2faa5264] LHLFactorization v2.2.1 + [7f56f5a3] LSODA v1.2.0 + [b964fa9f] LaTeXStrings v1.4.1 + [23fbe1c1] Latexify v0.16.12 + [87fe0de2] LineSearch v0.1.16 +⌃ [7ed4a6bd] LinearSolve v5.14.1 + [2ab3a3ac] LogExpFunctions v1.0.1 + [e6f89c97] LoggingExtras v1.2.0 [1914dd2f] MacroTools v0.5.16 - [d125e4d3] ManualMemory v0.1.8 - [a3b82374] MatrixFactorizations v3.0.1 - [bb5d69b7] MaybeInplace v0.1.4 - [739be429] MbedTLS v1.1.9 - [442fdcdd] Measures v0.3.2 + [bb5d69b7] MaybeInplace v0.1.8 + [442fdcdd] Measures v0.3.3 [e1d29d7a] Missings v1.2.0 -⌅ [961ee093] ModelingToolkit v9.80.2 - [2e0e35c7] Moshi v0.3.5 - [46d2c3a1] MuladdMacro v0.2.4 - [102ac46a] MultivariatePolynomials v0.5.9 - [6f286f6a] MultivariateStats v0.10.3 - [ffc61752] Mustache v1.0.20 - [d8a4904e] MutableArithmetics v1.6.4 - [d41bc354] NLSolversBase v7.9.1 - [2774e3e8] NLsolve v4.5.1 - [77ba4419] NaNMath v1.1.3 - [b8a86587] NearestNeighbors v0.4.21 - [8913a72c] NonlinearSolve v4.9.0 - [be0214bd] NonlinearSolveBase v1.12.0 - [5959db7a] NonlinearSolveFirstOrder v1.5.0 - [9a2c21bd] NonlinearSolveQuasiNewton v1.6.0 - [26075421] NonlinearSolveSpectralMethods v1.2.0 + [961ee093] ModelingToolkit v11.40.0 +⌃ [7771a370] ModelingToolkitBase v1.68.0 + [6bb917b9] ModelingToolkitTearing v1.20.6 + [2e0e35c7] Moshi v0.3.12 + [46d2c3a1] MuladdMacro v0.2.7 + [102ac46a] MultivariatePolynomials v0.5.19 + [6f286f6a] MultivariateStats v0.10.5 + [ffc61752] Mustache v1.0.21 + [d8a4904e] MutableArithmetics v1.8.0 + [77ba4419] NaNMath v1.1.4 + [b8a86587] NearestNeighbors v0.4.29 +⌃ [8913a72c] NonlinearSolve v4.28.1 +⌃ [be0214bd] NonlinearSolveBase v2.48.2 + [5959db7a] NonlinearSolveFirstOrder v2.4.1 + [9a2c21bd] NonlinearSolveQuasiNewton v1.15.2 + [26075421] NonlinearSolveSpectralMethods v1.8.1 [510215fc] Observables v0.5.5 [6fe1bfb0] OffsetArrays v1.17.0 - [4d8831e6] OpenSSL v1.5.0 - [429524aa] Optim v1.12.0 - [bac558e1] OrderedCollections v1.8.1 - [1dea7af3] OrdinaryDiffEq v6.98.0 - [89bda076] OrdinaryDiffEqAdamsBashforthMoulton v1.2.0 - [6ad6398a] OrdinaryDiffEqBDF v1.5.1 - [bbf590c4] OrdinaryDiffEqCore v1.26.0 - [50262376] OrdinaryDiffEqDefault v1.4.0 - [4302a76b] OrdinaryDiffEqDifferentiation v1.9.1 - [9286f039] OrdinaryDiffEqExplicitRK v1.1.0 - [e0540318] OrdinaryDiffEqExponentialRK v1.4.0 - [becaefa8] OrdinaryDiffEqExtrapolation v1.5.0 - [5960d6e9] OrdinaryDiffEqFIRK v1.12.0 - [101fe9f7] OrdinaryDiffEqFeagin v1.1.0 - [d3585ca7] OrdinaryDiffEqFunctionMap v1.1.1 - [d28bc4f8] OrdinaryDiffEqHighOrderRK v1.1.0 - [9f002381] OrdinaryDiffEqIMEXMultistep v1.3.0 - [521117fe] OrdinaryDiffEqLinear v1.3.0 - [1344f307] OrdinaryDiffEqLowOrderRK v1.2.0 - [b0944070] OrdinaryDiffEqLowStorageRK v1.3.0 - [127b3ac7] OrdinaryDiffEqNonlinearSolve v1.10.0 - [c9986a66] OrdinaryDiffEqNordsieck v1.1.0 - [5dd0a6cf] OrdinaryDiffEqPDIRK v1.3.1 - [5b33eab2] OrdinaryDiffEqPRK v1.1.0 - [04162be5] OrdinaryDiffEqQPRK v1.1.0 - [af6ede74] OrdinaryDiffEqRKN v1.1.0 - [43230ef6] OrdinaryDiffEqRosenbrock v1.10.1 - [2d112036] OrdinaryDiffEqSDIRK v1.3.0 - [669c94d9] OrdinaryDiffEqSSPRK v1.3.0 - [e3e12d00] OrdinaryDiffEqStabilizedIRK v1.3.0 - [358294b1] OrdinaryDiffEqStabilizedRK v1.1.0 - [fa646aed] OrdinaryDiffEqSymplecticRK v1.3.0 - [b1df2697] OrdinaryDiffEqTsit5 v1.1.0 - [79d7bb75] OrdinaryDiffEqVerner v1.2.0 - [90014a1f] PDMats v0.11.35 - [d96e819e] Parameters v0.12.3 - [69de0a69] Parsers v2.8.3 - [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.10 +⌅ [bac558e1] OrderedCollections v1.8.2 + [1dea7af3] OrdinaryDiffEq v7.8.1 +⌃ [6ad6398a] OrdinaryDiffEqBDF v2.4.5 +⌃ [bbf590c4] OrdinaryDiffEqCore v4.15.2 + [50262376] OrdinaryDiffEqDefault v2.6.0 +⌃ [4302a76b] OrdinaryDiffEqDifferentiation v3.11.0 +⌃ [127b3ac7] OrdinaryDiffEqNonlinearSolve v2.9.2 + [43230ef6] OrdinaryDiffEqRosenbrock v2.7.1 + [b4bd8bb3] OrdinaryDiffEqRosenbrockTableaus v2.4.2 + [2d112036] OrdinaryDiffEqSDIRK v2.9.1 + [b1df2697] OrdinaryDiffEqTsit5 v2.1.4 + [79d7bb75] OrdinaryDiffEqVerner v2.4.1 + [90014a1f] PDMats v0.11.41 +⌅ [d96e819e] Parameters v0.12.3 +⌅ [69de0a69] Parsers v2.8.7 + [86206cdf] PiecewiseDeterministicMarkovProcesses v0.0.12 [ccf2f8ad] PlotThemes v3.3.0 - [995b91a9] PlotUtils v1.4.3 - [91a5bcdd] Plots v1.40.13 - [e409e4f3] PoissonRandom v0.4.4 - [f517fe37] Polyester v0.7.18 - [1d0040c9] PolyesterWeave v0.2.2 + [995b91a9] PlotUtils v1.4.4 + [91a5bcdd] Plots v1.41.7 + [e409e4f3] PoissonRandom v0.4.13 [2dfb63ee] PooledArrays v1.4.3 - [85a6dd25] PositiveFactorizations v0.2.4 - [d236fae5] PreallocationTools v0.4.27 + [d236fae5] PreallocationTools v1.7.1 ⌅ [aea7be01] PrecompileTools v1.2.1 - [21216c6a] Preferences v1.4.3 - [08abe8d2] PrettyTables v2.4.0 + [21216c6a] Preferences v1.5.2 + [08abe8d2] PrettyTables v3.4.8 [27ebfcd6] Primes v0.5.7 - [43287f4e] PtrArrays v1.3.0 + [43287f4e] PtrArrays v1.4.0 + [0c0d3e7f] PureKLU v1.4.1 [438e738f] PyCall v1.96.4 - [1fd47b50] QuadGK v2.11.2 - [74087812] Random123 v1.7.1 - [e6cf234a] RandomNumbers v1.6.0 + [1fd47b50] QuadGK v2.11.3 [c84ed2f1] Ratios v0.4.5 - [b4db0fb7] ReactionNetworkImporters v0.16.1 + [b4db0fb7] ReactionNetworkImporters v1.5.0 + [988b38a3] ReadOnlyArrays v0.2.0 + [795d4caa] ReadOnlyDicts v1.0.1 [3cdcf5f2] RecipesBase v1.3.4 [01d81517] RecipesPipeline v0.6.12 - [731186ca] RecursiveArrayTools v3.33.0 + [731186ca] RecursiveArrayTools v4.5.1 [189a3867] Reexport v1.2.2 [05181044] RelocatableFolders v1.0.1 [ae029012] Requires v1.3.1 - [ae5879a3] ResettableStacks v1.1.1 - [79098fc4] Rmath v0.8.0 - [7e49a35a] RuntimeGeneratedFunctions v0.5.15 - [9dfe8606] SCCNonlinearSolve v1.2.0 - [94e857df] SIMDTypes v0.1.0 - [0bca4576] SciMLBase v2.96.0 - [31c91b34] SciMLBenchmarks v0.1.3 - [19f34311] SciMLJacobianOperators v0.1.6 -⌃ [c0aeaf25] SciMLOperators v0.4.0 - [53ae85a6] SciMLStructures v1.7.0 - [6c6a2e73] Scratch v1.2.1 - [91c51154] SentinelArrays v1.4.8 + [9fe22ead] RespecializeParams v1.3.0 + [79098fc4] Rmath v0.9.0 + [f2b01f46] Roots v3.0.7 + [7e49a35a] RuntimeGeneratedFunctions v0.5.25 +⌃ [9dfe8606] SCCNonlinearSolve v1.15.1 + [0bca4576] SciMLBase v3.50.0 +⌃ [31c91b34] SciMLBenchmarks v0.1.3 + [19f34311] SciMLJacobianOperators v0.1.18 + [a6db7da4] SciMLLogging v2.1.0 + [c0aeaf25] SciMLOperators v1.30.0 + [431bcebd] SciMLPublic v1.3.0 + [53ae85a6] SciMLStructures v1.10.5 + [6c6a2e73] Scratch v1.3.0 + [91c51154] SentinelArrays v1.4.10 [efcf1570] Setfield v1.1.2 [992d4aef] Showoff v1.0.3 - [777ac1f9] SimpleBufferStream v1.2.0 - [727e6d20] SimpleNonlinearSolve v2.5.0 - [699a6c99] SimpleTraits v0.9.4 - [ce78b400] SimpleUnPack v1.1.0 - [b85f4697] SoftGlobalScope v1.1.0 - [a2af1166] SortingAlgorithms v1.2.1 - [9f842d2f] SparseConnectivityTracer v0.6.18 - [0a514795] SparseMatrixColorings v0.4.20 - [276daf66] SpecialFunctions v2.5.1 - [860ef19b] StableRNGs v1.0.3 - [aedffcd0] Static v1.2.0 - [0d7ed370] StaticArrayInterface v1.8.0 - [90137ffa] StaticArrays v1.9.13 - [1e83bf80] StaticArraysCore v1.4.3 - [82ae8749] StatsAPI v1.7.1 - [2913bbd2] StatsBase v0.34.5 - [4c63d2b9] StatsFuns v1.5.0 - [f3b207a7] StatsPlots v0.15.7 - [9672c7b4] SteadyStateDiffEq v2.5.0 - [789caeaf] StochasticDiffEq v6.80.0 - [7792a7ef] StrideArraysCore v0.5.7 + [727e6d20] SimpleNonlinearSolve v2.14.1 + [699a6c99] SimpleTraits v0.9.6 + [a2af1166] SortingAlgorithms v1.2.3 + [a57abbd0] SparseColumnPivotedQR v2.1.7 + [0a514795] SparseMatrixColorings v0.4.27 + [276daf66] SpecialFunctions v2.9.0 + [860ef19b] StableRNGs v1.0.4 + [0c0c59c1] StarAlgebras v0.3.0 + [64909d44] StateSelection v1.11.1 + [90137ffa] StaticArrays v1.9.19 + [1e83bf80] StaticArraysCore v1.4.4 + [82ae8749] StatsAPI v1.8.0 + [2913bbd2] StatsBase v0.34.13 + [4c63d2b9] StatsFuns v2.2.1 + [f3b207a7] StatsPlots v0.15.8 [69024149] StringEncodings v0.3.7 - [892a3eda] StringManipulation v0.4.1 - [c3572dad] Sundials v4.28.0 - [2efcf032] SymbolicIndexingInterface v0.3.40 - [19f23fe9] SymbolicLimits v0.2.2 - [d1185830] SymbolicUtils v3.29.0 - [0c5d862f] Symbolics v6.40.0 +⌅ [892a3eda] StringManipulation v0.5.0 + [c3572dad] Sundials v6.6.0 + [2efcf032] SymbolicIndexingInterface v0.3.55 + [19f23fe9] SymbolicLimits v1.2.0 +⌅ [d1185830] SymbolicUtils v4.45.0 + [0c5d862f] Symbolics v7.39.0 [ab02a1b2] TableOperations v1.2.0 [3783bdb8] TableTraits v1.0.1 - [bd369af6] Tables v1.12.0 - [ed4db957] TaskLocalValues v0.1.2 + [bd369af6] Tables v1.14.0 + [ed4db957] TaskLocalValues v0.1.3 [62fd8b95] TensorCore v0.1.1 [8ea1fca8] TermInterface v2.0.0 - [1c621080] TestItems v1.0.0 - [8290d209] ThreadingUtilities v0.5.4 - [a759f4b9] TimerOutputs v0.5.29 - [3bb67fe8] TranscodingStreams v0.11.3 - [410a4b4d] Tricks v0.1.10 + [1c621080] TestItems v1.1.0 + [a759f4b9] TimerOutputs v1.2.0 + [410a4b4d] Tricks v0.1.13 [781d530d] TruncatedStacktraces v1.4.0 - [5c2747f8] URIs v1.5.2 [3a884ed6] UnPack v1.0.2 [1cfade01] UnicodeFun v0.4.1 - [1986cc42] Unitful v1.22.1 - [45397f5d] UnitfulLatexify v1.7.0 - [a7c27f48] Unityper v0.1.6 [41fe7b60] Unzip v0.2.0 [81def892] VersionParsing v1.3.0 - [897b6980] WeakValueDicts v0.1.0 + [d30d5f5c] WeakCacheSets v0.1.0 [44d3d7a6] Weave v0.10.12 - [cc8bc4a8] Widgets v0.6.7 - [efce3f68] WoodburyMatrices v1.0.0 - [ddb6d928] YAML v0.4.14 - [c2297ded] ZMQ v1.4.0 -⌅ [68821587] Arpack_jll v3.5.1+1 + [cc8bc4a8] Widgets v0.6.8 + [efce3f68] WoodburyMatrices v1.1.0 + [ddb6d928] YAML v0.4.16 + [c2297ded] ZMQ v1.5.1 +⌅ [68821587] Arpack_jll v3.5.2+0 [6e34b625] Bzip2_jll v1.0.9+0 - [83423d85] Cairo_jll v1.18.5+0 + [83423d85] Cairo_jll v1.18.7+0 [ee1fde0b] Dbus_jll v1.16.2+0 [2702e6a9] EpollShim_jll v0.0.20230411+1 - [2e619515] Expat_jll v2.6.5+0 -⌅ [b22a6f82] FFMPEG_jll v4.4.4+1 - [f5851436] FFTW_jll v3.3.11+0 - [a3f928ae] Fontconfig_jll v2.16.0+0 - [d7e528f0] FreeType2_jll v2.13.4+0 + [2e619515] Expat_jll v2.8.3+0 +⌅ [b22a6f82] FFMPEG_jll v8.1.2+0 + [a3f928ae] Fontconfig_jll v2.17.1+0 + [d7e528f0] FreeType2_jll v2.14.3+1 [559328eb] FriBidi_jll v1.0.17+0 - [0656b61e] GLFW_jll v3.4.0+2 - [d2c73de3] GR_jll v0.73.16+0 - [78b55507] Gettext_jll v0.21.0+0 - [f8c6e375] Git_jll v2.49.0+0 - [7746bdde] Glib_jll v2.84.0+0 - [3b182d85] Graphite2_jll v1.3.15+0 - [2e76f6c2] HarfBuzz_jll v8.5.1+0 - [1d5cc7b8] IntelOpenMP_jll v2025.0.4+0 - [aacddb02] JpegTurbo_jll v3.1.1+0 - [c1c5ebd0] LAME_jll v3.100.2+0 - [88015f11] LERC_jll v4.0.1+0 - [1d63c593] LLVMOpenMP_jll v18.1.8+0 + [0656b61e] GLFW_jll v3.5.1+0 + [d2c73de3] GR_jll v0.73.27+0 +⌅ [b0724c58] GettextRuntime_jll v0.22.4+0 + [61579ee1] Ghostscript_jll v9.55.1+0 + [020c3dae] Git_LFS_jll v3.7.1+0 + [f8c6e375] Git_jll v2.55.0+0 + [7746bdde] Glib_jll v2.88.3+0 + [3b182d85] Graphite2_jll v1.3.16+0 + [2e76f6c2] HarfBuzz_jll v100.14003.0+0 + [1d5cc7b8] IntelOpenMP_jll v2025.2.0+0 + [aacddb02] JpegTurbo_jll v3.2.0+1 + [c1c5ebd0] LAME_jll v3.100.3+0 + [88015f11] LERC_jll v4.1.0+0 + [1d63c593] LLVMOpenMP_jll v22.1.7+0 [aae0fff6] LSODA_jll v0.1.2+0 - [dd4b983a] LZO_jll v2.10.3+0 - [e9f186c6] Libffi_jll v3.4.7+0 +⌅ [e9f186c6] Libffi_jll v3.4.7+0 [7e76a0d4] Libglvnd_jll v1.7.1+1 [94ce4f54] Libiconv_jll v1.18.0+0 - [4b2f31a3] Libmount_jll v2.41.0+0 - [89763e89] Libtiff_jll v4.7.1+0 - [38a345b3] Libuuid_jll v2.41.0+0 - [856f044c] MKL_jll v2025.0.1+1 - [e7412a2a] Ogg_jll v1.3.5+1 - [9bd350c2] OpenSSH_jll v10.0.1+0 - [458c3c95] OpenSSL_jll v3.5.0+0 + [4b2f31a3] Libmount_jll v2.42.0+0 + [89763e89] Libtiff_jll v4.7.3+0 + [38a345b3] Libuuid_jll v2.42.0+0 + [856f044c] MKL_jll v2025.2.0+0 + [e7412a2a] Ogg_jll v1.3.6+0 +⌅ [656ef2d0] OpenBLAS32_jll v0.3.24+0 + [9bd350c2] OpenSSH_jll v10.5.1+0 + [458c3c95] OpenSSL_jll v3.5.8+0 [efe28fd5] OpenSpecFun_jll v0.5.6+0 - [91d4177d] Opus_jll v1.3.3+0 - [36c8627f] Pango_jll v1.56.3+0 -⌅ [30392449] Pixman_jll v0.44.2+0 - [c0090381] Qt6Base_jll v6.8.2+1 - [629bc702] Qt6Declarative_jll v6.8.2+1 - [ce943373] Qt6ShaderTools_jll v6.8.2+1 - [e99dba38] Qt6Wayland_jll v6.8.2+0 - [f50d1b31] Rmath_jll v0.5.1+0 -⌅ [fb77eaff] Sundials_jll v5.2.2+0 + [91d4177d] Opus_jll v1.6.1+0 + [36c8627f] Pango_jll v1.58.2+0 + [30392449] Pixman_jll v0.46.4+0 + [c0090381] Qt6Base_jll v6.10.2+2 + [629bc702] Qt6Declarative_jll v6.10.2+2 + [ce943373] Qt6ShaderTools_jll v6.10.2+1 + [6de9746b] Qt6Svg_jll v6.10.2+0 + [e99dba38] Qt6Wayland_jll v6.10.2+1 + [f50d1b31] Rmath_jll v0.5.2+0 +⌅ [ca45d3f4] SuiteSparse32_jll v5.10.1+0 + [fb77eaff] Sundials_jll v7.5.0+0 [a44049a8] Vulkan_Loader_jll v1.3.243+0 - [a2964d1f] Wayland_jll v1.23.1+0 - [2381bf8a] Wayland_protocols_jll v1.36.0+0 -⌅ [02c8fc9c] XML2_jll v2.13.6+1 - [ffd25f8a] XZ_jll v5.8.1+0 + [a2964d1f] Wayland_jll v1.24.0+0 + [ffd25f8a] XZ_jll v5.8.3+0 [f67eecfb] Xorg_libICE_jll v1.1.2+0 [c834827a] Xorg_libSM_jll v1.2.6+0 - [4f6342f7] Xorg_libX11_jll v1.8.12+0 + [4f6342f7] Xorg_libX11_jll v1.8.13+0 [0c0b7dd1] Xorg_libXau_jll v1.0.13+0 [935fb764] Xorg_libXcursor_jll v1.2.4+0 [a3789734] Xorg_libXdmcp_jll v1.1.6+0 - [1082639a] Xorg_libXext_jll v1.3.7+0 - [d091e8ba] Xorg_libXfixes_jll v6.0.1+0 - [a51aa0fd] Xorg_libXi_jll v1.8.3+0 - [d1454406] Xorg_libXinerama_jll v1.1.6+0 - [ec84b674] Xorg_libXrandr_jll v1.5.5+0 + [1082639a] Xorg_libXext_jll v1.3.8+0 + [d091e8ba] Xorg_libXfixes_jll v6.0.2+0 + [a51aa0fd] Xorg_libXi_jll v1.8.4+0 + [d1454406] Xorg_libXinerama_jll v1.1.7+0 + [ec84b674] Xorg_libXrandr_jll v1.5.6+0 [ea2f1a96] Xorg_libXrender_jll v0.9.12+0 + [a65dc6b1] Xorg_libpciaccess_jll v0.19.0+0 [c7cfdc94] Xorg_libxcb_jll v1.17.1+0 - [cc61e674] Xorg_libxkbfile_jll v1.1.3+0 - [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.4+0 - [12413925] Xorg_xcb_util_image_jll v0.4.0+1 - [2def613f] Xorg_xcb_util_jll v0.4.0+1 - [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1 - [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1 - [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1 + [cc61e674] Xorg_libxkbfile_jll v1.2.0+0 + [e920d4aa] Xorg_xcb_util_cursor_jll v0.1.6+0 + [12413925] Xorg_xcb_util_image_jll v0.4.1+0 + [2def613f] Xorg_xcb_util_jll v0.4.1+0 + [975044d2] Xorg_xcb_util_keysyms_jll v0.4.1+0 + [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.10+0 + [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.2+0 [35661453] Xorg_xkbcomp_jll v1.4.7+0 - [33bec58e] Xorg_xkeyboard_config_jll v2.44.0+0 + [33bec58e] Xorg_xkeyboard_config_jll v2.47.0+2 [c5fb5394] Xorg_xtrans_jll v1.6.0+0 [8f1865be] ZeroMQ_jll v4.3.6+0 [3161d3a3] Zstd_jll v1.5.7+1 - [35ca27e7] eudev_jll v3.2.9+0 - [214eeab7] fzf_jll v0.61.1+0 - [1a1c6b14] gperf_jll v3.3.0+0 - [a4ae2306] libaom_jll v3.11.0+0 - [0ac62f75] libass_jll v0.15.2+0 + [35ca27e7] eudev_jll v3.2.14+0 +⌅ [214eeab7] fzf_jll v0.61.1+0 + [a4ae2306] libaom_jll v3.14.1+0 + [0ac62f75] libass_jll v0.17.5+0 [1183f4f0] libdecor_jll v0.2.2+0 - [2db6ffa8] libevdev_jll v1.11.0+0 - [f638f0a6] libfdk_aac_jll v2.0.3+0 - [36db933b] libinput_jll v1.18.0+0 - [b53b4c65] libpng_jll v1.6.48+0 + [8e53e030] libdrm_jll v2.4.134+0 + [2db6ffa8] libevdev_jll v1.13.4+0 + [f638f0a6] libfdk_aac_jll v2.0.4+0 + [36db933b] libinput_jll v1.28.1+0 + [b53b4c65] libpng_jll v1.6.58+0 [a9144af2] libsodium_jll v1.0.21+0 - [f27f6e37] libvorbis_jll v1.3.7+2 - [009596ad] mtdev_jll v1.1.6+0 - [1317d2d5] oneTBB_jll v2022.0.0+0 -⌅ [1270edf5] x264_jll v2021.5.5+0 -⌅ [dfaa095f] x265_jll v3.5.0+0 - [d8fb68d0] xkbcommon_jll v1.8.1+0 + [9a156e7d] libva_jll v2.23.0+0 + [f27f6e37] libvorbis_jll v1.3.8+0 + [009596ad] mtdev_jll v1.1.7+0 + [1317d2d5] oneTBB_jll v2022.3.0+0 +⌅ [1270edf5] x264_jll v10164.0.1+0 + [dfaa095f] x265_jll v4.1.0+0 + [d8fb68d0] xkbcommon_jll v1.13.0+0 [0dad84c5] ArgTools v1.1.1 [56f22d72] Artifacts [2a0f44e3] Base64 diff --git a/markdown/Jumps/figures/Diffusion_CTRW_2_1.png b/markdown/Jumps/figures/Diffusion_CTRW_2_1.png index 8de1dc707..58e9dffcd 100644 Binary files a/markdown/Jumps/figures/Diffusion_CTRW_2_1.png and b/markdown/Jumps/figures/Diffusion_CTRW_2_1.png differ diff --git a/markdown/Jumps/figures/Diffusion_CTRW_3_1.png b/markdown/Jumps/figures/Diffusion_CTRW_3_1.png deleted file mode 100644 index 0db6ddfaa..000000000 Binary files a/markdown/Jumps/figures/Diffusion_CTRW_3_1.png and /dev/null differ diff --git a/markdown/Jumps/figures/Diffusion_CTRW_6_1.png b/markdown/Jumps/figures/Diffusion_CTRW_6_1.png index 072d109be..e373ce412 100644 Binary files a/markdown/Jumps/figures/Diffusion_CTRW_6_1.png and b/markdown/Jumps/figures/Diffusion_CTRW_6_1.png differ diff --git a/markdown/Jumps/figures/Diffusion_CTRW_7_1.png b/markdown/Jumps/figures/Diffusion_CTRW_7_1.png deleted file mode 100644 index cc6976e0a..000000000 Binary files a/markdown/Jumps/figures/Diffusion_CTRW_7_1.png and /dev/null differ diff --git a/markdown/Jumps/figures/EGFR_Benchmark_2_1.png b/markdown/Jumps/figures/EGFR_Benchmark_2_1.png index e6a0fa7d9..39ed6f3f1 100644 Binary files a/markdown/Jumps/figures/EGFR_Benchmark_2_1.png and b/markdown/Jumps/figures/EGFR_Benchmark_2_1.png differ diff --git a/markdown/Jumps/figures/EGFR_Benchmark_4_1.png b/markdown/Jumps/figures/EGFR_Benchmark_4_1.png index c16d6a50b..5e1ebe5fd 100644 Binary files a/markdown/Jumps/figures/EGFR_Benchmark_4_1.png and b/markdown/Jumps/figures/EGFR_Benchmark_4_1.png differ diff --git a/markdown/Jumps/figures/Mendes_multistate_example_3_1.png b/markdown/Jumps/figures/Mendes_multistate_example_3_1.png deleted file mode 100644 index 04cb1a60e..000000000 Binary files a/markdown/Jumps/figures/Mendes_multistate_example_3_1.png and /dev/null differ diff --git a/markdown/Jumps/figures/Mendes_multistate_example_4_1.png b/markdown/Jumps/figures/Mendes_multistate_example_4_1.png index cc45d9536..da487b4c0 100644 Binary files a/markdown/Jumps/figures/Mendes_multistate_example_4_1.png and b/markdown/Jumps/figures/Mendes_multistate_example_4_1.png differ diff --git a/markdown/Jumps/figures/Mendes_multistate_example_6_1.png b/markdown/Jumps/figures/Mendes_multistate_example_6_1.png deleted file mode 100644 index 6380a6456..000000000 Binary files a/markdown/Jumps/figures/Mendes_multistate_example_6_1.png and /dev/null differ diff --git a/markdown/Jumps/figures/Mendes_multistate_example_7_1.png b/markdown/Jumps/figures/Mendes_multistate_example_7_1.png index 837ca1147..2dbc87eef 100644 Binary files a/markdown/Jumps/figures/Mendes_multistate_example_7_1.png and b/markdown/Jumps/figures/Mendes_multistate_example_7_1.png differ diff --git a/markdown/Jumps/figures/MultivariateHawkes_13_1.png b/markdown/Jumps/figures/MultivariateHawkes_13_1.png deleted file mode 100644 index 2e51b86c6..000000000 Binary files a/markdown/Jumps/figures/MultivariateHawkes_13_1.png and /dev/null differ diff --git a/markdown/Jumps/figures/MultivariateHawkes_16_1.png b/markdown/Jumps/figures/MultivariateHawkes_16_1.png deleted file mode 100644 index 26594e70c..000000000 Binary files a/markdown/Jumps/figures/MultivariateHawkes_16_1.png and /dev/null differ diff --git a/markdown/Jumps/figures/MultivariateHawkes_20_1.png b/markdown/Jumps/figures/MultivariateHawkes_20_1.png deleted file mode 100644 index 5b14816b1..000000000 Binary files a/markdown/Jumps/figures/MultivariateHawkes_20_1.png and /dev/null differ diff --git a/markdown/Jumps/figures/MultivariateHawkes_21_1.png b/markdown/Jumps/figures/MultivariateHawkes_21_1.png deleted file mode 100644 index 367293082..000000000 Binary files a/markdown/Jumps/figures/MultivariateHawkes_21_1.png and /dev/null differ diff --git a/markdown/Jumps/figures/MultivariateHawkes_23_1.png b/markdown/Jumps/figures/MultivariateHawkes_23_1.png deleted file mode 100644 index 0fe8693cb..000000000 Binary files a/markdown/Jumps/figures/MultivariateHawkes_23_1.png and /dev/null differ diff --git a/markdown/Jumps/figures/MultivariateHawkes_8_1.png b/markdown/Jumps/figures/MultivariateHawkes_8_1.png deleted file mode 100644 index c022a3285..000000000 Binary files a/markdown/Jumps/figures/MultivariateHawkes_8_1.png and /dev/null differ diff --git a/markdown/Jumps/figures/NegFeedback_GeneExpr_2_1.png b/markdown/Jumps/figures/NegFeedback_GeneExpr_2_1.png deleted file mode 100644 index 1d056e185..000000000 Binary files a/markdown/Jumps/figures/NegFeedback_GeneExpr_2_1.png and /dev/null differ diff --git a/markdown/Jumps/figures/NegFeedback_GeneExpr_3_1.png b/markdown/Jumps/figures/NegFeedback_GeneExpr_3_1.png index a1d3b2c1a..3d66a4b36 100644 Binary files a/markdown/Jumps/figures/NegFeedback_GeneExpr_3_1.png and b/markdown/Jumps/figures/NegFeedback_GeneExpr_3_1.png differ diff --git a/markdown/Jumps/figures/NegFeedback_GeneExpr_7_1.png b/markdown/Jumps/figures/NegFeedback_GeneExpr_7_1.png index db14ba681..2ca90c949 100644 Binary files a/markdown/Jumps/figures/NegFeedback_GeneExpr_7_1.png and b/markdown/Jumps/figures/NegFeedback_GeneExpr_7_1.png differ diff --git a/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_3_1.png b/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_3_1.png index 0981084b9..03d8f0dd6 100644 Binary files a/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_3_1.png and b/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_3_1.png differ diff --git a/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_4_1.png b/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_4_1.png index 5f7600be7..21da1fe6e 100644 Binary files a/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_4_1.png and b/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_4_1.png differ diff --git a/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_5_1.png b/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_5_1.png index 61a7acd5b..a6eebe753 100644 Binary files a/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_5_1.png and b/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_5_1.png differ diff --git a/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_8_1.png b/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_8_1.png index ecd7d17c0..c185157d1 100644 Binary files a/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_8_1.png and b/markdown/Jumps/figures/NegFeedback_GeneExpr_Marchetti_8_1.png differ diff --git a/markdown/Jumps/figures/Spatial_Signaling_Sanft_11_1.png b/markdown/Jumps/figures/Spatial_Signaling_Sanft_11_1.png index 2e0106792..ba2c09f3b 100644 Binary files a/markdown/Jumps/figures/Spatial_Signaling_Sanft_11_1.png and b/markdown/Jumps/figures/Spatial_Signaling_Sanft_11_1.png differ diff --git a/markdown/Jumps/figures/Spatial_Signaling_Sanft_13_1.png b/markdown/Jumps/figures/Spatial_Signaling_Sanft_13_1.png index 55f53c322..79da05b47 100644 Binary files a/markdown/Jumps/figures/Spatial_Signaling_Sanft_13_1.png and b/markdown/Jumps/figures/Spatial_Signaling_Sanft_13_1.png differ diff --git a/markdown/Jumps/figures/Spatial_Signaling_Sanft_6_1.png b/markdown/Jumps/figures/Spatial_Signaling_Sanft_6_1.png index 3ef839c6f..44c5fe097 100644 Binary files a/markdown/Jumps/figures/Spatial_Signaling_Sanft_6_1.png and b/markdown/Jumps/figures/Spatial_Signaling_Sanft_6_1.png differ diff --git a/script/Jumps/Diffusion_CTRW.jl b/script/Jumps/Diffusion_CTRW.jl index a1b0be2fd..7fca7e4c6 100644 --- a/script/Jumps/Diffusion_CTRW.jl +++ b/script/Jumps/Diffusion_CTRW.jl @@ -1,29 +1,33 @@ - using Catalyst, JumpProcesses, JumpProblemLibrary, Plots, Statistics, DataFrames 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) +u0 = jprob.u0(rn, N) +rates = [:K => 1 / (h * h)] +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, u0, (0.0, tf), rates; aggregator = 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") function run_benchmark!(t, jump_prob, stepper) sol = solve(jump_prob, stepper) - @inbounds for i in 1:length(t) + return @inbounds for i in 1:length(t) t[i] = @elapsed (sol = solve(jump_prob, stepper)) end end @@ -32,7 +36,9 @@ 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, u0, (0.0, tf), rates; aggregator = method, save_positions = (false, false) + ) stepper = SSAStepper() t = Vector{Float64}(undef, nsims) run_benchmark!(t, jump_prob, stepper) @@ -40,26 +46,27 @@ for method in methods end -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 +) -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") using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) - +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) diff --git a/script/Jumps/EGFR_Benchmark.jl b/script/Jumps/EGFR_Benchmark.jl index e23f7cec2..3ba314e18 100644 --- a/script/Jumps/EGFR_Benchmark.jl +++ b/script/Jumps/EGFR_Benchmark.jl @@ -1,45 +1,54 @@ +using JumpProcesses, Plots, StableRNGs, BenchmarkTools, ReactionNetworkImporters, + StatsPlots, Catalyst -using JumpProcesses, Plots, StableRNGs, BenchmarkTools, ReactionNetworkImporters, StatsPlots, Catalyst - -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)) +egfr_net = complete(loadrxnetwork(BNGNetwork(), joinpath(@__DIR__, "Data/egfr_net.net"))) +egfr_u0 = Catalyst.get_u0_map(egfr_net) +egfr_parameters = Catalyst.get_parameter_map(egfr_net) -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") + jprob = JumpProblem( + egfr_net, egfr_u0, (0.0, tf), egfr_parameters; + aggregator = alg, u0_eltype = Int64 + ) + sol = solve(jprob, SSAStepper(), saveat = tf / 200) + plot!(plt, sol, idxs = :Dimers, label = "$alg") end plot!(plt) 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] + u0 = Catalyst.get_u0_map(model) + parameters = Catalyst.get_parameter_map(model) 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)) + jprob = JumpProblem( + model, u0, (0.0, end_time), parameters; + aggregator = alg, rng, save_positions = (false, false), u0_eltype = Int64 + ) b = @benchmarkable solve($jprob; saveat = $end_time) samples = 5 seconds = 7200 bm = run(b) - push!(times, median(bm).time/1e9) + push!(times, median(bm).time / 1.0e9) end - bar(alg_names, times, xlabel = "Algorithm", ylabel = "Average Time (s)", title = "SSA Runtime for EGFR network", legend = false) + return bar( + alg_names, times, xlabel = "Algorithm", ylabel = "Average Time (s)", + title = "SSA Runtime for EGFR network", legend = false + ) end -tf = 12. +tf = 12.0 rng = StableRNG(53124) algs = [NRM(), CCNRM(), DirectCR(), RSSACR()] @@ -49,4 +58,3 @@ plt using SciMLBenchmarks SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) - diff --git a/script/Jumps/Mendes_multistate_example.jl b/script/Jumps/Mendes_multistate_example.jl index 5b4f83955..e6dc66fa7 100644 --- a/script/Jumps/Mendes_multistate_example.jl +++ b/script/Jumps/Mendes_multistate_example.jl @@ -1,52 +1,56 @@ - using Catalyst, JumpProcesses, JumpProblemLibrary, Plots, Statistics fmt = :png jprob = JumpProblemLibrary.prob_jump_multistate -rn = jprob.network +rn = jprob.network reactions(rn) -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 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] + [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 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, jprob.u0, (0.0, tf), jprob.rates; + aggregator = 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) function run_benchmark!(t, jump_prob, stepper) sol = solve(jump_prob, stepper) - @inbounds for i in 1:length(t) + return @inbounds for i in 1:length(t) t[i] = @elapsed (sol = solve(jump_prob, stepper)) end end @@ -55,7 +59,10 @@ 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, jprob.u0, (0.0, tf), jprob.rates; + aggregator = method, save_positions = (false, false) + ) stepper = SSAStepper() time = Vector{Float64}(undef, nsims) run_benchmark!(time, jump_prob, stepper) @@ -63,9 +70,9 @@ for method in methods end -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]) @@ -73,16 +80,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") using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) - +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) diff --git a/script/Jumps/MultivariateHawkes.jl b/script/Jumps/MultivariateHawkes.jl deleted file mode 100644 index d9a0728a8..000000000 --- a/script/Jumps/MultivariateHawkes.jl +++ /dev/null @@ -1,719 +0,0 @@ - -using JumpProcesses, Graphs, Statistics, BenchmarkTools, Plots -using OrdinaryDiffEq: Tsit5 -fmt = :png -width_px, height_px = default(:size); - - -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] - return urate[i] - end - - @inline @inbounds function rate_brute(u, p, t) - λ, α, β, h, urate = p - 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 - end - urate[i] = λ + x - return urate[i] - end - - if use_recursion - return rate_recursion - else - return rate_brute - end - -end - - -function hawkes_jump(i::Int, g; use_recursion = false) - rate = hawkes_rate(i, g; use_recursion) - urate = rate - @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 - for j in g[i] - ϕ[j] *= exp(-β*(integrator.t - h[j])) - ϕ[j] += α - h[j] = integrator.t - end - integrator.u[i] += 1 - end - @inbounds function affect_brute!(integrator) - push!(integrator.p[4][i], integrator.t) - integrator.u[i] += 1 - end - return VariableRateJump( - rate, - use_recursion ? affect_recursion! : affect_brute!; - lrate, - urate, - rateinterval, - ) -end - -function hawkes_jump(u, g; use_recursion = false) - return [hawkes_jump(i, g; use_recursion) for i = 1:length(u)] -end - - -function f!(du, u, p, t) - du .= 0 - nothing -end - -function hawkes_problem( - 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) - jprob = JumpProblem(oprob, agg, jumps...; save_positions = save_positions) - return jprob -end - - -function hawkes_problem( - 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) - return jprob -end - - -V = 10 -G = erdos_renyi(V, 0.2, seed = 9103) -g = [neighbors(G, i) for i = 1:nv(G)] - - -tspan = (0.0, 50.0) -u = [0.0 for i = 1:nv(G)] -p = (0.5, 0.1, 2.0) - - -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)"), -] - -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) - 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)) -end - - -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 -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 - end - x += ϕij - end - end - rate[i] = λ + x - end - if issum - return sum(rate) - end - 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 -end - -function hawkes_affect_simple_brute!(xc, xd, p, t, i::Int64) - push!(p[4][i], t) -end - - -function hawkes_drate_simple(dxc, xc, xd, p, t) - dxc .= 0 -end - - -import LinearAlgebra: I -using PiecewiseDeterministicMarkovProcesses -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) - 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) - else - jprob = PDMPProblem(hawkes_drate_simple, hawkes_rate_simple_brute, - hawkes_affect_simple_brute!, nu, xc0, xd0, p, tspan) - end - return jprob -end - -push!(algorithms, (PDMPCHVSimple(), CHV(Tsit5()), false, "PDMPCHVSimple (brute-force)")); -push!(algorithms, (PDMPCHVSimple(), CHV(Tsit5()), true, "PDMPCHVSimple (recursive)")); - - -function hawkes_drate_full(dxc, xc, xd, p, t) - λ, α, β, _, _, g = p - for i = 1:length(g) - dxc[i] = -β * (xc[i] - λ) - end -end - - -function hawkes_rate_full(rate, xc, xd, p, t, issum::Bool) - λ, α, β, _, _, g = p - if issum - return sum(@view(xc[1:length(g)])) - end - rate[1:length(g)] .= @view xc[1:length(g)] - return 0.0 -end - -function hawkes_affect_full!(xc, xd, p, t, i::Int64) - λ, α, β, _, _, g = p - for j in g[i] - xc[i] += α - end -end - - -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, -) - xd0 = Array{Int}(u) - xc0 = [p[1] for i = 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) - return jprob -end - -push!(algorithms, (PDMPCHVFull(), CHV(Tsit5()), true, "PDMPCHVFull")); - - -const BENCHMARK_PYTHON::Bool = tryparse(Bool, get(ENV, "SCIMLBENCHMARK_PYTHON", "true")) -const REBUILD_PYCALL::Bool = tryparse(Bool, get(ENV, "SCIMLBENCHMARK_REBUILD_PYCALL", "true")) - -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) - - # 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")); -end - - -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) - 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)) -end - - -function hawkes_Λ(i::Int, g, p) - @inline @inbounds function Λ(t, h) - λ, α, β = p - x = λ * t - for j in g[i] - for _t in h[j] - if _t >= t - break - end - x += (α / β) * (1 - exp(-β * (t - _t))) - end - end - return x - end - return Λ -end - -function hawkes_Λ(g, p) - return [hawkes_Λ(i, g, p) for i = 1:length(g)] -end - -Λ = hawkes_Λ(g, p) - - -""" -Given an ODE solution `sol`, recover the timestamp in which events occurred. It -returns a vector with the history of each process in `sol`. - -It assumes that `JumpProblem` was initialized with `save_positions` equal to -`(true, false)`, `(false, true)` or `(true, true)` such the system's state is -saved before and/or after the jump occurs; and, that `sol.u` is a -non-decreasing series that counts the total number of events observed as a -function of time. -""" -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 - h = Vector{typeof(t)}(undef, k) - @inbounds for i = 1:k - h[i] = t[mask[:, i]] - end - return h -end - -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) - else - u = sol.u - end - return histories(u, sol.t) -end - -function histories(sol::S) where {S<:PDMP.PDMPResult} - return histories(sol.xd.u, sol.time) -end - -function histories(sols) - map(histories, sols) -end - - -import Distributions: Exponential - -""" -Computes the empirical and expected quantiles given a history of events `hs`, -the compensator `Λ` and the target quantiles `quant`. - -The history `hs` is a vector with the history of each process. Alternatively, -the function also takes a vector of histories containing the histories from -multiple runs. - -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 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) - _Δ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] - end - Δs[k] = reduce(vcat, _Δs) - end - empirical_quant = map((_Δs) -> quantile(_Δs, quant), Δs) - expected_quant = quantile(Exponential(1.0), quant) - return empirical_quant, expected_quant -end - -""" -Compute the compensator `Λ` value for each timestamp recorded in history `hs`. - -The history `hs` is a vector with the history of each process. Alternatively, -the function also takes a vector of histories containing the histories from -multiple runs. - -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}} - _hs = similar(hs) - @inbounds for n = 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} - @inbounds hsk = hs[k] - @inbounds Λk = Λ[k] - _hs = similar(hsk) - @inbounds for n = 1:length(hsk) - _hs[n] = Λk(hsk[n], hs) - end - return _hs -end - -function apply_Λ(hs::V, Λ) where {V<:Vector{<:Vector{<:Number}}} - _hs = similar(hs) - @inbounds for k = 1:length(_hs) - _hs[k] = apply_Λ(hs[k], Λ) - end - return _hs -end - -function apply_Λ(hs::V, Λ::A) where {V<:Vector{<:Vector{<:Number}},A<:Array} - _hs = similar(hs) - @inbounds for k = 1:length(_hs) - _hs[k] = apply_Λ(k, hs, Λ) - end - return _hs -end - -function apply_Λ(hs::V, Λ) where {V<:Vector{<:Vector{<:Vector{<:Number}}}} - return map((_hs) -> apply_Λ(_hs, Λ), hs) -end - - -@userplot QQPlot -@recipe function f(x::QQPlot) - empirical_quant, expected_quant = x.args - max_empirical_quant = maximum(maximum, empirical_quant) - max_expected_quant = maximum(expected_quant) - upperlim = ceil(maximum([max_empirical_quant, max_expected_quant])) - @series begin - seriestype := :line - linecolor := :lightgray - label --> "" - (x) -> x - end - @series begin - seriestype := :scatter - aspect_ratio := :equal - xlims := (0.0, upperlim) - ylims := (0.0, upperlim) - xaxis --> "Expected" - yaxis --> "Empirical" - markerstrokewidth --> 0 - markerstrokealpha --> 0 - markersize --> 1.5 - size --> (400, 500) - label --> permutedims(["quantiles $i" for i = 1:length(empirical_quant)]) - expected_quant, empirical_quant - end -end - - -let fig = [] - for (i, (algo, stepper, use_recursion, label)) in enumerate(algorithms) - @info label - if algo isa PyTick - _p = (p[1], p[2], p[3]) - 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 - elseif algo isa PDMPCHVFull - _p = (p[1], p[2], p[3], nothing, nothing, g) - else - if use_recursion - h = zeros(eltype(tspan), nv(G)) - ϕ = zeros(eltype(tspan), nv(G)) - urate = 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) - 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) - if algo isa PyTick - jump_prob.reset() - jump_prob.simulate() - runs[n] = jump_prob.timestamps - else - if ~(algo isa PDMPCHVFull) - if use_recursion - h .= 0 - ϕ .= 0 - else - for _h in h empty!(_h) end - end - if ~(algo isa PDMPCHVSimple) - urate .= 0 - end - end - runs[n] = histories(solve(jump_prob, stepper)) - end - end - qqs = qq(runs, Λ) - 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)) -end - - -tspan = (0.0, 25.0) -p = (0.5, 0.1, 5.0) -Vs = append!([1], 5:5:95) -Gs = [erdos_renyi(V, 0.2, seed = 6221) for V in Vs] - -bs = Vector{Vector{BenchmarkTools.Trial}}() - -for (algo, stepper, use_recursion, label) in algorithms - @info label - global _stepper = stepper - 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)] - 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) - else - 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) - else - if use_recursion - global h = zeros(eltype(tspan), nv(G)) - global urate = zeros(eltype(tspan), nv(G)) - 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 urate = zeros(eltype(tspan), nv(G)) - _p = (p[1], p[2], p[3], h, urate) - end - end - 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, - ) - else - if algo isa PDMPCHVFull - @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,) - else - @benchmark(solve(jump_prob, _stepper), - 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, - ) - else - @benchmark( - solve(jump_prob, _stepper), - setup = ([empty!(_h) for _h in h]; urate .= 0), - samples = 50, - evals = 1, - seconds = 10, - ) - end - end - end - catch e - BenchmarkTools.Trial( - BenchmarkTools.Parameters(samples = 50, evals = 1, seconds = 10), - ) - end - push!(_bs, trial) - if (nv(G) == 1 || nv(G) % 10 == 0) - 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 -end - - -let fig = plot( - yscale = :log10, - xlabel = "V", - ylabel = "Time (ns)", - legend_position = :outertopright, -) - for (i, (algo, stepper, use_recursion, label)) in enumerate(algorithms) - _bs, _Vs = [], [] - for (j, b) in enumerate(bs[i]) - if length(b) == 50 - push!(_bs, median(b.times)) - push!(_Vs, Vs[j]) - end - end - plot!(_Vs, _bs, label=label) - end - title!("Simulations, 50 samples: nodes × time") -end - diff --git a/script/Jumps/NegFeedback_GeneExpr.jl b/script/Jumps/NegFeedback_GeneExpr.jl index ae6772407..34d7f8032 100644 --- a/script/Jumps/NegFeedback_GeneExpr.jl +++ b/script/Jumps/NegFeedback_GeneExpr.jl @@ -1,4 +1,3 @@ - using JumpProcesses, Catalyst, JumpProblemLibrary, Plots, Statistics import JumpProblemLibrary: prob_jump_dnarepressor fmt = :png @@ -8,22 +7,27 @@ rn = prob_jump_dnarepressor.network reactions(rn) -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] +tf = prob_jump_dnarepressor.tstop +ploth = plot(reuse = false) +for (i, method) in enumerate(methods) + jump_prob = JumpProblem( + rn, prob_jump_dnarepressor.u0, (0.0, tf), prob_jump_dnarepressor.rates; + aggregator = 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) function run_benchmark!(t, jump_prob, stepper) sol = solve(jump_prob, stepper) - @inbounds for i in 1:length(t) + return @inbounds for i in 1:length(t) t[i] = @elapsed (sol = solve(jump_prob, stepper)) end end @@ -32,9 +36,12 @@ 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_jump_dnarepressor.u0, (0.0, tf), prob_jump_dnarepressor.rates; + aggregator = 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 @@ -48,19 +55,22 @@ for i in 1:length(methods) avgtimes[i] = mean(benchmarks[i]) stdtimes[i] = std(benchmarks[i]) end -println(medtimes/medtimes[1]) +println(medtimes / medtimes[1]) 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") using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) - +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) diff --git a/script/Jumps/NegFeedback_GeneExpr_Marchetti.jl b/script/Jumps/NegFeedback_GeneExpr_Marchetti.jl index 05ffb0953..452e04a1d 100644 --- a/script/Jumps/NegFeedback_GeneExpr_Marchetti.jl +++ b/script/Jumps/NegFeedback_GeneExpr_Marchetti.jl @@ -1,4 +1,3 @@ - using OrdinaryDiffEq, Catalyst, JumpProcesses, JumpProblemLibrary, Plots, Statistics fmt = :png @@ -11,25 +10,30 @@ rn = jprob.network reactions(rn) -u0f = [1000., 0., 0., 0., 0.] -odeprob = ODEProblem(rn, u0f, (0.,tf), rnpar) +u0f = [variable => Float64(value) for (variable, value) in u0] +odeprob = ODEProblem(rn, u0f, (0.0, tf), rnpar) solution = solve(odeprob, Tsit5()) -plot(solution, format=fmt) +plot(solution, format = fmt) -tf = 4000. -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) +tf = 4000.0 +methods = ( + Direct(), FRM(), SortingDirect(), NRM(), DirectCR(), + RSSA(), RSSACR(), Coevolve(), RDirect(), +) +shortlabels = [string(leg)[15:(end - 2)] for leg in methods] +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, u0, (0.0, tf), rnpar; + aggregator = 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) plot(p[end]) @@ -37,7 +41,7 @@ plot(p[end]) function run_benchmark!(t, jump_prob, stepper) sol = solve(jump_prob, stepper) - @inbounds for i in 1:length(t) + return @inbounds for i in 1:length(t) t[i] = @elapsed (sol = solve(jump_prob, stepper)) end end @@ -46,7 +50,10 @@ 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, u0, (0.0, tf), rnpar; + aggregator = method, save_positions = (false, false) + ) stepper = SSAStepper() t = Vector{Float64}(undef, nsims) run_benchmark!(t, jump_prob, stepper) @@ -64,15 +71,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") using SciMLBenchmarks -SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder],WEAVE_ARGS[:file]) - +SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) diff --git a/script/Jumps/Spatial_Signaling_Sanft.jl b/script/Jumps/Spatial_Signaling_Sanft.jl index 8e511a95b..3e49a9c6c 100644 --- a/script/Jumps/Spatial_Signaling_Sanft.jl +++ b/script/Jumps/Spatial_Signaling_Sanft.jl @@ -1,5 +1,5 @@ - using Catalyst, JumpProcesses, BenchmarkTools, Plots, Random +using SymbolicIndexingInterface: parameter_values invmicromolar_to_cubicmicrometer(invconcen) = invconcen / (6.02214076e2) @@ -10,10 +10,10 @@ 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 @@ -44,7 +44,7 @@ function transport_model(rn, N; domain_len = 6.0, D = 1.0, rng = Random.default_ # spatial initial condition # initial concentration of 12.3 nM = 12.3 * 1e-3 μM - num_molecules = trunc(Int, micromolar_to_invcubicmicrometer(12.3*1e-3) * (domain_len^3)) + num_molecules = trunc(Int, micromolar_to_invcubicmicrometer(12.3 * 1.0e-3) * (domain_len^3)) u0 = zeros(Int, 8, num_nodes) rand_EA = rand(rng, 1:num_nodes, num_molecules) rand_EB = rand(rng, 1:num_nodes, num_molecules) @@ -53,55 +53,63 @@ function transport_model(rn, N; domain_len = 6.0, D = 1.0, rng = Random.default_ u0[EBidx, rand_EB[i]] += 1 end - grid, hopping_constants, h, u0 + return grid, hopping_constants, h, u0 end function wellmixed_model(rn, u0, end_time, h) kaval = invmicromolar_to_cubicmicrometer(46.2) / h^3 - setdefaults!(rn, [:k₁ => 150, :ka => kaval, :kd => 3.82, :k₄ => 6.0]) + parameters = [:k₁ => 150, :ka => kaval, :kd => 3.82, :k₄ => 6.0] # 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)) + u0wm = species(rn) .=> vec(sum(u0, dims = 2)) + jprobwm = JumpProblem( + rn, u0wm, (0.0, end_time), parameters; + aggregator = Direct(), save_positions = (false, false) + ) majumps = jprobwm.massaction_jump - majumps, dprobwm, jprobwm, u0wm + return majumps, parameter_values(jprobwm), jprobwm, u0wm end 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) +majumps, parameters_wm, 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_sol = solve(jprob, SSAStepper(); saveat = end_time/200) +majumps, parameters_wm, jprobwm, u0wm = wellmixed_model(rn, u0, end_time, h) +dprob = DiscreteProblem(u0, (0.0, end_time), copy(parameters_wm)) +jprob = JumpProblem( + dprob, DirectCRDirect(), majumps; hopping_constants, + 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])" +) -@Base.kwdef mutable struct EventCallback +Base.@kwdef mutable struct EventCallback n::Int = 0 end function (ecb::EventCallback)(u, t, integ) ecb.n += 1 - ecb.n == 10^8 + return ecb.n == 10^8 end function (ecb::EventCallback)(integ) # save the final state terminate!(integ) - nothing + return nothing end @@ -113,15 +121,15 @@ 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) # we create a well-mixed model within a domain of the size of *one* voxel, h - majumps, dprobwm, jprobwm, u0wm = wellmixed_model(rn, u0, end_time, h) + majumps, parameters_wm, jprobwm, u0wm = wellmixed_model(rn, u0, end_time, h) # the spatial problem - dprob = DiscreteProblem(u0, (0.0, end_time), copy(dprobwm.p)) + dprob = DiscreteProblem(u0, (0.0, end_time), copy(parameters_wm)) @show N @@ -133,12 +141,15 @@ 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 = 3 seconds = 300 bench_dict[name, N] = run(b) end end + return end @@ -150,25 +161,31 @@ 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) + push!(medtimes[i], median(bench_dict[name, N]).time / 1.0e9) catch break end 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) - 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) + plot!( + plt1, xlabel = "number of sites per edge", ylabel = "median time in seconds", + xticks = Nv, legend = :bottomright + ) + plot!( + plt2, xlabel = "total number of sites", ylabel = "median time in seconds", + xticks = (Nv .^ 3, string.(Nv .^ 3)), legend = :bottomright + ) + return plot( + plt1, plt2; size = (1200, 800), legendtitle = "SSAs", + plot_title = "3D RDME, domain length = $domain_len", left_margin = 5Plots.mm + ) end @@ -180,7 +197,7 @@ domain_len = 12.0 benchmark_and_save!(bench_dict, end_times, Nv, algs, domain_len) -plt=fetch_and_plot(bench_dict, domain_len) +plt = fetch_and_plot(bench_dict, domain_len) bench_dict = Dict{Tuple{String, Int}, BenchmarkTools.Trial}() @@ -188,9 +205,8 @@ domain_len = 6.0 benchmark_and_save!(bench_dict, end_times, Nv, algs, domain_len) -plt=fetch_and_plot(bench_dict, domain_len) +plt = fetch_and_plot(bench_dict, domain_len) using SciMLBenchmarks SciMLBenchmarks.bench_footer(WEAVE_ARGS[:folder], WEAVE_ARGS[:file]) - diff --git a/script/Jumps/Synapse.jl b/script/Jumps/Synapse.jl deleted file mode 100644 index 8ed110369..000000000 --- a/script/Jumps/Synapse.jl +++ /dev/null @@ -1,120 +0,0 @@ - -using Synapse -using PiecewiseDeterministicMarkovProcesses, JumpProcesses, OrdinaryDiffEq, Plots -using BenchmarkTools -fmt = :png - - -p_synapse = SynapseParams(t_end = 1000.0); -glu = 0.0; -events_sorted_times = [500.0]; -is_pre_or_post_event = [true]; -events_bap = events_sorted_times[is_pre_or_post_event.==false]; -bap_by_epsp = Float64[]; -nu = buildTransitionMatrix(); - - -xc0 = initial_conditions_continuous_temp(p_synapse); -xd0 = initial_conditions_discrete(p_synapse); - - -solver = AutoTsit5(Rosenbrock23()); -algorithms = [ - ( - label = "PDMP", - agg = nothing, - solver = (CHV(solver), CHV(solver)), - saveat = [], - ), - ( - label = "Coevolve", - agg = Coevolve(), - solver = (solver, solver), - saveat = 1 / p_synapse.sampling_rate, - ), -]; - - -results = [] - -for algo in algorithms - push!( - results, - evolveSynapse( - xc0, - xd0, - p_synapse, - events_sorted_times, - is_pre_or_post_event, - bap_by_epsp, - [true], - nu, - algo.solver, - algo.agg; - save_positions = (false, true), - saveat = algo.saveat, - save_everystep = false, - ), - ) -end - - -fig = plot(xlabel = "Voltage", ylabel = "Time"); -for (i, algo) in enumerate(algorithms) - res = results[i] - plot!(res.t, res.Vsp, label = algo.label) -end -title!("Vsp") - - -fig = plot(xlabel = "N", ylabel = "Time"); -for (i, algo) in enumerate(algorithms) - res = results[i] - plot!(res.t, res.XD[1, :], label = algo.label) -end -title!("2line-Go, AMPA") - - -bs = Vector{BenchmarkTools.Trial}() - -for algo in algorithms - push!( - bs, - @benchmark( - evolveSynapse( - xc0, - xd0, - p_synapse, - events_sorted_times, - is_pre_or_post_event, - bap_by_epsp, - [true], - nu, - $(algo).solver, - $(algo).agg; - save_positions = (false, true), - saveat = $(algo).saveat, - save_everystep = false, - ), - samples = 50, - evals = 1, - seconds = 500, - ) - ) -end - - -labels = [a.label for a in algorithms] -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) -title!("evolveSynapse (Median time)") - - -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) -title!("evolveSynapse (Median memory)") -