Add more variable features

This commit is contained in:
2021-04-10 18:29:38 -05:00
parent 5e1f26e4b0
commit 733c8299e0
8 changed files with 331 additions and 61 deletions

View File

@@ -8,7 +8,7 @@ from typing import Any, Dict, List, Optional
from overrides import EnforceOverrides
from miplearn.features import Constraint
from miplearn.features import Constraint, Variable
from miplearn.instance.base import Instance
from miplearn.types import (
LPSolveStats,
@@ -247,9 +247,21 @@ class InternalSolver(ABC, EnforceOverrides):
"""
return False
@abstractmethod
def get_variables(self) -> Dict[str, Variable]:
pass
@abstractmethod
def get_constraint_attrs(self) -> List[str]:
"""
Returns a list of constraint attributes supported by this solver.
"""
pass
@abstractmethod
def get_variable_attrs(self) -> List[str]:
"""
Returns a list of variable attributes supported by this solver.
"""
pass