Update worker scheduling constraints in load_workers for improved shift management
This commit is contained in:
+3
-1
@@ -415,6 +415,7 @@ def load_workers():
|
||||
],
|
||||
nwds=non_working_days,
|
||||
previous_shifts=priors_map.get(initial, {}),
|
||||
max_days_worked_per_week=2
|
||||
)
|
||||
|
||||
|
||||
@@ -458,8 +459,9 @@ def load_workers():
|
||||
#w.add_force_assign_with("twilight", "oncall")
|
||||
w.add_force_assign_with("weekend", "oncall")
|
||||
|
||||
if w.name in ("DS",):
|
||||
if w.name in ("DS","RG"):
|
||||
w.add_hard_day_dependency({"Fri", "Sat", "Sun"}, ignore_dates=[datetime.date(2026, 5, 2)])
|
||||
w.max_days_worked_per_week = 3
|
||||
else:
|
||||
w.add_hard_day_dependency({"Fri", "Sun"})
|
||||
w.add_hard_day_exclusion({"Sat", "Sun"})
|
||||
|
||||
Reference in New Issue
Block a user