Skip to content
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

[Guidelines] impl_gradient vs impl_jacobian #108

Open
bchretien opened this issue Mar 4, 2016 · 0 comments
Open

[Guidelines] impl_gradient vs impl_jacobian #108

bchretien opened this issue Mar 4, 2016 · 0 comments

Comments

@bchretien
Copy link
Member

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.

cc @stanislas-brossette

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant