sannbox is a straightforward implementation of simulated annealing with box constraints.
sannbox(par, fn, control = list(), ...)sannbox returns a list with components:
  fn.
      The second number is provided for compatibility with optim and will always be NA.
    optim; will always be 0.par.fn corresponding to final.params.par.fn corresponding to par.control argument is a list that can supply any of the following components:
  trace
fnscalefn during optimization.
      If negative, turns the problem into a maximization problem.
      Optimization is performed on fn(par)/fnscale.
    
parscalepar/parscale and these should be comparable in the sense that a unit change in any element produces about a unit change in the scaled value.
    
maxit10000.
    
temp1.
    
tmax10.
    
candidate.distcandidate.dist is function(par,temp,scale) rnorm(n=length(par),mean=par,sd=scale*temp).
schedtemp and tmax.
      By default, sched is function(k,temp,tmax) temp/log(((k-1)%/%tmax)*tmax+exp(1)).
      Alternatively, one can supply a numeric vector of temperatures.
      This must be of length at least maxit.
    
lower, upperpar.
      By default, lower=-Inf and upper=Inf, i.e., there are no constraints.
    traj.match, probe.match.