An implementation of the simulated annealing optimization algorithm