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 <spurdl...@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.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to