As an extension of the travelling salesman problem, the travelling salesman problem with time
windows is a very difficult problemwith great theoretical and practical significance. In this paper, the time
restraints are converted intoobjective restraints, and genetic algorithmswithmutations by2-exchange and by
3-exchange, respectively, are designed by using sequence coding to deal with the soft and hard time
restraints. The simulation indicates that the latter algorithm is superior to the former, and that both of the
proposed algorithms are superior to the simple genetic algorithm.