Dear Ernest, many thanks for chatching this. This is a typo in the documentation for auglag which I will correct in the next version.
Best wishes, Jelmer On Thu, Jun 26, 2014 at 7:40 PM, Ernest Adrogué <[email protected]> wrote: > Hi, I've been able to track the problem down. > > Apparently I was misled by the documentation of the R package, which states > on page 5 that the argument 'hin' to the auglag function > > defines the inequalty constraints, hin(x) >= 0. > > However, this is not true. It should say > > defines the inequality constraints, hin(x) <= 0. > > As a result my inequality constraints in combination with the bound > constraints resulted in a feasible region that was the empty set and the > whole thing blew up. > > Attached is a self-contained example in R, that can be run with > "Rscript libnlopt-debug.r". > > The example solves the problem > > min f(x; a, b): R^2 -> R > > where a and b are two constant vectors. At the optimum, x1=mean(a) and > x2=mean(b) with both x1, x2 >= 0. Bound constraints are set to [0, 10]. > > It can be seen that if you define > > hin(x) = (x1, x2) > > the optimization fails with generic failure after 399 iterations with x1 > and > x2 approaching zero, whereas if you define > > hin(x) = (-x1, -x2) > > the algorithm converges to the correct solution (x1=2.56, x2=2.64) in 29 > iterations. > > Regards. > Ernest > > _______________________________________________ > NLopt-discuss mailing list > [email protected] > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss > >
_______________________________________________ NLopt-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss
