diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a2747fa..2ed722c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,12 +52,12 @@ file(GLOB UNO_SOURCE_FILES uno/ingredients/inequality_handling_methods/*.cpp uno/ingredients/inequality_handling_methods/inequality_constrained_methods/*.cpp uno/ingredients/inequality_handling_methods/interior_point_methods/*.cpp + uno/ingredients/subproblems/*.cpp uno/model/*.cpp uno/optimization/*.cpp uno/options/*.cpp uno/preprocessing/*.cpp - uno/reformulation/*.cpp - uno/solvers/*.cpp + uno/ingredients/subproblem_solvers/*.cpp uno/tools/*.cpp ) @@ -115,14 +115,14 @@ else() endif() endif() if(HSL OR MA57) - list(APPEND UNO_SOURCE_FILES uno/solvers/MA57/MA57Solver.cpp) + list(APPEND UNO_SOURCE_FILES uno/ingredients/subproblem_solvers/MA57/MA57Solver.cpp) list(APPEND TESTS_UNO_SOURCE_FILES unotest/functional_tests/MA57SolverTests.cpp) find_package(BLAS REQUIRED) list(APPEND LIBRARIES ${BLAS_LIBRARIES}) endif() if(HSL OR MA27) - list(APPEND UNO_SOURCE_FILES uno/solvers/MA27/MA27Solver.cpp) + list(APPEND UNO_SOURCE_FILES uno/ingredients/subproblem_solvers/MA27/MA27Solver.cpp) list(APPEND TESTS_UNO_SOURCE_FILES unotest/functional_tests/MA27SolverTests.cpp) find_package(BLAS REQUIRED) @@ -142,7 +142,7 @@ find_library(BQPD bqpd) if(NOT BQPD) message(WARNING "Optional library BQPD was not found.") else() - list(APPEND UNO_SOURCE_FILES uno/solvers/BQPD/BQPDSolver.cpp uno/solvers/BQPD/wdotd.f) + list(APPEND UNO_SOURCE_FILES uno/ingredients/subproblem_solvers/BQPD/BQPDSolver.cpp uno/ingredients/subproblem_solvers/BQPD/wdotd.f) list(APPEND TESTS_UNO_SOURCE_FILES unotest/functional_tests/BQPDSolverTests.cpp) link_to_uno(bqpd ${BQPD}) endif() @@ -152,7 +152,7 @@ find_package(HIGHS) if(NOT HIGHS) message(WARNING "Optional library HiGHS was not found.") else() - list(APPEND UNO_SOURCE_FILES uno/solvers/HiGHS/HiGHSSolver.cpp) + list(APPEND UNO_SOURCE_FILES uno/ingredients/subproblem_solvers/HiGHS/HiGHSSolver.cpp) list(APPEND TESTS_UNO_SOURCE_FILES unotest/functional_tests/HiGHSSolverTests.cpp) link_to_uno(highs ${HIGHS}) list(APPEND LIBRARIES highs::highs) @@ -163,7 +163,7 @@ find_package(MUMPS) if(NOT MUMPS_LIBRARY) message(WARNING "Optional library MUMPS was not found.") else() - list(APPEND UNO_SOURCE_FILES uno/solvers/MUMPS/MUMPSSolver.cpp) + list(APPEND UNO_SOURCE_FILES uno/ingredients/subproblem_solvers/MUMPS/MUMPSSolver.cpp) list(APPEND TESTS_UNO_SOURCE_FILES unotest/functional_tests/MUMPSSolverTests.cpp) list(APPEND LIBRARIES ${MUMPS_LIBRARY} ${MUMPS_COMMON_LIBRARY} ${MUMPS_PORD_LIBRARY}) diff --git a/uno/Uno.cpp b/uno/Uno.cpp index c4af1081..db683db0 100644 --- a/uno/Uno.cpp +++ b/uno/Uno.cpp @@ -8,13 +8,13 @@ #include "ingredients/globalization_mechanisms/GlobalizationMechanismFactory.hpp" #include "ingredients/globalization_strategies/GlobalizationStrategyFactory.hpp" #include "ingredients/inequality_handling_methods/InequalityHandlingMethodFactory.hpp" +#include "ingredients/subproblem_solvers/QPSolverFactory.hpp" +#include "ingredients/subproblem_solvers/LPSolverFactory.hpp" +#include "ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolverFactory.hpp" #include "linear_algebra/Vector.hpp" #include "model/Model.hpp" #include "optimization/Iterate.hpp" #include "optimization/WarmstartInformation.hpp" -#include "solvers/QPSolverFactory.hpp" -#include "solvers/LPSolverFactory.hpp" -#include "solvers/SymmetricIndefiniteLinearSolverFactory.hpp" #include "tools/Logger.hpp" #include "optimization/OptimizationStatus.hpp" #include "options/Options.hpp" diff --git a/uno/ingredients/constraint_relaxation_strategies/ConstraintRelaxationStrategy.cpp b/uno/ingredients/constraint_relaxation_strategies/ConstraintRelaxationStrategy.cpp index 5c91485e..28f042de 100644 --- a/uno/ingredients/constraint_relaxation_strategies/ConstraintRelaxationStrategy.cpp +++ b/uno/ingredients/constraint_relaxation_strategies/ConstraintRelaxationStrategy.cpp @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project directory for details. #include "ConstraintRelaxationStrategy.hpp" +#include "OptimizationProblem.hpp" #include "ingredients/globalization_strategies/GlobalizationStrategy.hpp" #include "ingredients/globalization_strategies/GlobalizationStrategyFactory.hpp" #include "optimization/Direction.hpp" @@ -11,7 +12,6 @@ #include "model/Model.hpp" #include "optimization/Iterate.hpp" #include "optimization/Multipliers.hpp" -#include "reformulation/OptimizationProblem.hpp" #include "symbolic/VectorView.hpp" #include "symbolic/Expression.hpp" #include "options/Options.hpp" diff --git a/uno/reformulation/ElasticVariables.cpp b/uno/ingredients/constraint_relaxation_strategies/ElasticVariables.cpp similarity index 100% rename from uno/reformulation/ElasticVariables.cpp rename to uno/ingredients/constraint_relaxation_strategies/ElasticVariables.cpp diff --git a/uno/reformulation/ElasticVariables.hpp b/uno/ingredients/constraint_relaxation_strategies/ElasticVariables.hpp similarity index 96% rename from uno/reformulation/ElasticVariables.hpp rename to uno/ingredients/constraint_relaxation_strategies/ElasticVariables.hpp index 7c1c7c15..cc83765b 100644 --- a/uno/reformulation/ElasticVariables.hpp +++ b/uno/ingredients/constraint_relaxation_strategies/ElasticVariables.hpp @@ -30,4 +30,4 @@ namespace uno { }; } // namespace -#endif // UNO_ELASTICVARIABLES_H +#endif // UNO_ELASTICVARIABLES_H \ No newline at end of file diff --git a/uno/ingredients/constraint_relaxation_strategies/FeasibilityRestoration.hpp b/uno/ingredients/constraint_relaxation_strategies/FeasibilityRestoration.hpp index 26810bc3..f71f4fab 100644 --- a/uno/ingredients/constraint_relaxation_strategies/FeasibilityRestoration.hpp +++ b/uno/ingredients/constraint_relaxation_strategies/FeasibilityRestoration.hpp @@ -7,8 +7,8 @@ #include #include "ConstraintRelaxationStrategy.hpp" #include "ingredients/globalization_strategies/ProgressMeasures.hpp" -#include "reformulation/OptimalityProblem.hpp" -#include "reformulation/l1RelaxedProblem.hpp" +#include "OptimalityProblem.hpp" +#include "l1RelaxedProblem.hpp" namespace uno { enum class Phase {FEASIBILITY_RESTORATION = 1, OPTIMALITY = 2}; diff --git a/uno/reformulation/OptimalityProblem.cpp b/uno/ingredients/constraint_relaxation_strategies/OptimalityProblem.cpp similarity index 100% rename from uno/reformulation/OptimalityProblem.cpp rename to uno/ingredients/constraint_relaxation_strategies/OptimalityProblem.cpp diff --git a/uno/reformulation/OptimalityProblem.hpp b/uno/ingredients/constraint_relaxation_strategies/OptimalityProblem.hpp similarity index 98% rename from uno/reformulation/OptimalityProblem.hpp rename to uno/ingredients/constraint_relaxation_strategies/OptimalityProblem.hpp index 9f488dae..ba374d3a 100644 --- a/uno/reformulation/OptimalityProblem.hpp +++ b/uno/ingredients/constraint_relaxation_strategies/OptimalityProblem.hpp @@ -37,4 +37,4 @@ namespace uno { }; } // namespace -#endif // UNO_OPTIMALITYPROBLEM_H +#endif // UNO_OPTIMALITYPROBLEM_H \ No newline at end of file diff --git a/uno/reformulation/OptimizationProblem.cpp b/uno/ingredients/constraint_relaxation_strategies/OptimizationProblem.cpp similarity index 100% rename from uno/reformulation/OptimizationProblem.cpp rename to uno/ingredients/constraint_relaxation_strategies/OptimizationProblem.cpp diff --git a/uno/reformulation/OptimizationProblem.hpp b/uno/ingredients/constraint_relaxation_strategies/OptimizationProblem.hpp similarity index 100% rename from uno/reformulation/OptimizationProblem.hpp rename to uno/ingredients/constraint_relaxation_strategies/OptimizationProblem.hpp diff --git a/uno/ingredients/constraint_relaxation_strategies/l1Relaxation.hpp b/uno/ingredients/constraint_relaxation_strategies/l1Relaxation.hpp index e3635d0c..387b9ddc 100644 --- a/uno/ingredients/constraint_relaxation_strategies/l1Relaxation.hpp +++ b/uno/ingredients/constraint_relaxation_strategies/l1Relaxation.hpp @@ -8,7 +8,7 @@ #include "ConstraintRelaxationStrategy.hpp" #include "ingredients/globalization_strategies/ProgressMeasures.hpp" #include "optimization/Multipliers.hpp" -#include "reformulation/l1RelaxedProblem.hpp" +#include "l1RelaxedProblem.hpp" namespace uno { struct l1RelaxationParameters { diff --git a/uno/reformulation/l1RelaxedProblem.cpp b/uno/ingredients/constraint_relaxation_strategies/l1RelaxedProblem.cpp similarity index 100% rename from uno/reformulation/l1RelaxedProblem.cpp rename to uno/ingredients/constraint_relaxation_strategies/l1RelaxedProblem.cpp diff --git a/uno/reformulation/l1RelaxedProblem.hpp b/uno/ingredients/constraint_relaxation_strategies/l1RelaxedProblem.hpp similarity index 100% rename from uno/reformulation/l1RelaxedProblem.hpp rename to uno/ingredients/constraint_relaxation_strategies/l1RelaxedProblem.hpp diff --git a/uno/ingredients/hessian_models/ConvexifiedHessian.cpp b/uno/ingredients/hessian_models/ConvexifiedHessian.cpp index fe5a532d..a508f80f 100644 --- a/uno/ingredients/hessian_models/ConvexifiedHessian.cpp +++ b/uno/ingredients/hessian_models/ConvexifiedHessian.cpp @@ -4,12 +4,11 @@ #include #include "ConvexifiedHessian.hpp" #include "ingredients/hessian_models/UnstableRegularization.hpp" -#include "reformulation/OptimizationProblem.hpp" -#include "solvers/DirectSymmetricIndefiniteLinearSolver.hpp" -#include "solvers/SymmetricIndefiniteLinearSolverFactory.hpp" +#include "ingredients/constraint_relaxation_strategies/OptimizationProblem.hpp" +#include "ingredients/subproblem_solvers/DirectSymmetricIndefiniteLinearSolver.hpp" +#include "ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolverFactory.hpp" #include "tools/Logger.hpp" #include "options/Options.hpp" -#include "tools/Infinity.hpp" #include "tools/Statistics.hpp" namespace uno { diff --git a/uno/ingredients/hessian_models/ExactHessian.cpp b/uno/ingredients/hessian_models/ExactHessian.cpp index 16886885..6299c2e4 100644 --- a/uno/ingredients/hessian_models/ExactHessian.cpp +++ b/uno/ingredients/hessian_models/ExactHessian.cpp @@ -2,7 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project directory for details. #include "ExactHessian.hpp" -#include "reformulation/OptimizationProblem.hpp" +#include "ingredients/constraint_relaxation_strategies/OptimizationProblem.hpp" #include "options/Options.hpp" namespace uno { diff --git a/uno/ingredients/hessian_models/HessianModelFactory.cpp b/uno/ingredients/hessian_models/HessianModelFactory.cpp index a7ee8cde..f679b6fa 100644 --- a/uno/ingredients/hessian_models/HessianModelFactory.cpp +++ b/uno/ingredients/hessian_models/HessianModelFactory.cpp @@ -6,7 +6,7 @@ #include "ConvexifiedHessian.hpp" #include "ExactHessian.hpp" #include "ZeroHessian.hpp" -#include "solvers/DirectSymmetricIndefiniteLinearSolver.hpp" +#include "ingredients/subproblem_solvers/DirectSymmetricIndefiniteLinearSolver.hpp" namespace uno { std::unique_ptr HessianModelFactory::create(const std::string& hessian_model, size_t dimension, size_t maximum_number_nonzeros, diff --git a/uno/ingredients/hessian_models/ZeroHessian.cpp b/uno/ingredients/hessian_models/ZeroHessian.cpp index ab4e80ae..63522a3e 100644 --- a/uno/ingredients/hessian_models/ZeroHessian.cpp +++ b/uno/ingredients/hessian_models/ZeroHessian.cpp @@ -2,7 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project directory for details. #include "ZeroHessian.hpp" -#include "reformulation/OptimizationProblem.hpp" +#include "ingredients/constraint_relaxation_strategies/OptimizationProblem.hpp" #include "options/Options.hpp" namespace uno { diff --git a/uno/ingredients/inequality_handling_methods/InequalityHandlingMethodFactory.cpp b/uno/ingredients/inequality_handling_methods/InequalityHandlingMethodFactory.cpp index 727955bb..90adc019 100644 --- a/uno/ingredients/inequality_handling_methods/InequalityHandlingMethodFactory.cpp +++ b/uno/ingredients/inequality_handling_methods/InequalityHandlingMethodFactory.cpp @@ -7,8 +7,8 @@ #include "inequality_constrained_methods/QPSubproblem.hpp" #include "inequality_constrained_methods/LPSubproblem.hpp" #include "interior_point_methods/PrimalDualInteriorPointMethod.hpp" -#include "solvers/QPSolverFactory.hpp" -#include "solvers/SymmetricIndefiniteLinearSolverFactory.hpp" +#include "ingredients/subproblem_solvers/QPSolverFactory.hpp" +#include "ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolverFactory.hpp" #include "options/Options.hpp" namespace uno { diff --git a/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/InequalityConstrainedMethod.cpp b/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/InequalityConstrainedMethod.cpp index f0cab785..1c0127ca 100644 --- a/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/InequalityConstrainedMethod.cpp +++ b/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/InequalityConstrainedMethod.cpp @@ -5,7 +5,7 @@ #include "optimization/Direction.hpp" #include "optimization/Iterate.hpp" #include "linear_algebra/Vector.hpp" -#include "reformulation/l1RelaxedProblem.hpp" +#include "ingredients/constraint_relaxation_strategies/l1RelaxedProblem.hpp" #include "options/Options.hpp" #include "symbolic/VectorView.hpp" diff --git a/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/LPSubproblem.cpp b/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/LPSubproblem.cpp index 7d3c9298..1eb691c7 100644 --- a/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/LPSubproblem.cpp +++ b/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/LPSubproblem.cpp @@ -4,9 +4,9 @@ #include "LPSubproblem.hpp" #include "optimization/Direction.hpp" #include "optimization/WarmstartInformation.hpp" -#include "reformulation/OptimizationProblem.hpp" -#include "solvers/LPSolver.hpp" -#include "solvers/LPSolverFactory.hpp" +#include "ingredients/constraint_relaxation_strategies/OptimizationProblem.hpp" +#include "ingredients/subproblem_solvers/LPSolver.hpp" +#include "ingredients/subproblem_solvers/LPSolverFactory.hpp" #include "options/Options.hpp" namespace uno { diff --git a/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/QPSubproblem.cpp b/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/QPSubproblem.cpp index fdba8a54..812070c8 100644 --- a/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/QPSubproblem.cpp +++ b/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/QPSubproblem.cpp @@ -3,15 +3,13 @@ #include "QPSubproblem.hpp" #include "optimization/Direction.hpp" -#include "ingredients/hessian_models/HessianModelFactory.hpp" -#include "linear_algebra/SymmetricMatrix.hpp" #include "optimization/Iterate.hpp" #include "optimization/WarmstartInformation.hpp" #include "preprocessing/Preprocessing.hpp" -#include "reformulation/OptimizationProblem.hpp" -#include "solvers/DirectSymmetricIndefiniteLinearSolver.hpp" -#include "solvers/QPSolver.hpp" -#include "solvers/QPSolverFactory.hpp" +#include "ingredients/constraint_relaxation_strategies/OptimizationProblem.hpp" +#include "ingredients/subproblem_solvers/DirectSymmetricIndefiniteLinearSolver.hpp" +#include "ingredients/subproblem_solvers/QPSolver.hpp" +#include "ingredients/subproblem_solvers/QPSolverFactory.hpp" #include "options/Options.hpp" #include "tools/Statistics.hpp" diff --git a/uno/ingredients/inequality_handling_methods/interior_point_methods/BarrierParameterUpdateStrategy.cpp b/uno/ingredients/inequality_handling_methods/interior_point_methods/BarrierParameterUpdateStrategy.cpp index 7cb67a6d..74d14b84 100644 --- a/uno/ingredients/inequality_handling_methods/interior_point_methods/BarrierParameterUpdateStrategy.cpp +++ b/uno/ingredients/inequality_handling_methods/interior_point_methods/BarrierParameterUpdateStrategy.cpp @@ -5,7 +5,7 @@ #include #include "BarrierParameterUpdateStrategy.hpp" #include "optimization/Iterate.hpp" -#include "reformulation/OptimizationProblem.hpp" +#include "ingredients/constraint_relaxation_strategies/OptimizationProblem.hpp" #include "symbolic/VectorExpression.hpp" #include "tools/Logger.hpp" #include "options/Options.hpp" diff --git a/uno/ingredients/inequality_handling_methods/interior_point_methods/PrimalDualInteriorPointMethod.cpp b/uno/ingredients/inequality_handling_methods/interior_point_methods/PrimalDualInteriorPointMethod.cpp index 1fbddff7..63aefb2c 100644 --- a/uno/ingredients/inequality_handling_methods/interior_point_methods/PrimalDualInteriorPointMethod.cpp +++ b/uno/ingredients/inequality_handling_methods/interior_point_methods/PrimalDualInteriorPointMethod.cpp @@ -4,15 +4,14 @@ #include #include "PrimalDualInteriorPointMethod.hpp" #include "PrimalDualInteriorPointProblem.hpp" +#include "ingredients/constraint_relaxation_strategies/l1RelaxedProblem.hpp" +#include "ingredients/subproblem_solvers/DirectSymmetricIndefiniteLinearSolver.hpp" +#include "ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolverFactory.hpp" +#include "linear_algebra/SparseStorageFactory.hpp" #include "optimization/Direction.hpp" #include "optimization/Iterate.hpp" -#include "ingredients/hessian_models/HessianModelFactory.hpp" -#include "linear_algebra/SparseStorageFactory.hpp" -#include "solvers/DirectSymmetricIndefiniteLinearSolver.hpp" -#include "solvers/SymmetricIndefiniteLinearSolverFactory.hpp" #include "optimization/WarmstartInformation.hpp" #include "preprocessing/Preprocessing.hpp" -#include "reformulation/l1RelaxedProblem.hpp" #include "symbolic/VectorView.hpp" #include "tools/Infinity.hpp" @@ -187,7 +186,7 @@ namespace uno { // check the inertia [[maybe_unused]] auto [number_pos_eigenvalues, number_neg_eigenvalues, number_zero_eigenvalues] = this->linear_solver->get_inertia(); - assert(number_pos_eigenvalues == problem.number_variables && number_neg_eigenvalues == problem.number_constraints && number_zero_eigenvalues == 0); + assert(number_pos_eigenvalues == number_variables && number_neg_eigenvalues == number_constraints && number_zero_eigenvalues == 0); // rhs this->assemble_augmented_rhs(current_multipliers, number_variables, number_constraints); diff --git a/uno/ingredients/inequality_handling_methods/interior_point_methods/PrimalDualInteriorPointProblem.hpp b/uno/ingredients/inequality_handling_methods/interior_point_methods/PrimalDualInteriorPointProblem.hpp index 6416f952..d909a6a6 100644 --- a/uno/ingredients/inequality_handling_methods/interior_point_methods/PrimalDualInteriorPointProblem.hpp +++ b/uno/ingredients/inequality_handling_methods/interior_point_methods/PrimalDualInteriorPointProblem.hpp @@ -4,7 +4,7 @@ #ifndef UNO_PRIMALDUALINTERIORPOINTPROBLEM_H #define UNO_PRIMALDUALINTERIORPOINTPROBLEM_H -#include "reformulation/OptimizationProblem.hpp" +#include "ingredients/constraint_relaxation_strategies/OptimizationProblem.hpp" namespace uno { class PrimalDualInteriorPointProblem : public OptimizationProblem { diff --git a/uno/solvers/BQPD/BQPDSolver.cpp b/uno/ingredients/subproblem_solvers/BQPD/BQPDSolver.cpp similarity index 100% rename from uno/solvers/BQPD/BQPDSolver.cpp rename to uno/ingredients/subproblem_solvers/BQPD/BQPDSolver.cpp diff --git a/uno/solvers/BQPD/BQPDSolver.hpp b/uno/ingredients/subproblem_solvers/BQPD/BQPDSolver.hpp similarity index 98% rename from uno/solvers/BQPD/BQPDSolver.hpp rename to uno/ingredients/subproblem_solvers/BQPD/BQPDSolver.hpp index 0304f517..87cf064e 100644 --- a/uno/solvers/BQPD/BQPDSolver.hpp +++ b/uno/ingredients/subproblem_solvers/BQPD/BQPDSolver.hpp @@ -8,7 +8,7 @@ #include #include "ingredients/subproblems/SubproblemStatus.hpp" #include "linear_algebra/Vector.hpp" -#include "solvers/QPSolver.hpp" +#include "ingredients/subproblem_solvers/QPSolver.hpp" namespace uno { // forward declaration diff --git a/uno/solvers/BQPD/wdotd.f b/uno/ingredients/subproblem_solvers/BQPD/wdotd.f similarity index 100% rename from uno/solvers/BQPD/wdotd.f rename to uno/ingredients/subproblem_solvers/BQPD/wdotd.f diff --git a/uno/solvers/DirectSymmetricIndefiniteLinearSolver.hpp b/uno/ingredients/subproblem_solvers/DirectSymmetricIndefiniteLinearSolver.hpp similarity index 95% rename from uno/solvers/DirectSymmetricIndefiniteLinearSolver.hpp rename to uno/ingredients/subproblem_solvers/DirectSymmetricIndefiniteLinearSolver.hpp index df5ed7c9..e08d449f 100644 --- a/uno/solvers/DirectSymmetricIndefiniteLinearSolver.hpp +++ b/uno/ingredients/subproblem_solvers/DirectSymmetricIndefiniteLinearSolver.hpp @@ -4,7 +4,7 @@ #ifndef UNO_DIRECTSYMMETRICINDEFINITELINEARSOLVER_H #define UNO_DIRECTSYMMETRICINDEFINITELINEARSOLVER_H -#include "solvers/SymmetricIndefiniteLinearSolver.hpp" +#include "SymmetricIndefiniteLinearSolver.hpp" namespace uno { template diff --git a/uno/solvers/HiGHS/HiGHSSolver.cpp b/uno/ingredients/subproblem_solvers/HiGHS/HiGHSSolver.cpp similarity index 100% rename from uno/solvers/HiGHS/HiGHSSolver.cpp rename to uno/ingredients/subproblem_solvers/HiGHS/HiGHSSolver.cpp diff --git a/uno/solvers/HiGHS/HiGHSSolver.hpp b/uno/ingredients/subproblem_solvers/HiGHS/HiGHSSolver.hpp similarity index 96% rename from uno/solvers/HiGHS/HiGHSSolver.hpp rename to uno/ingredients/subproblem_solvers/HiGHS/HiGHSSolver.hpp index 5f78285b..277e9b63 100644 --- a/uno/solvers/HiGHS/HiGHSSolver.hpp +++ b/uno/ingredients/subproblem_solvers/HiGHS/HiGHSSolver.hpp @@ -1,7 +1,7 @@ #ifndef UNO_HIGHSSOLVER_H #define UNO_HIGHSSOLVER_H -#include "solvers/LPSolver.hpp" +#include "ingredients/subproblem_solvers/LPSolver.hpp" #include "Highs.h" namespace uno { diff --git a/uno/solvers/LPSolver.hpp b/uno/ingredients/subproblem_solvers/LPSolver.hpp similarity index 100% rename from uno/solvers/LPSolver.hpp rename to uno/ingredients/subproblem_solvers/LPSolver.hpp diff --git a/uno/solvers/LPSolverFactory.cpp b/uno/ingredients/subproblem_solvers/LPSolverFactory.cpp similarity index 93% rename from uno/solvers/LPSolverFactory.cpp rename to uno/ingredients/subproblem_solvers/LPSolverFactory.cpp index 528b85a6..d17bb1b6 100644 --- a/uno/solvers/LPSolverFactory.cpp +++ b/uno/ingredients/subproblem_solvers/LPSolverFactory.cpp @@ -5,13 +5,13 @@ #include "LPSolverFactory.hpp" #include "linear_algebra/Vector.hpp" #include "options/Options.hpp" -#include "solvers/LPSolver.hpp" +#include "LPSolver.hpp" #ifdef HAS_BQPD -#include "solvers/BQPD/BQPDSolver.hpp" +#include "ingredients/subproblem_solvers/BQPD/BQPDSolver.hpp" #endif #ifdef HAS_HIGHS -#include "solvers/HiGHS/HiGHSSolver.hpp" +#include "ingredients/subproblem_solvers/HiGHS/HiGHSSolver.hpp" #endif namespace uno { diff --git a/uno/solvers/LPSolverFactory.hpp b/uno/ingredients/subproblem_solvers/LPSolverFactory.hpp similarity index 100% rename from uno/solvers/LPSolverFactory.hpp rename to uno/ingredients/subproblem_solvers/LPSolverFactory.hpp diff --git a/uno/solvers/MA27/MA27Solver.cpp b/uno/ingredients/subproblem_solvers/MA27/MA27Solver.cpp similarity index 100% rename from uno/solvers/MA27/MA27Solver.cpp rename to uno/ingredients/subproblem_solvers/MA27/MA27Solver.cpp diff --git a/uno/solvers/MA27/MA27Solver.hpp b/uno/ingredients/subproblem_solvers/MA27/MA27Solver.hpp similarity index 97% rename from uno/solvers/MA27/MA27Solver.hpp rename to uno/ingredients/subproblem_solvers/MA27/MA27Solver.hpp index 59895648..12bb5c4f 100644 --- a/uno/solvers/MA27/MA27Solver.hpp +++ b/uno/ingredients/subproblem_solvers/MA27/MA27Solver.hpp @@ -6,7 +6,7 @@ #include #include -#include "solvers/DirectSymmetricIndefiniteLinearSolver.hpp" +#include "../DirectSymmetricIndefiniteLinearSolver.hpp" namespace uno { // forward declaration diff --git a/uno/solvers/MA57/MA57Solver.cpp b/uno/ingredients/subproblem_solvers/MA57/MA57Solver.cpp similarity index 100% rename from uno/solvers/MA57/MA57Solver.cpp rename to uno/ingredients/subproblem_solvers/MA57/MA57Solver.cpp diff --git a/uno/solvers/MA57/MA57Solver.hpp b/uno/ingredients/subproblem_solvers/MA57/MA57Solver.hpp similarity index 96% rename from uno/solvers/MA57/MA57Solver.hpp rename to uno/ingredients/subproblem_solvers/MA57/MA57Solver.hpp index 33f9c524..31d1d17f 100644 --- a/uno/solvers/MA57/MA57Solver.hpp +++ b/uno/ingredients/subproblem_solvers/MA57/MA57Solver.hpp @@ -6,7 +6,7 @@ #include #include -#include "solvers/DirectSymmetricIndefiniteLinearSolver.hpp" +#include "ingredients/subproblem_solvers/DirectSymmetricIndefiniteLinearSolver.hpp" namespace uno { // forward declaration diff --git a/uno/solvers/MUMPS/MUMPSSolver.cpp b/uno/ingredients/subproblem_solvers/MUMPS/MUMPSSolver.cpp similarity index 100% rename from uno/solvers/MUMPS/MUMPSSolver.cpp rename to uno/ingredients/subproblem_solvers/MUMPS/MUMPSSolver.cpp diff --git a/uno/solvers/MUMPS/MUMPSSolver.hpp b/uno/ingredients/subproblem_solvers/MUMPS/MUMPSSolver.hpp similarity index 96% rename from uno/solvers/MUMPS/MUMPSSolver.hpp rename to uno/ingredients/subproblem_solvers/MUMPS/MUMPSSolver.hpp index da7ebd98..b18f18d1 100644 --- a/uno/solvers/MUMPS/MUMPSSolver.hpp +++ b/uno/ingredients/subproblem_solvers/MUMPS/MUMPSSolver.hpp @@ -5,7 +5,7 @@ #define UNO_MUMPSSOLVER_H #include -#include "solvers/DirectSymmetricIndefiniteLinearSolver.hpp" +#include "../DirectSymmetricIndefiniteLinearSolver.hpp" #include "dmumps_c.h" namespace uno { diff --git a/uno/solvers/QPSolver.hpp b/uno/ingredients/subproblem_solvers/QPSolver.hpp similarity index 98% rename from uno/solvers/QPSolver.hpp rename to uno/ingredients/subproblem_solvers/QPSolver.hpp index fb1e93c0..e63f74ad 100644 --- a/uno/solvers/QPSolver.hpp +++ b/uno/ingredients/subproblem_solvers/QPSolver.hpp @@ -5,7 +5,7 @@ #define UNO_QPSOLVER_H #include -#include "solvers/LPSolver.hpp" +#include "LPSolver.hpp" namespace uno { // forward declarations diff --git a/uno/solvers/QPSolverFactory.cpp b/uno/ingredients/subproblem_solvers/QPSolverFactory.cpp similarity index 95% rename from uno/solvers/QPSolverFactory.cpp rename to uno/ingredients/subproblem_solvers/QPSolverFactory.cpp index ea71c71c..5cb00424 100644 --- a/uno/solvers/QPSolverFactory.cpp +++ b/uno/ingredients/subproblem_solvers/QPSolverFactory.cpp @@ -5,10 +5,10 @@ #include "QPSolverFactory.hpp" #include "linear_algebra/Vector.hpp" #include "options/Options.hpp" -#include "solvers/QPSolver.hpp" +#include "QPSolver.hpp" #ifdef HAS_BQPD -#include "solvers/BQPD/BQPDSolver.hpp" +#include "ingredients/subproblem_solvers/BQPD/BQPDSolver.hpp" #endif namespace uno { diff --git a/uno/solvers/QPSolverFactory.hpp b/uno/ingredients/subproblem_solvers/QPSolverFactory.hpp similarity index 100% rename from uno/solvers/QPSolverFactory.hpp rename to uno/ingredients/subproblem_solvers/QPSolverFactory.hpp diff --git a/uno/solvers/SymmetricIndefiniteLinearSolver.hpp b/uno/ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolver.hpp similarity index 100% rename from uno/solvers/SymmetricIndefiniteLinearSolver.hpp rename to uno/ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolver.hpp diff --git a/uno/solvers/SymmetricIndefiniteLinearSolverFactory.cpp b/uno/ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolverFactory.cpp similarity index 93% rename from uno/solvers/SymmetricIndefiniteLinearSolverFactory.cpp rename to uno/ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolverFactory.cpp index 1d83c324..89e1b9df 100644 --- a/uno/solvers/SymmetricIndefiniteLinearSolverFactory.cpp +++ b/uno/ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolverFactory.cpp @@ -9,11 +9,11 @@ #include "options/Options.hpp" #if defined(HAS_HSL) || defined(HAS_MA57) -#include "solvers/MA57/MA57Solver.hpp" +#include "ingredients/subproblem_solvers/MA57/MA57Solver.hpp" #endif #if defined(HAS_HSL) || defined(HAS_MA27) -#include "solvers/MA27/MA27Solver.hpp" +#include "ingredients/subproblem_solvers/MA27/MA27Solver.hpp" #endif #ifdef HAS_HSL @@ -25,7 +25,7 @@ namespace uno { #endif #ifdef HAS_MUMPS -#include "solvers/MUMPS/MUMPSSolver.hpp" +#include "ingredients/subproblem_solvers/MUMPS/MUMPSSolver.hpp" #endif namespace uno { diff --git a/uno/solvers/SymmetricIndefiniteLinearSolverFactory.hpp b/uno/ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolverFactory.hpp similarity index 100% rename from uno/solvers/SymmetricIndefiniteLinearSolverFactory.hpp rename to uno/ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolverFactory.hpp diff --git a/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp b/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp index 700ed50c..ed2e3f30 100644 --- a/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp +++ b/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp @@ -9,8 +9,8 @@ #include "SparseStorageFactory.hpp" #include "RectangularMatrix.hpp" #include "ingredients/hessian_models/UnstableRegularization.hpp" +#include "ingredients/subproblem_solvers/DirectSymmetricIndefiniteLinearSolver.hpp" #include "model/Model.hpp" -#include "solvers/DirectSymmetricIndefiniteLinearSolver.hpp" #include "options/Options.hpp" #include "tools/Statistics.hpp" diff --git a/uno/options/DefaultOptions.cpp b/uno/options/DefaultOptions.cpp index 3088bb5c..348e023a 100644 --- a/uno/options/DefaultOptions.cpp +++ b/uno/options/DefaultOptions.cpp @@ -2,9 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project directory for details. #include "DefaultOptions.hpp" -#include "solvers/QPSolverFactory.hpp" -#include "solvers/LPSolverFactory.hpp" -#include "solvers/SymmetricIndefiniteLinearSolverFactory.hpp" +#include "ingredients/subproblem_solvers/QPSolverFactory.hpp" +#include "ingredients/subproblem_solvers/LPSolverFactory.hpp" +#include "ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolverFactory.hpp" namespace uno { Options DefaultOptions::load() { diff --git a/uno/options/Presets.cpp b/uno/options/Presets.cpp index 369271a0..a5086fcd 100644 --- a/uno/options/Presets.cpp +++ b/uno/options/Presets.cpp @@ -4,9 +4,9 @@ #include #include "Presets.hpp" #include "Options.hpp" -#include "solvers/LPSolverFactory.hpp" -#include "solvers/QPSolverFactory.hpp" -#include "solvers/SymmetricIndefiniteLinearSolverFactory.hpp" +#include "ingredients/subproblem_solvers/LPSolverFactory.hpp" +#include "ingredients/subproblem_solvers/QPSolverFactory.hpp" +#include "ingredients/subproblem_solvers/SymmetricIndefiniteLinearSolverFactory.hpp" namespace uno { Options Presets::get_preset_options(const std::optional& optional_preset) { diff --git a/uno/preprocessing/Preprocessing.cpp b/uno/preprocessing/Preprocessing.cpp index 00584c19..1221e296 100644 --- a/uno/preprocessing/Preprocessing.cpp +++ b/uno/preprocessing/Preprocessing.cpp @@ -2,14 +2,14 @@ // Licensed under the MIT license. See LICENSE file in the project directory for details. #include "Preprocessing.hpp" -#include "optimization/Direction.hpp" +#include "ingredients/subproblem_solvers/DirectSymmetricIndefiniteLinearSolver.hpp" +#include "ingredients/subproblem_solvers/QPSolver.hpp" #include "linear_algebra/SymmetricMatrix.hpp" #include "linear_algebra/RectangularMatrix.hpp" #include "model/Model.hpp" +#include "optimization/Direction.hpp" #include "optimization/Iterate.hpp" #include "optimization/WarmstartInformation.hpp" -#include "solvers/DirectSymmetricIndefiniteLinearSolver.hpp" -#include "solvers/QPSolver.hpp" #include "symbolic/VectorView.hpp" namespace uno { diff --git a/unotest/functional_tests/BQPDSolverTests.cpp b/unotest/functional_tests/BQPDSolverTests.cpp index 28c4996e..69b4b55d 100644 --- a/unotest/functional_tests/BQPDSolverTests.cpp +++ b/unotest/functional_tests/BQPDSolverTests.cpp @@ -2,13 +2,13 @@ // Licensed under the MIT license. See LICENSE file in the project directory for details. #include -#include "optimization/Direction.hpp" +#include "ingredients/subproblem_solvers/BQPD/BQPDSolver.hpp" #include "linear_algebra/RectangularMatrix.hpp" #include "linear_algebra/SparseVector.hpp" #include "linear_algebra/SymmetricMatrix.hpp" +#include "optimization/Direction.hpp" #include "optimization/WarmstartInformation.hpp" #include "options/Options.hpp" -#include "solvers/BQPD/BQPDSolver.hpp" #include "tools/Infinity.hpp" using namespace uno; diff --git a/unotest/functional_tests/HiGHSSolverTests.cpp b/unotest/functional_tests/HiGHSSolverTests.cpp index de7aea69..0381ee94 100644 --- a/unotest/functional_tests/HiGHSSolverTests.cpp +++ b/unotest/functional_tests/HiGHSSolverTests.cpp @@ -2,12 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project directory for details. #include -#include "optimization/Direction.hpp" +#include "ingredients/subproblem_solvers/HiGHS/HiGHSSolver.hpp" #include "linear_algebra/RectangularMatrix.hpp" #include "linear_algebra/SparseVector.hpp" +#include "optimization/Direction.hpp" #include "optimization/WarmstartInformation.hpp" #include "options/Options.hpp" -#include "solvers/HiGHS/HiGHSSolver.hpp" #include "tools/Infinity.hpp" using namespace uno; diff --git a/unotest/functional_tests/MA27SolverTests.cpp b/unotest/functional_tests/MA27SolverTests.cpp index a123a817..b0f4f443 100644 --- a/unotest/functional_tests/MA27SolverTests.cpp +++ b/unotest/functional_tests/MA27SolverTests.cpp @@ -2,8 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project directory for details. #include +#include "ingredients/subproblem_solvers/MA27/MA27Solver.hpp" #include "linear_algebra/SymmetricMatrix.hpp" -#include "solvers/MA27/MA27Solver.hpp" using namespace uno; diff --git a/unotest/functional_tests/MA57SolverTests.cpp b/unotest/functional_tests/MA57SolverTests.cpp index a75eb355..001b2953 100644 --- a/unotest/functional_tests/MA57SolverTests.cpp +++ b/unotest/functional_tests/MA57SolverTests.cpp @@ -2,8 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project directory for details. #include +#include "ingredients/subproblem_solvers/MA57/MA57Solver.hpp" #include "linear_algebra/SymmetricMatrix.hpp" -#include "solvers/MA57/MA57Solver.hpp" using namespace uno; diff --git a/unotest/functional_tests/MUMPSSolverTests.cpp b/unotest/functional_tests/MUMPSSolverTests.cpp index a886c9a0..28a48f8f 100644 --- a/unotest/functional_tests/MUMPSSolverTests.cpp +++ b/unotest/functional_tests/MUMPSSolverTests.cpp @@ -2,8 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project directory for details. #include +#include "ingredients/subproblem_solvers/MUMPS/MUMPSSolver.hpp" #include "linear_algebra/SymmetricMatrix.hpp" -#include "solvers/MUMPS/MUMPSSolver.hpp" using namespace uno;