generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is context.get_person_id(usize_id)
necessary?
#61
Comments
Thanks for catching this. I generally agree with your argument here.
In the short term, I would have |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The challenges described in #60 arises because
context.get_person_id(usize_id)
returnsPersonId{ id: usize_id}
even if that person doesn't technically exist. Given a validPersonId
, we can query properties for that person in fromPeopleData
. Right now, we need this functionality for the following kinds of patterns:I believe both functionalities can be addressed by alternative syntax, meaning we can get rid of
context.get_person_id(...)
.In essence, 1) is asking us to get the number of people who have a given person property value. This is just the size of a partition defined by the given person property values. If we want the entire set of people in the simulation, we could define some partition that is the entire set of alive people, and take it from there. I believe this may also negate the need for
context.get_current_population()
. Here's what some code could look like:This may be overkill! And, this all assumes we don't have a way to remove people (i.e.,
context.remove_person
) but rather just keep removed people in the simulation but with some property flag that marks them as not in the simulation (i.e.,dead
) and from there we can create partitions that filter such people out.The text was updated successfully, but these errors were encountered: