|
Algorithm 1 Balance Algorithm. |
|
Input: Initial deployed information of nodes and UAVs |
|
Output:,
|
| 1: = = 0, k = 1, = 0; |
| 2: Step 1. Synchronization;
|
| 3: UAV sends k-th ’Beacon’ message; |
| 4: Network update, obtain the and ; |
| 5: Step 2. Data Communication;
|
| 6: while
do
|
| 7: Let , , and ; |
| 8: if
= ⌀ then
|
| 9: Apply PCdFS mechanism (Algorithm 2) to balance the communication between and , and respectively; |
| 10: else
|
| 11: Apply PMCdFS algorithm (Algorithm 3) for the balancing between mobile nodes in and multi-UAVs, and obtain and through PMCdFS algorithm; |
| 12: Apply PCdFS mechanism (Algorithm 2) to balance the communication between and , and respectively; |
| 13: end if
|
| 14: Update , k, and ; |
| 15: end while
|
| 16: return
and ; |