Cost-E ﬀ ective Placement of Recharging Stations in Drone Path Planning for Surveillance Missions on Large Farms

: The energy limitation remains one of the biggest constraints in drone path planning, since it prevents drones from performing long surveillance missions. To assist drones in such missions, recharging stations have recently been introduced. They are platforms where the drone can autonomously land to recharge its battery before continuing the mission. However, the cost of those platforms remains a signiﬁcant obstacle to their adoption. Consequently, it is important to reduce their number while planning the path of the drone. This work introduces the Single Drone Multiple Recharging Stations on Large Farm problem (SD-MRS-LF). A large farm is considered as an area of interest to cover with a set of candidate locations where recharging stations can be installed. The aim is to determine the path of the drone that minimizes the number of locations for recharging stations as well as the completion time of the surveillance mission. This path planning problem falls within the realm of computational geometry and is related to similar problems that are encountered in the ﬁeld of robotics. The problem is complicated due to environmental constraints on farms such as wind speed and direction, which produce asymmetries in the optimal solution. A back-and-forth-k -opt simulated annealing (BFKSA) approach is proposed to solve the deﬁned problem. The new approach is compared to the basic back-and-forth (BF) and a K-opt variant of the well-known simulated annealing (KSA) approach over a set of 20 random topologies in di ﬀ erent environmental conditions. The results from computational experiments show that the BFKSA approach outperforms the others, in terms of providing feasible solutions and minimizing the number of recharges.


Introduction
One of the latest developments in agriculture is the use of drones.According to a recent PwC report [1], the agricultural drone market is estimated at USD 32.4 billion, taking the second largest share of the market.In, particular, drones are increasingly used in the surveillance of farms [2].In this application, drones fly over an area of interest to take pictures that can be analyzed later for different purposes including crop yield estimation, early warning of pests and disease, disaster risk reduction, and so on.Drone can be operated in two modes: manual mode requiring a remote human Symmetry 2020, 12, 1661 2 of 25 intervention and automatic mode in which the path of drone is determined beforehand [3].This last mode requires prior planning of the drone path, commonly known as coverage path planning (CPP) [4].More precisely, CPP for drones may be defined as the determination of an optimal path allowing a drone to complete a coverage mission, while minimizing the mission's completion time.The area of interest in agriculture is typically a farm that may be represented as a sequence of vertices that form a planar polygon.This polygon generally is decomposed into smaller cells to facilitate the coverage task.The decomposition is essentially based on the ground sampling distance (GSD), which represents the distance between pixel centers measured on the ground [5].
The major constraint in drone CPP is the small capacity of the drone's battery, which limits the drone's available energy and thus its flight range.For this reason, much research in the area of CPP has been focused on the development of energy-aware algorithms.One of the main ideas behind common algorithms is the assumption that a drone spends a lot of time and energy making turns [6,7].Thus, those algorithms modify conventional trajectories such as back-and-forth [8] and HILBERT [9].An interesting survey on coverage path planning with drones can be found in [10].
Regardless of the efficiency of algorithms, large-scale surveillance missions will require more than a single trip.For instance, the authors in [11] conducted around 200 flights to survey an area of about 29.5 ha with a battery-powered DJI Inspire 1 quadcopter.In an area of four square kilometers as it is the case in [12], a DJI Phantom 3 Professional drone requires at least 10 flights for a mission.Consequently, recharging stations have recently been introduced to assist the drone in continuous operation [13,14].When the drone runs out of energy, it may land on a recharging station to recharge its battery.Even if it is possible for a drone to land on a moving platform [15] and perform a dynamic wireless charging [16], the movement of such a platform in many farms is limited due the lack of proper roads throughout the farm.Most of the current literature considers predefined locations for recharging stations.For example, authors in [17] use only one drone with some recharging stations located at predefined sites.They tried to minimize the mission completion time by deciding when the drone should stop for charging depending on the state of charge (SoC).Reference [18] takes an alternative approach, by considering a fleet of drones with only one recharging station located at the center of the area of interest-the aim is to cover the area of interest with a constraint on energy replenishment scheduling.Since only one recharging station is used, the surveyed area is limited to a radius of half the traveling distance of a drone, so that the drone can make a round trip to the recharging station.
To automatically survey a larger area will require at least one recharging station located at an acceptable position.The first attempt to solve this issue of determining the optimal location of recharging stations is found in [19].Authors proposed a Drone Delivery Recharging Location Model (DDRLM) that optimizes the location of a set of recharging stations with the aim of maximizing the customer demand that can be served.In this formulation, the number of recharging stations is given beforehand.
Besides finding optimal locations for recharging stations, their number should also be minimized to reduce the cost of the overall architecture.Actually, the cost of an additional recharging station can significantly influence the cost of the overall architecture.For example, the Heisha recharging station costs about 1000 USD, while a Mavic Air drone that can be recharged using this station costs barely half the price (600 USD) [20].This shows the necessity to reduce the number of recharging stations, especially for users with limited budgets such as low-income users.
This work introduces the Single Drone Multiple Recharging Stations in Large Farm problem (SD-MRS-LF).Unlike the work in [19] which focuses on the determination of the locations for a given number of recharging stations, this work rather tackles drone path planning with a priority on the economical point of view.In this formulation, an area of interest is given as well as a set of candidate locations within the area of interest where recharging stations may potentially be installed.The objective is two-fold: first to minimize the number of actually used recharging stations and secondly to minimize the completion time of the surveillance mission.The solution with the smallest number of recharging stations will be the best regardless the completion time, since the priority is to reduce the cost.In case more than one solution provide the smallest number of recharging stations, the one with the smallest completion time will be considered as the best.To solve this problem, a new approach has been proposed: back-and-forth-k-opt simulated annealing (BFKSA).BFKSA is a combination of the two well-known algorithms, back and forth (BF) and the K-opt variant of simulated annealing (SA).The idea behind BFKSA is based on the assumption that the quality of the initial solution provided to a SA algorithm can influence the final solution.
The rest of the paper is organized as follows: Section 2 presents the system modelling and the formulation of the Single Drone Multiple Recharging Stations in Large Farm problem.Section 3 presents and explains the Back-and-Forth-k-opt Simulated Annealing approach defined to solve the problem.Section 4 presents the simulation setup and compares the results with basic Back-and-Forth and Simulated Annealing approaches.This paper ends with a conclusion and a look at future work.

Basic Assumptions
The following realistic assumptions and approximations have been made to specify the problem:

•
The drone begins the mission fully charged, but a single charge does not supply enough energy for the entire mission.

•
The flying status of the drone is one of two possibilities: vertical moving (take-off/landing), or horizontal motion [21].

•
Take-off energy and landing energy is negligible compared to the energy required for flight.

•
The drone flies at a constant altitude throughout the mission (except when recharging).

•
The area to cover presents no obstacles to impede the drone's flight.In practice, drones may fly at altitudes at 120 m which is higher than the tallest trees.

•
Weather conditions (including temperature, air pressure, relative humidity, and wind speed) are constant over the entire region, during the entire mission.Note that weather conditions such as wind and temperature can affect the energy consumption.The ambient temperature may influence the battery drain and capacity [22] while the wind may affect either positively or negatively the forward movement of the drone [23], depending on the wind speed and direction, as well as the flying status of the drone.

•
Recharging stations are located within the area to enable the drone to complete its mission.
There are a number of pre-identified candidate locations within the region where charging stations may potentially be located.

•
The drone can only visit a recharging station once per mission.This assumption reflects the fact that once a recharge is performed, the station will require a period of time to recharge itself (possibly using solar energy).

Scenario Modeling
Farm areas typically can be described as planar polygons.Unlike urban areas that may contain nonflying zones or tall buildings, the aerial space over a farm is generally free of obstacles.In this scenario, an area to cover is considered as a rectangular form of size S m 2 and decomposed into cells as illustrated in Figure 1a.The set of the cells is represented by A and contains n × m elements among which some cells are candidate locations where recharging stations may conveniently be deployed.The set of candidate locations is represented by C, with C ⊆ A. The decomposition of our target area into a grid depends on the maximum image collection distance interval of the drone.This distance interval depends on the specification of the drone (the field of view angle and the resolution of the camera) and the overlap requirement during image collection.The maximal value of the distance  separating image collection points (as shown in Figure 1b) is computed using (1) as proposed in [24].
ℎ  is the opening angle of the camera;  is the drone's altitude, and  the overlap ratio.
Figure 2 shows the geometry used to derive (1), with  the size of a cell of the grid.In real scenarios in farm surveillance, the minimal resolution of each collected image is an important aspect for image processing in further stages.This minimal resolution depends on the purpose of the surveillance mission.Given an image resolution ( ,  ), the spatial resolution  obtained by taking a picture at an altitude  with a field of view angle  can be computed by Equation (2).
If we consider the minimal resolution  required by the mission, we obtain the inequality From (3) we deduce the maximum altitude  the drone can fly.
The maximum altitude with respect to the image resolution requirement is generally used to minimize the time of the mission.During the remote sensing mission for monitoring sorghum The decomposition of our target area into a grid depends on the maximum image collection distance interval of the drone.This distance interval depends on the specification of the drone (the field of view angle and the resolution of the camera) and the overlap requirement during image collection.The maximal value of the distance I max separating image collection points (as shown in Figure 1b) is computed using (1) as proposed in [24].
where θ is the opening angle of the camera; H is the drone's altitude, and r the overlap ratio.
Figure 2 shows the geometry used to derive (1), with I the size of a cell of the grid.
growth, the authors in [25] used a ReadyMadeRC Anaconda drone equipped with a camera of 1.2 megapixels and flying at an altitude of 120 m which provided a spatial resolution of approximately 6.5 cm.In addition, the maximum altitude of the drone can be legally restricted.Due to budget limitation only one drone is considered with a maximal capacity energy  .Each time the drone stops at a recharging station, it recharges its battery to  before leaving.The mission starts at a given take-off point  and ends at a given landing point that maybe different from the take-off point.

Energy Consumption Model
Under horizontal motion, drones power expenditure may be broken into two components: one component for lift, and the second to overcome the parasitic drag that hinders its forward movement in free space [26,27].The total power in horizontal moving is given by (5).Details on how the formula is derived are presented in [28].
with In real scenarios in farm surveillance, the minimal resolution of each collected image is an important aspect for image processing in further stages.This minimal resolution depends on the purpose of the surveillance mission.Given an image resolution ϕ x , ϕ y , the spatial resolution ρ Symmetry 2020, 12, 1661 5 of 25 obtained by taking a picture at an altitude H with a field of view angle θ can be computed by Equation (2).
If we consider the minimal resolution ρ m required by the mission, we obtain the inequality From (3) we deduce the maximum altitude H M the drone can fly.
The maximum altitude with respect to the image resolution requirement is generally used to minimize the time of the mission.During the remote sensing mission for monitoring sorghum growth, the authors in [25] used a ReadyMadeRC Anaconda drone equipped with a camera of 1.2 megapixels and flying at an altitude of 120 m which provided a spatial resolution of approximately 6.5 cm.In addition, the maximum altitude of the drone can be legally restricted.
Due to budget limitation only one drone is considered with a maximal capacity energy E M .Each time the drone stops at a recharging station, it recharges its battery to E M before leaving.The mission starts at a given take-off point S t and ends at a given landing point that maybe different from the take-off point.

Energy Consumption Model
Under horizontal motion, drones power expenditure may be broken into two components: one component for lift, and the second to overcome the parasitic drag that hinders its forward movement in free space [26,27].The total power in horizontal moving is given by (5).Details on how the formula is derived are presented in [28]. with where • P is the required total power (in watts); • P P is the required power to overcome the parasitic drag (in watts); • P L is the required power to lift the drone (in watts); • C D is the aerodynamic drag coefficient; • F a is the front facing area (in m 2 ); • W is the total weight of the drone (in kg); • D a is the density of the air (in kg/m 3 ); • b is the width of the drone (in m); • v is the speed of the drone relative to the wind (in m/s).
Since P P and P L are respectively proportional and inversely proportional to the speed of the drone, a tradeoff (optimum speed) that minimizes the power consumption of the drone during horizontal moving should therefore be found.To compute this optimum speed, we use (8) proposed by [28].
All the parameters are the same used in ( 6) and (7).Several energy models have been proposed in the literature.The energy consumed during horizontal flight has been considered approximately constant [23], but it is not true in real case scenarios.The authors in [17] tried to derive a more realistic energy model based on empirical experiments.However, the model is tailored for experimental conditions in which the study has been conducted.In this paper, we will consider Equation (8) to derive an energy model.The energy E consumed during a time T and a power P is given by The time T can also be expressed as where d, v, w, and θ representing respectively the distance traveled, drone speed relative to the wind, the wind speed, and the relative angle between the wind and the travel direction.Considering Equations ( 5)-( 10), we may express energy consumption in terms of drone velocity relative to wind speed as where Taking the derivative with respect to v, we find the optimization condition for the optimal speed v opt In the case w = 0, this gives an optimal velocity v 0 that is expressed in Equation ( 13), Which agrees with (5).In the general case, we may write Multiplying by v 0 /β and noting that α β v 4 0 = 1, we obtain Equation ( 15) where ω ≡ (w cosθ)/v 0 .This gives a 5th order Equation ( 16) Symmetry 2020, 12, 1661 7 of 25 Denoting the largest root of Equations ( 16) by z max , we obtain the expression of the optimal speed in Equation (17), where the parameter v 0 corresponds to the cruise speed.
The energy consumption is then given by Equation ( 18) We use the specifications of the manufacturer to derive α and β.The specifications for the 3DR Solo drone are the following: From these numbers we may derive the power consumed at 2.5 m/s = 77 Wh/(25/60) = 185 Watts.From ( 5)-( 7) we have From the cruise speed, we may derive: 2.5m/s = β α Solving Equations ( 19) and ( 20) for α, β gives Finally, the energy consumption is estimated by plugging these parameters into (18) where v opt = 2.5z max (23) and z max is the largest root of Equation ( 24)

Problem Formulation
The Single Drone Multiple Recharging Stations in Large Farm problem (SD-MRS-LF) is defined as follows: given an area of interest decomposed into a set of cells A and a set of candidate locations for recharging station(s) C, determine a route R that minimizes the number of actually used recharging stations and the completion time of the mission.A route R may be characterized as a permutation of the elements of The objective functions are given by ( 25) and (26).They respectively minimize the number of recharging stations and the total traveling time. with • n is the number of elements in R; is the optimal speed of the drone to move from point R i to point R i+1 ; • w is the wind speed; • θ is the relative angle between the wind and the travel direction; • C E is the set of actually used recharging stations.

Complexity Analysis of the Problem
Let us consider the take-off point and the final landing node of the drone to be the same.The given problem can easily be reduced to the traveling salesman problem (TSP) by considering each cell to cover as a city to visit.Since each cell and recharging station can be visited once only, the problem amounts to find the best arrangement starting from the take-off point considered as the depot to the final landing point which is the same point.The given problem is therefore NP-hard with factorial time complexity O(n!).
For instance, an area of size 8 × 8 contains 64 cells corresponding to 64! = 1.26 × 10 89 arrangements.Evaluating such a number of arrangements using an exhaustive strategy would require 10 72 years on a CPU with a clock speed of 4 gigahertz.That is why metaheuristics are good alternatives.

Background
BFKSA is a combination of three algorithms: back-and-forth, k-opt, and simulated annealing.In the following subsections, we describe these three algorithms.In Section 3.2.we will describe how the three algorithms are integrated together to construct the BFKSA algorithm.

Back-and-Forth (BF)
BF is the simple technique mainly used in regular areas.It is inspired by 'the way of the ox'.In fact, when an ox trails a plow and has to cover an area, it moves in a straight line along the field, turns around, and then traces a new straight path adjacent to the previous one.BF is considered as an energy-aware algorithm since it reduces the number of turns made by a drone.For instance, in Figure 3a,b, the drone makes only six turns to cover the area of interest.A BF route can be generated using Algorithm 1 or Algorithm 2.
A generated route R may not be feasible.A route is feasible if the maximum energy of the battery allows the drone to fly from the starting point or an intermediary recharging station to the closest recharging station on the route; or from the last recharging station to the final landing point.Algorithm 3 minimizes the number of recharging stations as given by ( 24) on a given route R when the route is feasible.Depending on the location of the recharging stations, three cases can be observed (Figure 3): 1.
The route requires the minimal energy and the minimal number of recharging stations (Figure 3a) 2.
The route requires the minimal energy, but a higher number of recharging station (Figure 3b) 3.
The route requires the minimal energy, but it is not feasible (Figure 3c) In the last two cases, modifying the BF route may decrease the number or recharging stations or turn an infeasible route into a feasible one.This can be done by combining back-and-forth with metaheuristics such as simulated annealing, as described below.

Simulated Annealing (SA)
SA is inspired from the annealing process in metallurgy.The idea consists of generating an initial route and then performing several iterations to improve this route.A neighbor route is generated from the previous one at each iteration.The new route is accepted if it improves the value of the objective function.If it is not the case, the new route is accepted with a probability depending on the current temperature T and the difference between the new and previous values of the objective function (denoted by ∆E).The probability in the SA algorithm generally follows the Boltzmann distribution given by e − ∆E T .Since the temperature updates each time the equilibrium state is reached, the probability of accepting non-improving routes decreases.

K-Opt Algorithm
The basic simulated annealing randomly selects a new solution  in the neighborhood of the current solution .This selection process presents some limitations.First, the same neighbor solution  can be evaluated several times since there is no mechanism to recognize already visited solutions.
In some special cases, the algorithm can even be trapped in a local loop, switching between  and .Secondly, by selecting only one solution in the neighborhood of , another neighbor solution  better than  can be ignored.To mitigate these limitations, a local search in the neighborhood of a current solution  is usually performed.
One of the most widely used local search algorithms is the k-opt algorithm.It is a generalization of the 2-opt algorithm proposed by Georges Croes in 1958 to solve the traveling salesman problem.The algorithm is based on the k-opt operator and works as follows: at each step, k edges are removed from the current solution and the k partitions are therefore reconnected to form a new solution.An application of the 2-opt and the 3-opt operator on a given route R is illustrated in Figure 4.

K-Opt Algorithm
The basic simulated annealing randomly selects a new solution  in the neighborhood of the current solution .This selection process presents some limitations.First, the same neighbor solution  can be evaluated several times since there is no mechanism to recognize already visited solutions.
In some special cases, the algorithm can even be trapped in a local loop, switching between  and .Secondly, by selecting only one solution in the neighborhood of , another neighbor solution  better than  can be ignored.To mitigate these limitations, a local search in the neighborhood of a current solution  is usually performed.
One of the most widely used local search algorithms is the k-opt algorithm.It is a generalization of the 2-opt algorithm proposed by Georges Croes in 1958 to solve the traveling salesman problem.The algorithm is based on the k-opt operator and works as follows: at each step, k edges are removed from the current solution and the k partitions are therefore reconnected to form a new solution.An application of the 2-opt and the 3-opt operator on a given route R is illustrated in Figure 4.

K-Opt Algorithm
The basic simulated annealing randomly selects a new solution x in the neighborhood of the current solution x.This selection process presents some limitations.First, the same neighbor solution x can be evaluated several times since there is no mechanism to recognize already visited solutions.In some special cases, the algorithm can even be trapped in a local loop, switching between x and x.Secondly, by selecting only one solution in the neighborhood of x, another neighbor solution x better than x can be ignored.To mitigate these limitations, a local search in the neighborhood of a current solution x is usually performed.
One of the most widely used local search algorithms is the k-opt algorithm.It is a generalization of the 2-opt algorithm proposed by Georges Croes in 1958 to solve the traveling salesman problem.The algorithm is based on the k-opt operator and works as follows: at each step, k edges are removed from the current solution and the k partitions are therefore reconnected to form a new solution.An application of the 2-opt and the 3-opt operator on a given route R is illustrated in Figure 4.

BFKSA Algorithm
The Back-and-Forth Simulated Annealing is given in Algorithm 4. Initial Route (line 2): The initial route is obtained using Algorithm 5 (GenerateInitialRoute).BF algorithm can consider either vertical orientation (Figure 5b) or horizontal orientation (Figure 5c).The idea in Algorithm 5 is to run BF in both directions and to consider the orientation that provide the best value for  and  depending on wind direction.In case there is no feasible solution, the orientation that forms the smallest angle with the wind direction is taken.In this paper, we consider three directions for the wind: (0,1), (1,1), (1,0), shown in Figure 5a Fitness functions (lines 3 and 11): the two objective functions namely  and  are evaluated using respectively Equations ( 3) and ( 4).The number of actual recharging stations in a route is reduced using Algorithm 2 (recharging station minimization).
Generating a new route (line 8-10): the process of finding a new route starts by randomly selecting three indexes that will correspond to the edges to delete on the current route.Then, by using

BFKSA Algorithm
The Back-and-Forth Simulated Annealing is given in Algorithm 4. Initial Route (line 2): The initial route is obtained using Algorithm 5 (GenerateInitialRoute).BF algorithm can consider either vertical orientation (Figure 5b) or horizontal orientation (Figure 5c).The idea in Algorithm 5 is to run BF in both directions and to consider the orientation that provide the best value for f 1 and f 2 depending on wind direction.In case there is no feasible solution, the orientation that forms the smallest angle with the wind direction is taken.In this paper, we consider three directions for the wind: (0,1), (1,1), (1,0), shown in Figure 5a.

BFKSA Algorithm
The Back-and-Forth Simulated Annealing is given in Algorithm 4. Initial Route (line 2): The initial route is obtained using Algorithm 5 (GenerateInitialRoute).BF algorithm can consider either vertical orientation (Figure 5b) or horizontal orientation (Figure 5c).The idea in Algorithm 5 is to run BF in both directions and to consider the orientation that provide the best value for  and  depending on wind direction.In case there is no feasible solution, the orientation that forms the smallest angle with the wind direction is taken.In this paper, we consider three directions for the wind: (0,1), (1,1), (1,0), shown in Figure 5a Fitness functions (lines 3 and 11): the two objective functions namely  and  are evaluated using respectively Equations ( 3) and ( 4).The number of actual recharging stations in a route is reduced using Algorithm 2 (recharging station minimization).
Generating a new route (line 8-10): the process of finding a new route starts by randomly selecting three indexes that will correspond to the edges to delete on the current route.Then, by using Fitness functions (lines 3 and 11): the two objective functions namely f 1 and f 2 are evaluated using respectively Equations ( 3) and ( 4).The number of actual recharging stations in a route is reduced using Algorithm 2 (recharging station minimization).
Generating a new route (line 8-10): the process of finding a new route starts by randomly selecting three indexes that will correspond to the edges to delete on the current route.Then, by using GenerateRoutes(), new solutions are derived from the current one using a k-opt operator that deletes k edges and builds a new route.The value of k varies between 2 and 3.For a given route R, all the routes derived by applying a 2-opt or 3-opt are tested and the best is kept.Since the proposed model considers the wind direction, a reverse edge may consume a different energy quantity compared to the original edge (Figure 4).The determination of the best local route is given in Algorithm 6.
Stopping condition (line 6): the algorithm stops when the current temperature is lower than the minimal temperature or after reaching several equilibrium stages without improvement.We suppose therefore having reached at least a close to optimal route.Equilibrium stage (line 7): If there is no improvement of the best route found so far after a certain number of iteration, we suppose having reached an equilibrium state at the current temperature and the temperature is update (line 19).
Accepting a solution (line 14 to 18): Since the problem formulation first focuses on the cost of the deployment, a route is accepted if it provides a smaller number of recharging station, or if the number of recharging station is equal to the one of the best route found so far, but with a smaller completion time.However, a non-improving route with regard to the completion time can be accepted in order to escape from local optima, but with a certain probability.GenerateRoutes(), new solutions are derived from the current one using a k-opt operator that deletes k edges and builds a new route.The value of k varies between 2 and 3.For a given route R, all the routes derived by applying a 2-opt or 3-opt are tested and the best is kept.Since the proposed model considers the wind direction, a reverse edge may consume a different energy quantity compared to the original edge (Figure 4).The determination of the best local route is given in Algorithm 6. Stopping condition (line 6): the algorithm stops when the current temperature is lower than the minimal temperature or after reaching several equilibrium stages without improvement.We suppose therefore having reached at least a close to optimal route.Equilibrium stage (line 7): If there is no improvement of the best route found so far after a certain number of iteration, we suppose having reached an equilibrium state at the current temperature and the temperature is update (line 19).
Accepting a solution (line 14 to 18): Since the problem formulation first focuses on the cost of the deployment, a route is accepted if it provides a smaller number of recharging station, or if the number of recharging station is equal to the one of the best route found so far, but with a smaller completion time.However, a non-improving route with regard to the completion time can be accepted in order to escape from local optima, but with a certain probability.Accepting a solution (line 12 to 16): A route is accepted if it provides a smaller number of recharging stations, or if the number of recharging station is the equal to the one of the best route found so far, but with a smaller energy consumption.However, a non-improving route with regard to energy consumption can be accepted in order to escape from local optima, but with a certain probability.Accepting a solution (line 12 to 16): A route is accepted if it provides a smaller number of recharging stations, or if the number of recharging station is the equal to the one of the best route found so far, but with a smaller energy consumption.However, a non-improving route with regard to energy consumption can be accepted in order to escape from local optima, but with a certain probability.

Parameter Settings and General Setup
Parameter values used in the simulations are summarized in Table 1.The maximum energy, optimum velocity, and altitude correspond to operating parameters of the 3DR Solo drone.Vertical velocity and acceleration were taken as 0; horizontal acceleration was taken as 0, except when the drone is approaching a cell containing a RS.
A set of 20 random topologies of sizes between 8 × 8 and 16 × 16 cells with a varying number of candidate recharging station locations was generated using a generalized Halton number generator (https://github.com/fmder/ghalton).We consider an altitude  = 120 as adopted in [22] for two reasons.First, 3DR solo drone can be equipped with a camera able to shoot 4 K videos at 30 Accepting a solution (line 12 to 16): A route is accepted if it provides a smaller number of recharging stations, or if the number of recharging station is the equal to the one of the best route found so far, but with a smaller energy consumption.However, a non-improving route with regard to energy consumption can be accepted in order to escape from local optima, but with a certain probability.

Parameter Settings and General Setup
Parameter values used in the simulations are summarized in Table 1.The maximum energy, optimum velocity, and altitude correspond to operating parameters of the 3DR Solo drone.Vertical velocity and acceleration were taken as 0; horizontal acceleration was taken as 0, except when the drone is approaching a cell containing a RS.
A set of 20 random topologies of sizes between 8 × 8 and 16 × 16 cells with a varying number of candidate recharging station locations was generated using a generalized Halton number generator (https://github.com/fmder/ghalton).We consider an altitude  = 120 as adopted in [22] for two reasons.First, 3DR solo drone can be equipped with a camera able to shoot 4 K videos at 30

Parameter Settings and General Setup
Parameter values used in the simulations are summarized in Table 1.The maximum energy, optimum velocity, and altitude correspond to operating parameters of the 3DR Solo drone.Vertical velocity and acceleration were taken as 0; horizontal acceleration was taken as 0, except when the drone is approaching a cell containing a RS.A set of 20 random topologies of sizes between 8 × 8 and 16 × 16 cells with a varying number of candidate recharging station locations was generated using a generalized Halton number generator (https://github.com/fmder/ghalton).We consider an altitude H = 120 m as adopted in [22] for two reasons.First, 3DR solo drone can be equipped with a camera able to shoot 4 K videos at 30 fps and 12MP.This is far above 1.2 MP provided by the embedded camera of the ReadyMadeRC Anaconda drone used in [22].Secondly, although the maximum altitude H M can be higher than 120 m according to Equation ( 4), due to possibly legal restrictions and the maximum altitude of the drone we limit the altitude of the drone to 120 m.Using an angle of view θ = 94.4 • , the size of a cell is around 65 m (0.4 ha) according to Equation (1).That means the total area varies between 27 ha (8 × 8 instances) and 108 ha (16 × 16 instances).
Wind direction can influence the energy consumption of the drone for higher wind speeds.In this work, the wind speed ranges from 1 to 4 m/s.In addition, we consider three prevailing wind directions: 0 • , 45 • , 90 • (Figure 5a).
All algorithms were implemented in Python, and a UI was developed to visualize the results.Figure 6 presents a screenshot of the UI.
Symmetry 2020, 12, x FOR PEER REVIEW 14 of 25 fps and 12MP.This is far above 1.2 MP provided by the embedded camera of the ReadyMadeRC Anaconda drone used in [22].Secondly, although the maximum altitude  can be higher than 120 m according to Equation ( 4), due to possibly legal restrictions and the maximum altitude of the drone we limit the altitude of the drone to 120 m.Using an angle of view  = 94.4°, the size of a cell is around 65 m (0.4 ha) according to Equation (1).That means the total area varies between 27 ha (8 × 8 instances) and 108 ha (16 × 16 instances).
Wind direction can influence the energy consumption of the drone for higher wind speeds.In this work, the wind speed ranges from 1 to 4 m/s.In addition, we consider three prevailing wind directions: 0°, 45°, 90° (Figure 5a).
All algorithms were implemented in Python, and a UI was developed to visualize the results.Figure 6 presents a screenshot of the UI.

Simulation Results and Discussion
The proposed BFKSA is compared to the naïve Back and Forth approach and the K-Simulated Annealing (KSA).KSA is the K-opt variant of the well-known simulated annealing (KSA).The main difference with BFKSA is the fact that KSA starts with a randomly generated initial solution.All the

Simulation Results and Discussion
The proposed BFKSA is compared to the naïve Back and Forth approach and the K-Simulated Annealing (KSA).KSA is the K-opt variant of the well-known simulated annealing (KSA).The main difference with BFKSA is the fact that KSA starts with a randomly generated initial solution.All the algorithms are implemented from scratch in Python.The source code is available on GitHub at the following address: https://github.com/Suns-group/SD-MRS-LF(Supplementary Materials).
Four metrics are used to compare approaches: the ability to find a feasible solution, the number of recharging stations, the completion time of the mission, and the total energy consumption.
Simulations results are discussed based on the size of the instances and the wind speed and direction.Figures 7-10 display the results for feasibility, number of charging stations, mission completion time, and total energy consumption respectively on 8 × 8 instances.7 shows that the higher the wind speed, the lower the ability of all algorithms to find feasible solutions for all the approaches.This is explained by the fact that the drone must at times travel against the wind, and opposing strong winds can cause very large increases in energy consumption, according to Equation (21).Figures 7 and 8 show that all the approaches provide 100% feasibility and equal numbers of charging stations for wind speed less than or equal to 2 m/s.However, for higher wind speeds the BFKSA outperforms other approaches in both feasibility and reduced number of charging stations, except for wind speed 4 m/s and wind direction 45 • .This may be due to the fact that the initial back-and-forth movement used by BFKSA either aligns with 90 • or 0 • , whereas the optimal direction to avoid wind drag should be orthogonal to the wind direction 45 • .It is plausible that the initial suboptimal alignment leads to the algorithm's convergence to a suboptimal solution.On the other hand, KSA starts with a complete random solution and has a better chance of finding optimal drone path alignments.Four metrics are used to compare approaches: the ability to find a feasible solution, the number of recharging stations, the completion time of the mission, and the total energy consumption.
Simulations results are discussed based on the size of the instances and the wind speed and direction.Figures 7-10 display the results for feasibility, number of charging stations, mission completion time, and total energy consumption respectively on 8 × 8 instances.Figure 7 shows that the higher the wind speed, the lower the ability of all algorithms to find feasible solutions for all the approaches.This is explained by the fact that the drone must at times travel against the wind, and opposing strong winds can cause very large increases in energy consumption, according to Equation (21).Figures 7 and 8 show that all the approaches provide 100% feasibility and equal numbers of charging stations for wind speed less than or equal to 2 m/s.However, for higher wind speeds the BFKSA outperforms other approaches in both feasibility and reduced number of charging stations, except for wind speed 4 m/s and wind direction 45°.This may be due to the fact that the initial backand-forth movement used by BFKSA either aligns with 90° or 0°, whereas the optimal direction to avoid wind drag should be orthogonal to the wind direction 45°.It is plausible that the initial suboptimal alignment leads to the algorithm's convergence to a suboptimal solution.On the other hand, KSA starts with a complete random solution and has a better chance of finding optimal drone path alignments.However, the figures show that BFKSA can provide a slight improvement in some cases for lower wind speeds.For other wind speeds, BFKSA gives results that are close to BF and better than KS, except for power consumption with wind direction 45 • .
Detailed results for the 8 × 8 case are listed in Tables A1-A6 in Appendix A. An examination of the tables shows that BFKSA does not provide the smallest mission completion time only in two scenarios out of 12.The tables also show that each time BF finds a feasible solution, its energy consumption is close to the one of BFKSA, except in the cases where BFKSA provides a smaller number of recharging stations.
Figures 11-14 display the results for feasibility, number of charging stations, mission completion time, and total energy consumption respectively on 16 × 16 instances.As was the case in 8 × 8 instances, the wind speed and direction heavily influence the ability to find feasible solutions.For wind speed higher than 2 m/s and wind direction different from 0 • , none of the approaches is able to find a feasible solution.This justifies the holes in Figures 12-14 for wind speed higher than 2 m/s and wind direction different from 0 • .However, BFKSA manages to obtain close to 100% feasibility higher wind speeds and direction equals to 0 • .In addition, Figures 12-14 show that BFKSA provides the minimal number of recharging stations in all scenarios, as well as nearly matching BF in terms of completion time and energy consumption.wind speed higher than 2 m/s and wind direction different from 0°, none of the approaches is able to find a feasible solution.This justifies the holes in Figures 12-14 for wind speed higher than 2 m/s and wind direction different from 0°.However, BFKSA manages to obtain close to 100% feasibility higher wind speeds and direction equals to 0°.In addition, Figures 12-14 show that BFKSA provides the minimal number of recharging stations in all scenarios, as well as nearly matching BF in terms of completion time and energy consumption.More detailed results for the 16 × 16 simulations are given in Tables A7-A12.The comparative performance for KSA is much worse for 16 × than for 8 × 8.In particular, KSA sometimes requires more than twice the number of recharging stations and the total energy required by BFKSA.
All the above results show the dominance of BFKSA over the other approaches due to its ability to find a feasible solution with a minimum number of recharging stations.

Conclusions
The automatic surveillance of large farms using drones requires intelligent path planning that takes into account the drone's limited range and optimizes the locations of recharging stations.In this work, we introduced the Single Drone Multiple Recharging Stations in Large Farm problem (SD-MRS-LF).The objectives were to minimize first the number of recharging stations and then the mission completion time.An approach called BFKSA based on a combination of BF (back-and-forth), K-opt, and simulated annealing (SA) has been proposed to solve the problem.Simulation results comparing BFKSA to BF and KSA have shown the superior performance of BFKSA with respect to its ability to find feasible solutions with a minimal number of charging stations.BFKSA provides the highest percentage of feasible solutions with the smallest number of recharging stations.In certain cases, BFKSA was able to provide a mission completion time and energy consumption smaller than the values provided by BF known to be effective solution.
In this work, the drone was constrained to visit each station only once.Removing this constraint can significantly reduce the number of recharging stations, but it requires a new formulation of the problem.In addition, we suppose each recharging station having an unlimited energy.In case the drone can visit the same recharging station more than once, a charging and discharging function of the recharging station should be considered for a more realistic scenario.Moreover, other optimization techniques can be explored, and the area of interest can be extended to random fields.More detailed results for the 16 × 16 simulations are given in Tables A7-A12.The comparative performance for KSA is much worse for 16 × than for 8 × 8.In particular, KSA sometimes requires more than twice the number of recharging stations and the total energy required by BFKSA.
All the above results show the dominance of BFKSA over the other approaches due to its ability to find a feasible solution with a minimum number of recharging stations.

Conclusions
The automatic surveillance of large farms using drones requires intelligent path planning that takes into account the drone's limited range and optimizes the locations of recharging stations.In this work, we introduced the Single Drone Multiple Recharging Stations in Large Farm problem (SD-MRS-LF).The objectives were to minimize first the number of recharging stations and then the mission completion time.An approach called BFKSA based on a combination of BF (back-and-forth), K-opt, and simulated annealing (SA) has been proposed to solve the problem.Simulation results comparing BFKSA to BF and KSA have shown the superior performance of BFKSA with respect to its ability to find feasible solutions with a minimal number of charging stations.BFKSA provides the highest percentage of feasible solutions with the smallest number of recharging stations.In certain cases, BFKSA was able to provide a mission completion time and energy consumption smaller than the values provided by BF known to be effective solution.
In this work, the drone was constrained to visit each station only once.Removing this constraint can significantly reduce the number of recharging stations, but it requires a new formulation of the problem.In addition, we suppose each recharging station having an unlimited energy.In case the drone can visit the same recharging station more than once, a charging and discharging function of the recharging station should be considered for a more realistic scenario.Moreover, other optimization techniques can be explored, and the area of interest can be extended to random fields.

Figure 1 .
Figure 1.Description of the area of interest: (a) area to cover with candidate location for recharging stations; (b) numbering of the decomposed cells.

Figure 1 .
Figure 1.Description of the area of interest: (a) area to cover with candidate location for recharging stations; (b) numbering of the decomposed cells.

Figure 3 .
Figure 3. Back-and-forth solutions on a 4×4 grid: (a) an instance with a BFv solution using 3 RS; (b) an instance with a BFv solution using 4 RS; (c) an instance with no feasible BF solution neither BFv (Black) nor BFh (Yellow).

Algorithm 1 :Figure 3 .
Figure 3. Back-and-forth solutions on a 4 × 4 grid: (a) an instance with a BFv solution using 3 RS; (b) an instance with a BFv solution using 4 RS; (c) an instance with no feasible BF solution neither BFv (Black) nor BFh (Yellow).

Algorithm 1 : 25 Figure 3 .
Figure 3. Back-and-forth solutions on a 4×4 grid: (a) an instance with a BFv solution using 3 RS; (b) an instance with a BFv solution using 4 RS; (c) an instance with no feasible BF solution neither BFv (Black) nor BFh (Yellow).

Algorithm 3 :
Recharging Station Minimization (RSM) Input: R: a route; C: Set of Candidate RS Output: C E : set of actual RS Symmetry 2020, 12, x FOR PEER REVIEW 10 of 25

Algorithm 4 :
Back-and-Forth-k-opt Simulated Annealing Input: f 1 , f 2 : Objective functions; C: Set of Candidate RS; A: area to cover Output: R B : best route found, D B : Corresponding time, C EB : minimal set of actual RS Symmetry 2020, 12, x FOR PEER REVIEW 12 of 25

Figure 6 .
Figure 6.UI for visualization.The blue cell represents the take-off and landing point.Red cells are candidate locations of recharging stations.White cells are locations that are actually used for recharging stations.(a) Drone path generated respectively by BF using two recharging stations.(b) Drone path generated respectively by BFKSA using only one recharging station.

Figure 6 .
Figure 6.UI for visualization.The blue cell represents the take-off and landing point.Red cells are candidate locations of recharging stations.White cells are locations that are actually used for recharging stations.(a) Drone path generated respectively by BF using two recharging stations.(b) Drone path generated respectively by BFKSA using only one recharging station.

Symmetry 2020 ,
12,  x FOR PEER REVIEW 15 of 25 algorithms are implemented from scratch in Python.The source code is available on GitHub at the following address: https://github.com/Suns-group/SD-MRS-LF(Supplementary Materials).

Figure 7 .
Figure 7. Feasibility of the solutions for 8 × 8 instances with different wind speeds and directions.

Figure 7 .
Figure 7. Feasibility of the solutions for 8 × 8 instances with different wind speeds and directions.

Figure 8 .
Figure 8. Number of recharging stations for 8 × 8 Instances with different wind speeds and directions.

Figures 9
Figures 9 and 10 show the completion time and energy consumption respectively for 8 × 8 instances for the different wind scenarios.It is known from the literature that back and forth movement provides the most efficient energy consumption and mission completion time when wind speed is negligible.However, the figures show that BFKSA can provide a slight improvement in some cases for lower wind speeds.For other wind speeds, BFKSA gives results that are close to BF and better than KS, except for power consumption with wind direction 45°.

Figure 8 .
Figure 8. Number of recharging stations for 8 × 8 Instances with different wind speeds and directions.

Figures 9
Figures 9 and 10 show the completion time and energy consumption respectively for 8 × 8 instances for the different wind scenarios.It is known from the literature that back and forth movement provides the most efficient energy consumption and mission completion time when wind speed is negligible.However, the figures show that BFKSA can provide a slight improvement in some cases for lower wind speeds.For other wind speeds, BFKSA gives results that are close to BF and better than KS, except for power consumption with wind direction 45 • .Detailed results for the 8 × 8 case are listed in Tables A1-A6 in Appendix A. An examination of the tables shows that BFKSA does not provide the smallest mission completion time only in two scenarios out of 12.The tables also show that each time BF finds a feasible solution, its energy consumption is close to the one of BFKSA, except in the cases where BFKSA provides a smaller number of recharging stations.Figures 11-14 display the results for feasibility, number of charging stations, mission completion time, and total energy consumption respectively on 16 × 16 instances.As was the case in 8 × 8 instances, the wind speed and direction heavily influence the ability to find feasible solutions.For wind speed higher than 2 m/s and wind direction different from 0 • , none of the approaches is able to find a feasible solution.This justifies the holes in Figures 12-14 for wind speed higher than 2 m/s and wind direction different from 0 • .However, BFKSA manages to obtain close to 100% feasibility higher wind speeds and direction equals to 0 • .In addition, Figures12-14show that BFKSA provides the minimal number of recharging stations in all scenarios, as well as nearly matching BF in terms of completion time and energy consumption.

Figure 9 .
Figure 9. Mission completion time for 8 × 8 instances with different wind speeds and directions.

Figure 10 .
Figure 10.Total energy consumption for 8 × 8 Instances with different wind speeds and directions.

Figure 9 . 25 Figure 9 .
Figure 9. Mission completion time for 8 × 8 instances with different wind speeds and directions.

Figure 10 .
Figure 10.Total energy consumption for 8 × 8 Instances with different wind speeds and directions.Figure 10.Total energy consumption for 8 × 8 Instances with different wind speeds and directions.

Figure 10 .
Figure 10.Total energy consumption for 8 × 8 Instances with different wind speeds and directions.Figure 10.Total energy consumption for 8 × 8 Instances with different wind speeds and directions.

Figure 11 .
Figure 11.Feasibility of the solutions for 16 × 16 Instances with different wind speeds and directions.

Figure 11 . 25 Figure 12 .
Figure 11.Feasibility of the solutions for 16 × 16 Instances with different wind speeds and directions.Symmetry 2020, 12, x FOR PEER REVIEW 19 of 25

Figure 12 .
Figure 12.Number of recharging station for 16 × 16 instances with different wind speeds and directions.

Figure 12 .
Figure 12.Number of recharging station for 16 × 16 instances with different wind speeds and directions.

Figure 13 .
Figure 13.Mission completion time for 16 × 16 instances with different wind speeds and directions.

Figure 14 .
Figure 14.Total energy consumption for 16 × 16 instances with different wind speeds and directions.

Table 1 .
Parameter values

Table 1 .
Parameter values