Research Article

A Plant Propagation Algorithm for Constrained Engineering Optimisation Problems

Algorithm 2

Pseudocode of PPA for constrained optimisation.
(1) Initialization: Maximum number of generations; NP population size; trial run
(2) if     then
(3)  Create a random population of plants , using (4) and gather the best solutions.
(4) end if
(5) while     do
(6)  Use population formed by gathering all best solutions from previous runs.
  Calculate value for each column of (see Section 3).
(7) end while
(8) Evaluate the population. In case of the algorithm does not need to evaluate the population,
(9) Set number of runners, , ,
(10) while ( ) or ( ) do
(11)  Create :
(12)  for   to   do
(13)   for   to   do
(14)    if     then
(15)     if     then
(16)      Generate a new solution according to (5);
(17)       Evaluate it and store it in ;
(18)     end if
(19)     if     then
(20)      Generate a new solution according to (6);
(21)       Evaluate it and store it in ;
(22)     end if
(23)    else
(24)     for   :    do
(25)      if ( ) or ( ) then
(26)       update the th entry of , , according to (7);
(27)      end if
(28)      Evaluate new solution and store it in ;
(29)     end for
(30)    end if
(31)   end for
(32)  end for
(33)  Add to current population;
(34)  Sort the population in ascending order of the objective values;
(35)  Update current best;
(36) end while
(37) Return: Updated population.