[Ipopt] Best and free way of interacting with IPOPT on Linux

Paul Smith phhs80 at gmail.com
Sun Apr 13 13:40:29 EDT 2008


On Sun, Apr 13, 2008 at 12:42 PM, Sebastian Nowozin <nowozin at gmail.com> wrote:
>  >  As far as I know, there are several interfaces available:
>  >  - C, C++, Fortran
>  >  - Java
>  >  - Matlab
>  >  - AMPL, GAMS
>
>  > [...]
>
> >  Also the Java and Matlab interfaces I have never tried, but they also
>  >  require you to implement derivative evaluation methods. It might also be
>  >  that the communication between the Java or Matlab world on the one side
>  >  and the C++ world on the Ipopt side has an impact on the efficiency.
>  >  With the AMPL and GAMS interfaces specification of the model is more
>  >  convenient, but they might not fit into the "free" category. Even though
>  >  the interfaces are for free, the compiler for the algebraic model to an
>  >  instance that the interface can understand is not free for larger
>  >  models. Note that Ipopt is also included the GAMS distribution.
>
>  The Matlab interface is great and works like a charm (thanks to
>  Peter), I have used it often in the last few months.  However, usually
>  it is not the most efficient because all the different computations
>  are split up across functions (computeObjective, computeGradient,
>  computeJacobian, computeHessian).  For most problems I have worked
>  with you could do this calculation more efficiently if you could
>  calculate them together.  As Matlab's function interface is strictly
>  functional (i.e. no side effects), this is not possible with the
>  current interface, except by using hacks such as global variables and
>  checking if recomputation is necessary.

Notwithstanding, Matlab is not free... :-)

Thanks, Stefan and Sebastian, for your replies. Could somebody please
write for me an example showing how interact with Ipopt through C++?
For instance, could you please code for me the following optimization
problem:

max x1 + x2 + x3+ ... + x10

s.t. x1^2 + x2^2 + x3^2 + ... + x10^2 <= 1

?

I know the analytical solution of this optimization problem, but I am
looking for a more or less free way of using Ipopt on Linux.

Paul


Paul


More information about the Ipopt mailing list