june.activity.activity_manager.ActivityManager¶
-
class
june.activity.activity_manager.
ActivityManager
(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
()
-
move_people_to_active_subgroups
(activities: List[str], date: datetime.datetime = datetime.datetime(2020, 2, 2, 0, 0), days_from_start=0) Sends every person to one subgroup. If a person has a mild illness, they stay at home
-
move_to_active_subgroup
(activities: List[str], person: june.demography.person.Person, to_send_abroad=None) → Optional[june.groups.group.subgroup.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
-