A Simulated Annealing Algorithm for Scheduling Problems