-
Notifications
You must be signed in to change notification settings - Fork 850
add constrained optimizers #1980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Please provide a nice PR comment :-) |
Please update PR comment, make it draft PR until this is ready to review. Also, before that, refraing from pushing commits as it will trigger CI every time. |
@yetongumich Please update PR comment, make it draft PR |
CI on windows fails: maybe missing GTSAm_EXPORT? Do check the readme on that |
@dellaert This PR is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool !!!
Ajay, Bruce, and I looked at the code in more depth than I could by myself.
We also found that constraint factors could use a bit more documentation (as well as check naming convention there as well?)
* where | ||
* c = ||lambda_e||^2 / (2 * mu_e) + ||lambda_i||^2 / (2 * d) | ||
* is a constant term. | ||
* Notice: a term (0.5 d * ||g(x)||^2) is added to incorporate Lagrange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We (Frank, Ayaj, Bruce) were trying to read this carefully and are not entire following - and also does not seem to be there on Vandenberghe slides?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is inspired by Vandenberghe slide number 23. However, the slides only consider equality constraints. I made some extension to incorporate inequality constraints using a similar strategy to rewrite the augmented lagrangian function in least-squares form. I have updated the comments, and more detailed derivation is available in this overleaf document: https://www.overleaf.com/read/rzzgkwdrwnbh#a1f9f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment to a source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Merge at will. We could add (and benchmark) Nocedal scheme for updating
|
||
// Construct merit function. | ||
const NonlinearFactorGraph augmentedLagrangian = | ||
augmentedLagrangianFunction(newState); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this->augmentedLagrangianFunction()
* where | ||
* c = ||lambda_e||^2 / (2 * mu_e) + ||lambda_i||^2 / (2 * d) | ||
* is a constant term. | ||
* Notice: a term (0.5 d * ||g(x)||^2) is added to incorporate Lagrange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment to a source
This PR introduces constrained optimizers that solve constrained nonlinear least-squares problems.
The contents of this PR includes