[Ipopt] Jipopt Java interface

Stefan Vigerske stefan at math.hu-berlin.de
Wed Apr 23 04:35:39 EDT 2008


Hi,

> When the code was adapted to use the C++ interface (TNLP class) the
> no-SmartPrt nature was inherited. Of course the SmartPtr way could be used
> but it would be a little tricky (if not useless) because when calling C/C++ from Java the scope goes
> in and out in every function call (objective function, residuals, gradients, etc).
> 
> The point is, do the Ipopt infrastructure stores TNLP's instances internally in SmartPtrs?

Sure, just have a look at the signature of the 
IpoptApplication::OptimizeTNLP function that you use.

> I guess not (this can be seen in example file hs071_main.cpp), hence the current Java
> interface implementation is fine.

I see there:

SmartPtr<TNLP> mynlp = new HS071_NLP();
...
status = app->OptimizeTNLP(mynlp);

Looks like using SmartPtr for me...

Best,
Stefan

-- 
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan


More information about the Ipopt mailing list