mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 01:18:52 -06:00
Cuts: Call set_cuts instead of setting cuts_aot_ directly
This commit is contained in:
@@ -110,5 +110,6 @@ class MemorizingCutsComponent(_BaseMemorizingConstrComponent):
|
||||
if model.cuts_enforce is None:
|
||||
return
|
||||
assert self.constrs_ is not None
|
||||
model.cuts_aot_ = self.predict("Predicting cutting planes...", test_h5)
|
||||
stats["Cuts: AOT"] = len(model.cuts_aot_)
|
||||
cuts = self.predict("Predicting cutting planes...", test_h5)
|
||||
model.set_cuts(cuts)
|
||||
stats["Cuts: AOT"] = len(cuts)
|
||||
|
||||
@@ -82,3 +82,6 @@ class AbstractModel(ABC):
|
||||
@abstractmethod
|
||||
def write(self, filename: str) -> None:
|
||||
pass
|
||||
|
||||
def set_cuts(self, cuts: List) -> None:
|
||||
self.cuts_aot_ = cuts
|
||||
|
||||
Reference in New Issue
Block a user