june.activity.activity_manager_box

class june.activity.activity_manager_box.ActivityManagerBox(world, policies, timer, all_activities, activity_to_super_groups: dict, leisure: Optional[june.groups.leisure.leisure.Leisure] = None, travel: Optional[june.groups.travel.travel.Travel] = None)
__init__(world, policies, timer, all_activities, activity_to_super_groups: dict, leisure: Optional[june.groups.leisure.leisure.Leisure] = None, travel: Optional[june.groups.travel.travel.Travel] = None)

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

activities_to_super_groups(activities: List[str]) → List[str]

Converts activities into Supergroups, the interaction will run over these Groups.

activities:

list of activities that take place at a given time step

List of groups that are active.

static apply_activity_hierarchy(activities: List[str]) → List[str]

Returns a list of activities with the right order, obeying the permanent activity hierarcy and shuflling the random one.

activities:

list of activities that take place at a given time step

Ordered list of activities according to hierarchy

do_timestep()
kid_drags_guardian(guardian)
move_mild_ill_to_household(person: june.demography.person.Person)
move_mild_kid_guardian_to_household(kid: june.demography.person.Person)
move_people_to_active_subgroups(activities: List[str])

Sends every person to one subgroup. If a person has a mild illness, they stay at home

active_groups:

list of groups that are active at a time step

move_to_active_subgroup(activities: List[str], person: Person) → Subgroup

Given the hierarchy of activities and a person, decide what subgroup should they go to

activities:

list of activities that take place at a given time step

person:

person that is looking for a subgroup to go to

Subgroup to which person has to go, given the hierarchy of activities

send_and_receive_people_from_abroad(movable_people)

Deal with the MPI comms.

property active_super_groups
property all_super_groups