Solving scheduling problems with a simulated-annealing algorithm