Abby Spurdle
2021-May-27 03:27 UTC
[R] Testing optimization solvers with equality constraints
I need to retract my previous post. (Except the part that the R has extremely good numerical capabilities). I ran some of the examples, and Hans W was correct.
Abby Spurdle
2021-May-27 06:00 UTC
[R] Testing optimization solvers with equality constraints
If I can re-answer the original post: There's a relatively simple solution. (For these problems, at least). #wrong x0 = c (1, 0, 0) NlcOptim::solnl(x0, objfun = f, confun = conf)$par Rdonlp2::donlp2(x0, fn = f, nlin = list(heq), nlin.lower = 0, nlin.upper = 0)$par #right x0 = c (1, 1e6, 0) NlcOptim::solnl(x0, objfun = f, confun = conf)$par Rdonlp2::donlp2(x0, fn = f, nlin = list(heq), nlin.lower = 0, nlin.upper = 0)$par So, problems with the starting point, appear to be very *specific*. Hence, a small amount of intentional error resolves the problem. Presumably, there are more efficient solutions, that the package maintainers may (or may not) want to address. On Thu, May 27, 2021 at 3:27 PM Abby Spurdle <spurdle.a at gmail.com> wrote:> > I need to retract my previous post. > (Except the part that the R has extremely good numerical capabilities). > > I ran some of the examples, and Hans W was correct.