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

Hessian sparsity pattern of DerivativesCppad #191

Open
omersahintas opened this issue Apr 1, 2021 · 0 comments
Open

Hessian sparsity pattern of DerivativesCppad #191

omersahintas opened this issue Apr 1, 2021 · 0 comments

Comments

@omersahintas
Copy link

omersahintas commented Apr 1, 2021

Thanks for developing this great toolbox! Besides its control functionalities, by utilizing eigen, cppad and cppadcg, the library serves as a perfect NLP framework!

I use the toolbox to solve an NLP. So far, I have inherited the DiscreteCostEvaluatorBase and DiscreteConstraintBase classes and filled the required values by calling DerivativesCppadJIT. As the next step, I wanted to do the same with DerivativesCppad and later by using generated C++ code.

I decided to start with autodiff and could fill eval(), evalGradient() and sparseHessianValues() methods. However, I didn't find any getSparsityPatternHessian() method for DerivativesCppad.

I checked cppad and apparently there is the ForSparseHes() function that can return the sparsity pattern. However, I couldn't understand arguments' corresponding variables in CT (please see this brach in my fork). I would appreciate if you could guide me on that.

Do you know if this function could fit? Filling the getSparsityPatternHessian() implementation is mandatory, as leaving it blank causes the solver to fail; my naive assumption on a dense Hessian matrix by default (i.e. all elements are filled) was wrong.

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

No branches or pull requests

1 participant