[Ipopt] Optimizing without Hessian

Jason Moore moorepants at gmail.com
Thu Sep 18 09:17:37 EDT 2014


The derivative checker numerically differentiates your objective and
constraint function. This is simply used to check whether you wrote your
analytical derivatives in your gradient and Jacobian functions correctly.
It looks like you probably did, but that the error in the numerical
differentiation is causing the derivatives from the checker to be slightly
different than the ones in your functions. You can change the tolerance on
the derivative checker, or ignore this. You're analytical derivative is
correct. There is no need to run the checker in you "real" IPOPT runs.


Jason
moorepants.info
+01 530-601-9791

On Thu, Sep 18, 2014 at 7:08 AM, Philipp Bender <pbender at fzi.de> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dear list,
>
> I play around with IpOpt trying to solve my problem and some things
> from the documentation are unclear to me. Apart from that, I like the
> interface a lot and compared to SLSQP from nlopt, I hope to profit
> from the sparsity feature.
>
> My question is:
>
> What exactly does the derivative checker do?
>
> I have the following problem:
>
> min sum(x[i]**2), i = 0..49
>
> s.t. -inf < x[i] < -1000
>
> I did
>
> * not implement eval_h and left nnz_h_lag untouched in getnlp_info()
>
> * SetStringValue("hessian_approximation", "limited-memory");
> * SetStringValue("derivative_test", "first-order");
>
> * implement the eval_graf_f like grad_f[i] = 2*x[i]
> * initialized with x[i] = i, which obviously violates bounds.
>
> I get the following:
>
> - ---------------------------
>
> This is Ipopt version 3.11.9, running with linear solver mumps.
> NOTE: Other linear solvers might be more efficient (see Ipopt
> documentation).
>
> Starting derivative checker for first derivatives.
>
> * grad_f[          5] = -1.3516155659571183e+01    ~
> - -1.3505262089473826e+01  [ 8.066e-04]
> * grad_f[         22] =  1.0686361135565363e+01    ~
> 1.0667231032792877e+01  [ 1.793e-03]
> * grad_f[         33] =  2.1337930046135796e+01    ~
> 2.1351790099452490e+01  [ 6.491e-04]
>
> Derivative checker detected 3 error(s).
>
> - ---------------------------
>
> What does this mean? Is it important to have the checker run without
> errors?
>
> Best regards,
> Philipp
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iQIcBAEBAgAGBQJUGr1AAAoJEMSOzTAqQDLo808QAJfgphGl18LCPbNHD2E8Kcwi
> o1Cz3esgLOZwuWZ85FN+kgQL9GWwK8uqv//WoaT0G+X0ZaP1dlRx489Y8n46fnNP
> 3Ky/0PDdnn7Gtc4ke875pA4k5wgGbkAD4+rTw9taUuhc0sBTGVK6URhiymvIm21L
> P1oWQ7NrCQT2xG8FzhJlnUwf0xRkVyYCjCvc67XIw2viA6N9DVpe69vSPOb+PnYn
> 8oFnoIK6WULN/ugQHiHrSGt/DkjVFnQcN/o17bUmZIUrapJ1VGW+8+j4sM4av+Gl
> C6qbxef9wwZIjkylgeb/TzH+S6gLurnpm+8Qsdrb7img4BiF+5tOCRlH9OZ5t9pM
> LAdZVEny9eqaqV2wYk6QzpUt5EfJLYNeLjEhfHFakCJwCsE+O0t+ZsVAxJGprZFp
> Hlq2hrgf8f7ao5MAfOrnTvIW8S5t6sNfY1XkPnAg45gQnnwrSXHC9CtcO/woMVIn
> Eny+EjafcN7xrKRYpafta5GGQKIzNGWjY8kMzkNWUV54elt7mMFYzbIv9m1Ftn8x
> XT3fRRo/pNwVUx0X0Ts79of1GlvuwuU9j3LdlL721y1DS7RES4Gxs7D1HNqgr1/c
> UQM54SIgoZZcPXjKtJ+O/wCYsLL2qwgxFq1ROx3GPZmskk9WedWN/2i60WTEsFRk
> Vqo4iNcLO0OsrB3Q2T/A
> =mm94
> -----END PGP SIGNATURE-----
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20140918/02ef3969/attachment.html>


More information about the Ipopt mailing list