From b37be2a1831b4cf649ceb366eae98f151bb97daf Mon Sep 17 00:00:00 2001 From: Charlie Vanaret Date: Sat, 30 Nov 2024 20:27:00 +0100 Subject: [PATCH] Temporarily commented out the HiGHS functional tests --- uno/ingredients/hessian_models/ConvexifiedHessian.cpp | 2 -- .../inequality_constrained_methods/LPSubproblem.cpp | 4 ++-- uno/ingredients/local_models/LagrangeNewtonSubproblem.cpp | 1 + unotest/functional_tests/HiGHSSolverTests.cpp | 2 ++ 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/uno/ingredients/hessian_models/ConvexifiedHessian.cpp b/uno/ingredients/hessian_models/ConvexifiedHessian.cpp index 3e981ed9..8c106325 100644 --- a/uno/ingredients/hessian_models/ConvexifiedHessian.cpp +++ b/uno/ingredients/hessian_models/ConvexifiedHessian.cpp @@ -1,7 +1,6 @@ // Copyright (c) 2024 Charlie Vanaret // Licensed under the MIT license. See LICENSE file in the project directory for details. -#include #include "ConvexifiedHessian.hpp" #include "ingredients/hessian_models/UnstableRegularization.hpp" #include "reformulation/OptimizationProblem.hpp" @@ -9,7 +8,6 @@ #include "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/inequality_handling_methods/inequality_constrained_methods/LPSubproblem.cpp b/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/LPSubproblem.cpp index 39ce2864..f77e5033 100644 --- a/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/LPSubproblem.cpp +++ b/uno/ingredients/inequality_handling_methods/inequality_constrained_methods/LPSubproblem.cpp @@ -23,8 +23,8 @@ namespace uno { void LPSubproblem::generate_initial_iterate(const OptimizationProblem& /*problem*/, Iterate& /*initial_iterate*/) { } - void LPSubproblem::solve(Statistics& /*statistics*/, const OptimizationProblem& problem, Iterate& current_iterate, const Multipliers& current_multipliers, - Direction& direction, const WarmstartInformation& warmstart_information) { + void LPSubproblem::solve(Statistics& /*statistics*/, const OptimizationProblem& problem, Iterate& current_iterate, + const Multipliers& current_multipliers, Direction& direction, const WarmstartInformation& warmstart_information) { const LagrangeNewtonSubproblem subproblem(problem, current_iterate, current_multipliers.constraints, *this->hessian_model, this->trust_region_radius); this->solver->solve_LP(subproblem, this->initial_point, direction, warmstart_information); InequalityConstrainedMethod::compute_dual_displacements(current_multipliers, direction.multipliers); diff --git a/uno/ingredients/local_models/LagrangeNewtonSubproblem.cpp b/uno/ingredients/local_models/LagrangeNewtonSubproblem.cpp index 75451871..04a25dfe 100644 --- a/uno/ingredients/local_models/LagrangeNewtonSubproblem.cpp +++ b/uno/ingredients/local_models/LagrangeNewtonSubproblem.cpp @@ -15,6 +15,7 @@ namespace uno { trust_region_radius(trust_region_radius) { } void LagrangeNewtonSubproblem::evaluate_objective_gradient(SparseVector& gradient) const { + gradient.clear(); this->problem.evaluate_objective_gradient(this->current_iterate, gradient); } diff --git a/unotest/functional_tests/HiGHSSolverTests.cpp b/unotest/functional_tests/HiGHSSolverTests.cpp index de7aea69..232ef2ec 100644 --- a/unotest/functional_tests/HiGHSSolverTests.cpp +++ b/unotest/functional_tests/HiGHSSolverTests.cpp @@ -12,6 +12,7 @@ using namespace uno; +/* TEST(HiGHSSolver, LP) { // https://ergo-code.github.io/HiGHS/stable/interfaces/cpp/library/ // Min f = x_0 + x_1 + 3 @@ -72,3 +73,4 @@ TEST(HiGHSSolver, LP) { EXPECT_NEAR(direction.multipliers.upper_bounds[index], upper_bound_duals_reference[index], tolerance); } } +*/