# builders.domain.scheduling.time_lag
Domain specification
# TimeLag
Defines a time lag with both a minimum time lag and maximum time lag.
# Constructor TimeLag
TimeLag(
minimum_time_lag: Optional[int] = None,
maximum_time_lag: Optional[int] = None
)
# Parameters
- minimum_time_lag: min time lag. None means no min time lag.
- maximum_time_lag: max time lag. None means no max time lag.
# MinimumOnlyTimeLag
Defines a minimum time lag.
# Constructor MinimumOnlyTimeLag
MinimumOnlyTimeLag(
minimum_time_lag: int
)
# Parameters
- minimum_time_lag: min time lag. None means no min time lag.
- maximum_time_lag: max time lag. None means no max time lag.
# MaximumOnlyTimeLag
Defines a maximum time lag.
# Constructor MaximumOnlyTimeLag
MaximumOnlyTimeLag(
maximum_time_lag
)
# Parameters
- minimum_time_lag: min time lag. None means no min time lag.
- maximum_time_lag: max time lag. None means no max time lag.
# WithTimeLag
A domain must inherit this class if there are minimum and maximum time lags between some of its tasks.
# get_time_lags WithTimeLag
get_time_lags(
self
) -> dict[int, dict[int, TimeLag]]
Return nested dictionaries where the first key is the id of a task (int) and the second key is the id of another task (int). The value is a TimeLag object containing the MINIMUM and MAXIMUM time (int) that needs to separate the end of the first task to the start of the second task.
e.g. { 12:{ 15: TimeLag(5, 10), 16: TimeLag(5, 20), 17: MinimumOnlyTimeLag(5), 18: MaximumOnlyTimeLag(15), } }
# Returns
A dictionary of TimeLag objects.
# _get_time_lags WithTimeLag
_get_time_lags(
self
) -> dict[int, dict[int, TimeLag]]
Return nested dictionaries where the first key is the id of a task (int) and the second key is the id of another task (int). The value is a TimeLag object containing the MINIMUM and MAXIMUM time (int) that needs to separate the end of the first task to the start of the second task.
e.g. { 12:{ 15: TimeLag(5, 10), 16: TimeLag(5, 20), 17: MinimumOnlyTimeLag(5), 18: MaximumOnlyTimeLag(15), } }
# Returns
A dictionary of TimeLag objects.
# WithoutTimeLag
A domain must inherit this class if there is no required time lag between its tasks.
# get_time_lags WithTimeLag
get_time_lags(
self
) -> dict[int, dict[int, TimeLag]]
Return nested dictionaries where the first key is the id of a task (int) and the second key is the id of another task (int). The value is a TimeLag object containing the MINIMUM and MAXIMUM time (int) that needs to separate the end of the first task to the start of the second task.
e.g. { 12:{ 15: TimeLag(5, 10), 16: TimeLag(5, 20), 17: MinimumOnlyTimeLag(5), 18: MaximumOnlyTimeLag(15), } }
# Returns
A dictionary of TimeLag objects.
# _get_time_lags WithTimeLag
_get_time_lags(
self
) -> dict[int, dict[int, TimeLag]]
Return nested dictionaries where the first key is the id of a task (int) and the second key is the id of another task (int). The value is a TimeLag object containing the MINIMUM and MAXIMUM time (int) that needs to separate the end of the first task to the start of the second task.