[Ipopt] Problems on derivative checker

Stefan Vigerske stefan at math.hu-berlin.de
Tue Dec 7 17:54:51 EST 2010


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



More information about the Ipopt mailing list