Add exclude_dates option to PreShiftConstraint and PostShiftConstraint
This commit is contained in:
+2
-2
@@ -341,7 +341,7 @@ def main(
|
||||
constraint_options=RotaConstraintOptions(
|
||||
balance_weekends=True,
|
||||
max_shifts_per_week=6,
|
||||
max_days_per_week_block=[(4, 2), (6, 3)],
|
||||
max_days_per_week_block=[(4, 2), (4, 3)],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -356,7 +356,7 @@ def main(
|
||||
balance_offset=2,
|
||||
assign_as_block=False,
|
||||
constraints=[
|
||||
PreShiftConstraint(days=2, start_date="2025-11-17", exclude_days=("Fri", "Sat", "Sun")),
|
||||
PreShiftConstraint(days=2, start_date="2025-11-17", exclude_days=("Fri", "Sat", "Sun"), exclude_dates=["2026-04-06", "2026-05-04", "2026-05-25"]),
|
||||
PostShiftConstraint(days=1, start_date="2025-11-17", exclude_days=("Fri", "Sat", "Sun"), allow_self=True),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user