This paper presents a discrete particle swarm optimization (DPSO) algorithm with heterogeneous (non-uniform) parameter values for solving the dynamic travelling salesman problem (DTSP). The DTSP can be modelled as a sequence of static sub-problems, each of which is an instance of the TSP. We present a method for automatically setting the values of the DPSO parameters without three parameters, which can be defined based on the size of the problem, the size of the particle swarm, the number of iterations, and the particle neighbourhood size. We show that the diversity of parameter values has a positive effect on the quality of the generated results. We compare the performance of the proposed heterogeneous DPSO with two ant colony optimization (ACO) algorithms. The proposed algorithm outperforms the base DPSO and is competitive with the ACO.