-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporarily commented out all BQPD tests
- Loading branch information
Showing
17 changed files
with
52 additions
and
116 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
uno/ingredients/inequality_handling_methods/inequality_constrained_methods/LPSubproblem.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) 2018-2024 Charlie Vanaret | ||
// Licensed under the MIT license. See LICENSE file in the project directory for details. | ||
|
||
#include "LPSubproblem.hpp" | ||
#include "ingredients/local_models/LagrangeNewtonSubproblem.hpp" | ||
#include "optimization/Direction.hpp" | ||
#include "optimization/WarmstartInformation.hpp" | ||
#include "options/Options.hpp" | ||
#include "reformulation/OptimizationProblem.hpp" | ||
#include "solvers/LPSolver.hpp" | ||
#include "solvers/LPSolverFactory.hpp" | ||
|
||
namespace uno { | ||
LPSubproblem::LPSubproblem(size_t number_variables, size_t number_constraints, size_t number_objective_gradient_nonzeros, | ||
size_t number_jacobian_nonzeros, const Options& options) : | ||
InequalityConstrainedMethod("zero", number_variables, number_constraints, 0, false, options), | ||
solver(LPSolverFactory::create(number_variables, number_constraints, | ||
number_objective_gradient_nonzeros, number_jacobian_nonzeros, options)) { | ||
} | ||
|
||
LPSubproblem::~LPSubproblem() { } | ||
|
||
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) { | ||
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); | ||
this->number_subproblems_solved++; | ||
// reset the initial point | ||
this->initial_point.fill(0.); | ||
} | ||
} // namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 0 additions & 62 deletions
62
uno/ingredients/subproblems/inequality_constrained_methods/LPSubproblem.cpp
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters