HJReachability / ilqgames

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

question about the class proximity constraint #64

Closed zhonghai1995 closed 2 years ago

zhonghai1995 commented 2 years ago

Hello Professor Fridovich-Keil, I have a question about the class proximity constraint. In the implementation of the Quadraticize function of the class proximity constraints, it calls the ModifyDerivatives function. In the ModifyDerivatives function, it calculates the derivatives of lambda g(x) + mu g(x) g(x) / 2.

However, since the proximity constraint is an inequality constraint, then when the constraint value is less than 0 (the constraint is satified), should we still add the derivate of mu g(x) g(x) / 2? Because I think for inequality constraints, the augmented lagrangian is L = lambda g(x) + (mu/2)max(0,g(x))^2?

dfridovi commented 2 years ago

In that case \mu will get set to 0. See here. https://github.com/HJReachability/ilqgames/blob/d8aad9d2c71b1abdc2dc1f5dce74595ebf4bd928/include/ilqgames/constraint/constraint.h#L112 You're probably right that it could be implemented more efficiently though. Feel free to submit a PR!

zhonghai1995 commented 2 years ago

Thanks for the quick reply!