From 8c28e7155adecffb09eaae038be64e9038993184 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 27 Dec 2023 19:15:00 +0000 Subject: [PATCH] update for latest proc run --- gen.py | 13 ++++++------- leave.py | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gen.py b/gen.py index 7143593..7daf614 100644 --- a/gen.py +++ b/gen.py @@ -29,13 +29,13 @@ suspend_on_finish = False solve = True # time_to_run = 508500 # time_to_run = 2660000 -time_to_run = 60 * 1 +time_to_run = 60 * 60 * 85 # allow = 5000 -ratio = 0.01 +ratio = 0.001 # ratio = 0.9 -start_date = datetime.date(2023, 9, 4) +start_date = datetime.date(2024, 3, 4) # start_date = datetime.date(2023, 5, 1) # start_date = start_date + datetime.timedelta(weeks=13) # start_date = datetime.date(2022, 10, 10) @@ -53,7 +53,7 @@ Rota.constraint_options["hard_constrain_pair_separation"] = True Rota.add_shifts( SingleShift( - sites=("exeter", "exeter twilights and weekends"), + sites=("exeter", "exeter twilights and weekends", "exeter no nights"), name="exeter_twilight", length=12.5, days=days[:5], @@ -90,7 +90,7 @@ Rota.add_shifts( constraint=[{"name": "max_shifts_per_week", "options": 2}], ), SingleShift( - sites=("exeter", "exeter twilights and weekends"), + sites=("exeter", "exeter twilights and weekends", "exeter no nights"), name="weekend_exeter", length=12.5, days=days[5:], @@ -123,7 +123,7 @@ Rota.add_shifts( # force_as_block_unless_nwd=True ), SingleShift( - sites=("plymouth", "plymouth twilights and weekends"), + sites=("plymouth", "plymouth twilights and weekends", "plymouth first on weekends only"), name="weekend_plymouth1", length=8, days=days[5:], @@ -335,7 +335,6 @@ if load_leave: # Rota.build_model() solver_options = {"ratio": ratio, "seconds": time_to_run, "threads": 10} -solver_options = {"ratio": ratio, "seconds": time_to_run, } #start_time = time.time() Rota.build_and_solve(solver_options, export=True) diff --git a/leave.py b/leave.py index 9bbb3bf..31f36ca 100644 --- a/leave.py +++ b/leave.py @@ -134,7 +134,7 @@ def load_leave(Rota): if lower_item in shifts: worker["requests"].append(WorkRequests(date=date, shift=lower_item)) - elif lower_item in ("work_request", "happy to work"): + elif lower_item in ("work_request", "happy to work", "offered"): worker["requests"].append(WorkRequests(date=date, shift="*"))