From e04a0e95e96989f5e2e34a31c59d52ab1f31f9ca Mon Sep 17 00:00:00 2001 From: ZedongPeng Date: Sun, 12 May 2024 19:20:45 -0400 Subject: [PATCH] add warm_start_fixed_nlp config --- pyomo/contrib/mindtpy/algorithm_base_class.py | 5 ++++- pyomo/contrib/mindtpy/config_options.py | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pyomo/contrib/mindtpy/algorithm_base_class.py b/pyomo/contrib/mindtpy/algorithm_base_class.py index e015fc89e09..2a6ba052694 100644 --- a/pyomo/contrib/mindtpy/algorithm_base_class.py +++ b/pyomo/contrib/mindtpy/algorithm_base_class.py @@ -2663,7 +2663,10 @@ def initialize_subsolvers(self): set_solver_mipgap(self.mip_opt, config.mip_solver, config) set_solver_constraint_violation_tolerance( - self.nlp_opt, config.nlp_solver, config + self.nlp_opt, + config.nlp_solver, + config, + warm_start=config.warm_start_fixed_nlp, ) set_solver_constraint_violation_tolerance( self.feasibility_nlp_opt, config.nlp_solver, config, warm_start=False diff --git a/pyomo/contrib/mindtpy/config_options.py b/pyomo/contrib/mindtpy/config_options.py index 5d265e72cf6..a5b3e54844d 100644 --- a/pyomo/contrib/mindtpy/config_options.py +++ b/pyomo/contrib/mindtpy/config_options.py @@ -647,6 +647,14 @@ def _add_subsolver_configs(CONFIG): doc='Which MIP subsolver is going to be used for solving the regularization problem.', ), ) + CONFIG.declare( + 'warm_start_fixed_nlp', + ConfigValue( + default=True, + description='whether to warm start the fixed NLP subproblem.', + domain=bool, + ), + ) def _add_tolerance_configs(CONFIG):