[Ipopt] Problems on derivative checker

tristartom tristartom at gmail.com
Tue Dec 7 14:16:47 EST 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20101207/175c9c44/attachment.html 


More information about the Ipopt mailing list