feat: implement sub-block handling for shifts and update constraints in RotaBuilder
This commit is contained in:
+4
-3
@@ -74,6 +74,7 @@ def main(
|
||||
Rota.constraint_options["max_weekend_frequency"] = 3
|
||||
|
||||
Rota.constraint_options["max_days_per_week_block"] = [(8,3)]
|
||||
Rota.constraint_options["maximum_allowed_shift_diff"] = 1
|
||||
|
||||
# wr = [
|
||||
# WorkerRequirement(
|
||||
@@ -174,11 +175,11 @@ def main(
|
||||
length=12.5,
|
||||
days=days[4:],
|
||||
# balance_offset=3,
|
||||
rota_on_nwds=True,
|
||||
force_as_block=True,
|
||||
#rota_on_nwds=True,
|
||||
#force_as_block=True,
|
||||
# assign_as_block=True,
|
||||
constraints=[PreShiftConstraint(days=2), PostShiftConstraint(days=2)],
|
||||
# force_as_block_unless_nwd=True
|
||||
force_as_block_unless_nwd=[["Fri"], ["Sat", "Sun"]],
|
||||
),
|
||||
SingleShift(
|
||||
sites=("torbay", "torbay twilights and weekends"),
|
||||
|
||||
Reference in New Issue
Block a user