june.policy.individual_policies.CloseSchools

class june.policy.individual_policies.CloseSchools(start_time: str, end_time: str, years_to_close=None, attending_compliance=1.0, full_closure=None)

Template for a general policy.

start_time:

date at which to start applying the policy

end_time:

date from which the policy won’t apply

__init__(start_time: str, end_time: str, years_to_close=None, attending_compliance=1.0, full_closure=None)

Template for a general policy.

start_time:

date at which to start applying the policy

end_time:

date from which the policy won’t apply

_check_kid_goes_to_school(person: june.demography.person.Person)

Checks if a kid should go to school when there is a lockdown. The rule is that a kid goes to school if the age is below 14 (not included) and there are at least two key workers at home.

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) → 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>