Skip to content

Commit

Permalink
prettify somewhat (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
twallema committed Jul 25, 2024
1 parent bde1101 commit 283218f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tutorials/IDD/spatial_SIR/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,8 @@ def apply_transitionings(t, tau, transitionings, S, S_work, I, R,
# distribute the number of new infections on visited patch to the home patch
S_work_to_home = S * np.transpose(np.atleast_2d(M) @ np.transpose(transitionings['S_work'][0]/S_work))
# the resulting matrix is an N x M matrix with each element of row n, column m representing the total number of people infected from work that need to be returned to age-group n, location m.


#################################################
## CREATE THE NEW VALUES FOR S, Swork, I AND R ##
#################################################

# Calculate new states
S_new = S - transitionings['S'][0] - S_work_to_home[0]
S_work_new = matmul_2D_3D_matrix(S_new, M)
I_new = I + transitionings['S'][0] + S_work_to_home[0] - transitionings['I'][0]
Expand Down

0 comments on commit 283218f

Please sign in to comment.