The Application of Floyd Algorithm for Returning Path Algorithm with Constraints of Time and Limit of Load

. Under ideal condition, there are lots of Shortest Path Algorithms such as Dijkstra, Floyd, Johnson algorithms. However, putting these algorithms into use is not as we expected. The reasons cause the problem may be in the Returning Problem mentioned in the following paper. Shortest Path Algorithms only focus on the shortest path between the points, without paying attention to figure out the direct solution from the Starting Point to the Passing Points and finally to the Starting Point. A Shortest Path Algorithm applied in actual practice will be introduced in here, then another case will be introduced and analyzed to explain the following Algorithm: Under the Constraints of time and limit of Loading capacity, figure out the Shortest Path Algorithm through the Starting Point to the Passing Points and back to the Starting Point. At last , the algorithm is of feasibility and practicability.


Introduction
There are many cases indicate that an effective algorithm to calculate the best route from the starting Case 2: Self-driving tour to an unfamiliar city. In an unfamiliar city, the tourist will be found of a time-saving route to to more tourist attractions and come back to the hotel easier to have a rest and restart in better condition for the next day. So an easier plan and time-saving route is very practical.
Case 3: School buses pick up and send back students.
The number of school buses is fixed . Thus, to make maximum of the school buses in a time and energy saving route is in need.
Since the need of shortest path algorithm is so important, the purpose is to figure out the algorithm that can be put into use with high efficient. The author applies the most commonly used shortest path algorithms into real practice, gets the shortest path matrix. With matrix, the most ideal rerouting path is chosen to put into the schematization to return when the time and loading value surpasses the designated value. The same method is applied to arrange the rest of the nodal points.

Dijkstra Shortest Path Algorithm is
based on the path from the starting point to nodal point.
The time complex rate is O(n2) [1] . However, the returning path not only contains this path, but also other passing points and the distances among the these passing points. Hence, only applying the Dijkstra Shortest Path Algorithm is not enough to solve the complex real problems. Someone may think that if repeatedly apply the Dijkstra Shortest Path Algorithm to the passing points; then the shortest paths among the passing points will be acquired [2] . In real practice, this may cause the repeating calculation of the same nodal points which may make the time complex rate to O(n3) may lead to the instability of the passing points.
Taking the UAV as an example, the passing point to fetch the goods may differ from the next time, and this will lead to the changes in the passing points. Thus, to get the shortest path, the computer has to spend a lot of time to calculate the path again.

Floyd Shortest Path Algorithm is based
on the shortest path algorithm of multiple starting points whose time complex rate is O(n3) [3] .
In spite of the relevant high time complex rate, this algorithm is easy to figure out the shortest path of all the nodal points, without recalculating when the passing points are changed [4] . What it needs to do is to find out the shortest path among the path matrix. Thus, the Floyd Shortest Path Algorithm is very practical, and it will be applied in the algorithm of this paper.

Johnson Shortest Path Algorithm is also
based on multiple starting points.

The time complex rate of the sparse matrix path is O(VElgV). Theoretical, Johnson Shortest Path
Algorithm is regarded better than the other two shortest path algorithms [5] . If we apply the Ford and Dijkstra Algorithms, Authorization means the traveling time and the loading value on the nodal points.In practice, most of the path graphs are not sparse matrix path [6] , let alone its algorithm which is using the re-authorization with proper influences on the time and loading program. Therefore, the Johnson Shortest Path Algorithm is not suitable for the calculation of this paper [7] . From all the analysis listed above, Floyd Shortest Path Algorithm is applied in this paper.

The Detour Algorithm
From the starting point, figure out the shortest path to cover the other passing points and finally get back to the starting points. To prove that this path is the shortest, a simple model diagram [8] (Fig.1) can show us.
Since the path of the diagram has adopted the shortest path algorithm to filter the shortest path, the paths between the nodal points are the shortest [9] . S is

4.The Returning Path Algorithm
To make it easier to understand, we take the school bus picking up the students as example: All together, 10 points to picking up the students, and the number of the students are shown in Fig.   2(network diagram) as the nodal points. There are two kinds of school buses, they are 20seats and 40 seats and share the same driving time--within 30 minutes. The Edge Weight in the diagram means the time (minute). We put the time as the value of the distances. Details are as followed: Employing the same method, the first three lines of the shortest matrix will be shown in Fig. 5.
The Edge Weight from S to A is 10, to C is 7; the Edge Weight from A to C is 9, thus the PV(A, C)=8.

The choices for the path and the arrangement of the buses
The PV and the path information from Fig.6, arrange the PV in descending order and get Table 1.  The details are as followed: Since  (Fig. 8).
Connect H-I, and form Route 3. A 20-seat school bus drive 23 minutes to pick up 13 students.
So far, the detour of the route has accomplished. Fig.9 is the best returning route and we need not to make reference to Table 1(PV Table). From Fig.9, we can get the conclusion that: the school needs two 40-seat and one 20-seat school buses. And the 40-seat school buses will take Route 1 and 2; while the 20-seat school bus will take Route 3. If the school begins the lessons at 8 o'clock, in ideal condition, the school bus can start out at 7:20, and get back at 7:50.

Summary
After