june.policy.individual_policies.CloseCompanies¶
-
class
june.policy.individual_policies.
CloseCompanies
(start_time: str, end_time: str, full_closure=False, avoid_work_probability=None, furlough_probability=None, key_probability=None) Prevents workers with the tag ``person.lockdown_status=furlough” to go to work. If full_closure is True, then no one will go to work.
-
__init__
(start_time: str, end_time: str, full_closure=False, avoid_work_probability=None, furlough_probability=None, key_probability=None) Prevents workers with the tag ``person.lockdown_status=furlough” to go to work. If full_closure is True, then no one will go to work.
-
apply
(activities: List[str]) → List[str] Remove an activity from a list of activities
- activities:
list of activities
- activity_to_remove:
activity that will be removed from the list
-
check_skips_activity
(person: june.demography.person.Person, furlough_ratio=None, key_ratio=None, random_ratio=None) → bool Returns True if the activity is to be skipped, otherwise False
-
get_spec
() → str Returns the speciailization of the policy.
-
is_active
(date: datetime.datetime) → bool Returns true if the policy is active, false otherwise
- date:
date to check
-
static
read_date
(date: Union[str, datetime.datetime]) → datetime.datetime Read date in two possible formats, either string or datetime.date, both are translated into datetime.datetime to be used by the simulator
- date:
date to translate into datetime.datetime
date in datetime format
-
_abc_impl
= <_abc_data object>
-