Auto computing jacobian and gradient
bharswami opened this issue · comments
Is there a provision in ipopt for auto-computing jacobian and gradient? i.e. we don't have to specify those functions explicitly. Or do we have to use dependencies like mklJac etc?
Thanks in advance
Bharath
Ipopt itself only includes an AMPL interface, so that if you use AMPL (or something else that generates .nl files, e.g., Pyomo), you will get AMPL's automatic differentiation.
But then there are a number of automatic differentiation packages and modeling systems that have interfaces to Ipopt: https://coin-or.github.io/Ipopt/#HOWTOUSE
Thanks Stefan.
Also, in the cpp_example, there is a call to the function IpoptApplicationFactory().
SmartPtr app = IpoptApplicationFactory();
Is this defined in a pre-built library?
P.S.: I am trying to run ipopt problems in visual studio
Yes, IpoptApplicationFactory()
should be available in DLLs.
It doesn't do much, you should also be able to do a new Ipopt::IpoptApplication
from your code.
Ipopt/src/Interfaces/IpIpoptApplication.cpp
Lines 33 to 38 in 5fd7463
I was able to fix that by adding the path to the DLLs.
Visual Studio is now telling me that Ipopt-vc8.dll cannot be opened
I guess the libraries were built with mingw or something - not suited for MSVS2022.
Any suggestions/workarounds?
Ipopt-vc8.dll
sounds like a very old version of Ipopt. Binaries for current Ipopt are available at different places: https://github.com/coin-or/Ipopt?tab=readme-ov-file#precompiled-binaries
Thanks Stefan.
I am getting the error "ipopt-3.dll not found". Could this be a version incompatibility issue since I am using VS2022?
It looks more of a problem of making sure that the library can be found. Check your library search paths, e.g., environment variable PATH
.
I tried adding these to the PATH environment variable as well
Hi Stefan,
The issue was fixed by renaming the "ipopt.dll.lib" to "ipopt-3.lib"