Skip to main content
. 2025 Feb 23;25(5):1366. doi: 10.3390/s25051366
Algorithm 2 Pseudocode of the MST-Based System
  •   1:

    Initialize: Problem settings including Target_PositionMaMbMcDimDispersionPopSize (N), MaxIt (T), CurrIter (t)

  •   2:

    Randomly initialize the locations of the network node group

  •   3:

    for t=1 to T do

  •   4:

        for i=1 to N do

  •   5:

            Update the position of the ith candidate solution through the movement rules of a swarm intelligence optimization algorithm

  •   6:

            Substitute the ith candidate solution into the minimum spanning tree algorithm to obtain the fitness value

  •   7:

        end for

  •   8:

        Update the network node group to determine xbest

  •   9:

    end for

  • 10:

    Output: All potential sensor node deployment locations around the shortest path return Best solution