Simulated annealing works in object oriented code