Skip to content

Commit

Permalink
update ODEProcess benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelBrand1 committed Nov 6, 2024
1 parent 692a0bd commit fcb2501
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
1 change: 1 addition & 0 deletions benchmark/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DynamicPPL = "366bfd00-2699-11ea-058f-f148b4cae6d8"
EpiAware = "b2eeebe4-5992-4301-9193-7ebc9f62c855"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
TuringBenchmarking = "0db1332d-5c25-4deb-809f-459bc696f94f"
24 changes: 0 additions & 24 deletions benchmark/bench/EpiInfModels/InfectionODEProcess.jl

This file was deleted.

20 changes: 20 additions & 0 deletions benchmark/bench/EpiInfModels/ODEProcess.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
let
# Create an instance of SIRParams
sirparams = SIRParams(
tspan = (0.0, 30.0),
infectiousness = LogNormal(log(0.3), 0.05),
recovery_rate = LogNormal(log(0.1), 0.05),
initial_prop_infected = Beta(1, 99)
)

# Define the ODEProcess
sir_process = ODEProcess(
params = sirparams,
sol2infs = sol -> sol[2, :],
solver_options = Dict(:verbose => false, :saveat => 1.0)
)

# Generate the latent infections
mdl = generate_latent_infs(sir_process, nothing)
suite["ODEProcess"] = make_epiaware_suite(mdl)
end

0 comments on commit fcb2501

Please sign in to comment.