[Ipopt] Derivative checker seems to be incorrect

Ross Miller rosshm at icloud.com
Tue Mar 15 23:41:43 EDT 2016


Hi all,

I have a problem with the derivative checker that’s been puzzling me lately.

I use IPOPT to solve very large NLP problems, with sometimes 10,000+ variables and thousands of constraints.  I’m using IPOPT 3.12.4, MA57 solver, on MATLAB R2015b and Mac OS X 10.11.4.  The size of the problem comes from defining the states, controls, and dynamics of a model on a temporal grid (a “direct collocation” problem) with a certain number of nodes on that grid.  I can dictate the size of the problem by specifying the number of nodes.

The derivative test will often report errors that appear to be inaccurate.  For example:

* jac_g [   44,   44] = -3.4357799114574522e-01 v  ~  0.0000000000000000e+00  [ 3.436e-01]

I’m very confident that the derivative of my 44th constraint with respect to my 44th variable is non-zero.  I’ve verified this by visual inspection of the constraint equation, by the form of the equation in my constraints Jacobian, which is generated using symbolic dynamics software, and by performing my own hand-coded finite differencing of this constraint.  Here is the specified constraint equation from above:

f(44) = Fo20*Act20*FL20*FV20 - Fsec20;

where FL20 and Fsec20 are both functions of the 44th variable.  Here is the specified derivative of that equation with respect to the 44th variable:

dfdx(44,44) = Fo20*(Csec*Ksec*exp(Ksec*(-1+(Lm20-Lcc20)/Lu20))/Lu20-2*Act20*(-1+Lcc20/La20)*exp(-(-1+Lcc20/La20)^2/W20^2)*FV20/(W20^2*La20));

where all of the variables in that equation have non-zero values.  I’ve noticed that these errors seem to appear when the NLP problem gets above a certain size.  For smaller problems (few nodes) with the same model, the derivative test passes.  Regardless of the size or the success of the derivative check, the model seems to work (converges with acceptable tolerances and produces expected and reasonable results for my problem).

Is there any reason the accuracy of the derivative test would break down for larger problems, or is it more likely there is a mistake in my code somewhere that I’m missing?  I’ve tried playing around with the value of derivative_test_perturbation to no effect.  

Thanks,
Ross

=======================
Ross H. Miller, Ph.D.
Assistant Professor
Department of Kinesiology
University of Maryland
Office:	2134A SPH Building
Phone:	301-405-2495
Email:	rosshm at umd.edu <mailto:rosshm at umd.edu>
Web:	Google Scholar <http://scholar.google.com/citations?user=TKkdWHMAAAAJ&hl=en>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20160315/c3e3a150/attachment.html>


More information about the Ipopt mailing list