You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While most plugins do query the full constraint Jacobian through impl_jacobian, CFSQP can and does query single rows of the Jacobian matrix (e.g. gradient w.r.t. the i-th parameter for the j-th output of the k-th constraint). As a result, the plugin relies on proper impl_gradient implementations.
In practice, for complex multidimensional constraints, it is often easier to provide a single impl_jacobian method, and in this case, it is common for users to implement an empty impl_gradient (pure virtual method), and CFSQP fails since it gets a null vector, leaving the user confused.
Thus, we should clarify the guidelines for such cases (e.g. throw exceptions in the empty impl_gradient method), and provide helper classes/functions to detect such issues, for instance by comparing results from impl_jacobian and impl_gradient.
While most plugins do query the full constraint Jacobian through
impl_jacobian
, CFSQP can and does query single rows of the Jacobian matrix (e.g. gradient w.r.t. thei
-th parameter for thej
-th output of thek
-th constraint). As a result, the plugin relies on properimpl_gradient
implementations.In practice, for complex multidimensional constraints, it is often easier to provide a single
impl_jacobian
method, and in this case, it is common for users to implement an emptyimpl_gradient
(pure virtual method), and CFSQP fails since it gets a null vector, leaving the user confused.Thus, we should clarify the guidelines for such cases (e.g. throw exceptions in the empty
impl_gradient
method), and provide helper classes/functions to detect such issues, for instance by comparing results fromimpl_jacobian
andimpl_gradient
.cc @stanislas-brossette
The text was updated successfully, but these errors were encountered: