simulated annealing core