[Ipopt] a situation that the derivative checker is wrong?
Stefan Vigerske
stefan at math.hu-berlin.de
Fri Mar 12 04:35:21 EST 2010
Hi,
the eval_jac_g routine should return the derivative for the constraint
functions which values are returned in eval_g.
If you function g is not differentiable at a point, then the derivative
checker is likely to complain about it.
Since the error is exactly 1.0 and from what you wrote it looks to me
that your eval_jac_g code is wrong, i.e., it does not give the gradient
of g, but of some other function.
Stefan
lqc234 wrote:
> Hi all,
> I have a question during using the Ipopt.Is there a situation that the result of my code for eval_grad_f,eval_jac_g and eval_h is right but the derivative checker reports wrong? For example,
>
> *jac_g[6,7]=1.4776333636790881e+01v ~ 1.3776333629422766e+01[7.259e-02]
>
>
> In fact the "real" right value of jac_g[6,7] is just the *jac_g[6,7]=1.4776333636790881e+01 not the value 1.3776333629422766e+01 which computed by the finite difference. But the wrong value of the finite difference is "right" in respect of the finite difference. The reason that the finite difference give the "real" wrong result is because of the "problem"(not wrong,only different representation) of representation of eval_f and eval_g. So the finite difference is right according to the eval_f and eval_g , and the result of my code is also right according to the application, but the "real right" result is mine not the finite difference.
>
> I am not sure if I have explained my question,I hope so.
> Anyone can give me some answer?Thank you very much in advance!
> Regards
> QuanChang
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
--
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan
More information about the Ipopt
mailing list