[Ipopt] Problems on derivative checker

tristartom tristartom at gmail.com
Tue Dec 7 18:20:39 EST 2010


Thanks for the reply. I just found the problem... didnt reset objValue every
time eval_f is invoked.
Regards,
Tang


On Tue, Dec 7, 2010 at 5:54 PM, Stefan Vigerske <stefan at math.hu-berlin.de>wrote:

> Hi,
>
> what then is the code of eval_f that gives you an error?
> And how large are the errors that the derivative checker complains about?
>
> Stefan
>
> tristartom wrote:
> > Dear All,
> > I have a problem on derivative checker when using Ipopt via Java
> interfaces.
> > The two function I have problem with is eval_f and eval_grad_f. In the
> case
> > of n = 2 (n is a system parameter), this two functions are respectively
> > equal to
> > f(x0, x1) = (s0 + 2s2) * x0 + (s0 + 2s1) * x1 + s0 * x0x1
> > and
> > grad_f(x0, x1) = { s0 + 2s2 + s0 * x1, s0 + 2s1 + s0 * x0}
> >
> > and code is tested right. When I use derivative checker, it complains
> > errors. However, as I replace code of eval_f with
> >
> > protected boolean eval_f(int n, double[] x, boolean newX, double[]
> objValue)
> > {
> > assert n == this.n;
> > objValue[0] = (s[0] + 2 * s[2]) * x[0] + (s[0] + 2 * s[1]) * x[1] + s[0]
> *
> > x[0] * x[1];
> > return true;}
> >
> > Derivative checker passes with no error. I am asking what kind of problem
> it
> > could be. Thanks a lot in advance.
> > Tang
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20101207/f8dc7552/attachment.html 


More information about the Ipopt mailing list