[R] constrOptim with SANN

From: Jonas Rumpf <jonas.rumpf_at_uni-ulm.de>
Date: Fri, 18 Jan 2008 11:30:05 +0100

Hi Everyone,

I'm trying to minimize a function using constrOptim with the simulated annealing method SANN.

If I understand constrOptim well, it basically passes most of its arguments to optim while somehow enforcing the constraints.

My problem is, that since SANN does not need gradients, when using optim with SANN, the gr argument of optim is used to specify a function to create the next candidate point for the annealing algorithm. If it is left NULL, a default Gaussian Markov kernel is used - which is fine for my purposes.

But for some reason, when using constrOptim, a non-NULL grad argument is needed when using the SANN method. Is there a possible way to circumvent this, possibly by telling constrOptim to use optim's default or do I have to specify the function by hand? If so, how do I do that? Unfortunately, I was not able to find an example or definition how to appropriately specify the function for the creation of the next candidate point, nor how to tell constrOptim to simply use the default of optim.

Any help in this matter will be greatly appreciated, and I apologize, if this has recently been discussed or I missed something in the manuals.

Best regards,
Jonas Rumpf

R-help_at_r-project.org mailing list
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. Received on Fri 18 Jan 2008 - 10:35:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 18 Jan 2008 - 11:30:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive