Skip to main content
. 2021 Nov 7;23(11):1470. doi: 10.3390/e23111470
Algorithm 1 Pseudocode for the CTA diffusion strategy
  • 1:

    For any UAVi, UAVkNi, FVi[0] is initialized as 0.

  • 2:

    at time n:

  • 3:

    Each UAV calculates its load through (8).

  • 4:

    UAVi calculates Fvi,j[n1] through (10).

  • 5:

    UAVi broadcasts it FVk[n1] to neighboring UAVs.

  • 6:

    UAVi calculates the sum of FVk[n1] (UAVkNi) through (15).

  • 7:

    UAVi calculates its UAV-UAV virtual force FVi[n] through (16)