LearningSolver: add extract_sa, extract_lhs arguments

master
Alinson S. Xavier 4 years ago
parent 101bd94a5b
commit 5b4b8adee5
No known key found for this signature in database
GPG Key ID: DCA0DAD4D2F58624

@ -101,11 +101,16 @@ class LearningSolver:
solve_lp: bool = True,
simulate_perfect: bool = False,
extractor: Optional[FeaturesExtractor] = None,
extract_lhs: bool = True,
extract_sa: bool = True,
) -> None:
if solver is None:
solver = GurobiPyomoSolver()
if extractor is None:
extractor = FeaturesExtractor()
extractor = FeaturesExtractor(
with_sa=extract_sa,
with_lhs=extract_lhs,
)
assert isinstance(solver, InternalSolver)
self.components: Dict[str, Component] = {}
self.internal_solver: Optional[InternalSolver] = None

Loading…
Cancel
Save