HJReachability / ilqgames

Iterative Linear-Quadratic Games!
https://hjreachability.github.io/ilqgames/
BSD 3-Clause "New" or "Revised" License
132 stars 41 forks source link

Augmented Lagrangian solver #44

Closed dfridovi closed 3 years ago

dfridovi commented 3 years ago

This is going to be a relatively large PR since it should include:

As a small side note, I noticed that ILQFlatSolver is completely superfluous and can be subsumed by ILQSolver with minor modifications. Although we have not yet begun such integration, I anticipate handling equality constraints within the ILQSolver class optionally and creating an ActiveSetSolver parallel to the AugmentedLagrangianSolver that makes use of that equality constrained lower level solver.

This PR will be marked as ready to merge when most/all changes are complete.

dfridovi commented 3 years ago

Got first cut of most constraints up now. TODOs before finishing PR:

  1. Add constraints for keeping input dimension below/above certain value.
  2. Add inequality constraint handling in AugmentedLagrangianSolver - right now it treats all constraints as equality constraints.
  3. Test AugmentedLagrangianSolver in an example and tune/fix issues that arise.
  4. Replace all log barriers with constraints and use AugmentedLagrangianSolver in relevant examples. Note: the linesearch really doesn't always find descent directions. Had to default to nolinesearch in DubinsOriginExample. Other examples mostly untested.
  5. Remove old log barrier code so people don't mistakenly use it.
  6. Update documentation.
dfridovi commented 3 years ago

Getting a segfault when attempting to use new solver. Tracking down in #46.

dfridovi commented 3 years ago

Added automatic downscaling of multipliers when unconstrained solver fails (because of line search failure). This is probably a good longer term feature, but for now it is definitely a necessary holdover until the linesearch is more sophisticated.

dfridovi commented 3 years ago

All major features of this PR are done. As above, it will be important to improve the linesearch in the future, but for now the basics are there.

dfridovi commented 3 years ago

Merging now. Note that not all examples will run normally, but at least they shouldn't error out... I anticipate that tuning will be necessary in examples with constraints, but that should happen in separate PRs.