.
This commit is contained in:
@@ -9,18 +9,20 @@ from workers import Worker
|
||||
import datetime
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
use_neos = True
|
||||
use_cplex = True
|
||||
use_neos = False
|
||||
use_cplex = False
|
||||
solve = True
|
||||
|
||||
weeks_to_rota = 8
|
||||
weeks_to_rota = 26
|
||||
|
||||
time_to_run = 208500
|
||||
time_to_run = 158500
|
||||
#allow = 5000
|
||||
ratio = 0.4
|
||||
ratio = 0.05
|
||||
|
||||
use_live_rota = False
|
||||
suspend_on_finish = True
|
||||
|
||||
|
||||
sites = ("truro", "exeter", "torbay", "barnstaple", "plymouth", "proc", "truro no proc")
|
||||
@@ -29,7 +31,7 @@ Rota = RotaBuilder(datetime.date(2021, 9, 6),
|
||||
#Rota = RotaBuilder(datetime.date(2021, 12, 6),
|
||||
#Rota = RotaBuilder(datetime.date(2021, 11, 8),
|
||||
weeks_to_rota=weeks_to_rota,
|
||||
balance_offset_modifier=2,
|
||||
balance_offset_modifier=1,
|
||||
max_weekend_frequency=2,
|
||||
max_night_frequency=2)
|
||||
|
||||
@@ -82,17 +84,19 @@ Rota.add_shifts(
|
||||
12.5,
|
||||
days[4:],
|
||||
balance_offset=3,
|
||||
rota_on_nwds=False,
|
||||
rota_on_nwds=True,
|
||||
force_as_block=True,
|
||||
force_as_block_unless_nwd=True),
|
||||
#force_as_block_unless_nwd=True
|
||||
),
|
||||
SingleShift(("torbay", ),
|
||||
"weekend_torbay",
|
||||
12.5,
|
||||
days[4:],
|
||||
balance_offset=3,
|
||||
rota_on_nwds=False,
|
||||
rota_on_nwds=True,
|
||||
force_as_block=True,
|
||||
force_as_block_unless_nwd=True),
|
||||
#force_as_block_unless_nwd=True
|
||||
),
|
||||
SingleShift(("plymouth", ),
|
||||
"weekend_plymouth1",
|
||||
8,
|
||||
@@ -363,3 +367,6 @@ with open("test.html", "w") as f:
|
||||
f.write(ResultsHolder.get_worker_timetable_html(True))
|
||||
|
||||
ResultsHolder.export_rota_to_csv("rota")
|
||||
|
||||
if suspend_on_finish:
|
||||
os.system("systemctl suspend")
|
||||
Reference in New Issue
Block a user