Implement preliminary version of static lazy component

This commit is contained in:
2020-09-23 14:27:17 -05:00
parent 27b2a1eef5
commit e731f46b72
5 changed files with 344 additions and 0 deletions

View File

@@ -8,6 +8,10 @@ from abc import ABC, abstractmethod
logger = logging.getLogger(__name__)
class ExtractedConstraint(ABC):
pass
class InternalSolver(ABC):
"""
Abstract class representing the MIP solver used internally by LearningSolver.
@@ -134,6 +138,27 @@ class InternalSolver(ABC):
"""
pass
# @abstractmethod
def get_constraint_names(self):
"""
Returns a list of strings, containing the name of each constraint in the
model.
"""
pass
# @abstractmethod
def extract_constraint(self, cname):
"""
Removes a given constraint from the model and returns an object `c` which
can be used to verify if the removed constraint is still satisfied by
the current solution, using `is_constraint_satisfied(c)`, and can potentially
be re-added to the model using `add_constraint(c)`.
"""
pass
def is_constraint_satisfied(self, c):
pass
@abstractmethod
def set_threads(self, threads):
pass