.
This commit is contained in:
@@ -29,9 +29,9 @@ suspend_on_finish = True
|
|||||||
solve = True
|
solve = True
|
||||||
#time_to_run = 508500
|
#time_to_run = 508500
|
||||||
#time_to_run = 2660000
|
#time_to_run = 2660000
|
||||||
time_to_run = 5000
|
time_to_run = 100
|
||||||
#allow = 5000
|
#allow = 5000
|
||||||
ratio = 0.01
|
ratio = 0.41
|
||||||
#ratio = 0.9
|
#ratio = 0.9
|
||||||
|
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ start_date = datetime.date(2023, 9, 4)
|
|||||||
#start_date = start_date + datetime.timedelta(weeks=13)
|
#start_date = start_date + datetime.timedelta(weeks=13)
|
||||||
# start_date = datetime.date(2022, 10, 10)
|
# start_date = datetime.date(2022, 10, 10)
|
||||||
|
|
||||||
Rota = RotaBuilder(start_date, weeks_to_rota=14, balance_offset_modifier=1)
|
Rota = RotaBuilder(start_date, weeks_to_rota=10, balance_offset_modifier=1)
|
||||||
#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
|
||||||
Rota.constraint_options["max_night_frequency"] = 3 # 3
|
Rota.constraint_options["max_night_frequency"] = 3 # 3
|
||||||
|
|||||||
@@ -10,3 +10,4 @@ fastapi-sqlalchemy
|
|||||||
alembic
|
alembic
|
||||||
psycopg2
|
psycopg2
|
||||||
python-dotenv
|
python-dotenv
|
||||||
|
requests
|
||||||
+7
-1
@@ -307,9 +307,15 @@ class RotaBuilder(object):
|
|||||||
):
|
):
|
||||||
console.print("Setting up solver")
|
console.print("Setting up solver")
|
||||||
|
|
||||||
#solver = "scip"
|
solver = "scip"
|
||||||
|
|
||||||
if solver == "scip":
|
if solver == "scip":
|
||||||
|
if "seconds" in options:
|
||||||
|
options["limit/time"] = options.pop("seconds")
|
||||||
|
if "ratio" in options:
|
||||||
|
options["limit/gap"] = options.pop("ratio")
|
||||||
|
if "threads" in options:
|
||||||
|
options.pop("threads")
|
||||||
self.opt = SolverFactory(solver, executable="scip")
|
self.opt = SolverFactory(solver, executable="scip")
|
||||||
else:
|
else:
|
||||||
self.opt = SolverFactory(solver)
|
self.opt = SolverFactory(solver)
|
||||||
|
|||||||
Reference in New Issue
Block a user