Allow spliting forced blocks on nwdsAllow spliting forced blocks on nwds
This commit is contained in:
@@ -11,10 +11,10 @@ import datetime
|
||||
import sys
|
||||
|
||||
use_neos = True
|
||||
use_cplex = True
|
||||
use_cplex = False
|
||||
solve = True
|
||||
|
||||
weeks_to_rota = 26
|
||||
weeks_to_rota = 8
|
||||
|
||||
time_to_run = 208500
|
||||
#allow = 5000
|
||||
@@ -83,14 +83,16 @@ Rota.add_shifts(
|
||||
days[4:],
|
||||
balance_offset=3,
|
||||
rota_on_nwds=True,
|
||||
force_as_block=True),
|
||||
force_as_block=True,
|
||||
force_as_block_unless_nwd=False),
|
||||
SingleShift(("torbay", ),
|
||||
"weekend_torbay",
|
||||
12.5,
|
||||
days[4:],
|
||||
balance_offset=3,
|
||||
rota_on_nwds=True,
|
||||
force_as_block=True),
|
||||
force_as_block=True,
|
||||
force_as_block_unless_nwd=False),
|
||||
SingleShift(("plymouth", ),
|
||||
"weekend_plymouth1",
|
||||
8,
|
||||
@@ -232,7 +234,6 @@ else:
|
||||
nwd_end_date = Rota.rota_end_date
|
||||
|
||||
if "[" in i:
|
||||
print(i, i.split("[")[1][:-1])
|
||||
a, b = i.split("[")[1][:-1].split("-")
|
||||
nwd_start_date = datetime.datetime.strptime(a,
|
||||
"%d/%m/%y").date()
|
||||
@@ -241,7 +242,6 @@ else:
|
||||
|
||||
nwds.append((i.split("[")[0].strip()[:3].capitalize(), nwd_start_date, nwd_end_date))
|
||||
#nwds = [i.strip()[:3].capitalize() for i in nwd.split("/")] if nwd else None
|
||||
print(name, nwds)
|
||||
end_date = end_date if end_date else None
|
||||
oop = oop.split("-") if oop else None
|
||||
|
||||
@@ -295,7 +295,6 @@ else:
|
||||
print("Building model")
|
||||
Rota.build_shifts_and_workers()
|
||||
|
||||
print("PAIRS", Rota.worker_pairs)
|
||||
|
||||
Rota.sites.add("plymouth_twilights")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user