A Dynamic Task Scheduling Method for Multiple UAVs Based on Contract Net Protocol

Unmanned aerial vehicles are becoming promising platforms for disaster relief, such as providing emergency communication services in wireless sensor networks, delivering some living supplies, and mapping for disaster recovery. Dynamic task scheduling plays a very critical role in coping with emergent tasks. To solve the multi-UAV dynamic task scheduling, this paper constructs a multi-constraint mathematical model for multi-UAV dynamic task scheduling, involving task demands and platform capabilities. Three objectives are considered, which are to maximize the total profit of scheduled tasks, to minimize the time consumption, and to balance the number of scheduled tasks for multiple UAVs. The multi-objective problem is converted into single-objective optimization via the weighted sum method. Then, a novel dynamic task scheduling method based on a hybrid contract net protocol is proposed, including a buy-sell contract, swap contract, and replacement contract. Finally, extensive simulations are conducted under three scenarios with emergency tasks, pop-up obstacles, and platform failure to verify the superiority of the proposed method.


Introduction
Sudden catastrophic events, such as earthquakes, floods, terrorist attacks, etc., are always random, dynamic, destructive, and emergent. Unmanned aerial vehicles (UAVs) are flexible, low-cost, and high-efficient and can be applicable to emergency disaster relief [1][2][3][4][5][6]. In the pre-disaster stage, sensors installed on UAVs can predict the disaster's time, geographical location, and magnitude by cooperating with current wireless sensor networks [7]. This will efficiently contribute to decreasing injury and death, material and property loss. During disasters, the base stations are usually seriously destroyed, which makes it difficult for rescuers to assist survivors efficiently. Equipped with many advanced sensors, UAVs become promising data mules for sensor network data collection, which can efficiently fly to disaster areas, hover overhand, and collect and transmit real-time information without the influence of road obstacles [8,9]. Besides, in search and rescue scenarios, intelligent sensors installed on UAVs, such as Infra-red cameras and synthetic patrol radar, can quickly discover the survivors and give the accurate positions for safer and quicker rescue. UAVs are also used to draw a detailed map of the post-disaster environment [10] in cooperation with ground devices, which facilitates disaster recovery. As shown in Figure 1, DJI drones were applied to draw a three-dimensional map of a destroyed village for disaster recovery in the 2015 Nepal earthquake.
However, there are still many challenges for multi-UAV emergency scheduling, which are as follows: (1) heterogeneous UAVs are required to complete multiple tasks, such as communication, supply delivery, mapping, and monitoring, because emergencies are often diverse and unpredicted; (2) Multiple UAVs should cooperate with each other to complete However, there are still many challenges for multi-UAV emergency scheduling, which are as follows: (1) heterogeneous UAVs are required to complete multiple tasks, such as communication, supply delivery, mapping, and monitoring, because emergencies are often diverse and unpredicted; (2) Multiple UAVs should cooperate with each other to complete the complicated tasks; (3) Dynamic scheduling should be real-time to guarantee the successful accomplishment of tasks; (4) Energy efficiency should be taken into consideration, such as energy consumption of sensors in UAV-enabled wireless sensor networks [11,12] or fuel consumption of UAVs during the flight. Note that in this paper, we generate the short paths in two-dimensional scenarios by the APPATT [13] to reduce fuel consumption. Thus, we focus on how to reallocate tasks to multiple UAVs in realtime when confronting some emergencies.
Multi-UAV dynamic scheduling problem has been proven to be NP-hard and thus obtaining a globally optimal solution is computationally expensive [14]. Until now, many researchers around the world have put efforts into multi-UAV dynamic scheduling. Early research employed centralized methods to generate a scheme by a central server capable of gathering and spreading the whole information [15]. Nevertheless, centralized methods may place a heavy communication burden on the central server which is vulnerable to a single point of failure [16,17].
Therefore, distributed methods are often used to solve multi-UAV dynamic scheduling [18] and show excellent performance in computation and communication. Generally, among distributed algorithms, market-mechanism-based algorithms are prevailing involving auction-based algorithms and contract net protocol. Auction-based algorithms [19] are applied to generate near-optimal solutions for the task scheduling problem where one task just can be completed by one platform. However, the information of each UAV must be transmitted to the auctioneer in some way, which is time-consuming and leads to the limited network topology [20]. To cope with the issue, Choi et al. [21] proposed consensus-based decentralized auctions (CBBA) which delete the auctioneer and are distributed in each UAV, which has attracted a lot of research interest. The method includes two phases: one is the bundle-construction phase where each agent creates just a single bundle and updates it as the assignment process progresses; the other is the conflict resolution phase where agents bid on a single task and release it upon receiving a higher value in the winning bids list [22][23][24]. The two phases are in an iterative manner until the defined stopping criteria are satisfied.
Another successful market-based distributed algorithm is contract net protocol (CNP) which was proposed by Smith [25] in 1980. Agents can allocate tasks based on the market bidding mechanism (inviting tendering-bidding-winning), so that the whole multiagent system can complete tasks with low cost and high quality [26]. Contract net protocol was employed in manufacturing systems. Sousa and Ramos [27] proposed a negotiation protocol based on CNP for job scheduling in a manufacturing system. Owliya et al. [28]  Multi-UAV dynamic scheduling problem has been proven to be NP-hard and thus obtaining a globally optimal solution is computationally expensive [14]. Until now, many researchers around the world have put efforts into multi-UAV dynamic scheduling. Early research employed centralized methods to generate a scheme by a central server capable of gathering and spreading the whole information [15]. Nevertheless, centralized methods may place a heavy communication burden on the central server which is vulnerable to a single point of failure [16,17].
Therefore, distributed methods are often used to solve multi-UAV dynamic scheduling [18] and show excellent performance in computation and communication. Generally, among distributed algorithms, market-mechanism-based algorithms are prevailing involving auction-based algorithms and contract net protocol. Auction-based algorithms [19] are applied to generate near-optimal solutions for the task scheduling problem where one task just can be completed by one platform. However, the information of each UAV must be transmitted to the auctioneer in some way, which is time-consuming and leads to the limited network topology [20]. To cope with the issue, Choi et al. [21] proposed consensusbased decentralized auctions (CBBA) which delete the auctioneer and are distributed in each UAV, which has attracted a lot of research interest. The method includes two phases: one is the bundle-construction phase where each agent creates just a single bundle and updates it as the assignment process progresses; the other is the conflict resolution phase where agents bid on a single task and release it upon receiving a higher value in the winning bids list [22][23][24]. The two phases are in an iterative manner until the defined stopping criteria are satisfied.
Another successful market-based distributed algorithm is contract net protocol (CNP) which was proposed by Smith [25] in 1980. Agents can allocate tasks based on the market bidding mechanism (inviting tendering-bidding-winning), so that the whole multiagent system can complete tasks with low cost and high quality [26]. Contract net protocol was employed in manufacturing systems. Sousa and Ramos [27] proposed a negotiation protocol based on CNP for job scheduling in a manufacturing system. Owliya et al. [28] presented a CNP with specific rules for job scheduling and task allocation in manufacturing applications. Vancza et al. [29] and Baker [30] applied CNP for job-shop scheduling and demonstrated its effectiveness in a natural job-shop environment.
In addition, the CNP also has been adopted in dynamic task scheduling due to its simplicity and intuitiveness. Liang et al. [31] developed an improved contract net protocol (ICNP) that incorporated multi-agent systems, which can realize dynamic task scheduling when the environment is changeable. Hong et al. [32] designed the extended contract net protocol to enhance the time efficiency and solution quality. To solve the coordinated task scheduling between manned aircrafts and UAVs, Liu et al. [33] proposed a modified contract net protocol, which can realize real-time scheduling and satisfy the requirements. In contrast, Fan et al. [34] addressed multi-UAV heterogeneous task scheduling by ICNP incorporated multi-agent systems which verified its effectiveness by extensive experiments.
Currently, many achievements have been gained in dynamic task scheduling for UAVs, which can provide theoretical and technical support for military and civil usages [35][36][37]. Nevertheless, little existing research has focused on large-scale dynamic scheduling for multiple UAVs. Hence, to solve the issue, the paper constructs a multi-constraint mathematical model for multi-UAV dynamic task scheduling, whose objectives are to maximize the total profit of scheduled tasks, to minimize the consuming time and to balance the number of scheduled tasks for multiple UAVs. A hybrid contract net protocol for dynamic task scheduling is proposed, including a buy-sell contract, swap contract, and replacement contract.
The significant contributions of this work are summarized as follows.
(1) We construct a multi-objective optimization model for multi-UAV dynamic scheduling. Three objectives are to maximize the total profit of scheduled tasks, to minimize the time consumption and to balance the number of scheduled tasks for multiple UAVs. (2) We propose a hybrid contract net protocol involving a buy-sell contract, swap contract, and replacement contract to solve dynamic scheduling when encountering various emergencies. (3) We conduct numerous simulations under three typical scenarios with emergency tasks, pop-up obstacles, and platform failure, to verify the effectiveness of the proposed algorithm. The simulation results demonstrate that the proposed algorithm can respond to dynamic elements and generate feasible re-scheduling schemes within milliseconds for all designed instances.
This paper is organized as follows. Section 2 constructs the mathematical formulation for multi-UAV dynamic scheduling. Section 3 proposes the hybrid contract net protocol method for multi-UAV dynamic scheduling. The effectiveness of the proposed method is then demonstrated through several simulated scenarios in Section 4. Finally, Section 5 concludes this paper.

Multi-UAV Dynamic Scheduling Model
To clearly state the multi-UAV task scheduling problem, several assumptions are made as follows.
(1) Tasks with high rewards will be scheduled firstly when the number of UAVs is limited.
(2) Bidders can evaluate their capabilities to complete tasks. The notations used in the description of the multi-UAV task scheduling problem are summarized in Table 1. Denote V, Task and Barrier as the set of UAVs, tasks, and obstacles, respectively. reward i is the predefined reward of task i. Then, ErstTime i and LastTime i are the allowable earliest start time and latest end time of task i, respectively. t ij is the travel time from the task i to the task j and s i is the service time of the task i. The platform constraints involved in the model are flying range, energy capacity and memory capacity, which are denoted as MaxL h , MaxE h and MaxN h (h: UAV index), respectively.

Notations Description
V a set of UAVs, the allowable earliest start time and latest end time of task i s i the service time of task i t ij the travel time from task i to task j MaxL h , MaxE h , MaxN h flying range, energy capacity and memory capacity of UAV h One decision variable denotes whether the UAV h flies from the task i to the task j, which is defined by a binary variable x h i,j . If the UAV h flies from the task i to the task j, we have x h i,j = 1; otherwise, x h i,j = 0. The multi-UAV task scheduling model can be formulated as follows.

Constraints
(1) Constraint 1: each task can only be completed at most one time.
(2) Constraint 2: each UAV must fly to the next task after completing the current task, except for the final task.
(3) Constraint 3: the order of two tasks is unique.
(4) Constraint 4: tstart j is the start time of task j. tleave j is the departure time of task j. twait j is the waiting time of task j. If the former task of task j is task i, time window constraint of task j is as follows.
(6) Constraint 6: Num_Tasks(project h ) is the number of scheduled tasks for UAV V h .
(7) Constraint 7: Duration(project h ) is the duration time of scheduled tasks for UAV V h .

Objectives
During the auction progress, both the tenderee UAVs and the bidder UAVs need to calculate the performance of completing a task. Contrary to offline task scheduling, time consumption should be considered except for the total reward of scheduled tasks and the number of scheduled tasks for each UAV. Specifically, time consumption is the required time for task scheduling. Highly urgent tasks should be assigned to the appropriate UAVs in a short time. Once highly urgent tasks cannot be allocated in a reasonable time, the entire task scheduling would be affected. High profit means that when meeting the task demand, each UAV can complete many tasks with high rewards at a small cost. The number of scheduled tasks for each UAV should be balanced which can effectively avoid the rapid increase in time consumption for all UAVs. Hence, the performance of completing a task can be calculated as follows.
is load balancing performance when UAV V i completes the task T j . α, β and γ are the weight coefficients of indicators and meet the following formula, α + β + γ = 1.
(1) The first objective is to maximize the net profit. The net profit can be obtained by the reward of task i minus the cost. The cost includes path cost (the flight distance) and risk cost (including the probability of colliding with obstacles and being discovered by hostile weapon threats). The path cost and risk cost from the task T j−1 to task T j can be represented by can be generated after normalization. The net profit of task T j completed by UVA V i can be calculated as follows.
(2) The second objective is to improve the real-time performance which is given below.
where Time i (T j ) is the required time for allocating the task T j to the UAV V i . (3) During the task scheduling, it is also necessary to balance the number of scheduled tasks between UAVs. The third objective is to enhance the load balancing performance which is given below.
where N S i is the number of scheduled tasks for the task scheduling scheme S i , and MaxN i is the maximum number of scheduled tasks for the UAV V i .

Dynamic Elements
Three dynamic elements are considered, which are emergency tasks, pop-up obstacles, and platform failure.
(1) Emergency tasks Suppose that the set S i = Task 1 i , Task 2 i , · · · , Task n i i is the offline task scheduling scheme of UAV V i . There are N t emergency tasks, which can be denoted as Etask = {etask 1 , etask 2 , · · · , etask N t }. Then, the multi-UAV dynamic task scheduling can be described as: when confronting emergency tasks, task re-scheduling will be invoked requiring short time to maximize the performance of the overall system as much as possible. (2) Pop-up obstacles Suppose that the set S i = Task 1 i , Task 2 i , · · · , Task n i i is the offline task scheduling scheme of UAV V i . There are N e pop-up obstacles, which can be denoted as Ebarrier = {ebarrier 1 , ebarrier 2 , · · · , barrier N e }. Then, the multi-UAV dynamic task scheduling can be described as: when confronting pop-up obstacles, only tasks which collide with pop-up obstacles will be re-scheduled to maximize the performance of the overall system as much as possible.
(3) Platform failure Suppose that the set S i = Task 1 i , Task 2 i , · · · , Task n i i is the offline task scheduling scheme of UAV V i . N u UAVs cannot work well during the implementation (N u < N V ). The tasks allocated to these faulty UAVs will return to the planning center. The multi-UAV dynamic task scheduling can be described as: when some UAVs cannot work well, task re-scheduling will be invoked requiring short time to maximize the performance of the overall system as much as possible.

Contract Net Protocol
Contract net protocol (CNP) is a management framework based on a market mechanism commonly used in the distributed control system, which was introduced into the multi-agent control field by Davis and Smith in the 1980s [25]. As a dynamic task scheduling method, CNP can find near-optimal solutions by simulating the four processes of tendering, bidding, winning the b,id and signing the contract in market economic activities [38]. When the UAV is not capable of performing some tasks, these assigned tasks are up for auction by the tenderee UAV. Then, other UAVs will bid for the tasks to be allocated. Finally, the tenderee UAV will allocate the tasks to the most suitable bidder UAVs. As a nearly global optimal scheduling method, CNP is the critical technology for UAV dynamic scheduling.
CNP is divided into tendering phase, bidding phase, winning phase and signing phase [39]. To be specific, tendering phase is that when the tenderee UAV encounters some unexpected situations during the task execution, such as pop-up obstacles, emergency tasks or platform failure, it cannot cope with the issues alone and needs assistance [40]. It will release bidding information to find suitable UAVs. The bidding phase is when other UAVs will analyze their capabilities and judge whether they can perform the tasks after receiving the bidding information. If they can deal with the dynamic issues, they will propose a reasonable bidding price based on their own performance and send it to the tenderee for bidding. The winning phase is when the tenderee will select the suitable bidder based on designed heuristics [41]. The signing phase is when the tenderee and the successful bidder reach an agreement and sign a contract to complete a task scheduling. The detailed process is described in Figures 2 and 3.
CNP is divided into tendering phase, bidding phase, winning phase and signing phase [39]. To be specific, tendering phase is that when the tenderee UAV encounters some unexpected situations during the task execution, such as pop-up obstacles, emergency tasks or platform failure, it cannot cope with the issues alone and needs assistance [40]. It will release bidding information to find suitable UAVs. The bidding phase is when other UAVs will analyze their capabilities and judge whether they can perform the tasks after receiving the bidding information. If they can deal with the dynamic issues, they will propose a reasonable bidding price based on their own performance and send it to the tenderee for bidding. The winning phase is when the tenderee will select the suitable bidder based on designed heuristics [41]. The signing phase is when the tenderee and the successful bidder reach an agreement and sign a contract to complete a task scheduling. The detailed process is described in Figures 2 and 3.    Figure 3. The negotiation process of CNP.

Hybrid Contract Net Protocol
Currently, the classic buy-sell contract is generally used for multi UAV cooperative task scheduling. However, it cannot address the problem in a complex environment. To effectively solve multi-UAV coordinated task scheduling in a complex environment, this paper proposes a hybrid contract net protocol, which includes a buy-sell contract, swap contract and replacement contract.

Hybrid Contract Net Protocol
Currently, the classic buy-sell contract is generally used for multi UAV cooperative task scheduling. However, it cannot address the problem in a complex environment. To effectively solve multi-UAV coordinated task scheduling in a complex environment, this paper proposes a hybrid contract net protocol, which includes a buy-sell contract, swap contract and replacement contract.

Buy-Sell Contract
The buy-sell contract is the primary contract type in the contract net protocol [42]. During the auction process, each UAV realizes task scheduling through the "buy-sell" way. As shown in Figure 4, the task scheduling schemes of UAV V 1 and V 2 are {T 1 , T 3 , T 4 } and {T 2 , T 5 }, respectively. The UAV V 1 finds that the path from the task T 3 to the task T 4 collides with the pop-up obstacle on the way to the task T 3 . The path cannot be re-planned. Thus, the UAV V 1 will release bidding information about the task T 4 . We make the assumption that the UAV V 2 around the UAV V 1 is capable of performing the task T 4 based on its offline task scheduling scheme.

Buy-Sell Contract
The buy-sell contract is the primary contract type in the contract net protocol [42 During the auction process, each UAV realizes task scheduling through the "buy-sell way. As shown in Figure 4, the task scheduling schemes of UAV 1 V and 2 V ar { , } T T , respectively. The UAV 1 V finds that the path from the task 3 T to the task 4 T collides with the pop-up obstacle on the way to the task 3 T . The path can not be re-planned. Thus, the UAV 1 V will release bidding information about the task T . We make the assumption that the UAV 2 V around the UAV 1 V is capable of perform ing the task 4 T based on its offline task scheduling scheme.
(a)  The buy-sell contract can be described by a quadri-tuple, and j V are a tenderee and a bidder, respectively. , i j T is the task that is transferred from the UAV i V to the UAV j V .
, sa le i j U is the performance of the whole UAV system afte one auction. The procedures of the buy-sell contract are as follows.
Step 1: Initialize the performance of all UAVs (specifically, calculate the remaining capabilities and update their task scheduling schemes), and determine the only tendere according to the maximum remaining capability.
Step 2: The tenderee i V will release the information about the task i k T . The low bid price of the task i k T can be determined by the cost which the tenderee i V should pay for the task i k T in the scheme i S . The buy-sell contract can be described by a quadri-tuple, < V i , V j , T i,j , U sale i,j >. V i and V j are a tenderee and a bidder, respectively. T i,j is the task that is transferred from the UAV V i to the UAV V j . U sale i,j is the performance of the whole UAV system after one auction. The procedures of the buy-sell contract are as follows.
Step 1: Initialize the performance of all UAVs (specifically, calculate the remaining capabilities and update their task scheduling schemes), and determine the only tenderee according to the maximum remaining capability.
Step 2: The tenderee V i will release the information about the task T i k . The low bid price of the task T i k can be determined by the cost which the tenderee V i should pay for the task T i k in the scheme S i .
Step 3: After receiving the bidding information, the bidder V j will judge whether it can purchase the task T i k according to its remaining capability. If true, the bidding price will be evaluated as follows.
Step 4: The tenderee V i will evaluate the bids about the task T i k in finite time. It will select the winner who is the highest bidder and send the information to all bidders.
Step 5: The winner and tenderee will sign the contract and update their task scheduling schemes.

Swap Contract
The buy-sell contract can be useful only when the buyers can afford the task. However, in some special cases, it is difficult to realize the task re-scheduling only by buy-sell contract. Therefore, it is necessary to adopt a swap contract to improve the efficiency of task rescheduling [43]. As shown in Figure 5, the task scheduling schemes of UAV V 1 and V 2 are {T 1 , T 3 } and {T 2 }, respectively. The maximum number of tasks which can be completed by the UAV V 1 or V 2 is 2. The emergency task T 4 is found by the UAV V 2 . If the UAV V 2 performs the emergency task T 4 , it will consume more fuel and can be easily detected by the enemy. At the same time, the UAV V 1 is not capable of performing the emergency Sensors 2022, 22, 4486 9 of 17 task due to its limited tasks' number. Thus, the swap contract will be applied to task re-scheduling. The task re-scheduling schemes of the UAV V 1 and V 2 are {T 1 , T 4 } and {T 2 , T 3 }, respectively. task re-scheduling [43]. As shown in Figure 5, the task scheduling schemes of UAV V and 2 V are 1 3 { , } T T and 2 { } T , respectively. The maximum number of tasks which ca be completed by the UAV 1 V or 2 V is 2. The emergency task 4 T is found by the UAV 2 V . If the UAV 2 V performs the emergency task 4 T, it will consume more fuel and ca be easily detected by the enemy. At the same time, the UAV 1 V is not capable of per forming the emergency task due to its limited tasks' number. Thus, the swap contract wi be applied to task re-scheduling. The task re-scheduling schemes of the UAV 1 V an  The swap contract can be described by a five-tuple, < V i , V j , T i,j , T j,i , U swap i,j >. V i and V j are a tenderee and a bidder, respectively. T i,j is the task which is transferred from the UAV V i to the UAV V j . T j,i is the task which is transferred from the UAV V j to the UAV V i . U swap i,j is the performance of the whole UAV system after one auction. The procedures of the swap contract are as follows.
Step 1: Initialize the performance of all UAVs (specifically, calculate the remaining capabilities and update their task scheduling schemes), and determine the only tenderee according to the maximum remaining capability.
Step 2: The tenderee V i will release the information about the task T i k . The UAV V j will firstly use the buy-sell contract after receiving the information. If it cannot deal with the task, it will use the swap contract to swap its task T j l with the task T i k . The performance of the UAV V j can be calculated by the following formula.
Step 3: The tenderee V i will evaluate its performance if it agrees to swap their tasks as follows. U swap i and it will also evaluate the performance of all UAVs as follows. Step 4: The tenderee V i will evaluate the bids about the task T i k in finite time. It will select the winner who is the highest bidder and send the information to all bidders.
Step 5: The winner and tenderee will sign the contract and update their task scheduling schemes.

Replacement Contract
If the UAV can gain a high profit after performing a new emergency task, the UAV should abandon some current tasks with low profit to bid for new tasks instead of a buy-sell contract [44]. As shown in Figure 6, the task scheduling schemes of UAV V 1 are {T 1 , T 3 , T 4 , T 2 }. An emergency task with a high reward appears during the implementation. The replacement contract will be employed to help the UAV V 1 perform the emergency task at the cost of one task in the scheme. , replace i j U is the performance of the whole UAV system after one auction. The procedures of the replacement contract are as follows.
Step 1: Initialize the performance of all UAVs (specifically, calculate the remaining capabilities and update their task scheduling schemes), and determine the only tenderee according to the maximum remaining capability.
Step 2: The tenderee i V will release the information about the task i k T .The UAV j V will use the replacement contract that it will abandon its task j l T and perform the task i k T . The performance of the UAV j V can be calculated by the following formula.
Step 3: The tenderee i V will evaluate its performance if it agrees to the replacement contract as follows. The replacement contract can be described by a five-tuple, >. V i and V j are a tenderee and a bidder, respectively. T i,j is the task which is transferred from the UAV V i to the UAV V j . T j,null is the abandoned task from the UAV V j . U replace i,j is the performance of the whole UAV system after one auction. The procedures of the replacement contract are as follows.
Step 1: Initialize the performance of all UAVs (specifically, calculate the remaining capabilities and update their task scheduling schemes), and determine the only tenderee according to the maximum remaining capability.
Step 2: The tenderee V i will release the information about the task T i k .The UAV V j will use the replacement contract that it will abandon its task T j l and perform the task T i k . The performance of the UAV V j can be calculated by the following formula.
Step 3: The tenderee V i will evaluate its performance if it agrees to the replacement contract as follows.
Step 4: The tenderee V i will evaluate the bids about the task T i k in finite time. It will select the winner who is the highest bidder and send the information to all bidders.
Step 5: The winner and tenderee will sign the contract and update their task scheduling schemes.

Emergency Tasks
(1) Task re-scheduling based on buy-sell contract The proposed algorithm is coded in MATLAB and run on a PC computer with Core i5-8400 2.80 GHz CPU, 8 G memory, and Windows 10 operating system. Three UAVs are employed to perform 10 tasks. Their information is shown in Tables 2 and 3. The offline task scheduling scheme is reported in Table 4 and Figure 7. As shown in Figure 7, the simulation scenario is applied in a 100 km × 100 km area. The yellow circles and the red star represent obstacles and a UAV base station, respectively. The purple dots represent ten tasks, and the red lines denote flight paths of each UAV. The high-quality and collision-free paths between any pair of locations can be generated by the APPATT [13].
During the implementation, the emergency task 11 (as shown in Table 5) is found and the UAV UAV-01 with the largest remaining capacity becomes the tenderee. The UAV-01 will release the information about the task 11 among the UAVs. It is found that only UAV-01 can obtain the most significant profit after it performs the emergency task. Therefore, emergency task 11 is allocated to the UAV-01. The running time of task re-scheduling is 0.003 s. The task re-scheduling schemes are as shown in Table 6 and Figure 8.    During the implementation, the emergency task 11 (as shown in Table 5) is found and the UAV UAV-01 with the largest remaining capacity becomes the tenderee. The UAV-01 will release the information about the task 11 among the UAVs. It is found that only UAV-01 can obtain the most significant profit after it performs the emergency task. Therefore, emergency task 11 is allocated to the UAV-01. The running time of task rescheduling is 0.003 s. The task re-scheduling schemes are as shown in Table 6 and Figure  8.      (2) Task re-scheduling based on replacement contract Three UAVs are employed to perform 10 tasks. Their information is shown in Table  2 and Table 7. The offline task scheduling scheme is reported in Table 8 and Figure 9. (2) Task re-scheduling based on replacement contract Three UAVs are employed to perform 10 tasks. Their information is shown in Tables 2 and 7. The offline task scheduling scheme is reported in Table 8 and Figure 9.    During the implementation, the emergency task 11 (as shown in Table 9) is found and the UAV UAV-01 with the largest remaining capacity becomes the tenderee. The UAV-01 will release the information about the task 11 among the UAVs. It is found that no UAVs can perform the task 11 based on the buy-sell contract. Thus, the replacement contract will be employed. The task which is close to the emergency task in terms of distance and time window and whose reward is lower than the emergency task may be re- During the implementation, the emergency task 11 (as shown in Table 9) is found and the UAV UAV-01 with the largest remaining capacity becomes the tenderee. The UAV-01 will release the information about the task 11 among the UAVs. It is found that no UAVs can perform the task 11 based on the buy-sell contract. Thus, the replacement contract will be employed. The task which is close to the emergency task in terms of distance and time window and whose reward is lower than the emergency task may be replaced. Through this way, the allocated task 1 is the replaced task. The running time of task re-scheduling is 0.0005 s. The task re-scheduling schemes are as shown in Table 10 and Figure 10.

Pop-Up Obstacles
In this section, the information about three UAVs and ten tasks are shown in Table 2  and Table 3. The initial task scheduling scheme of UAV-01 is 10 6 9 11 → → → . The initial task scheduling scheme of UAV-02 is 2 8 7 → → . The initial task scheduling scheme of UAV-03 is 5 3 1 4 → → → . Task re-scheduling will be performed by buy-sell contract to deal with pop-up obstacles, whose result is reported as shown in Figure 11. During the implementation, the pop-up obstacle (the gray circle as shown in Figure 11) is found. The pop-up obstacle prohibits the UAV UAV-02 from flying from the task 8 to the task 7. Thus, the UAV UAV-02 will release the information about the task 7 and the UAV UAV-03 will win the bidding. The task re-scheduling scheme is reported as shown in Table 11.

Pop-Up Obstacles
In this section, the information about three UAVs and ten tasks are shown in Tables 2 and 3. The initial task scheduling scheme of UAV-01 is 10 → 6 → 9 → 11 . The initial task scheduling scheme of UAV-02 is 2 → 8 → 7 . The initial task scheduling scheme of UAV-03 is 5 → 3 → 1 → 4 . Task re-scheduling will be performed by buy-sell contract to deal with pop-up obstacles, whose result is reported as shown in Figure 11. During the implementation, the pop-up obstacle (the gray circle as shown in Figure 11) is found. The pop-up obstacle prohibits the UAV UAV-02 from flying from the task 8 to the task 7. Thus, the UAV UAV-02 will release the information about the task 7 and the UAV UAV-03 will win the bidding. The task re-scheduling scheme is reported as shown in Table 11.

Platform Failure
In this section, the initial task scheduling scheme is shown in Table 4. To be specific, the initial task scheduling scheme of UAV-01 is 10 → 6 → 9 → 11 . The initial task scheduling scheme of UAV-02 is 2 → 8 → 7 . The initial task scheduling scheme of UAV-03 is 5 → 3 → 1 → 4 . Suppose that the UAV UAV-02 breaks down and cannot complete its assigned tasks. Its tasks 2, 8, and 7 will be sold sequentially at auction. The buy-sell contract is firstly performed. The location of task 2 is close to task 9, which means that lower travel distance will be generated if the UAV-01 accomplishes task 2 after the task 9. Besides, the time window constraint of the task 2 also can be met. Thus, the UAV UAV-01 wins the bidding and performs the task 2 after the task 9. Similarly, the tasks 7 and 8 will be allocated to the UAV UAV-03 via the buy-sell contract. The running time of task re-scheduling is 0.005 s. The final task re-scheduling scheme is shown in Table 12 and Figure 12.

Pop-Up Obstacles
In this section, the information about three UAVs and ten tasks are shown in Table 2 and Table 3. The initial task scheduling scheme of UAV-01 is 10 6 9 11 → → → . The initial task scheduling scheme of UAV-02 is 2 8 7 → → . The initial task scheduling scheme of UAV-03 is 5 3 1 4 → → → . Task re-scheduling will be performed by buy-sell contract to deal with pop-up obstacles, whose result is reported as shown in Figure 11. During the implementation, the pop-up obstacle (the gray circle as shown in Figure 11) is found. The pop-up obstacle prohibits the UAV UAV-02 from flying from the task 8 to the task 7. Thus, the UAV UAV-02 will release the information about the task 7 and the UAV UAV-03 will win the bidding. The task re-scheduling scheme is reported as shown in Table 11.

Platform Failure
In this section, the initial task scheduling scheme is shown in Table 4. To be specific, the initial task scheduling scheme of UAV-01 is 10 6 9 11 → → → . The initial task scheduling scheme of UAV-02 is 2 8 7 → → . The initial task scheduling scheme of UAV-03 is Suppose that the UAV UAV-02 breaks down and cannot complete its assigned tasks. Its tasks 2, 8, and 7 will be sold sequentially at auction. The buy-sell contract is firstly performed. The location of task 2 is close to task 9, which means that lower travel distance will be generated if the UAV-01 accomplishes task 2 after the task 9. Besides, the time window constraint of the task 2 also can be met. Thus, the UAV UAV-01 wins the bidding and performs the task 2 after the task 9. Similarly, the tasks 7 and 8 will be allocated to the UAV UAV-03 via the buy-sell contract. The running time of task re-scheduling is 0.005 s. The final task re-scheduling scheme is shown in Table 12 and Figure 12.  As shown in Figure 12, the yellow circles and the red star represent obstacles and a UAV base, respectively. The purple dots represent ten tasks, and the red lines denote flight paths of each UAV. All the UAVs originate from one base. The UAV UAV-02 cannot depart from the base successfully and fail to complete its offline allocated tasks suddenly due to faults. Its allocated tasks will be re-allocated to the UAV-01 and UAV-03 via hybrid CNP. Figure 12a,b shows the final flight paths of each UAV which are related to their task re-scheduling schemes. Note that the flight paths may be crossed due to time windows as shown in Figure 12a.

Conclusions
To cope with the failure of the offline task scheduling scheme due to uncertain elements, a hybrid CNP is proposed to realize dynamic task scheduling. Extensive simulations are conducted under three scenarios with emergency tasks, pop-up obstacles and platform failure to verify the superiority of the proposed method. The following conclusions can be drawn from the results: (1) the hybrid CNP can respond to the dynamic elements (emergency tasks, pop-up obstacles, and platform failure) and is also capable of generating a new task scheduling scheme based on the offline scheme with about milli- As shown in Figure 12, the yellow circles and the red star represent obstacles and a UAV base, respectively. The purple dots represent ten tasks, and the red lines denote flight paths of each UAV. All the UAVs originate from one base. The UAV UAV-02 cannot depart from the base successfully and fail to complete its offline allocated tasks suddenly due to faults. Its allocated tasks will be re-allocated to the UAV-01 and UAV-03 via hybrid CNP. Figure 12a,b shows the final flight paths of each UAV which are related to their task re-scheduling schemes. Note that the flight paths may be crossed due to time windows as shown in Figure 12a.

Conclusions
To cope with the failure of the offline task scheduling scheme due to uncertain elements, a hybrid CNP is proposed to realize dynamic task scheduling. Extensive simulations are conducted under three scenarios with emergency tasks, pop-up obstacles and platform failure to verify the superiority of the proposed method. The following conclusions can be drawn from the results: (1) the hybrid CNP can respond to the dynamic elements (emergency tasks, pop-up obstacles, and platform failure) and is also capable of generating a new task scheduling scheme based on the offline scheme with about milliseconds delays for all designed cases. (2) Compared with a single contract, the hybrid CNP is more flexible and suitable for various dynamic environments, such as emergency tasks, pop-up obstacles, platform failure, and so on. In the future, more dynamic conditions should be considered, such as extreme weather, multiple platform failures, aircraft kinematics, and so on. Moreover, to get close to reality, dynamic scheduling for heterogeneous UAVs equipped with various sensors should be further discussed.