Simulated Annealing Algorithm Code Python