-
Notifications
You must be signed in to change notification settings - Fork 1
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
How to handle multiple pathogens/serotypes? #76
Comments
I don't believe that this is possible with a Rust macro, because the macro is evaluated at compile time, and With that said, I tend to think that it's inadvisable to have each of these be different person properties, in part because it doesn't enforce correctness. For instance, you can have
This guarantees that if someone is And then you would do:
Followed by:
|
For future consideration, one challenge with this approach is that event notifications for these kinds of vector person properties are not as useful as one might want. For example people may want to subscribe to people becoming newly infected and they will have to compare across the arrays to see if this kind of status change has occurred. I think we could at some point consider the concept of a vectorized/array person property - one where there is a vec/array of values for each person and where updates occur at specific index entries and updating the ith entry in that array releases an event than the ith entry has been changed with the old and new values at that index. |
I think we need an example that handles multiple serotypes, variants, pathogens, etc. Particularly, I am thinking of person properties. For instance, if I want to write a model for the four serotypes of dengue (DENV1, DENV2, DENV3, DENV4), should I set the person property for infection status, heatlh status, and even maybe last time infected as:
Another complication is if we don't know the number of circulating pathogens or variants in the population. For instance, if we specify the number of variants from an input file that is unknown at compile-time, I would like to define the person properties in a similar mamner.
The text was updated successfully, but these errors were encountered: