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

Provide only part of derivatives to SNOPT #44

Closed
mzwang828 opened this issue Feb 24, 2020 · 2 comments
Closed

Provide only part of derivatives to SNOPT #44

mzwang828 opened this issue Feb 24, 2020 · 2 comments

Comments

@mzwang828
Copy link

First of all, thanks a lot for providing us this super convenient tool!
I'm using it for constructing problems for Snopt. From the document of Snopt, I read that the user can provide part of gradients and Snopt can estimate the left gradients by finite differences. When I'm using ifopt, it seems to me that the Jacobian is first initialized as all zeros and then certain values are substituted by calculated derivates. Snopt thus considers that all the gradients are provided and will not estimate anything. I'm wondering is there's a way that I can calculate part of the derivates in my code and inform Snopt that the left derivates need estimation.

@mzwang828
Copy link
Author

I have figured out how to do this in a "manual" way.
To make SNOPT estimate the not provided derivatives, I first need to calculate the number of missing terms and their positions in the final Jacobian. I then have to modify the neG, iGfun and iGvar in snopt_adapter.cc accordingly to make SNOPT aware of missing terms.
Thanks again for this convenient tool!

@awinkler
Copy link
Member

Thanks @mzwang828 for looking into this and posting your solution!

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

2 participants