Nowadays, with the increase of traffic demand, some regulation measures have been adopted to alleviate traffic congestion. The restrictions add difficulties to the search of shortest path problems of road network, and some classical algorithms can not be adopted to find a right route. Although some researchers have presented some algorithms, intelligent optimization methods are seldom seen. In this paper, in the light of the characteristic of traffic restriction network, from the perspective of algorithm, we present a general simulated annealing algorithm that can take into account all the restrictions of real network and find the optimal solution between any two nodes efficiently without changing its structure. Finally, the algorithm is applied to a given road network and shows a higher efficiency, which validates its availability.