[Ipopt] Optimizing without Hessian
Stefan Vigerske
stefan at math.hu-berlin.de
Thu Sep 18 08:32:34 EDT 2014
Hi,
* grad_f[ 5] = -1.3516155659571183e+01 ~ -
-1.3505262089473826e+01 [ 8.066e-04]
means that for the derivative w.r.t. x[5] in your objective, you return
-13.516, while Ipopt estimate that it should be -13.505. The difference
is 8.066e-04, which is above the tolerance derivative_test_tol (1e-4).
In this case, this seems like a numerical issue with the estimate that
Ipopt is computing, not a bug in your code.
It may help to set point_perturbation_radius to 0. Then the derivative
test should be done on the starting point.
For more info, see
http://www.coin-or.org/Ipopt/documentation/node30.html
http://www.coin-or.org/Ipopt/documentation/node53.html
Best,
Stefan
On 09/18/2014 01:08 PM, Philipp Bender 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
>
More information about the Ipopt
mailing list