Skip to content

Commit

Permalink
improve deactivate baroncuts
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedong Peng committed Oct 27, 2023
1 parent 64881ad commit aaab118
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyomo/contrib/mindtpy/algorithm_base_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,8 @@ def init_rNLP(self, add_oa_cuts=True):
"""
config = self.config
self.rnlp = self.working_model.clone()
if config.use_baron_convexification:
self.rnlp.baroncuts.deactivate()
config.logger.debug('Relaxed NLP: Solve relaxed integrality')
MindtPy = self.rnlp.MindtPy_utils
TransformationFactory('core.relax_integer_vars').apply_to(self.rnlp)
Expand Down Expand Up @@ -2599,6 +2601,8 @@ def initialize_mip_problem(self):
)

self.fixed_nlp = self.working_model.clone()
if config.use_baron_convexification:
self.fixed_nlp.baroncuts.deactivate()
TransformationFactory('core.fix_integer_vars').apply_to(self.fixed_nlp)
initialize_feas_subproblem(self.fixed_nlp, config)

Expand Down

0 comments on commit aaab118

Please sign in to comment.