src.policies.domain_level_policy_blocks
¶
Functions to create building blocks of policies with common dates and domains.
Currently we distinguish the domains “work”, “educ” and “other”. “households” are not included in any domain because they are currently not subject to policies.
The functions here should not be called directly but will be used in the module
full_policy_blocks.py
.
All public functions here take the following arguments (and possibly some more)
contact_models (
dict
): A sid compatible dictionary with contact models.block_info (
dict
): A dictionary containing start_date, end_date and prefix of a block of policies.
The functions here expect that the domain names are part of contact model names.
Module Contents¶
Functions¶
|
Reduce contacts of workers by a attend_multiplier. |
|
Shut down all educ models to zero. |
|
Apply a simple hygiene multiplier to a subset of the educ models. |
|
Apply mixed_educ_policies to a set of contact models. |
|
Implement emergency care that is only based on the educ_contact_priority. |
|
Reduce all other contacts to zero. |
|
Reduce other contacts with multiplier. |
|
Reduce other contacts with gradually changing multiplier. |
|
|
|
|
|
|
|
|
|
Determine whether an education model is school, preschool or nursery. |
- reduce_work_models(contact_models, block_info, attend_multiplier, hygiene_multiplier)[source]¶
Reduce contacts of workers by a attend_multiplier.
- shut_down_educ_models(contact_models, block_info, educ_type)[source]¶
Shut down all educ models to zero.
- reduce_educ_models(contact_models, block_info, educ_type, multiplier)[source]¶
Apply a simple hygiene multiplier to a subset of the educ models.
- apply_mixed_educ_policies(contact_models, block_info, educ_type, always_attend_query, a_b_query, non_a_b_attend, hygiene_multiplier, a_b_rhythm=None)[source]¶
Apply mixed_educ_policies to a set of contact models.
- Parameters
contact_models (dict) – sid contact models
block_info (dict) – keys are ‘start_date’, ‘end_date’ and ‘prefix’.
educ_type (str) – “young_educ” or “school”. The function f”_get_{educ_type}_models” must exist in the local namespace.
educ_options (dict) – keys must contain ‘always_attend_query’, ‘a_b_query’, ‘non_a_b_attend’ and ‘hygiene_multiplier’. ‘a_b_rhythm’ is an optional key. See mixed_educ_policy for details.
- apply_emergency_care_policies(contact_models, block_info, educ_type, attend_multiplier, hygiene_multiplier)[source]¶
Implement emergency care that is only based on the educ_contact_priority.
This is a convenience function.
- reduce_other_models(contact_models, block_info, multiplier)[source]¶
Reduce other contacts with multiplier.