pre repalce
This commit is contained in:
@@ -75,7 +75,7 @@ class TestBalancing:
|
||||
balance_weighting=4,
|
||||
workers_required=1,
|
||||
force_as_block=False,
|
||||
constraints=["preclear2", "postclear2"],
|
||||
constraint=["preclear2", "postclear2"],
|
||||
),
|
||||
SingleShift(
|
||||
("group1", "group2"),
|
||||
@@ -118,7 +118,7 @@ class TestBalancing:
|
||||
#balance_weighting=4,
|
||||
workers_required=1,
|
||||
force_as_block=False,
|
||||
#constraints=["preclear2", "postclear2"],
|
||||
#constraint=["preclear2", "postclear2"],
|
||||
),
|
||||
SingleShift(
|
||||
("group1", "group2"),
|
||||
@@ -163,7 +163,7 @@ class TestBalancing:
|
||||
#balance_weighting=4,
|
||||
workers_required=1,
|
||||
force_as_block=False,
|
||||
#constraints=["preclear2", "postclear2"],
|
||||
#constraint=["preclear2", "postclear2"],
|
||||
),
|
||||
SingleShift(
|
||||
("group1", "group2"),
|
||||
@@ -214,7 +214,7 @@ class TestBalancing:
|
||||
balance_weighting=8,
|
||||
workers_required=2,
|
||||
force_as_block=False,
|
||||
#constraints=["preclear2", "postclear2"],
|
||||
#constraint=["preclear2", "postclear2"],
|
||||
),
|
||||
SingleShift(
|
||||
("group2","group3"),
|
||||
@@ -255,7 +255,7 @@ class TestBalancing:
|
||||
#balance_weighting=8,
|
||||
workers_required=2,
|
||||
force_as_block=False,
|
||||
#constraints=["preclear2", "postclear2"],
|
||||
#constraint=["preclear2", "postclear2"],
|
||||
),
|
||||
SingleShift(
|
||||
("group2","group3"),
|
||||
|
||||
+5
-5
@@ -37,7 +37,7 @@ class TestRemoteRotas:
|
||||
workers_required=1,
|
||||
balance_offset=100,
|
||||
force_as_block=False,
|
||||
constraints=[("require_remote_site_presence_week", ("group2", 2))],
|
||||
constraint=[("require_remote_site_presence_week", ("group2", 2))],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -76,7 +76,7 @@ class TestRemoteRotas:
|
||||
workers_required=1,
|
||||
balance_offset=10,
|
||||
force_as_block=True,
|
||||
constraints=[("require_remote_site_presence_week", ("group2", 1))],
|
||||
constraint=[("require_remote_site_presence_week", ("group2", 1))],
|
||||
),
|
||||
SingleShift(
|
||||
("group1", "group2"),
|
||||
@@ -86,7 +86,7 @@ class TestRemoteRotas:
|
||||
workers_required=1,
|
||||
balance_offset=10,
|
||||
force_as_block=False,
|
||||
#constraints=[("require_remote_site_presence_week", ("group2", 1))],
|
||||
#constraint=[("require_remote_site_presence_week", ("group2", 1))],
|
||||
#constraint=["balance_shifts_over_workers"]
|
||||
),
|
||||
)
|
||||
@@ -142,7 +142,7 @@ class TestRemoteRotas:
|
||||
workers_required=1,
|
||||
balance_offset=10,
|
||||
force_as_block=False,
|
||||
constraints=[("require_remote_site_presence", ("group2", 1))],
|
||||
constraint=[("require_remote_site_presence", ("group2", 1))],
|
||||
),
|
||||
SingleShift(
|
||||
("group1", "group2"),
|
||||
@@ -152,7 +152,7 @@ class TestRemoteRotas:
|
||||
workers_required=1,
|
||||
balance_offset=10,
|
||||
force_as_block=False,
|
||||
#constraints=[("require_remote_site_presence_week", ("group2", 1))],
|
||||
#constraint=[("require_remote_site_presence_week", ("group2", 1))],
|
||||
#constraint=["balance_shifts_over_workers"]
|
||||
),
|
||||
)
|
||||
|
||||
+27
-27
@@ -228,8 +228,8 @@ class TestDemoRotaNights:
|
||||
12.5,
|
||||
days[:4],
|
||||
workers_required=1,
|
||||
constraints=["preclear2", "postclear2"],
|
||||
# constraints=["night"],
|
||||
constraint=["preclear2", "postclear2"],
|
||||
# constraint=["night"],
|
||||
force_as_block=True
|
||||
# We use a different balance weighting for each shift as otherwise
|
||||
# the shifts can be treated equally (and no target diff)
|
||||
@@ -241,8 +241,8 @@ class TestDemoRotaNights:
|
||||
12.5,
|
||||
days[4:],
|
||||
# balance_weighting=0.5
|
||||
constraints=["preclear2", "postclear2"],
|
||||
# constraints=["night"],
|
||||
constraint=["preclear2", "postclear2"],
|
||||
# constraint=["night"],
|
||||
force_as_block=True,
|
||||
),
|
||||
SingleShift(
|
||||
@@ -252,12 +252,12 @@ class TestDemoRotaNights:
|
||||
days[:5],
|
||||
# balance_weighting=0.5
|
||||
workers_required=2,
|
||||
# constraints=["preclear2", "postclear2"],
|
||||
# constraint=["preclear2", "postclear2"],
|
||||
),
|
||||
# SingleShift(("group1","group2"), "atwilight", 12.5, days[:5], balance_offset=40,
|
||||
##balance_weighting=0.5
|
||||
# workers_required=2,
|
||||
# #constraints=["postclear2"],
|
||||
# #constraint=["postclear2"],
|
||||
# ),
|
||||
)
|
||||
|
||||
@@ -329,7 +329,7 @@ class TestDemoRotaClear:
|
||||
days[:5],
|
||||
balance_offset=40,
|
||||
workers_required=2,
|
||||
constraints=["preclear"],
|
||||
constraint=["preclear"],
|
||||
),
|
||||
SingleShift(
|
||||
("group1", "group2"),
|
||||
@@ -346,7 +346,7 @@ class TestDemoRotaClear:
|
||||
days[3],
|
||||
balance_offset=40,
|
||||
workers_required=1,
|
||||
constraints=["preclear2", "postclear2"],
|
||||
constraint=["preclear2", "postclear2"],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -486,7 +486,7 @@ class TestDemoRotaBalanceShiftSites:
|
||||
balance_offset=40,
|
||||
workers_required=2,
|
||||
force_as_block=True,
|
||||
constraints=["balance_across_groups"],
|
||||
constraint=["balance_across_groups"],
|
||||
),
|
||||
)
|
||||
self.Rota.constraint_options["balance_nights_across_sites"] = False
|
||||
@@ -522,7 +522,7 @@ class TestDemoRotaBalanceShiftSites:
|
||||
balance_offset=40,
|
||||
workers_required=3,
|
||||
force_as_block=True,
|
||||
constraints=["balance_across_groups"],
|
||||
constraint=["balance_across_groups"],
|
||||
),
|
||||
)
|
||||
self.Rota.constraint_options["balance_nights_across_sites"] = False
|
||||
@@ -556,7 +556,7 @@ class TestDemoRotaBalanceShiftSites:
|
||||
balance_offset=40,
|
||||
workers_required=3,
|
||||
force_as_block=True,
|
||||
constraints=["balance_across_groups"],
|
||||
constraint=["balance_across_groups"],
|
||||
),
|
||||
)
|
||||
self.Rota.constraint_options["balance_nights_across_sites"] = False
|
||||
@@ -614,7 +614,7 @@ class TestLimitConstraints:
|
||||
balance_offset=40,
|
||||
workers_required=4,
|
||||
force_as_block=True,
|
||||
constraints=[("limit_grade_number", {2: 1})],
|
||||
constraint=[("limit_grade_number", {2: 1})],
|
||||
),
|
||||
)
|
||||
# self.Rota.constraint_options["balance_nights_across_sites"] = False
|
||||
@@ -650,7 +650,7 @@ class TestLimitConstraints:
|
||||
balance_offset=40,
|
||||
workers_required=4,
|
||||
force_as_block=True,
|
||||
constraints=[("limit_grade_number", {3: 2})],
|
||||
constraint=[("limit_grade_number", {3: 2})],
|
||||
),
|
||||
)
|
||||
# self.Rota.constraint_options["balance_nights_across_sites"] = False
|
||||
@@ -688,7 +688,7 @@ class TestLimitConstraints:
|
||||
balance_offset=40,
|
||||
workers_required=4,
|
||||
force_as_block=True,
|
||||
constraints=[("limit_grade_number", {2: 3, 3: 1})],
|
||||
constraint=[("limit_grade_number", {2: 3, 3: 1})],
|
||||
),
|
||||
)
|
||||
# self.Rota.constraint_options["balance_nights_across_sites"] = False
|
||||
@@ -726,7 +726,7 @@ class TestLimitConstraints:
|
||||
balance_offset=40,
|
||||
workers_required=4,
|
||||
force_as_block=True,
|
||||
constraints=[("limit_grade_number", {2: 4, 3: 0})],
|
||||
constraint=[("limit_grade_number", {2: 4, 3: 0})],
|
||||
),
|
||||
)
|
||||
# self.Rota.constraint_options["balance_nights_across_sites"] = False
|
||||
@@ -747,7 +747,7 @@ class TestLimitConstraints:
|
||||
balance_offset=40,
|
||||
workers_required=1,
|
||||
force_as_block=True,
|
||||
constraints=[("minimum_grade_number", (3, 1))],
|
||||
constraint=[("minimum_grade_number", (3, 1))],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -783,7 +783,7 @@ class TestLimitConstraints:
|
||||
balance_offset=40,
|
||||
workers_required=4,
|
||||
force_as_block=True,
|
||||
constraints=[("minimum_grade_number", (3, 3))],
|
||||
constraint=[("minimum_grade_number", (3, 3))],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -819,7 +819,7 @@ class TestLimitConstraints:
|
||||
balance_offset=40,
|
||||
workers_required=4,
|
||||
force_as_block=True,
|
||||
constraints=[("minimum_grade_number", (3, 0))],
|
||||
constraint=[("minimum_grade_number", (3, 0))],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -841,7 +841,7 @@ class TestLimitConstraints:
|
||||
balance_offset=40,
|
||||
workers_required=4,
|
||||
force_as_block=True,
|
||||
constraints=[("minimum_grade_number", (4, 1))],
|
||||
constraint=[("minimum_grade_number", (4, 1))],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -860,7 +860,7 @@ class TestLimitConstraints:
|
||||
balance_offset=40,
|
||||
workers_required=2,
|
||||
force_as_block=True,
|
||||
constraints=[("require_remote_site_presence_week", ("group1", 2))],
|
||||
constraint=[("require_remote_site_presence_week", ("group1", 2))],
|
||||
),
|
||||
)
|
||||
self.Rota.build_and_solve(options={"ratio": 0.00})
|
||||
@@ -898,7 +898,7 @@ class TestLimitConstraints:
|
||||
balance_offset=20,
|
||||
workers_required=3,
|
||||
force_as_block=True,
|
||||
constraints=[("require_remote_site_presence_week", ("group2", 2))],
|
||||
constraint=[("require_remote_site_presence_week", ("group2", 2))],
|
||||
),
|
||||
)
|
||||
self.Rota.build_and_solve(options={"ratio": 0.00})
|
||||
@@ -930,7 +930,7 @@ class TestLimitConstraints:
|
||||
balance_offset=20,
|
||||
workers_required=3,
|
||||
force_as_block=True,
|
||||
constraints=[("require_remote_site_presence_week", ("group2", 1))],
|
||||
constraint=[("require_remote_site_presence_week", ("group2", 1))],
|
||||
),
|
||||
)
|
||||
self.Rota.build_and_solve(options={"ratio": 0.00})
|
||||
@@ -995,7 +995,7 @@ class TestNightUnavailable:
|
||||
# Add a weekday and weekend shift
|
||||
self.Rota.add_shifts(
|
||||
SingleShift(
|
||||
("group1",), "night_weekend", 12.5, days[5:], constraints=["night"]
|
||||
("group1",), "night_weekend", 12.5, days[5:], constraint=["night"]
|
||||
),
|
||||
)
|
||||
|
||||
@@ -1018,7 +1018,7 @@ class TestNightUnavailable:
|
||||
# Add a weekday and weekend shift
|
||||
self.Rota.add_shifts(
|
||||
SingleShift(
|
||||
("group1",), "night_weekend", 12.5, days[5:], workers_required=2, constraints=["night"]
|
||||
("group1",), "night_weekend", 12.5, days[5:], workers_required=2, constraint=["night"]
|
||||
),
|
||||
)
|
||||
|
||||
@@ -1032,7 +1032,7 @@ class TestNightUnavailable:
|
||||
|
||||
self.Rota.add_shifts(
|
||||
SingleShift(
|
||||
("group1",), "night_weekend", 12.5, days[5:], workers_required=2, constraints=[]
|
||||
("group1",), "night_weekend", 12.5, days[5:], workers_required=2, constraint=[]
|
||||
),
|
||||
)
|
||||
|
||||
@@ -1053,7 +1053,7 @@ class TestNightUnavailable:
|
||||
|
||||
self.Rota.add_shifts(
|
||||
SingleShift(
|
||||
("group1",), "night_weekend", 12.5, days[5:], workers_required=3, constraints=[]
|
||||
("group1",), "night_weekend", 12.5, days[5:], workers_required=3, constraint=[]
|
||||
),
|
||||
)
|
||||
|
||||
@@ -1079,7 +1079,7 @@ class TestNightUnavailable:
|
||||
#
|
||||
# self.Rota.add_shifts(
|
||||
# SingleShift(
|
||||
# ("group1",), "night_weekend", 12.5, days[5:], workers_required=3, constraints=["night"]
|
||||
# ("group1",), "night_weekend", 12.5, days[5:], workers_required=3, constraint=["night"]
|
||||
# ),
|
||||
# )
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user