mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Fix various warnings
This commit is contained in:
@@ -284,7 +284,13 @@ class LearningSolver:
|
||||
|
||||
return stats
|
||||
|
||||
def parallel_solve(self, instances, n_jobs=4, label="Solve", output=[]):
|
||||
def parallel_solve(
|
||||
self,
|
||||
instances,
|
||||
n_jobs=4,
|
||||
label="Solve",
|
||||
output=None,
|
||||
):
|
||||
"""
|
||||
Solves multiple instances in parallel.
|
||||
|
||||
@@ -295,6 +301,12 @@ class LearningSolver:
|
||||
|
||||
Parameters
|
||||
----------
|
||||
output: [str] or None
|
||||
If instances are file names and output is provided, write the modified
|
||||
instances to these files, instead of replacing the original files. If
|
||||
output is None, discard modified instance.
|
||||
label: str
|
||||
Label to show in the progress bar.
|
||||
instances: [miplearn.Instance] or [str]
|
||||
The instances to be solved
|
||||
n_jobs: int
|
||||
@@ -308,6 +320,8 @@ class LearningSolver:
|
||||
[solver.solve(p) for p in instances]
|
||||
|
||||
"""
|
||||
if output is None:
|
||||
output = []
|
||||
self.internal_solver = None
|
||||
self._silence_miplearn_logger()
|
||||
SOLVER[0] = self
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
|
||||
# Released under the modified BSD license. See COPYING.md for more details.
|
||||
|
||||
import logging
|
||||
import re
|
||||
import sys
|
||||
import logging
|
||||
import pyomo
|
||||
from abc import abstractmethod
|
||||
from io import StringIO
|
||||
|
||||
import pyomo
|
||||
from pyomo import environ as pe
|
||||
from pyomo.core import Var, Constraint
|
||||
|
||||
|
||||
Reference in New Issue
Block a user