Mathematical Problems in Engineering / 2012 / Article / Alg 4

Research Article

An Immune Cooperative Particle Swarm Optimization Algorithm for Fault-Tolerant Routing Optimization in Heterogeneous Wireless Sensor Networks

Algorithm 4

Update mechanism in the ICPSOA.
Input:   𝑃 S T π‘œ : The information parameters of nodes
      𝑆 𝑖 : The 𝑖 th particle swarm
      𝑏 ( 𝐿 , 𝑖 ) : Each sub-swarm’s optimal position vector function
      𝑃 G e n : The iterated generations for searching process
Output:  𝑣 𝑑 + 1 𝑖 𝑑 and π‘₯ 𝑑 + 1 𝑖 𝑑 : The velocity and position of each sub-swarm and its particle
     fi t n e s s ( 𝑝 𝑖 ) : The global optimal fitness
Process:
    For each swarm 𝑖 ∈ [ 1 β‹― π‘˜ ]
     For each particle π‘š ∈ [ 1 β‹― 𝑛 / π‘˜ ]
      Update velocity and position of each sub swarm’s particle
     If fi t n e s s ( 𝑏 ( π‘₯ π‘š 𝑆 𝑖 , 𝑖 ) ) β‰₯ fi t n e s s ( 𝑏 ( 𝑝 π‘š 𝑆 𝑖 , 𝑖 ) ) , 𝑏 ( 𝑝 π‘š 𝑆 𝑖 , 𝑖 ) = 𝑏 ( π‘₯ π‘š 𝑆 𝑖 , 𝑖 )
     Else If fi t n e s s ( 𝑏 ( π‘₯ π‘š 𝑆 𝑖 , 𝑖 ) ) < fi t n e s s ( 𝑏 ( 𝑝 π‘š 𝑆 𝑖 , 𝑖 ) ) , 𝑏 ( 𝑝 π‘š 𝑆 𝑖 , 𝑖 ) = 𝑏 ( 𝑝 π‘š 𝑆 𝑖 , 𝑖 )
      Calculate fi t n e s s ( 𝑝 𝑖 ) of the particle (path)
      End For
      𝑏 ( 𝑝 𝑔 𝑆 𝑖 , 𝑖 ) = a r g 𝑃 ( 𝑝 π‘š 𝑆 𝑖 , 𝑖 ) m a x 𝑓 𝑖 𝑑 𝑛 𝑒 𝑠 𝑠 ( 𝑏 ( 𝑝 π‘š 𝑆 𝑖 , 𝑖 ) )
    End For

Article of the Year Award: Outstanding research contributions of 2020, as selected by our Chief Editors. Read the winning articles.