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