Skip to content

Redundant calculations of objective functions and constraints #725

Answered by svigerske
BenVanDerMeer asked this question in Q&A
Discussion options

You must be logged in to vote

A reason that Ipopt does not tell in advance whether it will also need a gradient is that it typically does not know itself. In my understanding, Ipopt tries several points during line search. To decide whether to accept a point as next iterate, it will need only function values (eval_f and eval_g). If a point is accepted, then it will need also the first and second derivatives to continue (i.e., calculate the next search direction).

So whether to always compute both function values and gradient/Jacobian with the risk that the latter is thrown away, or having to essentially recompute the function values when doing the work for gradient/Jacobian only when requested, depends on how much eff…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BenVanDerMeer
Comment options

Answer selected by BenVanDerMeer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants