|
|
@ -44,6 +44,7 @@ class InternalSolver():
|
|
|
|
solution[str(var)][index] = var[index].value
|
|
|
|
solution[str(var)][index] = var[index].value
|
|
|
|
return solution
|
|
|
|
return solution
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GurobiSolver(InternalSolver):
|
|
|
|
class GurobiSolver(InternalSolver):
|
|
|
|
def __init__(self):
|
|
|
|
def __init__(self):
|
|
|
|
self.solver = pe.SolverFactory('gurobi_persistent')
|
|
|
|
self.solver = pe.SolverFactory('gurobi_persistent')
|
|
|
@ -128,7 +129,7 @@ class LearningSolver:
|
|
|
|
components=None,
|
|
|
|
components=None,
|
|
|
|
gap_tolerance=None,
|
|
|
|
gap_tolerance=None,
|
|
|
|
mode="exact",
|
|
|
|
mode="exact",
|
|
|
|
solver="cplex",
|
|
|
|
solver="gurobi",
|
|
|
|
threads=4,
|
|
|
|
threads=4,
|
|
|
|
time_limit=None,
|
|
|
|
time_limit=None,
|
|
|
|
):
|
|
|
|
):
|
|
|
|