[R] constrOptim with SANN

Jonas Rumpf jonas.rumpf at uni-ulm.de
Fri Jan 18 11:30:05 CET 2008


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




More information about the R-help mailing list