# Path Planning Optimization of the Load Transport Process Using Heuristic Algorithms
## 3 Heuristic Algorithms
### Particle Swarm Optimization  
The particle swarm algorithm, which is inspired by swarm intelligence, was proposed by [PERSON] and [PERSON] in 1995 [31]. Since its development, the PSO algorithm has been improved many times, e.g., by transforming the equations of particle motion, resulting in a combination of the global and local versions [25]. The principle of operation of the PSO algorithm can be presented in the following steps [32; 33]:  
* Specifying the input data,
* Random selection of particle velocities and positions,
* Calculation of the objective function,
* Determination of the best local (\(p_{m}\)) and global (\(g_{m}\)) position of the particle,
* Speed and location update,
* Recalculation of the objective function,
* Verification and update of location parameters (\(p_{m}\) and \(g_{m}\)),
* Assignment of the optimal solution. The appropriate choice of coefficients (\(\kappa\), \(w\) and \(c_{1},c_{2}\)) has a large impact on the acceleration of particle motion during numerical simulations. The selection of the PSO algorithm parameters was the subject of many works [26; 34; 35; 36; 37], in which appropriate values were determined to obtain the desired results. Based on the aforementioned works, the parameters of the particle swarm algorithm can be characterized as follows:  
* The squeeze factor (\(\kappa\)) prevents a sudden increase in speed and makes it easier to obtain population convergence,
* Learning coefficients (\(c_{1},c_{2}\)) determine the range of motion of the particle during iteration,
* The weighting factor (\(w\)) maintains a balance when looking for a local and global solution. During the simulation, the following values characteristic of the PSO algorithm were adopted: \(\kappa=0.7\), \(w=1\), \(\lambda=0.5\), \(c_{1}=1.49445\) and \(c_{2}=1.49445\). The scheme of PSO algorithm is presented in Figure 4. The criterion check for the PSO algorithm is based on the maximum number of iterations. The algorithm stops when a fixed number of iterations is reached. The course of the fitness function for the best results from the analyzed variants is shown in Figure 5.  
Figure 4: Scheme of the particle swarm optimization algorithm. Figure 5: The course of the convergence function of the PSO algorithm. The shortest trajectory of all analyzed variants, 3566 mm, was obtained for the case \(l_{pop}=50\), \(i=5\), \(it=75\). Further analysis of the results suggests that increasing the number of iterations generally improves the quality of the solution, especially for larger populations, but this effect diminishes after 75 iterations. This highlights the potential benefit of dynamically adjusting the number of iterations based on early convergence results. Taking into account the obtained numerical results (Tables 5-8), it can be concluded that the PSO algorithm finds the shortest trajectory for the maximum number of auxiliary points (\(i=5\)), but at a different number of iterations (\(it=75\) or \(it=100\)). For a population of \(l_{pop}=20\), the shortest trajectory is 3638 mm. The difference in this case from the optimal trajectory is 2%, while the time needed to perform the calculations was shorter by 0.5 s. For the calculations shown in Table 6 (\(l_{pop}=30\)), the shortest trajectory is 3629 mm, and the difference from the optimal trajectory is 1.8%. The calculation time in this case was 1.91 s shorter. In the case when the population number is 40, the length of the trajectory is 3587 mm. However, the time needed to complete the calculations was longer than in the case of the optimal trajectory and amounted to 29.2 s. The difference in length did not exceed 1%. It was also observed that increasing the number of population leads to a shorter trajectory (Figures 6-8). The projection of the trajectory onto the XY axis (Figure 6) is similar for each of the analyzed population numbers. This similarity is due to the fact that the search space is simpler and less complex, which makes it easier for particles to converge to similar solutions.