implemented a method in warmup to do simulated annealing.