[Ipopt] Ipopt Digest, Vol 94, Issue 5
Edson Cordeiro do Valle
edsoncv at enq.ufrgs.br
Thu Oct 4 13:16:24 EDT 2012
Martijn
Before approach to the scaling issue.
The message: "EXIT: Invalid number in NLP function or derivative
detected." means you function is evaluating to NaN or +-inf. You can try:
- plot your finite-difference derivative in the range of the variables
to see if they are evaluating to NaN or +-inf. Some functions with exp,
log, square root, may result in this behavior.
- increase the print level to see in what point it is happening.
- try to printf ou cout the gradient evaluation results to console.
This may give you some clue.
Regards
Edson C. do Valle
edsoncv at enq.ufrgs.br
Skype: edson.cv
ipopt-request at list.coin-or.org escreveu:
> Send Ipopt mailing list submissions to
> ipopt at list.coin-or.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://list.coin-or.org/mailman/listinfo/ipopt
> or, via email, send a message with subject or body 'help' to
> ipopt-request at list.coin-or.org
>
> You can reach the person managing the list at
> ipopt-owner at list.coin-or.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Ipopt digest..."
>
>
> Today's Topics:
>
> 1. Scaling in IPOPT (Martijn Disse)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 4 Oct 2012 15:04:06 +0000
> From: Martijn Disse <M.W.Disse at student.tudelft.nl>
> To: "ipopt at list.coin-or.org" <ipopt at list.coin-or.org>
> Subject: [Ipopt] Scaling in IPOPT
> Message-ID:
> <07CDC78571CB2D41873EE654CB0D01592FBEEAE6 at SRV361.tudelft.net>
> Content-Type: text/plain; charset="iso-8859-1"
>
> 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-0001.html>
>
> ------------------------------
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
>
> End of Ipopt Digest, Vol 94, Issue 5
> ************************************
>
More information about the Ipopt
mailing list