I've got a complicated expression for my constraint function $g(x)$, too complicated to let Mathematica compute the derivatives symbolically. By forcing only numeric inputs, IPOPT does (it appears) an approximation of the derivatives. But I can come up with a direct, simple expression for those derivatives in a callable function. Is there a simple not-documented option to provide my own callable function? I know there is using IPOPT directly.

  • $\begingroup$ This sounds like you are referring to automatic differentiation, which has been the topic of a few posts mathematica.stackexchange.com/questions/1873/… mathematica.stackexchange.com/questions/85682/… and AceGEN is mentioned in theses threads wolfram.com/products/applications/acegen $\endgroup$ Oct 27, 2021 at 15:24
  • $\begingroup$ Not quite, since I have an approximation to the Hessian (for example) that I want to use, that is simpler than what I would get from auto diff. But I will follow the link, thanks! $\endgroup$
    – MikeY
    Oct 27, 2021 at 15:31
  • 1
    $\begingroup$ Aha, I see. If you are using FindMinimum does have a "Gradient" option that should allow you to specify your function, and "Method"->"InteriorPoint" appears to use IPOPTLink $\endgroup$ Oct 27, 2021 at 15:45
  • $\begingroup$ Thanks...I'd also want to be able to specify (from the IPOPT docs) the Jacobian of the constraints and the Hessian of the Lagrangian function. Sounds like there is no mechanism. $\endgroup$
    – MikeY
    Oct 29, 2021 at 18:11


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.