Skip to main content
. 2024 Dec 26;25(1):72. doi: 10.3390/s25010072
Algorithm 2: Adaptive cluster maintenance and congestion management.
Input: List of clusters with information on the number of UAVs and area for each cluster, congestion threshold (LCFth) for UAV density, distance threshold for identifying neighbouring clusters, and scaling factor for UAV reassignment.
Output: Update distribution of UAVs between clusters and update LCF for each affected cluster.
# For each time interval
1: for each cluster i:
2:     Calculate LCF using (12)
# Check if LCF exceeds the threshold
3:   if LCFi>LCFth then
# Identify neighboring clusters within the distance threshold
4:       Eligible clusters = [ ]
5:  for each neighboring cluster j within distance_threshold do
6:   Calculate maximum and avaiable capacity of cluster j using (14) and (15)
# Check the neighbor capacity and level of LCF
7:  if LCFj>LCFth and Nava,j>0 then8:Eligible clusters append (j, Nava,j)9:  end if10:end for# Select the neighboring cluster with maximum available capacity11:if eligible clusters is not empty then# Calculate number of UAVs to trasfer12: Calculate number of UAVs to transfer using (16)# Transfer UAVs from congested cluster to the target cluster13: Transfer UAVs from cluster i to target cluster# Update LCF for both clusters14: Update LCF for both clusters (LCFi, LCFj)
15:       end if
16:    end if
17: end for