On Jan 11, 2012, at 8:00 AM, Norman Violet wrote:
I started to use the NLOPT package only recently and I have a question
regarding the CRS2 algorithm. Sometimes I need to stop a running
optimization and in most programs this is possible by setting the
value
of the cost functional to a negative value or to infinity or to 'not a
number' (Matlab NaN). Doing so in CRS2 seems to lead into an endless
loop, which is quite unpleasant, because I loose all results
obtained up
to this point.
Returning NaN or -Inf is not a reliable way to stop an optimization
algorithm, as it will play havoc with the calculations unless the code
continually checks for such things.
NLopt has a documented way to force the optimization to stop without
losing anything; see
http://jdj.mit.edu/wiki/index.php/NLopt_Reference#Forced_termination
_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss