Skip to main content
. 2024 Aug 29;9(9):519. doi: 10.3390/biomimetics9090519
Algorithm 1 Framework of the DBO Algorithm
  • Input: 

    Maximum iteration Tmax, population size N

  • Output: 

    Optimal position Xbest2 and its corresponding fitness value fmin

  • 1:

    Initialize the population of particles, indexed as i=1,2N, and def-ine relevant parameters.

  • 2:

    while tTmaxdo

  • 3:

       for i belonging to the rolling dung beetles group. do

  • 4:

         a=rand(1)

  • 5:

         if a0.9 then

  • 6:

            Update the location of the rolling dung beetle using Equation (1).

  • 7:

         else

  • 8:

            Simulate rolling the ball in the presence of obstacles using Equation (2) to update the location.

  • 9:

         end if

  • 10:

       end for

  • 11:

       Calculate the nonlinear convergence factor as R=1t/Tmax.

  • 12:

       for i belonging to the spawning dung beetles group. do

  • 13:

         Update the location of the spawning dung beetle using Equations (3) and (4).

  • 14:

       end for

  • 15:

       for i belonging to the foraging dung beetles group. do

  • 16:

         Update the location of the foraging dung beetle using Equations (5) and (6).

  • 17:

       end for

  • 18:

       for i belonging to the stealing dung beetles group. do

  • 19:

         Update the location of the stealing dung beetle using Equation (7).

  • 20:

       end for

  • 21:

    end while

  • 22:

    return Return the optimal position Xbest2 and its corresponding fitness valu-e fmin.