[R] Testing optimization solvers with equality constraints
Abby Spurdle
@purd|e@@ @end|ng |rom gm@||@com
Thu May 27 08:03:52 CEST 2021
I meant:
x0 = c (1, 1e-3, 0)
Not:
x0 = c (1, 1e6, 0)
So, large intentional error may work too.
Possibly, better...?
On Thu, May 27, 2021 at 6:00 PM Abby Spurdle <spurdle.a using gmail.com> wrote:
>
> 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 using 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.
More information about the R-help
mailing list