Reactive Planning-Driven Approach to Online UAVs Mission Rerouting and Rescheduling

: The presented problem concerns the route planning of a UAV ﬂeet carrying out deliveries to spatially dispersed customers in a highly dynamic and unpredictable environment within a speciﬁed timeframe. The developed model allows for predictive (i.e., taking into account forecasted changing weather conditions) and reactive (i.e., enabling contingency UAVs rerouting) delivery mission planning (i.e., NP-hard problem) in terms of the constraint satisfaction problem. Due to the need to implement an emergency return of the UAV to the base or handling ad hoc ordered deliveries, sufﬁcient conditions have been developed. Checking that these conditions are met allows cases to be eliminated if they do not guarantee acceptable solutions, thereby allowing the calculations to be sped up. The experiments carried out showed the usefulness of the proposed approach in DSS-based contingency planning of the UAVs’ mission performed in a dynamic environment.


Introduction
In this paper, we consider the planning of the fleet mission problem for UAVs with highly dynamic and unpredictable environment constraints [1][2][3][4][5]. Typical disruptions in deliveries by UAVs may be caused by ad hoc changes to the deliveries ordered or changing weather conditions, which affect the energy consumption of UAVs and result in their shorter range due to the depletion of batteries [6,7]. For this reason, routing and scheduling a UAV fleet in partially known and unpredictable environments should take into account both projected changes in orders and weather conditions and selected categories of interference not included in previous forecasts. In other words, the planning of the UAVs' missions should take into account the possibility of implementing both proactive (e.g., taking into account the projected disturbances) and reactive (e.g., enabling contingency reactions) behaviour.
UAV routes can be determined through proactive planning [6] and generated in an offline mode or in reactive planning [8,9] while executed in an online mode. Routes determined in proactive planning guarantee the achievement of the planned mission's goal in terms of environmental parameters, which change at predetermined intervals. Scenarios corresponding to planned reactive rules do not guarantee reactive end-to-end paths employed in the routing process while adapting to changes in the environment during the execution of a mission [7,[9][10][11][12][13][14][15][16]. In particular, the reactive routing strategies linking "route discovery" (proactive route planning) and "route maintenance" (adopting reactive rules) concepts [17] are responsible for the robustness of UAVs in terms of the changes in weather conditions. In this context, our study focuses on reactive planning [18,19] of deliveries by the UAVs' fleet that are resistant to sudden atmospheric changes, resulting in a change in wind direction and intensity, rain or snow, precipitation, or unforeseen changes in delivery schedules caused by the cancellation of ordered deliveries or the notification of new orders.
In this context, the studies presented are a continuation of the previously published work focused on methods for planning UAVs' fleet missions online [20,21]. Previous research has focused on selected planning strategies for UAVs' fleet missions. These focus on arbitrarily chosen decomposition concepts for planned volumes of deliveries being phased out under submissions and are responsible for the partial distribution of supplies. Both variable weather conditions and ad hoc changing conditions for the volume of planned deliveries are taken into account. The aim of the research was to develop methods of predictive and/or reactive planning of acceptable options successively implemented under the supply of sub-missions, in particular the methods that enable their online use.
The originality of the paper results from merging the proactive and reactive planning of UAV fleet missions. The developed model allows for predictive (i.e., taking into account forecasted weather conditions changing) and reactive (i.e., enabling the interruption of a drone's mission) planning for delivery missions in terms of the constraint satisfaction problem (CSP). This is easily implemented and commercially available in a constraint programming environment, e.g., IBM ILOG. In particular, the conditions guaranteeing the resistance function convexity, which consequently speed up the calculations (involved in the CSP solution) for the extended version of the UAVs' mission planning are developed (i.e., taking into account multiple depots).
To summarise, the main objective of this paper is to introduce constraint programming based on a hybrid model. This is a combination of proactive and reactive planning and routing the UAVs' fleet delivery missions. The new contributions provided to the currently available literature are (i) presenting a resistance function determining the UAVs' mission resistance to both changes in weather conditions and changes to the times and location of deliveries, (ii) demonstrating the condition guaranteeing convexity of the resistance function in the polar coordinate system and (iii) conducting computational experiments confirming the usefulness of the proposed approach (i.e., the model and the condition based on it) for online planning of the UAVs' fleet missions.
In other words, the proposed approach supports the decision-makers in their search for a plan of the missions (with routes and flight schedules), which allows for the delivery of an expected quantity of goods to a specific group of recipients. Introducing a new measure of the UAVs' mission resistance and the analysis of the conditions guaranteeing its convexity allowed us to develop a declarative model of proactive/reactive UAV mission planning. Its computer implementation enables us to solve problems of scale encountered in practice online (distribution of goods for up to 90 customers). The remainder of this paper is organised as follows: Section 2 elaborates on related research. Section 3 presents the methodology used in the approach to UAV mission contingency planning. Section 4 describes the mathematical formulation for the declarative model for reactive planning of deliveries by the UAV fleet in terms of the constraint satisfaction problem. In Section 5, we focus on the relaxation of the convex resistance function aimed at developing restrictions, reducing the time-consuming assessment of weather conditions. Section 6 presents experiments that have been carried out and elaborates on the results obtained. Finally, Section 7 provides the final conclusions followed by a description of future research.

Related Work
A great number of publications are devoted to the study of various aspects of the construction [22][23][24] and operation [1,4,5,12,14] of UAVs and the possibilities for their use in various areas of civil missions (real-time monitoring, surveillance, reconnaissance, search and rescue) [25][26][27] and military areas (weapons delivery, guided missile support, directing artillery, spotting enemy positions). These publications also look at the methods for planning their missions [28]. The trend of research dedicated to online planning missions carried out by UAV teams has become increasingly noticeable. Research conducted in this area is devoted to the application of UAVs in emergency situations where they are used for transport of much-needed water, food, and medical supplies over hazardous (flooded) terrain. This is required due to climate change [29], necessitating the introduction of online UAV mission planning systems [20]. Other studies conducted in this area are devoted to various fields of application, e.g., reconnaissance and mapping [17], package delivery [3], delivery communication capabilities [22], healthcare [24,25], and so on. Increasing interest in these kinds of issues follows on from a need to search for scenario-driven planning methods that are aimed at the preparation of plans for UAV missions and aimed at an interactive tool building that facilitates the analysis and comparison of different scenarios and an iterative identification of sound and efficient mitigation strategies.
In the considered research domain, two directions can be distinguished. The first focuses on planning methods, taking into account weather uncertainty (e.g., investigating the manner in which energy consumption in UAV deliveries is affected by windy environmental conditions), and searching for route planning methods resistant to ad hoc changes in procurement conditions (e.g., studying the impact of changes in order terms and volumes to complete the planned delivery mission) [6,7,11]. In turn, the second research direction deals with methods of design and utilising networks of autonomous UAVs with complementary sensing and actuation equipment to collectively perform complicated tasks, i.e., the flying ad-hoc network (FANET) [30]. FANET spontaneously forms when UAVs connect and communicate with each other to facilitate long range missions and can be seen as a temporary type of local area network.
Indicated research gaps have become an inspiration for conducting this study, focusing on hybrid planning, i.e., a combination of proactive and reactive planning of the UAVs' fleet delivery missions resistant to sudden changes in weather conditions and unforeseen changes in the arrangements for governing delivery schedules. To clarify the motivation standing behind the selection of the hybrid routing mode, we should note that the routes determined in proactive planning guarantee the achievement of the planned mission goal within the environment's parameters, including change in predetermined intervals. In turn, routes determined in proactive planning guarantee the achievement of the mission goal only in the event of a previously foreseen (pre-planned) occurrence of an assumed type of disturbance. This is because a number of reactive rules guaranteeing the existence of reactive end-to-end paths employed in the routing process scenario is limited to just few arbitrarily chosen environmental changes.
In this context, this study proposes a novel model for proactive and reactive planning (different scenarios) that allow for a higher degree of realism, thus a higher likelihood of a mission being executed according to plan even when weather forecasts, order terms, and volumes to complete the planned delivery are changing. The novelty of this study results in the addition of a function of UAVs mission resistance to changes in weather conditions. In this context, we consider online re-planning when disturbances appear (e.g., earlier return of some of the UAVs from the fleet to the base), which exceeds the values incorporated at the proactive planning stage. The challenge in solving these types of problems is high computational complexity limiting solutions to small-scale problems. The ongoing work is focused on building models that enable the time-efficient planning of systems that are weatherproof and resistant to all kinds of UAV mission disturbances. To the best of our knowledge, it is the first model for solving a problem with the above-mentioned properties. The presented problem has been neither previously addressed nor solved in the existing literature [8][9][10]17,28,[31][32][33][34], thus it is not possible to compare it directly with existing methods. The novelty of the presented approach results from the extension of the declarative model used in our previous works, particularly in [6,7,20,21] by the addition of a function of the UAVs mission resistance to both changes in weather conditions and changes in the times and locations of deliveries. The condition that constitutes this extension allows the UAV's battery depletion to be foreseen in online mode before completing its mission, and thus it can be used in DSS-based planning of the UAVs' fleet mission.

Approach to UAV Fleet Online Routing
We consider a distribution network, that is modelled by the graph G = (N, E) where N = {N 1 , . . . , N λ , . . . , N n } signifies the set of n = |N| nodes and E = N β , N λ β, λ ∈ {1, . . . , n}, β = λ signifies the set of edges determining the possible connections between nodes. Set NB ⊂ N contains the nodes representing the bases and a set of ND ⊂ N contains the nodes representing delivery points: NB ∪ ND = N, NB ∩ ND = ∅. Given a fleet of UAVs U = {U 1 , . . . , U k , . . . , U K } that delivers goods to the points ND, the fleet U is spread between the bases NB, the subset U λ ⊆ U determines the UAVs allocated at base N λ ∈ NB. An ordered quantity of goods z λ ∈ N (taken from the base N 1 ) should be transported to each delivery point N λ ∈ ND. Deliveries are made as part of the mission S, which consists of sub-missions l S (i.e., delivery plans that include a single course of UAVs: base-delivery points-base). Z denotes a sequence consisting of variables z λ : Z = (z 1 , . . . , z n ) where z λ = 0 for each N λ ∈ NB. It is assumed that all required goods should be delivered in the given horizon time H. The amount of goods delivered during one sub-mission l S by the U k to the delivery point N λ ∈ ND is determined by the variable l c k λ ∈ N. l C is a sequence: l C = ( l c 1 1 , . . . , l c K 1 , . . . , l c 1 n , . . . , l c K n ) determining the payload weight delivered by fleet U ( l c k λ = 0 for each N λ ∈ NB). Variable Q k denotes the payload capacity of U k (amount of goods transported by U k cannot exceed Q k ). Moreover, each U k is described by the following technical parameters: the battery capacity CAP, airspeed va, drag coefficient C D , front surface A, and UAV width b. The time spent on take-off and landing U k on the delivery point N λ is indicated by variable w λ ∈ N. Note that l U ⊆ U denotes a set of UAVs used during sub-mission l S. The time when the U k ∈ l U arrives at the delivery point N λ during a sub-mission l S is indicated by the variable l y k λ ∈ N [s]. In this context, the sequence l Y consisting of moments l y k λ is called the schedule of the fleet l U : l Y = ( l y 1 1 , . . . , l y K 1 , . . . , l y 1 n , . . . , l y K n ). We assume that the variable t β,λ ∈ N determines travelling time between nodes N β , N λ , where N β , N λ ∈ E, and routes of U k ∈ l U during sub-mission l S are represented by the sequences l π k = N k 1 , . . . , N k i , N k i+1 , . . . , N k µ , where k i ∈ {1, . . . , n}, (N k i , N k i+1 ) ∈ E. l Π denotes a sequence of UAV routes executed during the sub-mission l S: l Π = ( l π 1 , . . . , l π k , . . . , l π K ) (in case when U k / ∈ l U then l π k = ). The delivery plan of one UAV's sub-mission l S is defined as a sequence: l S = ( l U , l Π, l Y, l C).
It is assumed that a plan of the UAVs' sub-missions l S is implemented under specific weather conditions, i.e., the weather forecast is known for each sub-mission l S. The forecasted weather conditions are described by the set F of pairs composed of direction θ and wind speed vw (θ, vw) ∈ F , i.e., F is defined as follows: Where Z(θ) is a function whose values determine the maximum forecasted wind speed for a given direction θ. The weather conditions determine the admissibility of the adopted submission's plan l S, i.e., they determine whether the batteries of UAVs will be prematurely discharged during implementation.
A function Y k,l (θ) determines the borderline wind speed (for a given direction θ), which guarantees the successful completion of the delivery plan by the U k during the sub-mission l S in the distribution network G: Y k,l (θ) = maxΓ k,l (θ), where Γ k,l (θ)-the set of the wind speed's values vw for a given direction θ, for which the batteries of U k are not discharged. The sub-mission's plan l S is assumed [12] to be resistant to the forecast weather conditions, F, if the boundary wind Y k,l (θ) of all U k ∈ l U in any direction θ does not exceed the forecasted value Z(θ): ∀ U k ∈ l U ∀ θ∈[0 • ,360 • ) Y k,l (θ) ≥ F (θ). The implementation of the designated mission S may be subject to various disturbances IS.
Among them, there are sudden changes in the weather (beyond the expected F * (θ) range and changes in orders Z), order changes (increased/decreased amount of ordered deliveries Z * ), changes to the number of delivery points served (changing the structure of the network G * ). The UAVs' fleet, when performing the mission plan S, meets a disturbance IS(t * )-covering one of the cases: the weather F * (θ), the network G * , orders Z * , the time t * . In such situations, it becomes necessary to answer to the question: Does a re-route plan exit for mission S * that guarantees timely deliveries in a given time horizon H and at acceptable battery levels?
In order to provide an example to illustrate the proposed approach, let us consider a distribution network (from Figure 1a) covering an area of 100 km 2 Figure 1c. The weight of individual orders is: z 3 ÷ z 6 = 5, z 7 = 10, z 8 = z 9 = 15, z 10 ÷ z 16 = 5, z 17 = 10, z 18 = z 19 = 15, z 20 ÷ z 26 = 5, z 27 = 10, z 28 = 15, z 30 ÷ z 36 = 5, z 37 = 10 , z 38 = z 39 = 15, z 40 = 5. These assumptions are used to seek the UAVs mission S plan guaranteeing timely deliveries (within the time horizon of 2.5 h) for the required amount of goods. The example of an admissible solution is presented in Figure 2. It consists of six sub-missions: S = 1 S, 2 S, . . . , 6 S following the wind speed constraints of <9 m/s. deliveries * ), changes to the number of delivery points served (changing the structure of the network * ). The UAVs' fleet, when performing the mission plan , meets a disturbance * -covering one of the cases: the weather ℱ * θ , the network * , orders Z * , the time * . In such situations, it becomes necessary to answer to the question: Does a re-route plan exit for mission * that guarantees timely deliveries in a given time horizon and at acceptable battery levels?
In order to provide an example to illustrate the proposed approach, let us consider a distribution network (from Figure 1a) covering an area of 100 km 2 and containing two bases, , , and 38 delivery points , … , . The goods are delivered by a fleet of 4 UAVs ( , … , ) divided into two sub-fleets ( , and , serving the bases and , respectively. The technical parameters of the UAVs are shown in the table in Figure 1c. The weight of individual orders is: z z 5, z 10, z z 15, z z 5, z 10, z z 15, z z 5, z 10, z 15, z z 5, z 10 , z z 15, z 5. These assumptions are used to seek the UAVs mission plan guaranteeing timely deliveries (within the time horizon of 2.5 h) for the required amount of goods. The example of an admissible solution is presented in Figure 2. It consists of six sub-missions: , , … , following the wind speed constraints of <9 m/s. An example illustrating the course of the UAVs fleet mission, 1 S, and the values of the resistance functions, Figure 2. It is worth noting that the UAVs' routing for mission 1 S is weatherproof for a given weather forecast (i.e., Y k,l (θ) ≥ F (θ)) : Appl. Sci. 2021, 11, x FOR PEER REVIEW 6 of 22 , is shown in Figure 2. It is worth noting that the UAVs' routing for mission is weatherproof for a given weather forecast (i.e., , ℱ :  Figure 1b. According to the forecast, the wind speed does not exceed 9 in a direction of 0°-360°. Introducing of the additional base in node allows the delivery problem to be split into two sub-problems with one transportation network. As a result, this means that each base has its own unique parameters, e.g., the width of the time horizon for a given iteration, which can be overlapping. This approach can be used  Figure 1b. According to the forecast, the wind speed does not exceed vw = 9 m s in a direction of θ = 0 • -360 • . Introducing of the additional base in node N 2 allows the delivery problem to be split into two sub-problems with one transportation network. As a result, this means that each base has its own unique parameters, e.g., the width of the time horizon for a given iteration, which can be overlapping. This approach can be used in real world applications, e.g., when two companies have the same transportation network, their own fleet of UAV's, etc., they need to coordinate the transportation of goods between customers and avoid collisions. We consider a situation in which the weather conditions of the mission carried out rapidly changed at the time t * = 3000 [s], i.e., during the execution of the sub-mission 2 S, the wind speed increased to vw = 11 m/s with the same intensity and direction θ = 110 • -130 • . Such a change means that this mission cannot be continued due to too much energy consumption (the mission's resistance function Y 3,2 (θ) values are below the level corresponding to speed 11 m s -see Figure 3). Figure 3 shows the location of the UAVs at time t * = 3000 [s], i.e., upon receipt of information about a change in weather and marking the place where the battery of U 3 will be discharged in the event of continuation of deliveries in accordance with the current plan 2 S.
work, their own fleet of UAV's, etc., they need to coordinate the transportation of goods between customers and avoid collisions. We consider a situation in which the weather conditions of the mission carried out rapidly changed at the time * 3000 [s], i.e., during the execution of the sub-mission , the wind speed increased to 11 m/s with the same intensity and direction 110°-130°. Such a change means that this mission cannot be continued due to too much energy consumption (the mission's resistance function , values are below the level corresponding to speed 11 -see Figure 3). Figure 3 shows the location of the UAVs at time * 3000 s , i.e., upon receipt of information about a change in weather and marking the place where the battery of will be discharged in the event of continuation of deliveries in accordance with the current plan . In this situation, the route of the sub-mission being carried out needs to be corrected, requiring the below question to be answered. In this situation, the route of the sub-mission 2 S being carried out needs to be corrected, requiring the below question to be answered.
Given a UAV fleet U = {U 1 , U 2 , U 3 , U 4 } providing deliveries to the delivery points allocated in the network G from

CSP Formulation
The proposed reaction to the occurrence of a disturbance IS(t * ) can be reduced to dynamic re-routing and rescheduling of previously adopted routes l Π, schedules l Y and delivered goods l C stated in the basic proactive plan for the mission by the UAVs' fleet. This is a feasible adjustment of assumed l Π, l Y, and l C values to the changes in forecasted weather F * (θ), and corrections introduced to the network G * or orders Z * .
In order to formally define the concept of disturbance IS(t * ), let us introduce the concept of the state of the mission's implementation S. The state of the mission S at the time t is defined as follows: is an allocation of UAVs to nodes at the time t: M(t) = N a 1 , . . . , N a k , . . . , N a K , where a k ∈ {1, . . . , n} determines the (delivery points) node N a k occupied by U k (or the node the U k is headed to). F * (θ, t) is the weather condition forecast at the time t. * G(t) is the graph model of the distribution network structure at time t (number and location of delivery points). Z * (t) is the sequence of goods requested at the time t. The state IS(t * ) following condition Occurrence of IS(t * ) disturbance should be assessed in terms of its impact on the further course of the mission of S (that is, whether the value of the resistance function Y k,l (θ) is greater than F (θ)). If the implementation of the mission is at risk (Y k,l (θ) F (θ)), an attempt should be made to reschedule it. The following condition action (if-then) rules are used for this purpose: 1. If the adopted mission plan S is not resistant to disturbance IS(t * ) (∃ k∈{1,...,K},l∈{1,...,L} Y k,l (θ) F (θ)), a check should be carried out to see whether it is possible to adapt (re-plan) to the new conditions. That is, decide whether all UAVs in the air continue their current missions or make their appropriate corrections. 2. If there are UAVs (the set U R) that cannot continue to fly due to disturbance IS(t * ), then they should be returned to base, ensuring that airborne UAVs (the set U \U R) can take over their tasks. 3. If the tasks of the UAVs returning to the base (the set U R) cannot be taken over by UAVs still performing their missions, a check should be carried out as to whether the reserve UAVs available at base (the set U B) can take over their responsibilities. This means the UAVs in the air continue their existing missions, while the reserve UAVs take over the liabilities of the UAVs returned to base. 4. If the reserve UAVs (the set U B) are unable to take over the responsibilities returned to the base (the set U R), then their activity should be suspended until the disturbance is resolved.
The above rules have been used in the reactive mission planning method S. The idea behind this method is as follows: during the implementation of the mission S, there is a continuous monitoring of the state of the IS(t) (for t ∈ {0 . . . H}). If at the state IS(t), the following condition holds [F * (θ, t * ) = F * (θ)] ∨ [ * G(t * ) = G] ∨ [Z * (t * ) = Z] (i.e., there is a change in the weather forecast or in the structure of the distribution network, and the size of the requests, etc.) and the mission S is under threat (i.e., at least one of the UAVs will not return to base due to low battery), then an attempt must be made to replan. This type of reaction is performed by the function solve, the purpose of which is to designate a mission * S adapted to the new conditions determined by the disturbance IS(t). In practice, it comes down to solving the relevant constraints satisfaction problem CS O U , S, IS(t) (where: O U defines the fleet designated by condition action rules 1-4). The relevant constraints distribution process follows the sequence where at first an attempt is made to designate the mission * S for the fleet U = U (according to the rule 1). In the event of failure, an attempt is made to designate this for the fleet U = U \U R (according to rule 2) and then for the fleet U = (U \U R) ∪ U B (according to rule 3). If an admissible solution * S still does not exist, then the mission plan currently used should be modified (due to the reduce function) in such a way that it removes the UAVs' sub-missions that are not resistant to disturbance IS(t) (according to rule 4).
It should be noted that the designation of mission * S is associated with the designation of routings l Π, schedules l Y and delivery sequences l C throughout the remaining time horizon {t . . . H}. Due to the disturbance IS(t * ) occurrence, the proposed reactive planning algorithm (implemented in the IBM ILOG environment) generates the end-to-end paths that modify previously planned routes, restoring the ability to implement the designated mission delivery plan.
The mathematical formulation of the constraint satisfaction problem CS O U , S, IS(t) aimed at contingency planning for the UAVs' mission design employs the following parameters, variables, sets, and constraints: Parameters: l G the graph of a distribution network for sub − mission l S, l U the subset of UAVs l U ⊆ U carrying out the sub − mission l S, z λ the demand at node N λ , z 1 = 0, K the size of the fleet of UAVs, d β,λ the distance between N β , N λ , A the front-facing area of a UAV, t β,λ the travel time between N β , N λ , C D the aerodynamic drag coefficient, U λ the set of UAVs allocated at base N λ ∈ NB, l y k λ the time at which U k arrives at node N λ , before the disturbance IS(t * ) occurrence, l s k the take − off time of U k before the disturbance IS(t * ), l x k β,λ the binary variable used to indicate whether the flight between points N β , N λ , takes place before the disturbance IS(t * ) occurs, l y k λ the time at which U k arrives at node N λ before the disturbance IS(t * ), l c k λ the weight of freight delivered to node N λ by U k , before the disturbance IS(t * ) occurrence, Decision Variables: the binary variable used to indicate if U k travels between nodes N β , N λ after the disturbance IS(t * ) occurrence (during sub − mission l S.), l x k β,λ = 1 i f U k travels between nodes N β , N λ 0 otherwise. l y k λ the time at which U k arrives at node N λ after disturbance IS(t * ) occurrence (during sub − mission l S.), l c k λ the weight of freight delivered to node N λ by U k after the disturbance IS(t * ) occurrence (during sub − mission l S.), l f k β,λ the weight of freight carried between nodes N β , N λ by U k after the disturbance IS(t * ) occurrence (during sub-mission l S.), l P k β,λ the energy per unit of time consumed by U k during the flight between nodes N β , N λ (after the disturbance IS(t * ) occurrence), l bat k the total energy consumed by U k after the disturbance IS(t * ) occurrence (during sub − mission l S.), l s k the take − off time of U k after disturbance IS(t * ) occurrence, l cp λ the total weight of freight delivered to node N λ after the disturbance IS(t * ) occurrence (during sub-mission l S.), l π k the route of U k after the disturbance IS(t * ) occurrence (during sub-mission l S.), l π k = (N k 1 , . . . , N k i , N k i+1 , . . . , N k µ ), k i ∈ {1, . . . , n}, N k i , N k i+1 ∈ E Sets l Y the sequence of moments l y k λ that schedules the fleet l U after the disturbance IS(t * ) occurrence, l C the sequence of weights of delivered goods l c k λ , l Π the set of UAV routes l π k , l S the plan of sub − mission after the disturbance IS(t * ) occurrence : l S = l U , l Π, l Y, l C , the re − route plan of the mission * S = 1 S , . . . , l S , . . . , L S .
Constraints: routes, delivery of freight, and energy consumption.
where l va i,j (θ, vw) and t i,j depend on the assumed goods delivery strategy, D is an air density that is equal to 1.225 kg/m 3 , and A is the front-facing area of UAV that is equal to 1.2 m 2 (provided by the UAV manufacturer). If the ground speed vg i,j is constant, then an air speed l va i,j is calculated from: Since the re-planning of the mission delivery plan. S, is the result of the disturbance, IS(t * ), the new set of sub-missions 1 S , . . . , l S , . . . , L S guaranteeing timely delivery is determined by solving the following constraint satisfaction problem (32): To solve CS (32), the values of the decision variables must be determined from the adopted set of domains for which the given constraints are satisfied.

Constraints Relaxation
The previous section showed that solving the CS (32) problem enables the designation of an * S mission resistant to IS(t * ) for disturbances caused by changing weather conditions specified by F (θ) . Solving this problem, however, is very time-consuming, which results from the necessity of verifying the inequality (25) of the wind direction change Y k,l (θ) ≥ F (θ) carried out for each increment θ ∈ [0 • , 360 • ). Consequently, this section shows the relaxation of the above limitation, which allows for a significant acceleration of the calculations. The proposed relaxation assumes that the Y k,l (θ) function is convex in the polar coordinate system. Appropriate conditions guaranteeing its convexity are shown below.

Resistance Function Convexity in the Polar Coordinate System
Note that function A(θ) is a convex function in the polar coordinate system if each section with ends belonging to an area limited by the function A(θ) is included in this area (see Figure 4).
Proof: Proof amounts to the designation of an explicit form of the function Y k,l (θ) and then to the demonstration that its constituents are convex functions.
1. Function Y k,l (θ). According to the definition of the Y k,l (θ) function, its values are the solution to the following equation: where CAP-the energy capacity of a UAV, bat k (θ, vw)-the total energy consumed by U k (during sub-mission l S-route l π k ): where t i,j -travel time from node i to node j: t i,j = d i,j vg i,j , l P k i,j (θ, vw)-energy per unit of time, consumed by U k during a flight from node i to node j in weather conditions (θ, vw).
and after using the following substitutions AD = 1 2 C D × A × D and WA = (W×g) Equation (2) can, therefore, be presented as: where CAP i,j -a maximum amount of energy that can be used by U k on the section that matches node i with node j. This equation can be further simplified to: and after using the following substitutions VG = vg i,j × cosϑ i,j , VS = vg i,j × sinϑ i,j : and after using the following substitution R = CW 2 − vg i,j 2 : and after using the following substitution X = VG × cosθ + VS × sinθ : The solution to this equation takes the following form: Considering that: X = VG × cosθ + VS × sinθ , the resistance function takes the following form: 2.
Convexity of function Y k,l (θ) components. Due to (51), Y k,l (θ) is a sum of the following two functions: where a, b, c ≥ 0 Due to the fact that functions a × cosθ , b × sinθ are convex functions in the polar coordinate system (see Figure 5a) and a sum of convex functions is a convex function, A(θ) must also be convex. In turn, the function B(θ) becomes convex with correspondingly large c-values. In general, it can be demonstrated that the function B(θ) is convex when the following condition holds: where , , 0 Due to the fact that functions cos , sin are convex functions in the polar coordinate system (see Figure 5a) and a sum of convex functions is a convex function, A must also be convex. In turn, the function B becomes convex with correspondingly large c-values. In general, it can be demonstrated that the function B is convex when the following condition holds: For example, by adopting , 1 the function B becomes a convex for 1.5 (see Figure 5b). The value is determined by the value of the parameter which depends (see (2)-(18)) on the parameters of the environment where the flight is carried out and on the technical parameters of the UAV: For example, by adopting a, b = 1 the function B(θ) becomes a convex for c > 1.5 (see Figure 5b).
The value c is determined by the value of the R parameter which depends (see (2)-(18)) on the parameters of the environment where the flight is carried out and on the technical parameters of the UAV: The fact that function Y k,l (θ) is convex implies the previously adopted findings, e.g., (22) and the following assumptions In simple terms: where R-parameter specified by (23), RG-parameter specified by the formula: × (vg i,j × sinϑ i,j ) . Figure 6 shows a graph of the R values for the sample technical parameters and a graph of the RG values above which (R > RG) the function B(θ) becomes a convex function. Therefore, because the R-values encountered in practice are very high (i.e., R >>> 100), it is assumed that functions A(θ) and B(θ) are convex. Consequently, since the sum of the convex functions is also a convex function, the resistance function Y k,l (θ), described by (51) is also convex.
In simple terms: where -parameter specified by (23) Figure 6 shows a graph of the values for the sample technical parameters and a graph of the values above which ( ) the function becomes a convex function. Therefore, because the R-values encountered in practice are very high (i.e., >>> 100), it is assumed that functions A and B are convex. Consequently, since the sum of the convex functions is also a convex function, the resistance function , , described by (51) is also convex. QED.

Relaxation of the Convex Resistance Function
The presented property guaranteeing the , function convexity can be used to simplify the constraint (25). In order to replace the condition (25) with an equivalent that

Relaxation of the Convex Resistance Function
The presented property guaranteeing the Y k,l (θ) function convexity can be used to simplify the constraint (25). In order to replace the condition (25) with an equivalent that is less time consuming computationally, it was assumed that continuous (smooth) Y k,l (θ) function will be approximated by a discrete function represented by a finite set Y k,l = Y k,l (θ i ) i = 1 . . . lq; θ i < θ i+1 , where lq is an number of samples taken arbitrarily. This set contains the vertices of a polygon Y * k,l (θ) depicted in Figure 7. The convexity of the Y k,l (θ) function ensures that the polygon Y * k,l (θ) always includes the restricted area limited by this function (see Figure 6b).

Computational Experiments
Consider the network from Figure 1, in which the UAVs fleet , , , service delivery points -. The structure of subsequent sub-missions , , … , of the adopted mission plan is presented in Figure 2.
Let us assume (see Section 2) that at time t*=3000 [s] during execution of sub-mission the wind speed increases to 11 m/s while its intensity and direction 110° 130° remain unchanged. With such a change in weather conditions, it becomes necessary to re-plan the mission, including the introduction of the sub-missions , , , , to correct its course. For this purpose, an algorithm described in our previous paper [30] has been used. Its implementation in the constraint programming environment IBM ILOG (Intel Core i7-M4800MQ 2.7 GHz, 32 GB RAM) has shown that the solution time for problems of a size considered does not exceed 35 s. Figures 8a and 9a show the plan (i.e., the route and schedule) of mission * adapted to the disturbance IS(3000). Rule 2 was used in assigning mission * , i.e., If there are UAVs that cannot continue to fly due to disturbance IS t * , they should be returned to the base and it should be ensured that airborne UAVs can take over their tasks. Consequently, a decision to turn back to base was made (see the sub-mission - Figure 3) because there was a risk of premature battery depletion. This means that the function Y k,l (θ) can be replaced by the function Y * k,l (θ) and, in fact, the set of vertices in Y k,l . In practice, it means reducing the quantity of condition (25) checks to the number of vertices of the adopted polygon. Consequently, the constraint (25) can be replaced by the following one: Y * k,l (θ) ≥ F (θ); . . . θ ∈ θ 1 , . . . , θ lq (58)

Computational Experiments
Consider the network from Figure 1, in which the UAVs fleet U = {U 1 , U 2 , U 3 , U 4 } service delivery points N 3 -N 40 . The structure of subsequent sub-missions 1 S, 2 S, . . . , 6 S of the adopted mission plan S is presented in Figure 2.
Let us assume (see Section 2) that at time t* = 3000 [s] during execution of sub-mission 2 S the wind speed increases to vw = 11 m/s while its intensity and direction θ = 110 • − 130 • remain unchanged. With such a change in weather conditions, it becomes necessary to re-plan the mission, including the introduction of the sub-missions 2 S, 3 S, 4 S, 5 S, 6 S to correct its course. For this purpose, an algorithm described in our previous paper [30] has been used. Its implementation in the constraint programming environment IBM ILOG (Intel Core i7-M4800MQ 2.7 GHz, 32 GB RAM) has shown that the solution time for problems of a size considered does not exceed 35 s. Figures 8a and 9a show the plan (i.e., the route and schedule) of mission * S adapted to the disturbance IS(3000). Rule 2 was used in assigning mission * S, i.e., If there are UAVs that cannot continue to fly due to disturbance IS(t * ), they should be returned to the base and it should be ensured that airborne UAVs can take over their tasks. Consequently, a decision to turn U 3 back to base was made (see the sub-mission 2 S- Figure 3) because there was a risk of premature battery depletion.     Therefore, the goods to the node N 7 will not delivered. At the same time, U 4 continued its mission unchanged. This decision forced the necessity of rescheduling subsequent submissions 3 S, 4 S, 5 S, 6 S, enabling the designation of a new alternative plan * S taking into account the specificity of the disturbance IS(3000) that occurs. Of course, the scope of each revised plan depends on the timing of the decision to reschedule the plan. In Figure 8, the possible routes of the sub-mission depending on the timing of the re-scheduling decision are shown. Figure 8 presents the two kinds of reaction to the disruption. The first type of reaction results in mission re-scheduling (after the end of the sub-mission 3 S affected by disruption), as shown in Figure 8a. In Figure 8b, the decision to re-plan the mission has been taken "ad hoc". This means the flight mission plan for each UAV belonging to the fleet K = {U 1 , U 2 , U 3 , U 4 } has to be changed (see Figure 9b).
In other words, the main ideas behind the two methods following alternative approaches to the sudden weather changes are illustrated in Figures 8 and 9. The cases presented in Figures 8a and 9a can be used in the situation when the vehicles started from base number 1, but these should be less exploited, e.g., due to the quality of the engines used, whereas in Figures 8b and 9b, the entire available fleet results in a shorter duration of the entire mission.
In order to assess the scalability of proposed approach in terms of the possibility of its use in an online mode (i.e., to solve the problem in <600 s) in decision support systems, a series of quantitative experiments have been carried out. Table 1 contains the results of experiments that have been conducted for the three functions of forecasted weather F (θ) = 11, 12, 13 m/s. The experiments are carried out for the network of n, a randomly designated collection of delivery points (over an area of 10 km × 10 km) and a fleet consisting of K UAVs with the technical parameters as shown in the table in Figure  1c. For each of the considered variants of the network, a proactive mission plan has been set out to guarantee the delivery in the time horizon of H = 10, 000 s. It was assumed that at time t * = 2000 s, there is a change in the weather forecast that lasts until the end of the considered time horizon. The change in weather involves increasing the expected wind speed by 2 m/s and accordingly equals F * (θ) = 11, 12, 13 m/s. The results (i.e., the times with a relaxation TCR and without a relaxation TC determining reactive mission plan designs) are presented in Table 1 where "×" highlights the cases where it was not possible to designate a mission plan in time t > 600 s. The conducted experiments (both qualitative and quantitative) show that for the distribution network of a size up to 80 delivery points serviced by two UAVs, the fleet mission plans can be effectively refined (in less than 600 s) and successfully carried out in changing weather conditions while taking into account specific types of disturbances. Such results were achieved through the implementation of the relaxation described by the constraint (58). The proposed constraint relaxation enables a linear reduction in computational complexity function. Results of experiments show that in the considered case the computational complexity is about 70 times smaller than in the case without relaxation.
In turn, the acceptance of condition (25) limits the size of the online analysing networks to 40 delivery points. The obtained results show that the adopted limitations force planning solutions consisting of many sub-missions but not exceeding 17, and the number of submissions needed to be accomplished in case of deteriorating weather conditions F (θ) (imposing an increase in energy consumption) and the size of the fleet U decreasing.
The obtained results show that the computer implementation of the proposed method within the constraint programming environment (e.g., IBM ILOG) will allow a solver to be built, enabling the development of an interactive and task-oriented decision support system.

Conclusions
The investigated cases of dynamic navigation of vehicles carrying out a common mission focus on the planning problem of the proactive and reactive driven hybrid routing of UAV fleet delivery missions. The class of considered cases includes situations related to planning UAV routes under changed weather conditions exceeding those previously forecasted and/or changes to previously agreed terms of order fulfilment. These occur, for example, in networks allowing the presence of impatient consumers [35,36]. Examples of such situations illustrate cases of automatic navigation of the UAV to a charging station when the battery drops to a certain level, designating a route bypassing the delivery point that refuses to accept the delivery and serves another previously un-planned delivery point in its place. Consequently, the need to react in such situations enforces the establishment of condition-action rules that allow the designation of appropriate possible end-to-end routes enabling emergency safe completion of the mission or its continuation in a modified version.
The case under consideration where UAVs depart from and return to one of multiple depot locations is the multi-depot extension of the previously considered contingency planning problem. Since the related problem of UAV mission planning has proven to be NP-hard, its constraint satisfaction-driven implementation has been proposed. A longterm objective of this study is to develop dedicated DSS software. With this in mind, we employ the declarative modelling framework, mostly because of its fast prototyping capability. The main advantage of the proposed approach follows from the open structure of the proposed model. This allows several other variables and restrictions to be taken into account (e.g., related to the cost of a mission, distribution system infrastructure, heterogeneity of UAVs, etc.). Computational results show that the permissible size of the distribution network (90 nodes and 2 UAVs) where considered reactive planning aims at a routing delivery design for a fleet mission makes the proposed approach suitable for online applications.
The scope of the current paper is limited to the modelling of robust delivery scenarios for the selected disturbances (a change in weather conditions). In general, we can consider the online re-planning of UAVs' missions for disturbances implied by factors such as change in order (customer resignation, the appearance of a new customer), change in the delivery date, change in UAV fleet (failure of a UAV), change in the structure of the distribution network (shutdown of the UAVs base), etc. Taking into account these types of additional disturbances requires the reference model to be extended with appropriate decision variables each time. A similarly developed model (dedicated to the decision problem) can also be easily extended to the needs of optimization problems related to minimizing energy consumption, the size of the UAV fleet, the number of UAV depots, etc. Thanks to the approved relaxation of the nonlinear constraints, the above-mentioned modifications (extensions) will not significantly affect the computational complexity of the problem under consideration.
In our future research, we want to take into account the uncertain nature of the realworld variables that are not deterministic. Thus, a fuzzy approach could be applied to the UAVs' mission planning problem while allowing for a more accurate estimation of the timeliness of deliveries, and distribution through multi-depot and multi-fleet delivery planning subject to constraints imposed by appearance and a range of varying time windows. Finally, the model might benefit from being added to different aspects related to the size of fleets with heterogeneous UAVs and coordination of different UAV fleets operating independently in a shared area.