diff --git a/pyomo/contrib/mindtpy/algorithm_base_class.py b/pyomo/contrib/mindtpy/algorithm_base_class.py index 5547350ed44..bbcb8f5fc56 100644 --- a/pyomo/contrib/mindtpy/algorithm_base_class.py +++ b/pyomo/contrib/mindtpy/algorithm_base_class.py @@ -2950,7 +2950,7 @@ def MindtPy_iteration_loop(self): ) if self.curr_int_sol not in set(self.integer_list): # Call the NLP pre-solve callback - with time_code(self.timing, 'Call after subproblem solve'): + with time_code(self.timing, 'Call before subproblem solve'): config.call_before_subproblem_solve(self.fixed_nlp) fixed_nlp, fixed_nlp_result = self.solve_subproblem() @@ -2965,7 +2965,7 @@ def MindtPy_iteration_loop(self): # The constraint linearization happens in the handlers if not config.solution_pool: # Call the NLP pre-solve callback - with time_code(self.timing, 'Call after subproblem solve'): + with time_code(self.timing, 'Call before subproblem solve'): config.call_before_subproblem_solve(self.fixed_nlp) fixed_nlp, fixed_nlp_result = self.solve_subproblem() @@ -3002,7 +3002,7 @@ def MindtPy_iteration_loop(self): self.integer_list.append(self.curr_int_sol) # Call the NLP pre-solve callback - with time_code(self.timing, 'Call after subproblem solve'): + with time_code(self.timing, 'Call before subproblem solve'): config.call_before_subproblem_solve(self.fixed_nlp) fixed_nlp, fixed_nlp_result = self.solve_subproblem() diff --git a/pyomo/contrib/mindtpy/config_options.py b/pyomo/contrib/mindtpy/config_options.py index 019c6933d76..0d0b536525a 100644 --- a/pyomo/contrib/mindtpy/config_options.py +++ b/pyomo/contrib/mindtpy/config_options.py @@ -328,8 +328,8 @@ def _add_common_configs(CONFIG): ConfigValue( default=_DoNothing(), domain=None, - description='Function to be executed after every subproblem', - doc='Callback hook after a solution of the nonlinear subproblem.', + description='Function to be executed before every subproblem', + doc='Callback hook before a solution of the nonlinear subproblem.', ), ) CONFIG.declare( diff --git a/pyomo/contrib/mindtpy/single_tree.py b/pyomo/contrib/mindtpy/single_tree.py index bc0f5d3cf4f..6b501ef874d 100644 --- a/pyomo/contrib/mindtpy/single_tree.py +++ b/pyomo/contrib/mindtpy/single_tree.py @@ -774,7 +774,7 @@ def __call__(self): # solve subproblem # Call the NLP pre-solve callback - with time_code(mindtpy_solver.timing, 'Call after subproblem solve'): + with time_code(mindtpy_solver.timing, 'Call before subproblem solve'): config.call_before_subproblem_solve(mindtpy_solver.fixed_nlp) # The constraint linearization happens in the handlers fixed_nlp, fixed_nlp_result = mindtpy_solver.solve_subproblem() @@ -923,7 +923,7 @@ def LazyOACallback_gurobi(cb_m, cb_opt, cb_where, mindtpy_solver, config): # solve subproblem # Call the NLP pre-solve callback - with time_code(mindtpy_solver.timing, 'Call after subproblem solve'): + with time_code(mindtpy_solver.timing, 'Call before subproblem solve'): config.call_before_subproblem_solve(mindtpy_solver.fixed_nlp) # The constraint linearization happens in the handlers fixed_nlp, fixed_nlp_result = mindtpy_solver.solve_subproblem()