Skip to content

Commit

Permalink
Add missing change to SIR model.
Browse files Browse the repository at this point in the history
  • Loading branch information
clorton committed Dec 8, 2023
1 parent bf9e8fd commit 162bc28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,9 @@ docs/_build

# Mypy Cache
.mypy_cache/

# Testing
tests/*.csv
tests/*.xlsx
tmp/*
data/*
4 changes: 2 additions & 2 deletions tests/test_agentsir.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 162bc28

Please sign in to comment.