mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-07 18:08:51 -06:00
Lazy: Simplify method signature; switch to AbstractModel
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# Released under the modified BSD license. See COPYING.md for more details.
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Optional, Dict
|
||||
from typing import Optional, Dict, Callable
|
||||
|
||||
import numpy as np
|
||||
|
||||
@@ -16,6 +16,10 @@ class AbstractModel(ABC):
|
||||
_supports_node_count = False
|
||||
_supports_solution_pool = False
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.lazy_enforce: Optional[Callable] = None
|
||||
self.lazy_separate: Optional[Callable] = None
|
||||
|
||||
@abstractmethod
|
||||
def add_constrs(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user