Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CovidAlertABM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Jentsch
CovidAlertABM
Commits
7501a165
Commit
7501a165
authored
4 years ago
by
Peter Jentsch
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
cd928577
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Manifest.toml
+71
-26
71 additions, 26 deletions
Manifest.toml
Project.toml
+1
-0
1 addition, 0 deletions
Project.toml
src/CovidAlertVaccinationModel.jl
+4
-3
4 additions, 3 deletions
src/CovidAlertVaccinationModel.jl
src/plotting.jl
+11
-1
11 additions, 1 deletion
src/plotting.jl
with
87 additions
and
30 deletions
Manifest.toml
+
71
−
26
View file @
7501a165
...
...
@@ -11,23 +11,29 @@ git-tree-sha1 = "dedbbb2ddb876f899585c4ec4433265e3017215a"
uuid
=
"dce04be8-c92d-5529-be00-80e4d2c0e197"
version
=
"2.1.0"
[[ArgTools]]
uuid
=
"0dad84c5-d112-42e6-8d28-ef12dabb789f"
[[ArnoldiMethod]]
deps
=
[
"LinearAlgebra"
,
"Random"
,
"StaticArrays"
]
git-tree-sha1
=
"f87e559f87a45bece9c9ed97458d3afe98b1ebb9"
uuid
=
"ec485272-7323-5ecc-a04f-4719b315124d"
version
=
"0.1.0"
[[ArrayInterface]]
deps
=
[
"IfElse"
,
"LinearAlgebra"
,
"Requires"
,
"SparseArrays"
]
git-tree-sha1
=
"ef91c543a3a8094eba9b1f7171258b9ecae87dfa"
uuid
=
"4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version
=
"3.0.0"
[[Artifacts]]
deps
=
[
"Pkg"
]
git-tree-sha1
=
"c30985d8821e0cd73870b17b0ed0ce6dc44cb744"
uuid
=
"56f22d72-fd6d-98f1-02f0-08ddc0907c33"
version
=
"1.3.0"
[[BangBang]]
deps
=
[
"Compat"
,
"ConstructionBase"
,
"Future"
,
"InitialValues"
,
"LinearAlgebra"
,
"Requires"
,
"Setfield"
,
"Tables"
,
"ZygoteRules"
]
git-tree-sha1
=
"
f42321255afc37da855b6cd9f2a1fc36c017ceee
"
git-tree-sha1
=
"
d53b1eaefd48e233545d21f5b764c8ee54df4a09
"
uuid
=
"198e06fe-97b7-11e9-32a5-e1d131e6ad66"
version
=
"0.3.
29
"
version
=
"0.3.
30
"
[[Base64]]
uuid
=
"2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
...
...
@@ -87,10 +93,8 @@ uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version
=
"3.25.0"
[[CompilerSupportLibraries_jll]]
deps
=
[
"Artifacts"
,
"JLLWrappers"
,
"Libdl"
,
"Pkg"
]
git-tree-sha1
=
"8e695f735fca77e9708e795eda62afdb869cbb70"
deps
=
[
"Artifacts"
,
"Libdl"
]
uuid
=
"e66e0078-7015-5450-92f7-15fbd957f2ae"
version
=
"0.3.4+0"
[[CompositionsBase]]
git-tree-sha1
=
"f3955eb38944e5dd0fabf8ca1e267d94941d34a5"
...
...
@@ -114,9 +118,9 @@ uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version
=
"4.0.4"
[[DataAPI]]
git-tree-sha1
=
"
25ccd31003243d2ce83e474cf11663dddf48035
f"
git-tree-sha1
=
"
6d64b28d291cb94a0d84e6e41081fb081e7f717
f"
uuid
=
"9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version
=
"1.
4.1
"
version
=
"1.
5.0
"
[[DataFrames]]
deps
=
[
"CategoricalArrays"
,
"Compat"
,
"DataAPI"
,
"Future"
,
"InvertedIndices"
,
"IteratorInterfaceExtensions"
,
"LinearAlgebra"
,
"Markdown"
,
"Missings"
,
"PooledArrays"
,
"PrettyTables"
,
"Printf"
,
"REPL"
,
"Reexport"
,
"SortingAlgorithms"
,
"Statistics"
,
"TableTraits"
,
"Tables"
,
"Unicode"
]
...
...
@@ -158,6 +162,10 @@ git-tree-sha1 = "f0e06a5b5ccda38e2fb8f59d91316e657b67047d"
uuid
=
"31c24e10-a181-5473-b8eb-7969acd0382f"
version
=
"0.24.12"
[[Downloads]]
deps
=
[
"ArgTools"
,
"LibCURL"
,
"NetworkOptions"
]
uuid
=
"f43a241f-c20a-4ad4-852c-f6b1247861c6"
[[EarCut_jll]]
deps
=
[
"Artifacts"
,
"JLLWrappers"
,
"Libdl"
,
"Pkg"
]
git-tree-sha1
=
"92d8f9f208637e8d2d28c664051a00569c01493d"
...
...
@@ -269,6 +277,11 @@ git-tree-sha1 = "c7ec02c4c6a039a98a15f955462cd7aea5df4508"
uuid
=
"cd3eb016-35fb-5094-929b-558a96fad6f3"
version
=
"0.8.19"
[[IfElse]]
git-tree-sha1
=
"28e837ff3e7a6c3cdb252ce49fb412c8eb3caeef"
uuid
=
"615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
version
=
"0.1.0"
[[ImportAll]]
deps
=
[
"Test"
]
git-tree-sha1
=
"5aa65f6204e1b68dfef024421e61fbcacecfbfa6"
...
...
@@ -345,16 +358,34 @@ git-tree-sha1 = "c7aebfecb1a60d59c0fe023a68ec947a208b1e6b"
uuid
=
"b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
version
=
"1.2.0"
[[LabelledArrays]]
deps
=
[
"ArrayInterface"
,
"LinearAlgebra"
,
"MacroTools"
,
"StaticArrays"
]
git-tree-sha1
=
"5e288800819c323de5897fa6d5a002bdad54baf7"
uuid
=
"2ee39098-c373-598a-b85f-a56591580800"
version
=
"1.5.0"
[[Latexify]]
deps
=
[
"Formatting"
,
"InteractiveUtils"
,
"LaTeXStrings"
,
"MacroTools"
,
"Markdown"
,
"Printf"
,
"Requires"
]
git-tree-sha1
=
"3a0084cec7bf157edcb45a67fac0647f88fe5eaf"
uuid
=
"23fbe1c1-3f47-55db-b15f-69d7ec21a316"
version
=
"0.14.7"
[[LibCURL]]
deps
=
[
"LibCURL_jll"
,
"MozillaCACerts_jll"
]
uuid
=
"b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
[[LibCURL_jll]]
deps
=
[
"Artifacts"
,
"LibSSH2_jll"
,
"Libdl"
,
"MbedTLS_jll"
,
"Zlib_jll"
,
"nghttp2_jll"
]
uuid
=
"deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
[[LibGit2]]
deps
=
[
"
Printf
"
]
deps
=
[
"
Base64"
,
"NetworkOptions"
,
"Printf"
,
"SHA
"
]
uuid
=
"76f85450-5226-5b5a-8eaa-529ad045b433"
[[LibSSH2_jll]]
deps
=
[
"Artifacts"
,
"Libdl"
,
"MbedTLS_jll"
]
uuid
=
"29816b5a-b9ab-546f-933c-edad1886dfa8"
[[LibVPX_jll]]
deps
=
[
"Artifacts"
,
"JLLWrappers"
,
"Libdl"
,
"Pkg"
]
git-tree-sha1
=
"85fcc80c3052be96619affa2fe2e6d2da3908e11"
...
...
@@ -442,10 +473,8 @@ uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
version
=
"1.0.3"
[[MbedTLS_jll]]
deps
=
[
"Artifacts"
,
"JLLWrappers"
,
"Libdl"
,
"Pkg"
]
git-tree-sha1
=
"0eef589dd1c26a3ac9d753fe1a8bcad63f956fa6"
deps
=
[
"Artifacts"
,
"Libdl"
]
uuid
=
"c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version
=
"2.16.8+1"
[[Measures]]
git-tree-sha1
=
"e498ddeee6f9fdb4551ce855a46f54dbd900245f"
...
...
@@ -467,6 +496,9 @@ version = "0.4.5"
[[Mmap]]
uuid
=
"a63ad114-7e13-5084-954f-fe012c677804"
[[MozillaCACerts_jll]]
uuid
=
"14a3606d-f60d-562e-9121-12d972cd8159"
[[NaNMath]]
git-tree-sha1
=
"bfe47e760d60b82b66b61d2d44128b62e3a369fb"
uuid
=
"77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
...
...
@@ -483,6 +515,9 @@ git-tree-sha1 = "01b5715cdd1b7c5d493c26cc05e4af663ba9a052"
uuid
=
"46757867-2c16-5918-afeb-47bfcb05e46a"
version
=
"0.3.0"
[[NetworkOptions]]
uuid
=
"ca575930-c2e3-43a9-ace4-1e988b2c1908"
[[Ogg_jll]]
deps
=
[
"Artifacts"
,
"JLLWrappers"
,
"Libdl"
,
"Pkg"
]
git-tree-sha1
=
"a42c0f138b9ebe8b58eba2271c5053773bde52d0"
...
...
@@ -508,9 +543,9 @@ uuid = "91d4177d-7536-5919-b921-800302f37372"
version
=
"1.3.1+3"
[[OrderedCollections]]
git-tree-sha1
=
"
cf59cfed2e2c12e8a2ff0a4f1e9b2cd8650da6db
"
git-tree-sha1
=
"
d45739abcfc03b51f6a42712894a593f74c80a23
"
uuid
=
"bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version
=
"1.3.
2
"
version
=
"1.3.
3
"
[[PCRE_jll]]
deps
=
[
"Artifacts"
,
"JLLWrappers"
,
"Libdl"
,
"Pkg"
]
...
...
@@ -542,7 +577,7 @@ uuid = "30392449-352a-5448-841d-b1acce4e97dc"
version
=
"0.40.0+0"
[[Pkg]]
deps
=
[
"
Date
s"
,
"LibGit2"
,
"Libdl"
,
"Logging"
,
"Markdown"
,
"Printf"
,
"REPL"
,
"Random"
,
"SHA"
,
"UUIDs"
]
deps
=
[
"
Artifacts"
,
"Dates"
,
"Download
s"
,
"LibGit2"
,
"Libdl"
,
"Logging"
,
"Markdown"
,
"Printf"
,
"REPL"
,
"Random"
,
"SHA"
,
"Serialization"
,
"TOML"
,
"Tar"
,
"UUIDs"
]
uuid
=
"44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
[[PlotThemes]]
...
...
@@ -592,7 +627,7 @@ uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
version
=
"2.4.1"
[[REPL]]
deps
=
[
"InteractiveUtils"
,
"Markdown"
,
"Sockets"
]
deps
=
[
"InteractiveUtils"
,
"Markdown"
,
"Sockets"
,
"Unicode"
]
uuid
=
"3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
[[Random]]
...
...
@@ -699,9 +734,9 @@ version = "1.2.1"
[[SplittablesBase]]
deps
=
[
"Setfield"
,
"Test"
]
git-tree-sha1
=
"
c2b4f3cd29827787a5f61afe12ea13222197ab98
"
git-tree-sha1
=
"
edef25a158db82f4940720ebada14a60ef6c4232
"
uuid
=
"171d559e-b47b-412a-8079-5efa626c420e"
version
=
"0.1.1
2
"
version
=
"0.1.1
3
"
[[StaticArrays]]
deps
=
[
"LinearAlgebra"
,
"Random"
,
"Statistics"
]
...
...
@@ -741,6 +776,10 @@ version = "1.2.3"
deps
=
[
"Libdl"
,
"LinearAlgebra"
,
"Serialization"
,
"SparseArrays"
]
uuid
=
"4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
[[TOML]]
deps
=
[
"Dates"
]
uuid
=
"fa267f1f-6049-4f14-aa54-33bafae1ed76"
[[TableTraits]]
deps
=
[
"IteratorInterfaceExtensions"
]
git-tree-sha1
=
"b1ad568ba658d8cbb3b892ed5380a6f3e781a81e"
...
...
@@ -753,8 +792,12 @@ git-tree-sha1 = "8dc2bb7d3548e315d890706547b24502ed79504f"
uuid
=
"bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version
=
"1.3.1"
[[Tar]]
deps
=
[
"ArgTools"
,
"SHA"
]
uuid
=
"a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
[[Test]]
deps
=
[
"Distributed"
,
"InteractiveUtils"
,
"Logging"
,
"Random"
]
deps
=
[
"InteractiveUtils"
,
"Logging"
,
"Random"
,
"Serialization"
]
uuid
=
"8dfed614-e22c-5e08-85e1-65c5234f0b40"
[[ThreadsX]]
...
...
@@ -795,9 +838,9 @@ version = "1.18.0+4"
[[XML2_jll]]
deps
=
[
"Artifacts"
,
"JLLWrappers"
,
"Libdl"
,
"Libiconv_jll"
,
"Pkg"
,
"Zlib_jll"
]
git-tree-sha1
=
"
be0db24f70aae7e2b89f2f3092e93b8606d659a6
"
git-tree-sha1
=
"
afd2b541e8fd425cd3b7aa55932a257035ab4a70
"
uuid
=
"02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
version
=
"2.9.1
0+3
"
version
=
"2.9.1
1+0
"
[[XSLT_jll]]
deps
=
[
"Artifacts"
,
"JLLWrappers"
,
"Libdl"
,
"Libgcrypt_jll"
,
"Pkg"
,
"XML2_jll"
]
...
...
@@ -932,10 +975,8 @@ uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10"
version
=
"1.4.0+3"
[[Zlib_jll]]
deps
=
[
"Artifacts"
,
"JLLWrappers"
,
"Libdl"
,
"Pkg"
]
git-tree-sha1
=
"320228915c8debb12cb434c59057290f0834dbf6"
deps
=
[
"Libdl"
]
uuid
=
"83775a58-1f1d-513f-b197-d71354ab007a"
version
=
"1.2.11+18"
[[Zstd_jll]]
deps
=
[
"Artifacts"
,
"JLLWrappers"
,
"Libdl"
,
"Pkg"
]
...
...
@@ -973,6 +1014,10 @@ git-tree-sha1 = "fa14ac25af7a4b8a7f61b287a124df7aab601bcd"
uuid
=
"f27f6e37-5d2b-51aa-960f-b287f2bc3b7a"
version
=
"1.3.6+6"
[[nghttp2_jll]]
deps
=
[
"Artifacts"
,
"Libdl"
]
uuid
=
"8e850ede-7688-5339-a07c-302acd2aaf8d"
[[x264_jll]]
deps
=
[
"Artifacts"
,
"JLLWrappers"
,
"Libdl"
,
"Pkg"
]
git-tree-sha1
=
"d713c1ce4deac133e3334ee12f4adff07f81778f"
...
...
This diff is collapsed.
Click to expand it.
Project.toml
+
1
−
0
View file @
7501a165
...
...
@@ -10,6 +10,7 @@ Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DelimitedFiles
=
"8bb1440f-4735-579b-a4ab-409b98df4dab"
Distributions
=
"31c24e10-a181-5473-b8eb-7969acd0382f"
ImportAll
=
"c65182e5-40f4-518f-8165-175b85689199"
LabelledArrays
=
"2ee39098-c373-598a-b85f-a56591580800"
LightGraphs
=
"093fc24a-ae57-5d10-9952-331d41423f4d"
NamedTupleTools
=
"d9ec5142-1e00-5aa0-9d6a-321866360f50"
NetworkLayout
=
"46757867-2c16-5918-afeb-47bfcb05e46a"
...
...
This diff is collapsed.
Click to expand it.
src/CovidAlertVaccinationModel.jl
+
4
−
3
View file @
7501a165
...
...
@@ -45,9 +45,10 @@ function main()
# display(size.(agent_model.demographic_index_vectors))
u_0
=
get_u_0
(
length
(
agent_model
.
demographics
))
steps
=
300
@btime
solve!
(
$
u_0
,
$
get_parameters
(),
$
steps
,
$
agent_model
,
$
vaccinate_uniformly!
);
# solve!(u_0,get_parameters(),steps,agent_model,vaccinate_uniformly!);
# plot_model(agent_model.base_network,graphs,sol1)
# @btime solve!($u_0,$get_parameters(),$steps,$agent_model,$vaccinate_uniformly!);
sol
,
graphs
=
solve!
(
u_0
,
get_parameters
(),
steps
,
agent_model
,
vaccinate_uniformly!
);
return
aggregate_timeseries
(
sol
)
# plot_model_spatial_gif(agent_model.base_network,graphs,sol1)
end
...
...
This diff is collapsed.
Click to expand it.
src/plotting.jl
+
11
−
1
View file @
7501a165
...
...
@@ -37,7 +37,7 @@ end
# gif(anim, "graphplot.gif", fps = 1.0)
# end
function
plot_model
(
static_graph
,
annealed_graph_list
::
AbstractVector
,
solution
)
function
plot_model
_spatial_gif
(
static_graph
,
annealed_graph_list
::
AbstractVector
,
solution
)
plt
=
plot
()
network_pts
=
make_layout
(
annealed_graph_list
[
1
])
anim
=
Animation
()
...
...
@@ -52,4 +52,14 @@ function plot_model(static_graph,annealed_graph_list::AbstractVector,solution)
end
gif
(
anim
,
"graphplot.gif"
,
fps
=
1.0
)
end
using
LabelledArrays
function
aggregate_timeseries
(
sol
)
agent_statuses
=
map
(
Symbol
,[
AgentStatus
(
i
)
for
i
in
1
:
AgentStatus
.
size
])
return
@LArray
[
count
(
x
->
AgentStatus
(
i
)
==
x
,
u_t
)
for
u_t
in
sol
,
i
in
1
:
AgentStatus
.
size
]
namedtuple
(
agent_statuses
,
ntuple
(
i
->
(
:
,
i
),
length
(
agent_statuses
)))
end
function
plot_aggregate_timeseries
(
sol
,
network
)
plot
(
sol
,
labels
=
reshape
([
string
(
k
)
for
k
in
keys
(
keys
(
sol
))],(
1
,
:
)))
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment