sid.update_states¶
Module Contents¶
Functions¶
|
Update the states with new infections and advance it by one period. |
|
Update countdowns. |
|
Update information with newly infected individuals. |
|
Kill people over the ICU limit. |
|
|
|
Activate the counter for immunity by vaccinations. |
|
-
update_states(states: pd.DataFrame, newly_infected_contacts: pd.Series, newly_infected_events: pd.Series, params: pd.DataFrame, virus_strains: Dict[str, Any], to_be_processed_tests: Optional[pd.Series], newly_vaccinated: pd.Series, seed: itertools.count, derived_state_variables)[source]¶ Update the states with new infections and advance it by one period.
States are changed in place to save copying!
- Parameters
states (pandas.DataFrame) – See The states DataFrame.
newly_infected_contacts (pandas.Series) – Boolean series indicating individuals infected by contacts. There can be an overlap with infections by events.
newly_infected_events (pandas.Series) – Boolean series indicating individuals infected by events. There can be an overlap with infections by contacts.
params (pandas.DataFrame) – See params.
virus_strains (Dict[str, Any]) – A dictionary with the keys
"names"and"factors"holding the different contagiousness factors of multiple viruses.to_be_processed_tests (pandas.Series) – Tests which are going to be processed.
newly_vaccinated (Optional[pandas.Series]) – A series which indicates newly vaccinated people.
seed (itertools.count) – Seed counter to control randomness.
derived_state_variables (Dict[str, str]) – A dictionary that maps names of state variables to pandas evaluation strings that generate derived state variables, i.e. state variables that can be calculated from the existing state variables.
- Returns: states (pandas.DataFrame): Updated states with reduced countdown lengths,
newly started countdowns, and killed people over the ICU limit.
-
_update_info_on_newly_infected(states, newly_infected_contacts, newly_infected_events, virus_strains)[source]¶ Update information with newly infected individuals.
-
_update_info_on_new_tests(states: pd.DataFrame, to_be_processed_tests: pd.Series) → pd.DataFrame[source]¶