Skip to content

Feature/alm#2414

Open
yetongumich wants to merge 6 commits intodevelopfrom
feature/ALM
Open

Feature/alm#2414
yetongumich wants to merge 6 commits intodevelopfrom
feature/ALM

Conversation

@yetongumich
Copy link
Contributor

Add Bound constrained Lagrangian optimizer

@github-actions
Copy link

timeSFMBAL benchmark

  • Head: 88b59fe7a6e03e833f33b3dc2227708546fb7376
  • Base: afff38a7374382b00ac831240ac49f047fa73861

No head benchmark results were found.

Worker runs

Role Runner SHA Conclusion

@dellaert
Copy link
Member

@yetongumich you were going to merge in develop, right?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a bound-constrained augmented Lagrangian optimizer and factors out the augmented Lagrangian graph construction into a reusable function, alongside a new unit test for the new optimizer.

Changes:

  • Add BoundConstrainedLagrangian optimizer (params/state/implementation) plus a new test case.
  • Extract augmented-Lagrangian factor graph construction into AugmentedLagrangianFunction (AugmentedLagrangian.h/.cpp) and refactor AugmentedLagrangianOptimizer to use it.
  • Minor header updates in AugmentedLagrangianOptimizer (state fields/type alias).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
gtsam/constrained/tests/testBoundConstrainedLagrangian.cpp Adds a unit test exercising the new bound-constrained Lagrangian optimizer.
gtsam/constrained/BoundConstrainedLagrangian.h Declares the new optimizer, params, and state types.
gtsam/constrained/BoundConstrainedLagrangian.cpp Implements the new optimizer iteration/update logic and logging.
gtsam/constrained/AugmentedLagrangianOptimizer.h Updates augmented-Lagrangian state definition and a type alias.
gtsam/constrained/AugmentedLagrangianOptimizer.cpp Refactors to call the extracted AugmentedLagrangianFunction.
gtsam/constrained/AugmentedLagrangian.h Declares a reusable augmented-Lagrangian factor-graph builder.
gtsam/constrained/AugmentedLagrangian.cpp Implements the extracted factor-graph builder (incl. biased-factor plumbing).

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +97 to +101
for (size_t i = 0; i < eqConstraints.size(); i++) {
const auto& constraint = eqConstraints.at(i);
Vector bias = lambdaEq[i] / muEq * constraint->sigmas();
auto penalty_l2 = constraint->penaltyFactor(muEq);
graph.emplace_shared<BiasedFactor>(penalty_l2, bias);
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants