update gen.py

This commit is contained in:
Ross
2024-01-07 17:52:44 +00:00
parent a7e1fa7171
commit 44c21e3c6a
+8 -8
View File
@@ -29,8 +29,8 @@ suspend_on_finish = False
solve = True solve = True
# time_to_run = 508500 # time_to_run = 508500
# time_to_run = 2660000 # time_to_run = 2660000
time_to_run = 60 * 60 * 85 time_to_run = 60 * 60 * 100
time_to_run = 5000 #time_to_run = 60 * 300
# allow = 5000 # allow = 5000
ratio = 0.5 ratio = 0.5
#ratio = 0.9 #ratio = 0.9
@@ -42,7 +42,7 @@ start_date = datetime.date(2024, 3, 4)
# start_date = datetime.date(2022, 10, 10) # start_date = datetime.date(2022, 10, 10)
Rota = RotaBuilder( Rota = RotaBuilder(
start_date, weeks_to_rota=13, balance_offset_modifier=1, name="proc rota" start_date, weeks_to_rota=8, balance_offset_modifier=1, name="proc rota"
) )
# Rota = RotaBuilder(start_date, weeks_to_rota=20, balance_offset_modifier=1) # Rota = RotaBuilder(start_date, weeks_to_rota=20, balance_offset_modifier=1)
Rota.constraint_options["balance_weekends"] = True Rota.constraint_options["balance_weekends"] = True
@@ -82,7 +82,7 @@ Rota.add_shifts(
assign_as_block=True, assign_as_block=True,
), ),
SingleShift( SingleShift(
sites=("plymouth", "plymouth twilights", "plymouth twilights and weekends"), sites=("plymouth", "plymouth twilights", "plymouth twilights and weekends", "plymouth twilights, weekends and weekend nights"),
name="plymouth_twilight", name="plymouth_twilight",
length=12.5, length=12.5,
days=days[:5], days=days[:5],
@@ -124,7 +124,7 @@ Rota.add_shifts(
# force_as_block_unless_nwd=True # force_as_block_unless_nwd=True
), ),
SingleShift( SingleShift(
sites=("plymouth", "plymouth twilights and weekends", "plymouth first on weekends only"), sites=("plymouth", "plymouth twilights and weekends", "plymouth first on weekends only", "plymouth twilights, weekends and weekend nights"),
name="weekend_plymouth1", name="weekend_plymouth1",
length=8, length=8,
days=days[5:], days=days[5:],
@@ -135,7 +135,7 @@ Rota.add_shifts(
constraint=[{"name": "pre", "options": 2}, {"name": "post", "options": 2}], constraint=[{"name": "pre", "options": 2}, {"name": "post", "options": 2}],
), ),
SingleShift( SingleShift(
sites=("plymouth", "plymouth twilights and weekends"), sites=("plymouth", "plymouth twilights and weekends", "plymouth twilights, weekends and weekend nights"),
name="weekend_plymouth2", name="weekend_plymouth2",
length=8, length=8,
days=days[5:], days=days[5:],
@@ -146,7 +146,7 @@ Rota.add_shifts(
constraint=[{"name": "pre", "options": 2}, {"name": "post", "options": 2}], constraint=[{"name": "pre", "options": 2}, {"name": "post", "options": 2}],
), ),
SingleShift( SingleShift(
sites=("plymouth", "plymouth twilights", "plymouth twilights and weekends"), sites=("plymouth", "plymouth twilights", "plymouth twilights and weekends", "plymouth twilights, weekends and weekend nights"),
name="plymouth_bank_holidays", name="plymouth_bank_holidays",
length=8, length=8,
days=days[5:], days=days[5:],
@@ -177,7 +177,7 @@ Rota.add_shifts(
], ],
), ),
SingleShift( SingleShift(
sites=(sites), sites=[*sites, "plymouth twilights, weekends and weekend nights"],
name="night_weekend", name="night_weekend",
length=12.25, length=12.25,
days=days[4:], days=days[4:],