-
Notifications
You must be signed in to change notification settings - Fork 58
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
Expose Ipopt's new_x argument #34
Comments
This is easy and cheap to emulate by storing the previous input vector and checking if it's equal to the new one. We'd accept a PR for this, but anyway I'd recommend coding to the MathProgBase interface which would let you easily switch between solvers (Ipopt, KNITRO, NLopt). |
Ok, thank you, I'll look into MathProgBase. For my own understanding, how would you store the previous value? I can't seem to access variables outside the scope of eval functions. (An example is below.)
|
Try |
If you look in the source you'll see that I did wrap the C interface, including |
Thanks, using the brackets to refer to the global Yes, I noticed that you had |
It's not very well documented at this point, but you wouldn't use globals with MathProgBase, you would store the vector inside your NLPEvaluator object, so there's no type inference/performance issues to worry about. See the discussion here: JuliaNLSolvers/Optim.jl#107 |
The C++ interface to Ipopt has an
new_x
argument to the evaluation functions (eval_f
,eval_grad_f
, etc.), allowing the user to avoid re-computing costly derivatives (e.g. when they have an expensive objective function that calculates the value and derivative simultaneously). Would it be possible to expose this feature in the Julia interface?The text was updated successfully, but these errors were encountered: