[R] optim(method="SANN")

Robin Hankin rksh at soc.soton.ac.uk
Fri May 28 14:41:51 CEST 2004


Hello List

I'm working on a combinatoric problem in which the object is to
minimize the badness() of a vector.  I think this class of problem is only
soluble by optim() using method=SANN.

The badness() of anything is >= 0, and when I've found a solution with
zero badness, I want optim() to stop (carrying on beyond zero badness
cannot improve the solution).  Efficiency is crucial here.

The  ?optim manpage states

           For '"SANN"' 'maxit' gives the total number of function
           evaluations. There is no other stopping criterion.

How best to make optim() stop as soon as it finds a zero badness
solution?



-- 
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
SO14 3ZH
tel +44(0)23-8059-7743
initialDOTsurname at soc.soton.ac.uk (edit in obvious way; spam precaution)




More information about the R-help mailing list