[Ipopt] Passing additional data to TNLP methods
Michael Braun
braunm at mit.edu
Mon Apr 25 10:30:23 EDT 2011
Ipopt looks like a terrific package, and I am interested in trying it out using the C and C++ interfaces for some statistical estimation problems. But in going through the documentation and mailing lists, I do not see how one could pass additional objects (like an array of data) to the functions that compute the objective, gradient and Hessian. Is there a way to do that, or do model parameters need to be hard-coded in? I've considered using global variables, but that just doesn't seem like it should be the best solution.
Could someone kindly point me to an example of what I need to do? I should mention up front that I am new to C++, having done most of my coding in C in the past, so many object-oriented concepts are new to me. But an example of how to do this would be very helpful.
Thanks,
Michael Braun
braunm _at_ mit.edu
More information about the Ipopt
mailing list