From 4037c3cc0b10e64225a30392c8fd4abe4fdb18e1 Mon Sep 17 00:00:00 2001 From: ZedongPeng Date: Mon, 20 May 2024 21:27:40 -0400 Subject: [PATCH] enable warmstart for ipopth --- pyomo/contrib/mindtpy/util.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pyomo/contrib/mindtpy/util.py b/pyomo/contrib/mindtpy/util.py index 4ff553e9907..225e2e24d42 100644 --- a/pyomo/contrib/mindtpy/util.py +++ b/pyomo/contrib/mindtpy/util.py @@ -602,16 +602,15 @@ def set_solver_constraint_violation_tolerance( 'constr_viol_tol ' + str(config.constraint_tolerance) ) if warm_start: - pass # Ipopt warmstart options - # opt.options['add_options'].append( - # 'warm_start_init_point yes\n' - # 'warm_start_bound_push 1e-9\n' - # 'warm_start_bound_frac 1e-9\n' - # 'warm_start_slack_bound_frac 1e-9\n' - # 'warm_start_slack_bound_push 1e-9\n' - # 'warm_start_mult_bound_push 1e-9\n' - # ) + opt.options['add_options'].append( + 'warm_start_init_point yes\n' + 'warm_start_bound_push 1e-9\n' + 'warm_start_bound_frac 1e-9\n' + 'warm_start_slack_bound_frac 1e-9\n' + 'warm_start_slack_bound_push 1e-9\n' + 'warm_start_mult_bound_push 1e-9\n' + ) elif config.nlp_solver_args['solver'] == 'conopt': opt.options['add_options'].append( 'RTNWMA ' + str(config.constraint_tolerance)