Skip to content
Prev 4385 / 63424 Next

bounds violations, infinite loops in optim/L-BFGS-B (PR#671)

It's a feature, on the TODO list to be added one day.
There are no plans to remove either.  `indefinitely' is not part
of the non-warranty.
On Solaris, I get neither negative values nor an infinite loop
on your examples. 

On Linux RH6.2/gcc 2.95.2 I get

NA 1 NA 1 1 1 1 0.6831783 1 0.6831783 1 NA 
NA -Inf NA -Inf -Inf -Inf -Inf -160.2173 -Inf -107.0805 -Inf NA 
Error in optim(c(min(boot.total) - 1, 100, 1), nllfun2g.boot, lower = rep(fuzz,  
: 
        L-BFGS-B needs finite values of fn

for the first, and probably a loop for the second.  I think this is
the usual problem with inconsistent internal precision on Linux
compilers, so try compiling optim.c with -ffloat-store to make gcc
IEEE-compliant.  (At least, that's what the Linux gcc man page says.)

Can you provide some evidence for negative parameter values?  That's
not supposed to happen, but as I rarely fail to supply derivatives,
I have not tested it much.

Finally, I think you have omitted to supply scaling consts for your problem,
and optim will work a lot better if you do, as it will also do if
you can supply analytical derivatives.