This paper studies the problem of site selection and tour route, establishes multi-objective decision model and optimizes the line model, uses the Floyd algorithm and uses MATLAB and lingo to program to provide the optimal scheme of site selection and tour route respectively. A single-target optimization model was established, a minimum value function was established for the total distance after weighting, the shortest path length of any two communities was calculated using the Floyd algorithm, and the site of the water and electricity payment was obtained to facilitate residents to pay the utility bill. By establishing the constraint optimization line model, the shortest path of any two residential areas is obtained by The Floyd algorithm, establish the shortest path spanning tree whose root is residential area no.6, and the regions are divided, then optimal tour is obtained.