Remove tuples from ConstraintFeatures

This commit is contained in:
2021-05-20 10:23:53 -05:00
parent f9ac65bf9c
commit c494f3e804
9 changed files with 139 additions and 147 deletions

View File

@@ -5,7 +5,7 @@
import logging
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Any, List, Optional, Tuple
from typing import Any, List, Optional, List
from miplearn.features import VariableFeatures, ConstraintFeatures
from miplearn.instance.base import Instance
@@ -59,7 +59,7 @@ class InternalSolver(ABC):
self,
cf: ConstraintFeatures,
tol: float = 1e-5,
) -> Tuple[bool, ...]:
) -> List[bool]:
"""
Checks whether the current solution satisfies the given constraints.
"""
@@ -176,7 +176,7 @@ class InternalSolver(ABC):
pass
@abstractmethod
def remove_constraints(self, names: Tuple[str, ...]) -> None:
def remove_constraints(self, names: List[str]) -> None:
"""
Removes the given constraints from the model.
"""