june.interaction.interaction.Interaction

class june.interaction.interaction.Interaction(alpha_physical: float, beta: Dict[str, float], contact_matrices: dict, susceptibilities_by_age: Dict[str, int] = None, population: june.demography.demography.Population = None)

Class to handle interaction in groups.

alpha_physical

Scaling factor for physical contacts, an alpha_physical factor of 1, means that physical contacts count as much as non-physical contacts.

beta

dictionary mapping the group specs with their contact intensities

contact_matrices

dictionary mapping the group specs with their contact matrices

susceptibilities_by_age

dictionary mapping age ranges to their susceptibility. Example: susceptibilities_by_age = {“0-13” : 0.5, “13-99” : 0.5} note that the right limit of the range is not included.

population

list of people to have the susceptibilities changed.

__init__(alpha_physical: float, beta: Dict[str, float], contact_matrices: dict, susceptibilities_by_age: Dict[str, int] = None, population: june.demography.demography.Population = None)

Initialize self. See help(type(self)) for accurate signature.

adapt_contacts_to_schools(input_contact_matrix, xi, age_min, age_max, physical=False)
classmethod from_file(config_filename: str = PosixPath('/home/sadie/JUNE/configs/defaults/interaction/interaction.yaml'), population: june.demography.demography.Population = None)june.interaction.interaction.Interaction
process_contact_matrices(groups: List[str], input_contact_matrices: dict)
process_school_matrices(input_contact_matrices, age_min=0, age_max=20)
set_population_susceptibilities(susceptibilities_by_age: dict, population: june.demography.demography.Population)

Changes the population susceptibility to the disease.

time_step_for_group(delta_time: float, group: june.interaction.interactive_group.InteractiveGroup)
time_step_for_subgroup(subgroup_transmission_probabilities, susceptible_ids, susceptibilities, infector_subgroups, infector_subgroup_sizes, contact_matrix, beta, delta_time, subgroup_idx, school_years) → List[int]