Simulated Annealing sample code