Skip to content

Commit

Permalink
remove the support of greybox in LP/NLP gurobi
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedongPeng committed Sep 19, 2023
1 parent e461e93 commit 13a7213
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions pyomo/contrib/mindtpy/cut_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,18 @@ def add_oa_cuts_for_grey_box(
<= 0
)
# TODO: gurobi_persistent currently does not support greybox model.
if (
config.single_tree
and config.mip_solver == 'gurobi_persistent'
and mip_iter > 0
and cb_opt is not None
):
cb_opt.cbLazy(
target_model.MindtPy_utils.cuts.oa_cuts[
len(target_model.MindtPy_utils.cuts.oa_cuts)
]
)
# https://github.com/Pyomo/pyomo/issues/3000
# if (
# config.single_tree
# and config.mip_solver == 'gurobi_persistent'
# and mip_iter > 0
# and cb_opt is not None
# ):
# cb_opt.cbLazy(
# target_model.MindtPy_utils.cuts.oa_cuts[
# len(target_model.MindtPy_utils.cuts.oa_cuts)
# ]
# )


def add_ecp_cuts(
Expand Down

0 comments on commit 13a7213

Please sign in to comment.