[ADOL-C] Evaluating Hessian of Lagrangian

Ingrid Hallen ingridhallen at hotmail.com
Mon Apr 8 09:38:29 EDT 2013

Thanks for the suggestions!

Regarding the first, I think it might not be so efficient for my problem, having
almost as many constraints as variables. But I might give it a try. Perhaps
one can modify the code for sparse_hess in some clever way ...

Regarding the second I am unfortunately clueless as to how one could
exploit that fact.

Kind regards,


Date: Sun, 7 Apr 2013 15:31:50 -0700
From: normvcr at telus.net
To: adol-c at list.coin-or.org
Subject: Re: [ADOL-C] Evaluating Hessian of Lagrangian

    Perhaps you can trace L as a function
      of both x and lambda.

      Then when you need the hessian,

      calculate the hessian only with respect to x.

      Not sure if this is better/worse than what you suggested.


      When using the Hessian of the Lagrangian, you will eventually be

      attention to the kernel of your constraints.  Do you know if this

      would offer a simplification to how the hessian could be computed?





      On 04/05/2013 04:02 AM, Ingrid Hallen wrote:



        I'm doing non-linear optimization with IPOPT. For this, I'm
        using ADOL-C

        to compute the Hessian of the Lagrangian


        L(x,lambda) = f(x) + sum_{i}lambda_{i}h_{i}(x),


        where x are the variables, lambda the Lagrange multipliers and 

        f(x) and h_{i}(x) objective and constraint functions.


        What I'm doing in my code is the following (omitting details):


        // **********************


        // Trace Lagrangian function



        for(i=0;i<n;i++) {

            xad[i] <<= x[i];



        Lagrangian(xad, lambda);


        Lad >>=L;




        // Evaluate Hessian of the Lagrangian

        repeat = 0;



        // ***********************


        This works fine, but is not so efficient. One reason is that,
        since lambda changes, 

        the Lagrangian function has to be retaped every time the Hessian
        is needed and so it 

        appears that I cannot set repeat = 1 when calling sparse_hess.


        One way to circumvent this problem could perhaps be to trace the

        and constraint functions individually and then construct the
        Hessian of

        the Lagrangian using multiple calls to sparse_hess, but is there

        more convenient way to do it? 








ADOL-C mailing list
ADOL-C at list.coin-or.org


ADOL-C mailing list
ADOL-C at list.coin-or.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/adol-c/attachments/20130408/2310128d/attachment.html>

More information about the ADOL-C mailing list