<div dir="ltr"><div>Hi,</div><div><br></div><div>I'm working on completing the addition of a MATLAB interface to CasADi, but I'm struggling finding a way to send the text output from IPOPT to MATLAB's mexPrintf. Is it possible to somehow set a user-defined function for printing log messages? Or, alternatively, to have IPOPT write output to C++'s iostream (i.e. std::cout and std::cerr) instead of C's printf (i.e. stdout and stderr)? The former is much easier to redirect to a custom function.</div><div><br></div><div>In general, since Ipopt is a C++ code, I would expect iostream to be used for printing, but I guess it uses printf because of the linear solvers underneath.</div><div><br></div><div>If anyone is interested, you can find an example of how to solve an NLP using IPOPT with CasADi-MATLAB here: <a href="https://github.com/casadi/casadi/blob/develop/test/matlab/rosenbrock.m">https://github.com/casadi/casadi/blob/develop/test/matlab/rosenbrock.m</a>. This is complete with efficient calculation of sparse Hessians and Jacobians but unless you start MATLAB from the command line without the GUI, you'll lose the IPOPT text output due to the above issue. I'll get back to this mailing list as soon as we make a stable release.</div><div><br></div><div>Best regards,</div><div>Joel</div><div><br></div><div><br></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>-- <br>Joel Andersson, PhD<br>Ptge. Busquets 11-13, atico 3<br>E-08940 Cornella de Llobregat (Barcelona), Spain<br>Home: +34-93-6034011<br>Mobile: <span style="font-size:12.8000001907349px">+34-63-4408800 (in</span><span style="font-size:12.8000001907349px"> Sweden also </span><span style="font-size:12.8000001907349px">+46-707-360512)</span></div></div></div></div></div></div></div>
</div>