Research Article

Optimization Algorithm for AoI-Based UAV-Assisted Data Collection

Algorithm 3

Trajectory optimization algorithm based on ant colony algorithm.
Input: cluster head coordinates, coordinates of data center DC, maximum
   iteration and other related parameters;
Output: Shortest path trajectory , the optimal value of P2;
1: Initialization related parameters;
2: for i=1: do
3: for j=1: do
4:  Update tube, allowed
5:  Determine the next visited cluster head node according to equation (16);
6: end for
7: Calculate the value corresponding to the path found by each ant according
  to equation (15);
8: Update the pheromone according to equation (17) (18);
9: end for
10: Choose the trajectory that minimizes equation (15), denoted as , the
 corresponding value is the optimal value of P2.