Page 147 - Data Science Algorithms in a Week
P. 147

Simulation Optimization Using a Hybrid Scheme …             131

                                Generate  N  particles  p  ) 0 (  = [p  0 (    ), p  0 (  ),..,p  0 (  )],  i  =  1,..,N;  where
                                                       i       1 i    2 i    in p

                                 pij(0) is randomly selected according to a uniform distribution in the interval
                                    L   U
                                  [ p  j  , p  j  ], j = 1,..,np (a particle i is represented by a np-dimensional real-

                                 valued vector pi).
                                Generate velocities v i  ) 0 (  0   , 0 [ =  ,..,  ] 0 , i = 1,..,N.

                                Evaluate the fitness of each particle using J(pi(0)), i = 1,..,N.
                                Set  the  initial  value  of  the  personal  best  position  vector  as  y  ) 0 (  =  p  ) 0 (  ,
                                                                                           i     i
                                 i = 1,..,N.
                                Determine  the  neighborhood  best  position  vector  ˆ y  (0)  using  the  formula
                                                                                 i
                                  J(y ˆ i (0) ) = min{ J(y j  0 (  ))}, j ∈ B , where Bi defines the set of indexes for the
                                                            i
                                 particles neighbors.
                                Determine  the  global  best  position    g (0)  using  the  formula

                                  J(g (0) ) =  min{ J(y  0 (  ))},  i    = 1 ,.., N .
                                                 i
                                Set the initial value of the inertia weight  w ( 0 ) . Set k’ = 0.
                       Step 2) Iteration updating: Set k = k + 1.
                       Step 3) Weight updating: If k-1-k’ ≥ iteration_lag then update the inertia weight using:

                                  ) 
                              w (k =   w   ) ' (k .

                          Step 4) Velocity updating: Calculate the velocity of particle i by using:

                                                                      )] c r
                                  ) w
                              v i (k =  (k )v i (k  ) 1 - + c r 1 (k )[y i (k  - ) p i (k +  2  2 (k )[y i (k  - ) p i (k )]
                                                                                 ˆ
                                                     1

                       Step  5)  Position  updating:  Based  on  the  updated  velocities,  each  particle  changes  its
                              position according to the following equation:

                              p i (k ) =  v i (k +  i (k  ) 1 -
                                         ) p

                       Step  6)  Personal  best  updating:  Determine  the  personal  best  position  visited  so  far  by
                              each particle:
                                Evaluate the fitness of each particle using J(pi(k)), i = 1,..,N.
                                             ( k           J(   if  p  (k  1))  J(y  (k - 1))
                                             y
                                                    ) 1
                                Set  y  ) k (      i       i           i
                                      i
                                               p i  ) k (          J(   if  p i (k))   J(y i (k - 1))
   142   143   144   145   146   147   148   149   150   151   152