-
Notifications
You must be signed in to change notification settings - Fork 39
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
Calling CppAD::ipopt::solve from CppADCodeGen #78
Comments
Hi, Is there any more info I can provide to help with this question? |
Hello Andy, From what I can see from CppAD's support for Ipopt this would require a re-implementation for CppADCodeGen since CppAD uses AD::ADFun and CppADCodeGen uses different types and requires additional steps (compilation step). Kind regards, |
I think that working on a faster than CppAD::ipopt::solve interface to ipopt, along the lines suggested above, is worth while but not a simple effort. If someone is interested in taking the lead on this, I would be willing to will to help. |
Thank you for the advice. |
I suggest you start by programming up the simple ipopt example You will note that the example above is documented using omhelp. |
There is an example that creates a model for a Lagrangian here: I would, however, not do it like this. Nevertheless, it can be used as a starting point. I would instead create two models:
For the NLP model I would configure a custom sparse hessian sparsity with only half of the Hessian (to improve performance). If there are any parameters in the model I would also remove them from the sparsity patterns. |
Hi, Would you be able to help me run this ipopt example using CppADCodeGen? What changes should I make to replicate this example but with the AD performed by CppADCodeGen? I have successfully compiled and run this example with my local ipopt and CppAD builds and it works well.
Many thanks,
The text was updated successfully, but these errors were encountered: