[Ipopt] Questions about derivative checker in my application

Stefan Vigerske stefan at vigerske.de
Fri Aug 28 17:28:49 EDT 2009


Hi,

> Howerver ,some erros reported in second-order derivative checker:
> Starting derivative checker for second derivatives.
>  
>               obj_hess[    0,    0] = 2.1667999999999999e+001 v  ~ 2.1668000016461519e+001  [7.597e-010]
>               obj_hess[    0,    1] = 1.4846332882348406e+001 v  ~ 1.4846332874185464e+001  [5.498e-010]
>               obj_hess[    0,    2] = -6.3199549447439418e-001 v  ~ -6.3199543376413203e-001  [6.071e-008]
>               obj_hess[    0,    3] = -3.0727543785496283e+000 v  ~ -3.0727544064745871e+000  [9.088e-009]
>               obj_hess[    0,    4] = 3.4428446955109338e-001 v  ~ 3.4428424555699166e-001  [2.240e-007]
>               obj_hess[    0,    5] = -3.3725573097898369e+000 v  ~ -3.3725569892339990e+000  [9.505e-008]
>               obj_hess[    0,    6] = -4.6717664533426682e+000 v  ~ -4.6717665291851063e+000  [1.623e-008]
>               obj_hess[    0,    7] = 1.7283918699941374e+000 v  ~ 1.7283918296584488e+000  [2.334e-008]

Up to here, they seem neglectable.

> *             obj_hess[    1,    0] = 1.4846332882348406e+001 v  ~ 9.1281670944770920e+008  [1.000e+000]
> *             obj_hess[    1,    1] = 7.1104243742634594e+000 v  ~ 1.0509828614292449e+009  [1.000e+000]
> *             obj_hess[    1,    2] = 2.9470153244501667e+000 v  ~ 1.2421330133431286e+008  [1.000e+000]
> *             obj_hess[    1,    3] = -5.3405494070519410e-001 v  ~ 1.9661343399021125e+008  [1.000e+000]
> *             obj_hess[    1,    4] = 2.9853884066737142e+000 v  ~ 7.6353513713819706e+008  [1.000e+000]
> *             obj_hess[    1,    5] = 3.1521177446064130e-001 v  ~ -8.4714371002286768e+008  [1.000e+000]
> *             obj_hess[    1,    6] = -1.6040120801053943e+000 v  ~ 3.3153617915217382e+008  [1.000e+000]
> *             obj_hess[    1,    7] = -4.0798313132651529e+000 v  ~ 2.9545935826156133e+008  [1.000e+000]
> .             ..............................
> .             ..............................
> .             ..............................
> *             obj_hess[    7,    6] = 3.8733499986256832e+000 v  ~ 3.7267636760748780e+008  [1.000e+000]
> *             obj_hess[    7,    7] = 2.9676708730317345e+000 v  ~ 3.3212278660882109e+008  [1.000e+000]
> 
> 
> And I noticed that the derivative results computed by the finite difference of Ipopt is huge, e.g 2.2544251702905512e+009  , 2.2101112672395563e+008  .Why the obj_hess[0][] of the finite differences is resonable and  almost identical with the values based on my own  code , while others are totally unresonable and  have too huge errors compared to my results?

I think the derivative checker try to tell you that there is a bug in
your code (in eval_hess).
If your objective function is behaving bad and you think the finite
differences are wrong, you could try playing with options like
point_perturbation_radiusm and derivative_test_perturbation in order to
keep points closer together.

Stefan



More information about the Ipopt mailing list