## 3 Experiments  
### Static Route Planning Experiments by SPA*  
In this section, we use the traditional path planning algorithm and the swarm intelligence (SI)-based path planning algorithm as a comparison of SPA*. Traditional path planning algorithms include Dijkstra, A*, and BA*; SI-based path planning algorithms include ACO, HHO, and SSA. The static route path planning experiments refer to route planning from the starting point to the end point by fixing the risk assessment data over a certain period of time. The main observation indexes on a route are the running time of algorithms, the average assessment value of wind and wave risk \(f_{1}\), the average assessment value of comprehensive risk \(f_{2}\), and the rate of violating IMO (R-VIMO). Then R-VIMO is calculated using Equation (12). \[ \begin{split}&\text{R}-\text{VIMO}(Path)=\frac{\sum\limits_{i=2}^{ \frac{n}{2}}I(q_{i};v_{i}T_{E}(i))}{n},\\ & I(q_{i},v_{i},T_{e}(i))=\left\{\begin{array}{ll}1,&\text{if }q_{i},v_{i}\text{ and }T_{E}(i)\text{ satisfy Constraint I or II}\\ 0,&\text{otherwise}\end{array}\right.\end{split}  \tag{12}\]  
where R-VIMO(_Path_) represents R-VIMO of _Path_; \(q_{i}\) is the angle between the wave direction and the ship's heading when the ship travels to the \(i\)th grid according to the planned path _Path_; \(v_{i}\) is the actual velocity when the ship travels to the \(i\)th grid according to the planned path _Path_; \(T_{E}(i)\) is the encountered period with waves when the ship travels to the \(i\)th grid according to the planned path _Path_; \(q_{i}\), \(v_{i}\) and \(T_{E}(i)\) are from _Path_. \(I(q_{i},v_{i},T_{e}(i))\) is an indicator function that determines whether three variables satisfy Constraints I and II. Figure 4: For dynamic planning, the implementation of SPA* is compared with the traditional implementation. The smaller the running time of algorithms \(f_{1},f_{2}\), and R-VIMO, the better the performance of the algorithm. R-VIMO is an important standard. If the R-VIMO of a route is greater than 0, it means that it has a section that does not meet the IMO standard. Keeping R-VIMO at 0 is a test of the performance of the planning algorithm. This paper argues that the path of R-VIMO = 0 is absolutely better than that of R-VIMO > 0. There are some red segments in the paths marked by different colors in Figure 5 and the last figure in paper. The red segments indicate violations of Constraint I or Constraint II in Section 2.1. Figure 5: Static planning routes of SPA*, traditional path planning and SI-based path planning for different map sizes. (**a**,**c**,**e**) are the routes planned by SPA* and traditional path planning algorithms for the corresponding map sizes; (**b**,**d**,**f**) are the routes planned by SPA* and SI-based path planning algorithms for the corresponding map sizes. The weights in the cost function of Dijkstra, A *, and BA * are consistent with SPA*. The w of the heuristic function in A * and BA * is 0.15. The maximum number of iterations in ACO is 400, the initial population is 50, \(\alpha\) is 2, \(\beta\) is 5, \(\rho\) is 0.3, and \(Q\) is 200. The maximum number of iterations of HHO is 400, and the population size is 50. The maximum number of iterations of SSA is 400, the initial population is 50, the warning value is 0.6, and the proportion of discoverers and participants is 0.7 and 0.3, respectively. The number of segments \(m\) in SPA* is 7, where the heuristic function of A* is the adaptive heuristic function proposed in this paper. The starting point of each experiment is set at the top left corner of the map, and the end point is set at the bottom right corner of the map. The cruising speed of the ship in the experiment is 30 knots per hour, and the displacement is 54,500 tons. And \(T_{r}\) is 10.0065 s. The length, width, and height of the ship are 306.4, 74.4, and 14 meters, respectively.