From 070eba785f1d2c10e447830a0db33d18f0df05ae Mon Sep 17 00:00:00 2001 From: Charlie Vanaret Date: Thu, 14 Nov 2024 15:31:31 +0100 Subject: [PATCH] Added filterslp preset (TR restoration filter SLP method) [skip ci] --- README.md | 2 +- uno/options/Presets.cpp | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 99172e00..9c48c202 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Uno implements the following strategies: **Any strategy combination** can be automatically generated without any programming effort from the user. Note that all combinations do not necessarily result in sensible algorithms, or even convergent approaches. For more details, check out our [preprint](https://www.researchgate.net/publication/381522383_Unifying_nonlinearly_constrained_nonconvex_optimization) or my [presentation at the ICCOPT 2022 conference](https://www.researchgate.net/publication/362254109). -Uno implements three **presets**, that is strategy combinations that correspond to existing solvers (as well as hyperparameter values found in their documentations): +Uno implements **presets**, that is strategy combinations that correspond to existing solvers (as well as hyperparameter values found in their documentations): * `filtersqp` mimics filterSQP (trust-region feasibility restoration filter SQP method); * `ipopt` mimics IPOPT (line-search feasibility restoration filter barrier method); * `byrd` mimics Byrd's S $\ell_1$ QP (line-search $\ell_1$ merit S $\ell_1$ QP method). diff --git a/uno/options/Presets.cpp b/uno/options/Presets.cpp index a2d3e5c2..035102a0 100644 --- a/uno/options/Presets.cpp +++ b/uno/options/Presets.cpp @@ -4,6 +4,7 @@ #include #include "Presets.hpp" #include "Options.hpp" +#include "solvers/LPSolverFactory.hpp" #include "solvers/QPSolverFactory.hpp" #include "solvers/SymmetricIndefiniteLinearSolverFactory.hpp" @@ -19,6 +20,7 @@ namespace uno { /** default preset **/ const auto QP_solvers = QPSolverFactory::available_solvers(); const auto linear_solvers = SymmetricIndefiniteLinearSolverFactory::available_solvers(); + const auto LP_solvers = LPSolverFactory::available_solvers(); if (not QP_solvers.empty()) { Presets::set(options, "filtersqp"); @@ -26,6 +28,9 @@ namespace uno { else if (not linear_solvers.empty()) { Presets::set(options, "ipopt"); } + else if (not LP_solvers.empty()) { + Presets::set(options, "filterslp"); + } // note: byrd is not very robust and is not considered as a default preset } return options; @@ -125,6 +130,24 @@ namespace uno { options["funnel_switching_infeasibility_exponent"] = "2"; options["funnel_update_strategy"] = "2"; } + else if (preset_name == "filterslp") { + options["constraint_relaxation_strategy"] = "feasibility_restoration"; + options["subproblem"] = "LP"; + options["globalization_mechanism"] = "TR"; + options["globalization_strategy"] = "fletcher_filter_method"; + options["filter_type"] = "standard"; + options["progress_norm"] = "L1"; + options["residual_norm"] = "L2"; + options["sparse_format"] = "CSC"; + options["TR_radius"] = "10"; + options["l1_constraint_violation_coefficient"] = "1."; + options["enforce_linear_constraints"] = "yes"; + options["tolerance"] = "1e-5"; + options["loose_tolerance"] = "1e-4"; + options["TR_min_radius"] = "1e-8"; + options["switch_to_optimality_requires_linearized_feasibility"] = "yes"; + options["protect_actual_reduction_against_roundoff"] = "no"; + } else { throw std::runtime_error("The preset " + preset_name + " is not known"); }