mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-09 19:08:51 -06:00
Make extractor configurable
This commit is contained in:
@@ -132,23 +132,22 @@ class Sample:
|
||||
class FeaturesExtractor:
|
||||
def __init__(
|
||||
self,
|
||||
internal_solver: "InternalSolver",
|
||||
with_sa: bool = True,
|
||||
) -> None:
|
||||
self.solver = internal_solver
|
||||
self.with_sa = with_sa
|
||||
|
||||
def extract(
|
||||
self,
|
||||
instance: "Instance",
|
||||
solver: "InternalSolver",
|
||||
with_static: bool = True,
|
||||
) -> Features:
|
||||
features = Features()
|
||||
features.variables = self.solver.get_variables(
|
||||
features.variables = solver.get_variables(
|
||||
with_static=with_static,
|
||||
with_sa=self.with_sa,
|
||||
)
|
||||
features.constraints = self.solver.get_constraints(
|
||||
features.constraints = solver.get_constraints(
|
||||
with_static=with_static,
|
||||
)
|
||||
if with_static:
|
||||
|
||||
Reference in New Issue
Block a user