From 162bc28e5a91f28585de31115f9efeb919684089 Mon Sep 17 00:00:00 2001 From: Christopher Lorton Date: Thu, 7 Dec 2023 23:32:13 -0800 Subject: [PATCH] Add missing change to SIR model. --- .gitignore | 6 ++++++ tests/test_agentsir.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 77973dd..d02eabc 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,9 @@ docs/_build # Mypy Cache .mypy_cache/ + +# Testing +tests/*.csv +tests/*.xlsx +tmp/* +data/* diff --git a/tests/test_agentsir.py b/tests/test_agentsir.py index ace5932..e915ff5 100644 --- a/tests/test_agentsir.py +++ b/tests/test_agentsir.py @@ -32,7 +32,7 @@ def test_sir(): ITIMER_TYPE_NB = nb.uint8 print(f"Creating a well-mixed SIR community with {POP_SIZE:_} individuals.") - community = abc(POP_SIZE) + community = abc(POP_SIZE, **{"beta": BETA}) community.add_property("dob", dtype=DOB_TYPE_NP, default=0) community.add_property("susceptibility", dtype=SUSCEPTIBILITY_TYPE_NP, default=1.0) community.add_property("itimer", dtype=ITIMER_TYPE_NP, default=0) @@ -85,7 +85,7 @@ def transmission(community, _timestep): # community.susceptibility[infected] = 0.0 # community.itimer[infected] = np.random.normal(MEAN_INF, STD_INF, size=infected.sum()).round().astype(ITIMER_TYPE_NP) - transmission_inner(community.susceptibility, community.itimer, community.count) + transmission_inner(community.susceptibility, community.itimer, community.count, community.beta) return