## 4 Algorithm Test and AGV Quantity Analysis
### AGV Quantity Analysis of Packaging Workshop  
In this study, the multi-AGV conflict-free path planning algorithm based on time windows is used to analyze the sensitivity of the numbers in conflict-free AGV traffic. The number of missions increased from 70 to 200, and the number of AGVs increased from three to nine. The conflict-free transport time and the number of avoided collisions of AGVs under different transport tasks are simulated. The simulation results are shown in Table 2 and Figure 11. The top digit in the table is the transit time, and the bottom digit is the number of collisions avoided.  
AGV transport time and collision times are shown in Figure 11a,b.  
The completion times of the AGV transportation tasks increase in line with the number of transportation tasks, as illustrated in Figure 11a. This phenomenon can be attributed to several factors: Firstly, when a fixed number of AGVs are assigned to perform multiple tasks continuously without interruption, they may encounter path conflicts and deviate from the shortest distance route. Consequently, the efficiency of AGV transportation fluctuates to some extent but has minimal impact on the overall completion time.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Transportation Time**} & \multicolumn{8}{c}{**AGV Quantity**} \\ \cline{2-9}  & **3** & **4** & **5** & **6** & **7** & **8** & **9** \\ \hline \multirow{3}{*}{75} & 1318 & 960 & 812 & 697 & 601 & 598 & 650 \\  & 3 & 14 & 133 & 152 & 255 & 483 & 637 \\  & 1834 & 1355 & 1157 & 835 & 759 & 801 & 917 \\  & 2 & 16 & 142 & 176 & 437 & 761 & 1053 \\  & 2319 & 1581 & 1221 & 1065 & 947 & 927 & 1031 \\  & 0 & 21 & 156 & 217 & 503 & 1057 & 1336 \\  & 2853 & 1925 & 1583 & 1393 & 1092 & 1062 & 1173 \\  & 3 & 25 & 175 & 293 & 631 & 1255 & 1489 \\  & 3455 & 2771 & 2352 & 1951 & 1807 & 1565 & 1695 \\
200 & 5 & 31 & 307 & 527 & 930 & 1449 & 2057 \\ \hline \hline \end{tabular}
\end{table}
Table 2: AGV transit time and collision number table.  
Figure 10: Wait for conflict resolution schematics.  
When the number of transportation tasks is fixed at the initial moment, the task completion time remains relatively constant as the number of AGVs increases. However, when the number of AGVs becomes excessively large, there is a subsequent increase in the task completion time. At this juncture, augmenting the number of AGVs does not effectively mitigate the total task completion time. The underlying reasons for this phenomenon are analyzed. As depicted in Figure 10(b), an escalation in the quantity of AGVs results in a corresponding rise in collisions between them. With a substantial number of AGVs present, collision occurrences become more frequent and urgent, ultimately impeding the overall transportation efficiency and prolonging the total AGV task completion time.  
Considering that the daily transportation task of packaging is undertaken about 180 times, and there is a certain upward trend, it is recommended that the appropriate number of AGVs in the packaging workshop is four. In this case, each AGV can complete its transportation task quickly, and the possibility of AGV conflict in the transportation process is low.