june.policy.individual_policies.Quarantine

class june.policy.individual_policies.Quarantine(start_time: Union[str, datetime.datetime] = '1900-01-01', end_time: Union[str, datetime.datetime] = '2100-01-01', n_days: int = 7, n_days_household: int = 14, compliance: float = 1.0, household_compliance: float = 1.0)

This policy forces people to stay at home for `n_days` days after they show symtpoms, and for `n_days_household` if someone else in their household shows symptoms

start_time:

date at which to start applying the policy

end_time:

date from which the policy won’t apply

n_days:

days for which the person has to stay at home if they show symtpoms

n_days_household:

days for which the person has to stay at home if someone in their household shows symptoms

compliance:

percentage of symptomatic people that will adhere to the quarantine policy

household_compliance:

percentage of people that will adhere to the hoseuhold quarantine policy

__init__(start_time: Union[str, datetime.datetime] = '1900-01-01', end_time: Union[str, datetime.datetime] = '2100-01-01', n_days: int = 7, n_days_household: int = 14, compliance: float = 1.0, household_compliance: float = 1.0)

This policy forces people to stay at home for `n_days` days after they show symtpoms, and for `n_days_household` if someone else in their household shows symptoms

start_time:

date at which to start applying the policy

end_time:

date from which the policy won’t apply

n_days:

days for which the person has to stay at home if they show symtpoms

n_days_household:

days for which the person has to stay at home if someone in their household shows symptoms

compliance:

percentage of symptomatic people that will adhere to the quarantine policy

household_compliance:

percentage of people that will adhere to the hoseuhold quarantine policy

apply(person: june.demography.person.Person, days_from_start: float, activities: List[str])

Removes all activities but residence if the person has to stay at home.

check_stay_home_condition(person: june.demography.person.Person, days_from_start)

Returns true if a person must stay at home. Parameters ———- person:

person to whom the policy is being applied

days_from_start:

time past from beginning of simulation, in units of days

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>