-
Notifications
You must be signed in to change notification settings - Fork 23
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
Don't call jac_structure if problem has no constraints #66
Conversation
@mlubin I don't know what to check for (it seems like the unit test is supposed to be added at the MPB level), but this seems acceptable to me. Okay to merge? |
If it passes rosenbrocktest then you can merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and won't work (even fixing row 85). Although the nonlinear model is loaded correctly, KNITRO still calls eval_jac_g
callback --- it seems the numConstr=0
and empty indexes are not the right wy to communicate to KNITRO that the problem is unconstrained. Should probably pass pointer to null somewhere?
initialize(d, init_feat) | ||
|
||
Ihess, Jhess = has_hessian ? hesslag_structure(d) : (Int[], Int[]) | ||
Ijac, Jjac = numConstr > 0 && jac_structure(d) : (Int[], Int[]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&&
should be ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
The remaining issue mentioned by gragusa is due to the fact that Knitro asks for objective gradient and jacobian evaluations through a single callback. |
@sylvainmouret line 254 of what script? |
Sorry, I forgot to mention it. It's in KNITRO.jl. |
This has been implement in #73 so I will close. |
CC @mlubin
Untested because I don't have KNITRO. Follows jump-dev/Ipopt.jl#71, fixing for JuliaOpt/MathProgBase.jl#133.