-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consistency between total infected and total over mortality groups re…
…quires using mortality groups in calculations. Specifically, treatments use mortality groups directly to consistently apply the treatment function. When mortality is not active, we still need to behave the same, so we now consider all infected to be a part of one mortality group when asked for it. This allows treatments to use mortality groups to get infected even when mortality is disabled. The functions in host pool which accept mortality groups for a cell as an input are now ignoring mortality groups when mortality is not active (before they were relying on input mortality vector being empty). Alternative implementation, or just possible improvement in addtion to this new API, would be to allow treatments to pass a function to reduce the different values, but treatments uses different functions for different pools, so that would require at least two functions passed which is possible, but may be hard to read.
- Loading branch information
1 parent
e65eb93
commit 699c018
Showing
3 changed files
with
108 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters