From 97b3d938bb6cdc21c045209af1910eb3e55c5836 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 22 Jun 2023 21:02:18 +0100 Subject: [PATCH] . --- gen.py | 6 +++--- rota/shifts.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gen.py b/gen.py index 3e95675..466ecf3 100644 --- a/gen.py +++ b/gen.py @@ -29,9 +29,9 @@ suspend_on_finish = False solve = True # time_to_run = 508500 # time_to_run = 2660000 -time_to_run = 100 +time_to_run = 60 * 10 # allow = 5000 -ratio = 0.41 +ratio = 0.01 # ratio = 0.9 @@ -41,7 +41,7 @@ start_date = datetime.date(2023, 9, 4) # start_date = datetime.date(2022, 10, 10) Rota = RotaBuilder( - start_date, weeks_to_rota=10, balance_offset_modifier=1, name="proc rota" + start_date, weeks_to_rota=26, balance_offset_modifier=1, name="proc rota" ) # Rota = RotaBuilder(start_date, weeks_to_rota=20, balance_offset_modifier=1) Rota.constraint_options["balance_weekends"] = True diff --git a/rota/shifts.py b/rota/shifts.py index e7e9f19..f481d49 100644 --- a/rota/shifts.py +++ b/rota/shifts.py @@ -421,7 +421,8 @@ class RotaBuilder(object): options={"ratio": 0.1, "seconds": 1000, "threads": 10}, solve=True, debug_if_fail: bool = False, - export=False + export=False, + solver="cbc" ): self.run_start_time = datetime.datetime.now() @@ -431,7 +432,7 @@ class RotaBuilder(object): self.build_model() if solve: - self.solve_model(options=options, debug_if_fail=debug_if_fail) + self.solve_model(options=options, debug_if_fail=debug_if_fail, solver=solver) self.run_end_time = datetime.datetime.now()