Skip to main content
. 2022 Nov 21;12(11):2892. doi: 10.3390/diagnostics12112892
Algorithm 1 AL-Biruni Earth radius (BER) algorithm
  • 1:

    Initialize BER population Si(i=1,2,,d) with size d, iterations Tmax, fitness function Fn, t=1, BER parameters

  • 2:

    Calculate fitness function Fn for each Si

  • 3:

    Find best solution as S

  • 4:

    whiletTmaxdo

  • 5:

       for (i=1:i<n1+1) do

  • 6:

         Update r1=h1cos(x)1cos(x), r2=h2cos(x)1cos(x)

  • 7:

         Update positions to move toward best solution as in Equation (1)

  • 8:

       end for

  • 9:

       for (i=1:i<n2+1) do

  • 10:

         Update r=hcos(x)1cos(x), r3=h3cos(x)1cos(x)

  • 11:

         Update positions Elitism of best solution as in Equation (2)

  • 12:

         Update positions Investigating area around best solution as in Equation (3)

  • 13:

         Compare S(t+1) and S(t+1) to select best solution S

  • 14:

         if The best fitness has remained the same over the past two editions. then

  • 15:

             Mutate solution as in Equation (4)

  • 16:

         end if

  • 17:

       end for

  • 18:

       Update the fitness function Fn for each Si

  • 19:

       Find best solution as S

  • 20:

       Update BER parameters, t=t+1

  • 21:

    end while

  • 22:

    ReturnS