Added simulation parameters for the rate of external interactions, and the external base infected rate
Added code to tickInteractions() to check susceptible and recovered people for external interactions
Added externalInteraction() helper function to calculate if an interaction happened, and with which variant
Modified hasBeenExposed() to accept either the infected person (previous functionality) or the variant (new). For external interactions, we don't have an actor to pass as the infected person, so we pass the variant instead. Not sure if there is a cleaner way to reuse the code here without the funky optional parameters.
Note that by modeling external interactions, as more people become vaccinated or recovered, the external infection rate will naturally decline even though the number of interactions remains constant. This is why I chose to calculate the number of external interactions instead of directly calculating a number of external infections.
TODO: The externalInteraction() function can use the current time and infection stats to vary the rate of infections or the mix of variants, but currently it just uses fixed values.
Implemented infections from external sources:
tickInteractions()
to check susceptible and recovered people for external interactionsexternalInteraction()
helper function to calculate if an interaction happened, and with which varianthasBeenExposed()
to accept either the infected person (previous functionality) or the variant (new). For external interactions, we don't have an actor to pass as the infected person, so we pass the variant instead. Not sure if there is a cleaner way to reuse the code here without the funky optional parameters.Note that by modeling external interactions, as more people become vaccinated or recovered, the external infection rate will naturally decline even though the number of interactions remains constant. This is why I chose to calculate the number of external interactions instead of directly calculating a number of external infections.
TODO: The
externalInteraction()
function can use the current time and infection stats to vary the rate of infections or the mix of variants, but currently it just uses fixed values.