add bank holiday shifts
This commit is contained in:
@@ -10,11 +10,11 @@ import datetime
|
||||
|
||||
import sys
|
||||
|
||||
use_neos = False
|
||||
use_neos = True
|
||||
use_cplex = False
|
||||
solve = True
|
||||
|
||||
weeks_to_rota = 13
|
||||
weeks_to_rota = 6
|
||||
|
||||
time_to_run = 28500
|
||||
#allow = 5000
|
||||
@@ -25,8 +25,8 @@ use_live_rota = False
|
||||
|
||||
sites = ("truro", "exeter", "torbay", "barnstaple", "plymouth")
|
||||
|
||||
Rota = RotaBuilder(datetime.date(2021, 9, 6),
|
||||
#Rota = RotaBuilder(datetime.date(2021, 11, 8),
|
||||
#Rota = RotaBuilder(datetime.date(2021, 9, 6),
|
||||
Rota = RotaBuilder(datetime.date(2021, 12, 6),
|
||||
weeks_to_rota=weeks_to_rota,
|
||||
balance_offset_modifier=2,
|
||||
max_weekend_frequency=2,
|
||||
@@ -60,7 +60,7 @@ Rota.add_shifts(
|
||||
days[:4],
|
||||
balance_offset=3,
|
||||
assign_as_block=True),
|
||||
SingleShift(("plymouth", ),
|
||||
SingleShift(("plymouth", "plymouth_twilights"),
|
||||
"plymouth_twilight",
|
||||
12.5,
|
||||
days[:5],
|
||||
@@ -104,6 +104,15 @@ Rota.add_shifts(
|
||||
workers_required=1,
|
||||
rota_on_nwds=True,
|
||||
force_as_block=True),
|
||||
SingleShift(("plymouth", "plymouth_twilights"),
|
||||
"plymouth_bank_holidays",
|
||||
8,
|
||||
days[5:],
|
||||
balance_offset=3,
|
||||
workers_required=1,
|
||||
rota_on_nwds=True,
|
||||
force_as_block=False,
|
||||
bank_holidays_only=True),
|
||||
SingleShift(
|
||||
(sites),
|
||||
"night_weekday",
|
||||
@@ -264,6 +273,8 @@ else:
|
||||
print("Building model")
|
||||
Rota.build_shifts_and_workers()
|
||||
|
||||
Rota.sites.add("plymouth_twilights")
|
||||
|
||||
Rota.build_model()
|
||||
|
||||
print(Rota.get_worker_details())
|
||||
@@ -319,7 +330,7 @@ worker_timetable = ResultsHolder.get_worker_timetable()
|
||||
worker_timetable_brief = ResultsHolder.get_worker_timetable_brief(
|
||||
show_prefs=False, show_unavailable=False)
|
||||
|
||||
#print(worker_timetable_brief)
|
||||
print(worker_timetable_brief)
|
||||
#print(Rota.get_workers_total_fte())
|
||||
|
||||
ResultsHolder.get_weekend_details()
|
||||
|
||||
Reference in New Issue
Block a user