[Ipopt] Scaling in IPOPT
Martijn Disse
M.W.Disse at student.tudelft.nl
Thu Oct 4 11:04:06 EDT 2012
Hi Everyone,
My previous post was about different results on Hardware than on my laptop. I found out by trial and error that it seems related to the nlp_scaling_method.
* When using a "gradient-based" I get nice results on Simulink (laptop), but on xPC-target (real-time hardware), I get some "Invalid number" or "restoration failed" message.
* When using "user-scaling" and not specify any scaling anywhere (I cannot find it in the 'options' appendix C of the documentation), Simulink and xPC-target show similar results, but much slower. If I look at the logs, the slower response does not come from the number of iterations, but from the number of function evaluations during one iteration.
I am using a simple forward-difference approximation for the gradient with a static stepsize of h=1e-7 (machine accuracy of laptop is 2.22e-16, not sure about the xPC-target Intel Xeon).
Two questions:
1. The high number of function evaluations per iteration seems to point to a gradient issue. Am I correct in this?
2. Ideally I would like to use gradient-based scaling, but does anyone have any experience in using this method i.c.w. finite difference approximation?
I hope someone can help me, because I am really lost in this for a week now. :)
Best,
Martijn Disse
________________________________
Van: ipopt-bounces at list.coin-or.org [ipopt-bounces at list.coin-or.org] namens Martijn Disse [M.W.Disse at student.tudelft.nl]
Verzonden: dinsdag 2 oktober 2012 11:35
To: ipopt at list.coin-or.org
Onderwerp: [Ipopt] Issue on hardware implementation IPOPT: scaling issue?
Hi everyone,
I've build an NMPC controller as a Matlab C-mex S-function and it works like a charm in Simulink. When I however compile to an xPC-target (turn a PC into a dedicated hardware) executable using MSVS 2010 express, I get different results.
I used the "output_file" option on to see what is happening. There are several differences between the Simulink log and the target hardware log:
1. Xpc: Scaling parameter for objective function = 1.000000e-008
Simulink: Scaling parameter for objective function = 1.163760e-003
2. Xpc: compl_inf = 4.0000000500000000e+005
Simulink: compl_inf = 3.4371342722094269e+000
3. Xpc: overall_error = 4.0000000499999999e-003
Simulink: overall_error = 1.0000000000000000e+002
Iteration 0:
4. Xpc: inf_du lg(mu) = 8.59e-004
Simulink: inf_du lg(mu) = 1.00e+002
It ends up with:
-EXIT: Invalid number in NLP function or derivative detected.
-Restoration phase is called at point that is almost feasible, with constraint violation 5.672143e-007. Abort.
-EXIT: Restoration Failed!
My question: What could case a difference in the hardware implementation (xPC-target, Mathworks) and the Simulink results? The difference is already visible in the completely different scaling values.
I hope someone can help me :)
Best regards,
-Martijn Disse
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20121004/abb6b076/attachment.html>
More information about the Ipopt
mailing list