|
Algorithm 2 Genetic Algorithm with Minimum Energy for Data Forwarding (GAMEDF). |
Initialization: Battery capacity of the UAV is insufficient for visiting all CH robots, i.e., .
Algorithm:
fordo
# Comment: Choose K of M CH robots and desist from visiting remaining CH robots.
find all combinations of the CH robots.
# Comment: For each of the combinations of CH robots.
for
do
# Comment: Check whether the UAV can find a route to visit all CH robots in the combination .
if
for
then
# Comment: is a feasible K-element combination, i.e., . find the minimum energy consumption of the CH robots in .
Use Algorithm 1 for each CH robot . find
end if
end for
# Comment: If there exists at least a feasible K-element combination, find the K-element combination by which energy consumption of CH robots in will be minimum.
if
then
find
end if
end for
# Comment: find the combination by which the minimum energy consumption of the CH robots in will be minimum (In this step, all K values are considered so this is the step to find the minimum of minimum).
find .
# Comment: As output, provide the result of K and the combination as the solution.
Output:
|