Reorganize callbacks

This commit is contained in:
2021-04-10 09:04:34 -05:00
parent 6ac738beb4
commit 735884151d
5 changed files with 93 additions and 64 deletions

View File

@@ -98,10 +98,8 @@ class BasePyomoSolver(InternalSolver):
lazy_cb: Optional[LazyCallback] = None,
user_cut_cb: Optional[UserCutCallback] = None,
) -> MIPSolveStats:
if lazy_cb is not None:
raise Exception("lazy callback not currently supported")
if user_cut_cb is not None:
raise Exception("user cut callback not currently supported")
assert lazy_cb is None, "callbacks are not currently supported"
assert user_cut_cb is None, "callbacks are not currently supported"
total_wallclock_time = 0
streams: List[Any] = [StringIO()]
if tee:
@@ -413,6 +411,9 @@ class BasePyomoSolver(InternalSolver):
sense=sense,
)
def are_callbacks_supported(self) -> bool:
return False
class PyomoTestInstanceInfeasible(Instance):
@overrides