june.policy.leisure_policies.CloseLeisureVenue¶
-
class
june.policy.leisure_policies.
CloseLeisureVenue
(start_time: Union[str, datetime.datetime], end_time: Union[str, datetime.datetime], venues_to_close='cinemas', 'groceries') Template for policies that will close types of leisure venues
- start_time:
date at which to start applying the policy
- end_time:
date from which the policy won’t apply
- venues_to_close:
list of leisure venues that will close
-
__init__
(start_time: Union[str, datetime.datetime], end_time: Union[str, datetime.datetime], venues_to_close='cinemas', 'groceries') Template for policies that will close types of leisure venues
- start_time:
date at which to start applying the policy
- end_time:
date from which the policy won’t apply
- venues_to_close:
list of leisure venues that will close
-
apply
(leisure: june.groups.leisure.leisure.Leisure)
-
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>