Thanks, you are right about this.  A fix will be included in the next NLopt 
release.

Note that a similar fix needs to be applied to BOBYQA.  Also, in the 
computation of robeg and rhoend subsequent to your patch, usages of dx and 
s.scale should be surrounded by fabs(....) to take the absolute value.

On Jul 30, 2012, at 6:36 AM, Alexander Law wrote:
> It seems I found a bug in the COBYLA algorithm implementation. When an 
> initial-guess vector contains positive and negative values, in my objective 
> function I get "-inf" instead of actual values.
> I found that the bug is due to scaling x inside of COBYLA (cobyla.c, 
> cobyla_minimize function). When dx vector contains negative values. s.lb and 
> s.ub rescaled, but with negative scale[j] they should be swapped too.
> Please see attached patch.



_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to