Skip to main content
. 2024 Mar 14;24(6):1865. doi: 10.3390/s24061865
Algorithm 1 Four-Connectivity Optimal Beacon Placement
  • Input: 

    Drone domain (D), Beacon domain (B), Beacon Range (R), K-connectivity (K).

  • Output: 

    Beacon placement configuration with the minimum number of beacons and 4-connectivity full coverage.

  • Initialization: 

     

  •  1:

    for i=1 to i=numberofindividuals(P) do

  •  2:

       Generate one beacon at random position (x,y,z)B;

  •  3:

       Calculate the overall coverage provided by this beacon (fitness).

  •  4:

    end for

  •  5:

    Sort all of the individuals (P sets of one beacon) with respect to their fitness from the highest to the lowest;

  •  6:

    Select the first C of them (the C best of them according to their fitness) and eliminate the rest PC (Evolution chooses the best as parents for the next generation and kills the rest);

  •  7:

    Update P1,,PC with these survivor individuals which are going to be used in the next generation.

  • Optimization Framework: 

     

  •  8:

    for k=1 to i=4(Kconnectivity=4) do

  •  9:

       while STOP==0 do

  • 10:

         for i=1 to i=P/C do

  • 11:

            For each of the selected individuals from previous generation (P1,,PC), generate one beacon at random position (x,y,z)B and add it to them;

  • 12:

            Calculate the k fitness (maximum coverage with respect to each point has access to k beacon) for each of these individuals.

  • 13:

         end for

  • 14:

         Sort all of these new individuals (P sets of some beacons) with respect to their k fitness from the highest to the lowest;

  • 15:

         Select the first C of them (the C best of them according to their fitness) and eliminate the rest PC (Evolution chooses the best as parents for the next generation and kills the rest);

  • 16:

         Update P1PC with these individuals which are going to be used in the next generation;

  • 17:

         if at least one of the {P1,,PC} has a k connectivity coverage then

  • 18:

            STOP=1

  • 19:

         end if

  • 20:

       end while

  • 21:

    end for