# Path Planning Optimization of the Load Transport Process Using Heuristic Algorithms
## 3 Heuristic Algorithms  
### Genetic Algorithm  
The principle of operation of the classical genetic algorithm, which was used in this work, can be presented in the following points [25; 30]:  
* Generate (randomly) a starting population of \(n\)-chromosomes, which are the initial solution to the problem,
* Calculate the objective function (adaptation assessment), which allows for determining the quality measure of individuals,
* Terminate the genetic algorithm when the ending criterion of the algorithm is met,
* If the criterion is not met, a new population of individuals is created by applying the selection process and genetic operators, which is again subjected to the stage of the fitness assessment. The optimization process using the genetic algorithm is shown in Figure 2. The criterion check for the GA algorithm is based on the maximum number of generations. The algorithm stops working when it reaches a predetermined number of generations. The following operators were selected and implemented: the roulette method in the selection process, one-point crossover, and bit string mutation. The course of the fitness function for the best results from the analyzed variants is shown in Figure 3.  
Figure 2: Scheme of the genetic algorithm. For each of the analyzed variants, calculations were performed 10 times, with the following characteristic parameters of the algorithm changed: crossing probability (\(p_{k}=0.5\), \(p_{k}=0.8\)), mutation probability (\(p_{m}=0.05\), \(p_{m}=0.1\)), number of waypoints (\(i=8,10,12\)), number of populations (\(l_{pop}=50\), \(l_{pop}=100\)) and number of iterations (\(it=500\),\(1000\)). The number of computations was chosen based on previous initial tests that analyzed differences in results. The calculations were repeated 10 times to balance the computational effort with the statistical robustness of the results, which is standard practice in similar optimization studies. In the initial tests, it was observed that with the number of repetitions exceeding 10, the changes in the results were insignificant. The results of the shortest trajectories are presented in Tables 1-4, with the best solution presented for each analyzed case. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & & \multicolumn{5}{c}{**Population Number \(l_{pop}\)**} \\ \cline{2-7}
**It** & & \multicolumn{5}{c}{**50**} & \multicolumn{5}{c}{**100**} \\ \cline{2-7}  & & \multicolumn{5}{c}{**Number of Waypoints**} \\ \cline{2-7}  & & **8** & **10** & **12** & **8** & **10** & **12** \\ \hline \multirow{3}{*}{500} & \(L\) [mm] & 3618 & 3962 & 3900 & 3651 & 3816 & 4010 \\ \cline{2-7}  & \(T\) [s] & 70.8 & 76.5 & 84.4 & 151.6 & 157.3 & 164.7 \\ \hline \multirow{3}{*}{1000} & \(L\) [mm] & 3613 & 3743 & 3875 & **3564** & 3785 & 3849 \\ \cline{2-7}  & \(T\) [s] & 143.2 & 156.5 & 185.6 & 307.3 & 297.1 & 312.7 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Value of the objective function and computation time for various parameters of the genetic algorithm—\(p_{k}=0.5\) and \(p_{m}=0.1\). Figure 3: The course of the convergence function of the genetic algorithm. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & \multicolumn{6}{c}{**Population Number \(I_{pop}\)**} \\ \cline{2-7}
**It** & \multicolumn{6}{c}{**50**} & \multicolumn{6}{c}{**100**} \\ \cline{2-7}  & \multicolumn{6}{c}{**Number of Waypoints**} \\ \cline{2-7}  & \multicolumn{1}{c}{**8**} & **10** & **12** & **8** & **10** & **12** \\ \hline \multirow{2}{*}{500} & \(L\) [mm] & 3676 & 3830 & 3801 & **3579** & 3788 & 3738 \\ \cline{2-7}  & \(T\) [s] & 73.4 & 79.1 & 83.0 & 142.9 & 154.8 & 167.9 \\ \hline \multirow{2}{*}{1000} & \(L\) [mm] & 3742 & 3678 & 3853 & 3678 & 3703 & 3817 \\ \cline{2-7}  & \(T\) [s] & 153.5 & 153.3 & 167.7 & 281.7 & 317.5 & 343.3 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Value of the objective function (trajectory \(L\)) and calculation time for various parameters of the genetic algorithm—\(p_{k}=0.5\) and \(p_{m}=0.05\).