Skip to main content
. 2022 Nov 21;12(11):2892. doi: 10.3390/diagnostics12112892
Algorithm 3 Proposed BERSFS algorithm
  • 1:

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

  • 2:

    Calculate fitness function Fn for each Si

  • 3:

    Find best solution as S

  • 4:

    whiletTmaxdo

  • 5:

       if (randBERSFS>0.5) then

  • 6:

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

  • 7:

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

  • 8:

               Calculate D=r1(S(t)1)

  • 9:

               Update positions to head toward best solution as

               S(t+1)=S(t)+D(2r21)

  • 10:

         end for

  • 11:

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

  • 12:

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

  • 13:

            Calculate D=r3(L(t)S(t))

  • 14:

            Update positions Elitism of best solution as

            S(t+1)=r2(S(t)+D)

  • 15:

            Calculate k=1+2×t2Maxiter2

  • 16:

            Update positions Investigating area around best solution as

            S(t+1)=r(S(t)+k)

  • 17:

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

  • 18:

            if best fitness is not changed for last two iterations then

  • 19:

                Mutate solution as S(t+1)=kz2hcos(x)1cos(x)

  • 20:

            end if

  • 21:

         end for

  • 22:

       else

  • 23:

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

  • 24:

            Calculate updated best solution as

            S(t+1)=Gaussian(μS,σ)+(η×S(t)η×Pi)

  • 25:

         end for

  • 26:

       end if

  • 27:

       Update the fitness function Fn for each Si

  • 28:

       Find best solution as S

  • 29:

       Update BERSFS parameters, t=t+1

  • 30:

    end while

  • 31:

    ReturnS