Commit 3c995c3e authored by Peter Jentsch's avatar Peter Jentsch
Browse files

added distinct vaccination/infection stages, immunization delay, and...

added distinct vaccination/infection stages, immunization delay, and univariate figures showing more useful results with these changes
parent 91c68770
......@@ -39,9 +39,9 @@ version = "0.1.0"
[[ArrayInterface]]
deps = ["IfElse", "LinearAlgebra", "Requires", "SparseArrays", "Static"]
git-tree-sha1 = "2fbfa5f372352f92191b63976d070dc7195f47a4"
git-tree-sha1 = "f5cb35e4e2cbb488846d95b471f479be1ff6b173"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "3.1.7"
version = "3.1.9"
[[Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
......@@ -92,9 +92,9 @@ version = "1.16.0+6"
[[ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "42e3c181483fbd2c416087a0a93838803e358358"
git-tree-sha1 = "a66109c73612c63b10923ac446fddb0f0d21a593"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "0.9.38"
version = "0.9.40"
[[CheapThreads]]
deps = ["ArrayInterface", "IfElse", "Requires", "Static", "StrideArraysCore", "ThreadingUtilities", "VectorizationBase"]
......@@ -104,21 +104,21 @@ version = "0.2.3"
[[ColorSchemes]]
deps = ["ColorTypes", "Colors", "FixedPointNumbers", "Random", "StaticArrays"]
git-tree-sha1 = "9d7dfad1326b1ad29afa1366587806a14d727745"
git-tree-sha1 = "c8fd01e4b736013bc61b704871d20503b33ea402"
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
version = "3.12.0"
version = "3.12.1"
[[ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
git-tree-sha1 = "32a2b8af383f11cbb65803883837a149d10dfe8a"
git-tree-sha1 = "024fe24d83e4a5bf5fc80501a314ce0d1aa35597"
uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
version = "0.10.12"
version = "0.11.0"
[[Colors]]
deps = ["ColorTypes", "FixedPointNumbers", "Reexport"]
git-tree-sha1 = "82f4e6ff9f847eca3e5ebc666ea2cd7b48e8b47e"
git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.12.7"
version = "0.12.8"
[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
......@@ -320,9 +320,9 @@ uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"
[[GLFW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"]
git-tree-sha1 = "bd1dbf065d7a4a0bdf7e74dd26cf932dda22b929"
git-tree-sha1 = "a199aefead29c3c2638c3571a9993b564109d45a"
uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89"
version = "3.3.3+0"
version = "3.3.4+0"
[[GR]]
deps = ["Base64", "DelimitedFiles", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Printf", "Random", "Serialization", "Sockets", "Test", "UUIDs"]
......@@ -355,15 +355,15 @@ uuid = "7746bdde-850d-59dc-9ae8-88ece973131d"
version = "2.59.0+4"
[[Grisu]]
git-tree-sha1 = "03d381f65183cb2d0af8b3425fde97263ce9a995"
git-tree-sha1 = "972f5abbfc7101df2ea122aa730f4861550aaf2f"
uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe"
version = "1.0.0"
version = "1.0.1"
[[HTTP]]
deps = ["Base64", "Dates", "IniFile", "MbedTLS", "NetworkOptions", "Sockets", "URIs"]
git-tree-sha1 = "c9f380c76d8aaa1fa7ea9cf97bddbc0d5b15adc2"
git-tree-sha1 = "0e67ed09b3d89a28bb804ef5b886499f3a40a0cb"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "0.9.5"
version = "0.9.7"
[[Hwloc]]
deps = ["Hwloc_jll"]
......@@ -602,7 +602,7 @@ uuid = "093fc24a-ae57-5d10-9952-331d41423f4d"
version = "1.3.5"
[[LinearAlgebra]]
deps = ["Libdl", "libblastrampoline_jll"]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
[[LogExpFunctions]]
......@@ -680,9 +680,9 @@ version = "0.7.1"
[[MonteCarloMeasurements]]
deps = ["Distributed", "Distributions", "LinearAlgebra", "MacroTools", "Random", "RecipesBase", "Requires", "SLEEFPirates", "StaticArrays", "Statistics", "StatsBase", "Test"]
git-tree-sha1 = "8d2dc50cef7583e7b27a0c66dc0a0b32eb4c1f52"
git-tree-sha1 = "2529d92658cd24d197f7bc80a34a9109ad4f1970"
uuid = "0987c9cc-fe09-11e8-30f0-b96dd679fdca"
version = "0.10.1"
version = "0.10.2"
[[MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
......@@ -708,9 +708,9 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
[[OffsetArrays]]
deps = ["Adapt"]
git-tree-sha1 = "b3dfef5f2be7d7eb0e782ba9146a5271ee426e90"
git-tree-sha1 = "87a728aebb76220bd72855e1c85284c5fdb9774c"
uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
version = "1.6.2"
version = "1.7.0"
[[Ogg_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
......@@ -730,10 +730,6 @@ git-tree-sha1 = "ed076aedbd3cb85731730268d60a7acfa4ac92f3"
uuid = "925886fa-5bf2-5e8e-b522-a9147a512338"
version = "1.4.4"
[[OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
[[OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "71bbbc616a1d710879f5a1021bcba65ffba6ce58"
......@@ -810,9 +806,9 @@ version = "1.0.10"
[[Plots]]
deps = ["Base64", "Contour", "Dates", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "JSON", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs"]
git-tree-sha1 = "30004ffb10118498f38eb0f22cffe802b0aae45f"
git-tree-sha1 = "eced322de627fa8469c55f24899fdd4cce7d978c"
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
version = "1.12.0"
version = "1.13.2"
[[PooledArrays]]
deps = ["DataAPI", "Future"]
......@@ -828,9 +824,9 @@ version = "1.2.1"
[[PrettyTables]]
deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"]
git-tree-sha1 = "a7162ad93a899333717481f448a235ffafeb5eba"
git-tree-sha1 = "b60494adf99652d220cdef46f8a32232182cc22d"
uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
version = "1.0.0"
version = "1.0.1"
[[Printf]]
deps = ["Unicode"]
......@@ -1004,9 +1000,9 @@ version = "0.2.4"
[[StaticArrays]]
deps = ["LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "e8cd1b100d37f5b4cfd2c83f45becf61c762eaf7"
git-tree-sha1 = "2653e9c769343808781a8bd5010ee7a17c01152e"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "1.1.1"
version = "1.1.2"
[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
......@@ -1037,13 +1033,9 @@ uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
version = "0.5.1"
[[SuiteSparse]]
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays", "SuiteSparse_jll"]
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
[[SuiteSparse_jll]]
deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"]
uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
[[SweepOperator]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "20da2784e79fc0bfdd70592d1b47d7a6034e82d1"
......@@ -1322,10 +1314,6 @@ git-tree-sha1 = "acc685bcf777b2202a904cdcb49ad34c2fa1880c"
uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0"
version = "0.14.0+4"
[[libblastrampoline_jll]]
deps = ["Artifacts", "Libdl", "OpenBLAS_jll", "Pkg"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
[[libfdk_aac_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "7a5780a0d9c6864184b3a2eeeb833a0c871f00ab"
......
......@@ -27,6 +27,7 @@ OnlineStats = "a15396b6-48d5-5d58-9928-6d29437db91e"
Pandas = "eadc2687-ae89-51f9-a5d9-86b5a6373a9c"
Pipe = "b98c9c47-44ae-5843-9183-064241ee97a0"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RandomNumbers = "e6cf234a-135c-5ec9-84dd-332b85af5143"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
......
using CovidAlertVaccinationModel
using OnlineStats
using Plots
const samples = 1
const parameters = (
sim_length = 50,
num_households = 5000,
I_0_fraction = 0.002,
base_transmission_probability = 0.0015,
recovery_rate = 1/7,
immunization_loss_prob = 0.0055, #mean time of 6 months
π_base = -0.2,
κ = 0.001,
ω = 0.0000,
ρ = [0.0,0.0,0.0],
η = 0.0,
ω_en = 0.00,
ρ_en = [0.0,0.0,0.0],
γ = 0.0,
β = 100.0,
notification_parameter = 0.000,
vaccinator_prob = 0.2,
app_user_fraction = 0.4,
notification_threshold = 2,
infection_introduction_delay = 50
immunizing = true,
)
function solve_and_plot_parameters()
out = mean_solve(samples, parameters ,DebugRecorder)
p = plot_model(nothing,[nothing],[out])
savefig(p,"timeseries.pdf")
end
solve_and_plot_parameters()
\ No newline at end of file
......@@ -2,7 +2,7 @@ using CovidAlertVaccinationModel
using OnlineStats
using ThreadsX
using Plots
const samples = 10
const samples = 5
##Univariate tests
const len = 4 #number of points to evaluate
gr()
......@@ -10,14 +10,14 @@ gr()
const default_parameters = (
sim_length = 600,
num_households = 5000,
I_0_fraction = 0.001,
base_transmission_probability = 0.0015,
recovery_rate = 0.1,
I_0_fraction = 0.002,
base_transmission_probability = 0.001,
recovery_rate = 1/7,
immunization_loss_prob = 0.0055, #mean time of 6 months
π_base = -0.25,
π_base = -4.0,
η = 0.0,
κ = 0.0,
ω = 0.0005,
κ = 1.0,
ω = 0.001,
ρ = [0.0,0.0,0.0],
ω_en = 0.00,
ρ_en = [0.0,0.0,0.0],
......@@ -27,22 +27,36 @@ const default_parameters = (
vaccinator_prob = 0.2,
app_user_fraction = 0.4,
notification_threshold = 2,
immunizing = true,
immunization_delay = 14,
immunization_begin_delay = 50,
infection_introduction_delay = 100
)
#add beta
#run model without vaccination
#use derivative of log of no infections to calibrate p
#seed inital infections according to degree
#total number of notifications
#age structured vaccination
#
const univarate_test_list = (
(:I_0_fraction, range(0.0, 0.05; length = len)),
(:base_transmission_probability, range(0.0001, 0.002; length = len)),
(:base_transmission_probability, range(0.0002, 0.002; length = len)),
(:recovery_rate, range(0.1, 0.5; length = len)),
(:immunization_loss_prob, range(0.00, 0.05; length = len)),
(:π_base, range(-1.0, -0.0; length = len)),
(:η, range(0.0, 0.1; length = len)),
(:κ, range(0.0, 0.1; length = len)),
(:ω, range(0.0, 0.001; length = len)),
(:π_base, range(-4.5, -3.5; length = len)),
(:η, range(0.0, 0.01; length = len)),
(:κ, range(0.5, 1.5; length = len)),
(:ω, range(0.0, 0.01; length = len)),
(:ω_en, range(0.0, 0.5; length = len)),
(:γ, range(0.0, 0.5; length = len)),
(:β, range(2, 30; length = len)),
(:notification_parameter, range(0.00, 0.05; length = len)),
(:app_user_fraction, range(0.05, 0.25; length = len)),
(:notification_threshold, (1:len)),
(:immunization_delay, [7,10,14,20]),
)
const univariate_path = "CovidAlertVaccinationModel/plots/univariate/"
......@@ -51,8 +65,8 @@ function univarate_test(variable, variable_range)
solve_fn(p) = mean_solve(samples, p,DebugRecorder)
univariate_outlist = ThreadsX.map(solve_fn, parameter_range_list)
p = plot_model(variable,parameter_range_list,univariate_outlist)
p = plot_model(variable,parameter_range_list,univariate_outlist,default_parameters.infection_introduction_delay,default_parameters.immunization_begin_delay)
return p
end
......
using CovidAlertVaccinationModel
using OnlineStats
using Plots
const samples = 5
const parameters = (
sim_length = 600,
num_households = 5000,
I_0_fraction = 0.002,
base_transmission_probability = 0.001,
recovery_rate = 1/7,
immunization_loss_prob = 0.0055, #mean time of 6 months
π_base = -4.0,
η = 0.0,
κ = 1.0,
ω = 0.001,
ρ = [0.0,0.0,0.0],
ω_en = 0.00,
ρ_en = [0.0,0.0,0.0],
γ = 0.0,
β = 5.0,
notification_parameter = 0.001,
vaccinator_prob = 0.2,
app_user_fraction = 0.4,
notification_threshold = 2,
immunizing = true,
immunization_delay = 14,
immunization_begin_delay = 50,
infection_introduction_delay = 100
)
function solve_and_plot_parameters()
out = mean_solve(samples, parameters ,DebugRecorder)
p = plot_model(nothing,[nothing],[out],parameters.infection_introduction_delay,parameters.immunization_begin_delay)
savefig(p,"timeseries.pdf")
end
solve_and_plot_parameters()
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment