Research Article

Smart Microgrid Energy Management Using a Novel Artificial Shark Optimization

Algorithm 1

Initialize the whole Shark population
Random initialization of the positions of each Shark
   while (iter < maximum number of iterations max_iter)
      for each Shark
      Calculate the objective function value of every Shark
      Select the local best position & objective function value of every Shark
      Select the universal best position and objective function value of Sharks
      Update the value of tp
         Iftp <= threshold probability of finding pray
           Speed of a shark is updated by using equation (6)
           Position of a Shark is updated by using equation (7)
         else  Position of a Shark is updated by using equation (9)
         end if
      Check the new position of Shark is within its limit
      Evaluate the direction of the speed of a Shark
      end for
   iter = iter + 1
   end while
return universal best Shark.