[Ipopt] improving IPOPT speed with Algorithmic Differentiation Theory

Sebastian Walter walter at mathematik.hu-berlin.de
Thu Sep 18 06:50:15 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hey,
thanks for the quick reply :)

This is exactly what I thought, too.
But unfortunately this doesn't help, or maybe I'm missing something?

My implementation looked like this:

/----------------------------------------------/

x_count = 0;
last_eval = 999999;

bool eval_grad_f(..., bool new_x){
  x_count += new_x;
  last_eval = x_count;

  -- compute f and grad_f and cache f--
}

bool eval_f(..., bool new_x){
  x_count += new_x;
  if(x_count == last_eval){
    -- return cached value --
    return true;
  }
  ...
}

/----------------------------------------------/

But this would only work when the call sequence is like this
eval_grad_f(x_13)
eval_f(x_13)
eval_grad_f(x_14)
eval_f(x_14)
etc.

However IPOPT calls them like this
eval_f(x_13)
eval_grad_f(x_13)
eval_f(x_14)
eval_grad_f(x_14)



Hmm, maybe this redundancy isn't really an issue since the linear algebra
needs considerably more time than the function evaluations.

Total CPU secs in IPOPT (w/o function evaluations)   =      7.732
Total CPU secs in NLP function evaluations           =      1.280



regards,
Sebastian Walter





Andrey Romanenko schrieb:
> Hello,
> 
> You have (..., bool new_x, ...)
> 
> argument in the function calls so you can check if the solver calls the 
> functions with the old decision vector. You can extend the 
> TNLP class to have your own members where you can cache the data.
> 
> Hope this helps.
> 
> Best Regards,
> 
> Andrey Romanenko
> Ciengis, SA
> Rua Pedro Nunes
> 3030-199 Coimbra
> Portugal
> tel. +351-239-700353
>      +351-932-806074
> fax: +351-239-700301

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFI0jJn9PBA5IG0h0ARAgZyAJ0as1hDnzr+fthDEnsiXtPyYZ/o3gCfUc/W
t9pNB3MErjKFAfn65M1+6I8=
=+lkr
-----END PGP SIGNATURE-----


More information about the Ipopt mailing list