The route optimization process is one of the analyzes that can be used when there is a constraint on resources and time, including post-earthquake conditions. In this research, this analysis has been used to solve the Travelling Salesman Problem. In this case, the goal is finding the shortest path between a set of points and the algorithm will try to minimize the transmission costs and target function. This paper due to target, is practical and developmental, due to doing method is descriptive and analytical and due to information gathering method is documental and surveying. In order to implement this problem, by considering to the strict scenario of accessing resources, two algorithms including the Ant Colony Optimization and Imperialist Competition Algorithm in the MATLAB environment with the Dijkstra algorithm in the GIS environment have been used. The view points of the model are areas that prepared to temporary post-earthquake settlement in Gorgan city and the spatial and temporal real-time distances in the urban network are used instead of Euclidian distances. The results of the implementation of the model have shown that the Ant Colony Optimization has performed the route optimization in two parameters of time and distance more effectively than the two dijkstra and Imperialist Competition Algorithm.