-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/23/2014 07:23 PM, Tobias Schmidt wrote: >> OK, in my understanding the optimization should be executable >> with a gradient-based algorithm if I set *grad* to a constant >> value instead of a calculated one. A short try also fails with >> the nlopt roundoff- limited exception after the first >> optimization step. > > I found out that the constant value, which I previously set as > "gradient" was too small. A bigger one causes the program to run > successfully! Hence, it led me implementing the gradient > calculations based on the difference quotients. > > Unfortunately, the optimization converges with an x vector which > violates the constraints, but the "last_optimize_result()" says > "FTOL_REACHED"! Does either the way I define or add the functions > cause the violations?
Firstly: Try a smaller value for the quotient of your difference quotient, d. Secondly: SQP is a local method, and hence, will only find a stationary point of the constraint optimization problem. If either your objective function or our constraints are not convex, this can very well violate the constraints (if you, locally, cannot improve any constraint without making another one worse). Is your solution "close" to the matlab solution? If yes, you probably have numerical problems with your gradient approximation. If no, you could be stuck in a local stationary point. Best, Julius > Regards, Tobias > > > _______________________________________________ NLopt-discuss > mailing list [email protected] > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss > - -- Dipl.-Inform. Julius Ziegler <[email protected]> Institut für Mess- und Regelungstechnik Karlsruher Institut für Technologie Department of Measurement and Control Karlsruhe Institute of Technology Engler-Bunte-Ring 21 76131 Karlsruhe Tel. +49 721 608 47146 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJS4idrAAoJEMXuNLCiya8LaxQH/iEu4U/avBMhN4v+THxmc1P9 Zn+8Jl8y4eYtMTwWg17XFGX5vJnLqt55QJp5WFBNrJDMP/7vBcMFQ8u/Pw+83mfE 23F7SA7NIOeiQiLJezNY5fijbsM8W1bMGw+vQJsNaqZ1OusLWNGnibdecrqLddfb dMNPxPs/RzM+54YZxjspJdegWCVQs0Vulq2QvoZCwQCCtpdPBcmiIS2Im6LxNT75 LHn3lKrGJGZpkbET4jH0kEieOfflvhVh+/9OHH2N+IeL1y+9Z+A0bpDC7VLZNNIK 0OlDaMaGMNRcRmwcI7cT6cIXHb0G4Ddupvdcfo0l//yBFIe7OO1SV8j2YtUPsuc= =RH/z -----END PGP SIGNATURE----- _______________________________________________ NLopt-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss
