Skip to main content
. 2024 Aug 6;9(8):476. doi: 10.3390/biomimetics9080476
Algorithm 1 LCGA main pseudocode
  • Require: 

    P=PS,D,LB,UB,Fitness InitializePopulation(P, PS, D, LB, UB, Fitness)

  •  

      Evaluate(P, Fitness)

  • 1:

    while solution not found and termination conditions not met do

  • 2:

        stage RandomStage(1, 3)

  • 3:

        if stage=1 then

  • 4:

            GrowthStage

  • 5:

        else if stage=2 then

  • 6:

            ReproductionStage

  • 7:

        else

  • 8:

            DeathStage

  • 9:

        end if

  • 10:

        if P= then

  • 11:

            PopulationRestart

  • 12:

        end if

  • 13:

        Evaluate(P, Fitness)

  • 14:

    end while