Research Article
Solving “Limited” Task Allocation Problem for UAVs Based on Optimization Algorithms
Pseudocode 2
Pseudocode of the PSO algorithm.
Input: UAVs, Tasks, Key Tasks. | Output: The best task assignment sequence and its objective function value. | 1: The UAV, mission and key task are encoded as particles. | 2: DO | 3: For per particle | 4: Calculated the fitness (using evaluation function); | 5: If (fitness is better than historical best value of particles) | 6: Use Xi update the best individual in history Pi; | 7: End | 8: Select the best particle in the current particle swarm; | 9: If (the current best particle is better than the historical best particle) | 10: Update with the best particle of current swarm Pg; | 11: For per particle | 12: Update the particle velocity according to formula (11); | 13: Update the particle position according to formula (12); | 14: End | 15: While The maximum number of iterations is not reached |
|