Page 36 - Read Online
P. 36

Page 342                       Sellers et al. Intell Robot 2022;2(4):333­54  I http://dx.doi.org/10.20517/ir.2022.21




               Algorithm 1: Improved PSO (IPSO) algorithm for waypoint sequencing
               Initialize a population of particles
               Set the size of the swarm to      , the maximum number of iteration          .
               for i=1 to       do
                   Initialize       within the search range of (         ,         ) frandomly;
                   Initialize       within the velocity range of (         ,         ) randomly;
                         =      ;
               end
               Evaluate each      ;
               Identify the best position      ;
               while (a stop criterion is not satisfied & t <          ) do
                   for p=1 to       do
                       Update    1 and    2 by Equation (8), Equation (9), and Equation (10);
                          = ∑     ¯       (  )
                          
                                  
                                     
                              =1        
                   end
                   ; // The sum of particle weights
                       (           )
                             ∑       
                   ¯    = ˆ   /  ˆ     ; // Average the weights together
                               =1    
                                                 
                                         
                            max 1≤   ≤   (F(   (  )))−F(   (  ))+  
                                         
                   ˆ           =  max 1≤   ≤   (F(   (  )))−min 1≤   ≤   (F(   (  )))+   ; // Calculate the weights of each
                                                 
                                                    
                                     
                                     
                                                    
                       particle
                                                           
                                          
                        (t+1)=     (t)+    1    1 [    (t)-     (t)]+    2    2 [       (t)-     (t)]; // Update the fitness
                                          
                       value for each particle
                        +1  =      +1  +    ; // Add the fitness value to the particle position
                                 +1
                           
                      
                                 
                      ,  +1    ,  
                          =       ; // Store the initial local best position
                      ,  +1    ,  
                          =      
               end
               ; // Store the initial global best position
               Evaluate F(     +1 );
                            
                       ,  +1     +1
               if F(       ) < F(       ) then
                             ,  +1
                   Update        ; // Update the new local best position
               end
                       ,  +1     ,  +1
               if F(       ) < F(       ) then
                             ,  +1
                   Update        ; // Update the new global best position
               end
               workspace through the distance of the edge list E. Nevertheless, some edge distances cannot represent the
               sparseness of the entire workspace, such as the edges enclosed by the red dotted line in Figure 6B.
   31   32   33   34   35   36   37   38   39   40   41