# builders.domain.scheduling.time_windows
Domain specification
# TimeWindow
Defines a time window with earliest start, latest start, earliest end and latest end only.
# Constructor TimeWindow
TimeWindow(
earliest_start: int,
latest_start: int,
earliest_end: int,
latest_end: int,
max_horizon: int
) -> None
Initialize self. See help(type(self)) for accurate signature.
# ClassicTimeWindow
Defines a time window with earliest start and latest end only.
# Constructor ClassicTimeWindow
ClassicTimeWindow(
earliest_start: int,
latest_end: int,
max_horizon: int
) -> None
Initialize self. See help(type(self)) for accurate signature.
# StartFromOnlyTimeWindow
Defines a time window with an earliest start only.
# Constructor StartFromOnlyTimeWindow
StartFromOnlyTimeWindow(
earliest_start: int,
max_horizon: int
) -> None
Initialize self. See help(type(self)) for accurate signature.
# StartBeforeOnlyTimeWindow
Defines a time window with an latest start only.
# Constructor StartBeforeOnlyTimeWindow
StartBeforeOnlyTimeWindow(
latest_start: int,
max_horizon: int
) -> None
Initialize self. See help(type(self)) for accurate signature.
# EndFromOnlyTimeWindow
Defines a time window with an earliest end only.
# Constructor EndFromOnlyTimeWindow
EndFromOnlyTimeWindow(
earliest_end: int,
max_horizon: int
) -> None
Initialize self. See help(type(self)) for accurate signature.
# EndBeforeOnlyTimeWindow
Defines a time window with a latest end only.
# Constructor EndBeforeOnlyTimeWindow
EndBeforeOnlyTimeWindow(
latest_end: int,
max_horizon: int
) -> None
Initialize self. See help(type(self)) for accurate signature.
# StartTimeWindow
Defines a time window with an earliest start and a latest start only.
# Constructor StartTimeWindow
StartTimeWindow(
earliest_start: int,
latest_start: int,
max_horizon: int
) -> None
Initialize self. See help(type(self)) for accurate signature.
# EndTimeWindow
Defines a time window with an earliest end and a latest end only.
# Constructor EndTimeWindow
EndTimeWindow(
earliest_end: int,
latest_end: int,
max_horizon: int
) -> None
Initialize self. See help(type(self)) for accurate signature.
# EmptyTimeWindow
Defines an empty time window.
# Constructor EmptyTimeWindow
EmptyTimeWindow(
max_horizon: int
) -> None
Initialize self. See help(type(self)) for accurate signature.
# WithTimeWindow
A domain must inherit this class if some tasks have time windows defined.
# get_time_window WithTimeWindow
get_time_window(
self
) -> dict[int, TimeWindow]
Return a dictionary where the key is the id of a task (int) and the value is a TimeWindow object. Note that the max time horizon needs to be provided to the TimeWindow constructors e.g. { 1: TimeWindow(10, 15, 20, 30, self.get_max_horizon()) 2: EmptyTimeWindow(self.get_max_horizon()) 3: EndTimeWindow(20, 25, self.get_max_horizon()) 4: EndBeforeOnlyTimeWindow(40, self.get_max_horizon()) }
# Returns
A dictionary of TimeWindow objects.
# _get_time_window WithTimeWindow
_get_time_window(
self
) -> dict[int, TimeWindow]
Return a dictionary where the key is the id of a task (int) and the value is a TimeWindow object. Note that the max time horizon needs to be provided to the TimeWindow constructors e.g. { 1: TimeWindow(10, 15, 20, 30, self.get_max_horizon()) 2: EmptyTimeWindow(self.get_max_horizon()) 3: EndTimeWindow(20, 25, self.get_max_horizon()) 4: EndBeforeOnlyTimeWindow(40, self.get_max_horizon()) }
# Returns
A dictionary of TimeWindow objects.
# WithoutTimeWindow
A domain must inherit this class if none of the tasks have restrictions on start times or end times.
# get_time_window WithTimeWindow
get_time_window(
self
) -> dict[int, TimeWindow]
Return a dictionary where the key is the id of a task (int) and the value is a TimeWindow object. Note that the max time horizon needs to be provided to the TimeWindow constructors e.g. { 1: TimeWindow(10, 15, 20, 30, self.get_max_horizon()) 2: EmptyTimeWindow(self.get_max_horizon()) 3: EndTimeWindow(20, 25, self.get_max_horizon()) 4: EndBeforeOnlyTimeWindow(40, self.get_max_horizon()) }
# Returns
A dictionary of TimeWindow objects.
# _get_time_window WithTimeWindow
_get_time_window(
self
) -> dict[int, TimeWindow]
Return a dictionary where the key is the id of a task (int) and the value is a dictionary of EmptyTimeWindow object.
# Returns
A dictionary of TimeWindow objects.