Source code for sid.countdowns

"""Specification of the countdowns that govern the disease progression and testing."""

[docs]COUNTDOWNS = { "cd_infectious_true": { "changes": {"infectious": True, "n_has_infected": 0}, "starts": ["cd_infectious_false", "cd_symptoms_true"], }, "cd_infectious_false": {"changes": {"infectious": False}}, "cd_symptoms_true": { "changes": {"symptomatic": True}, "starts": ["cd_symptoms_false", "cd_needs_icu_true"], }, "cd_symptoms_false": {"changes": {"symptomatic": False, "infectious": False}}, # If a person requires ICU, symptoms will end when the need for ICU ends. "cd_needs_icu_true": { "changes": {"needs_icu": True, "cd_symptoms_false": -1}, "starts": ["cd_dead_true", "cd_needs_icu_false"], }, "cd_dead_true": { "changes": { "dead": True, "symptomatic": False, "needs_icu": False, "knows_immune": False, "knows_infectious": False, "cd_symptoms_false": -1, "cd_needs_icu_false": -1, } }, "cd_needs_icu_false": { "changes": { "needs_icu": False, "symptomatic": False, "infectious": False, "knows_immune": False, "knows_infectious": False, } }, "cd_received_test_result_true": {"changes": {"received_test_result": True}}, "cd_knows_infectious_false": {"changes": {"knows_infectious": False}}, "cd_ever_infected": {}, "cd_ever_vaccinated": {}, "cd_received_rapid_test": {},
} """(dict): The dictionary with the information on countdowns. - cd_infectious_true is triggered by an infection - cd_received_test_result is triggered by tests - all other countdowns are triggered by chain reactions. """
[docs]COUNTDOWNS_WITHOUT_DRAWS = ( "cd_ever_infected", "cd_ever_vaccinated", "cd_received_rapid_test",
) """Tuple[str]: Countdowns which do not have draws."""
[docs]COUNTDOWNS_WITH_DRAWS = tuple(sorted(set(COUNTDOWNS) - set(COUNTDOWNS_WITHOUT_DRAWS)))
"""Tuple[str]: Countdowns whose length is a random variable."""