Skip to content

Commit

Permalink
Merge branch 'benchmark' into OA_convexification
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedong Peng committed Oct 27, 2023
2 parents aaab118 + 6bcdadb commit d9dd088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyomo/contrib/mindtpy/algorithm_base_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ def init_rNLP(self, add_oa_cuts=True):
subprob_terminate_cond = results.solver.termination_condition

# Sometimes, the NLP solver might be trapped in a infeasible solution if the objective function is nonlinear and partition_obj_nonlinear_terms is True. If this happens, we will use the original objective function instead.
if subprob_terminate_cond == tc.infeasible and config.partition_obj_nonlinear_terms:
if subprob_terminate_cond == tc.infeasible and config.partition_obj_nonlinear_terms and self.rnlp.MindtPy_utils.objective_list[0].expr.polynomial_degree() not in self.mip_objective_polynomial_degree:
config.logger.info(
'Initial relaxed NLP problem is infeasible. This might be related to partition_obj_nonlinear_terms. Try to solve it again without partitioning nonlinear objective function.')
self.rnlp.MindtPy_utils.objective.deactivate()
Expand Down

0 comments on commit d9dd088

Please sign in to comment.