Closed adcascone closed 6 months ago
Hi.
Regarding the first question, you did effectively recover the results. First, we don't know the seed used in that example, but there is a call to runif
so you are almost certainly not using the same starting values. That being said, you are getting a result of effectively c(0, 0, 1)
, which is the answer. You appear to be using the default tolerances, which are sqrt(.Machine$double.eps)
or roughly 1.49e-8
. Try running auglag(runif(3), fn, hin = hin, heq = heq, localsolver="lbfgs", control = list(xtol_rel = 1e-15))
and you will see your results for the first two parameters are within xtol_rel
of 0, as they should be.
Regarding your second question, it is the same issue. You are getting a vector of five zeros within your requested tolerance. The exact value of your solution that close to zero depends not only on the processor you are using but also the BLAS. However, you are getting the correct answer within machine tolerance. This 1991 article by David Goldberg is very important in understanding the limits of how machines interpret very small real numbers.
Hope that helps.
@astamm, I think this one can be closed.
Thanks for the discussion.
I used the example from the alabama::auglag help page that's included on p. 8 of the nloptr reference manual to test the function, and I can't reproduce the $par values that are associated with the following code:
The output I generated is:
Similarly, I used the Powell problem example from the Rsolnp::solnp help page that's included on p. 8 of the nloptr reference manual, and I can't reproduce the $par values that are associated with the following code::
The output I generated is: