# [Coin-ipopt] Re: Fw: optimal control problem in IPOPT

Andreas Waechter andreasw at watson.ibm.com
Thu Jul 28 10:58:21 EDT 2005

```Gerben,

The quasi-Newton options in Ipopt allow you to run Ipopt without providing
it second derivatives - see the option IQUASI (in README.IPOPT).  For the
full space version (which is probably what you are using), 6 or -6 might
work.  In general, the code usually performs faster and more robust if it
has second derivatives, so if you can get them and speed/robustness is of
importance to you, you might think of providing them to Ipopt.

Hope this helps,

Andreas

On Thu, 28 Jul 2005, Huijsman wrote:

> Dear Andreas
>
> never mind my recent email.
> I found the error: 1/4*... resulted in 0, instead of 0.25*...
>
> My second question remains:
>
> is it possible to solve optimal control problems in IPOPT without having to provide the Hessian?
> If so, how could I do so?
>
> Thank you,
>
> Gerben Huijsman
>
>
> ----- Original Message -----
> From: Huijsman
> To: coin-ipopt-owner at list.coin-or.org
> Sent: Wednesday, 27 July, 2005 00:17
> Subject: optimal control problem in IPOPT
>
>
> Dear Andreas
>
> I am very interested in using IPOPT for solving optimal control problems.
>
> To check if I could use IPOPT, I started with a relative simple problem,
> the Minimum Energy Problem from the book Applied Control Theory by Bryson:
>
> min. J = 1/2*integral a^2 dt  (0 =< t =< 1)
>
> subject to
> a = vdot,     v = xdot,    v(0) = -v(1) = 1,   x(0) = x(1) = 0
>
>
> I've downloaded IPOPT and successfully tested it with the fortran example.
> By the way, I am working on a MS Windows machine with Compaq Visual Fortran (Developer Studio).
>
> To discretize the Bryson problem, I employed collocation.
> Attached to this email you'll find the Fortran files containing the code I used, including the initial guess.
>
>
> When running the program, IPOPT returns IERR = 11. Even when I present the optimal solution as initial guess, IPOPT won't run.
>
> I've looked extensively at both IPOPT and my code, but I can't figure out what's causing the error (infinity or NaN).
>
>
> Could you please have a look at it and tell me where to look for the troublemaker?
>
> Secondly, I was wondering if I could solve optimal control problems in IPOPT without having to provide the Hessian.
>
> Thank you,
>
> Gerben Huijsman

```