# Algorithms for Delivery of Data by Drones in an Isolated Area Divided into Squares
## 3 Simulation Results and Discussion
Detailed results of the comparison between changing the battery and charging the battery cases are presented in Table 5. The results obtained in this paper by simulation were compared with those obtained in [41]. In the case of the squares network and battery changing, the values of the delivery rate were within the range of 0.166 to 0.646 for the routing protocols Epidemic, Spray and Wait, PRoPHET, MaxProp, and MaxDelivery. The best delivery rate was 0.954 for the TD-Drone Dijkstra protocol (Figure 11). The worst result in terms of latency was obtained for MaxDelivery, and TD-Drone Dijkstra's average latency was the best, as expected (Figure 12). The delivery rate in the case of drone battery charging was between 0.135 and 0.143 for the routing protocols Epidemic, Spray and Wait, PRoPHET, MaxProp, and MaxDelivery. The maximum delivery rate was 0.54 and was obtained for the TD-Drone Dijkstra protocol. These low values were obtained because of the large delay due to the battery charge. The worst results for latency were obtained for PRoPHET and Epidemic, and TD-Drone Dijkstra's latency was also the best. The comparison between average latencies was performed on the routes where the delivery was successful for all of the algorithms (66 routes for the case of battery change and 64 routes in the case of battery recharge). The best delivery rate in all cases was given by the TD-Drone Dijkstra algorithm because its buffer load was the lowest (the data was loaded only in the stations and drones belonging to the calculated route). The latency in the case of [PERSON]'s algorithm was high because it can deliver most of the packages. Generally, the other algorithms can deliver only on the shorter distances due to buffer restrictions. It is known that [PERSON]'s algorithm results in the shortest path, and, therefore, the best latency. The delivery rate was better for the triangles drone network (Figures 13 and 14), with the exception of the Spray and Wait algorithm in the battery changing case. For PRoPHET, Max Prop, and TD-Drone Dijkstra in the battery charging case, the latency was significantly better. Latency in the case of changing the battery in the triangles drone network was generally better (Figure 15), with the exception of Spray and Wait, and in the case of Max Delivery a significantly better latency was obtained. In the case of battery charging (Figure 16), latency was better in the triangles drone network for three algorithms (Epidemic, Max Delivery, and TD-Drone Dijkstra), and, for the other three algorithms, the latency was better in the squares drone network. Figure 12: Average latency in the squares drone network. Figure 13: Delivery rate, battery changing, squares vs. triangles. Figure 16: Average latency: battery charging, squares vs. triangles. Figure 14: Delivery rate, battery charging, squares vs. triangles. Figure 15: Average latency: battery changing, squares vs. triangles. approximately the same surface, and double the number of loading/changing stations is required, although the total number of fixed communication stations is similar (63 vs. 65). Epidemic, Spray and Wait, PRoPHET, and MaxProp are classic algorithms used for DTN. However, in our case, as shown, the time-dependent Dijkstra algorithm adaptation can be successfully used because since the flight timetables are known. There are numerous advantages of the TD-Drone Dijkstra algorithm: an exact and optimum route is a priori calculated, ensuring the fastest time of delivery from departure to destination if the route exists; a message is not unnecessarily sent in the network if no route exists from departure to destination; multiple copies of the messages are not unnecessarily spread through drone and station buffers, resulting in unnecessary overloading of the buffers; and, finally, the rate of delivery success is maximized.