Skip to content

Commit

Permalink
add config check for load_solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedongPeng committed Sep 20, 2023
1 parent 8d7f6c5 commit 807e4f5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pyomo/contrib/mindtpy/algorithm_base_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,6 @@ def init_rNLP(self, add_oa_cuts=True):
nlp_args = dict(config.nlp_solver_args)
update_solver_timelimit(self.nlp_opt, config.nlp_solver, self.timing, config)
with SuppressInfeasibleWarning():
print('solving rnlp')
results = self.nlp_opt.solve(
self.rnlp,
tee=config.nlp_solver_tee,
Expand Down Expand Up @@ -2236,6 +2235,17 @@ def check_config(self):
config.logger.info("Solution pool does not support APPSI solver.")
config.mip_solver = 'cplex_persistent'

# related to https://github.com/Pyomo/pyomo/issues/2363
if (
'appsi' in config.mip_solver
or 'appsi' in config.nlp_solver
or (
config.mip_regularization_solver is not None
and 'appsi' in config.mip_regularization_solver
)
):
config.load_solutions = False

################################################################################################################################
# Feasibility Pump

Expand Down

0 comments on commit 807e4f5

Please sign in to comment.