## 2 Models  
### The Gridded Path Constraint Model Based on the International Maritime Organization (IMO)  
Environmental map is the premise of the path planning task. In general, the planning of the ship's track requires electronic charts to provide global environmental information. The environment map is usually composed of complex geometric figures, which means most of the search algorithms cannot be directly applied in path planning, and the scale of the map directly affects the efficiency of path planning, so it is necessary to process the environment map. The grid map is the most commonly used form of processing and expression. It represents the environment as a square grid network with a certain resolution. The grids are divided into free state and occupied state according to whether they are occupied by obstacles, and the grids are independent of each other. The grid map is easy to create and easy to implement path planning, so it is widely used in robotics, autonomous driving, and other fields. Figure 1: The overview chart on the technical characteristics of SPA*. The IMO points out that the constituents of environmental risk during the navigation of a ship at sea are mainly wind and waves. Based on this, many scholars have transformed the IMO's quantified limitation rules for wind and waves into constraints in the route planning algorithm in grid maps. Scholars point out that one of the factors of the ship most affected by wind and wave conditions is its operating speed. Winds and waves with different angles and strengths can cause ships to stall at different levels. The stall can lead to various dangerous phenomena on the ship, among which the more popular ones are surf-riding and broaching-to. For a long time, many ship trajectory planning considered only distance cost and scalar risk cost. In this paper, we note the scalar risk assessment array as \(F_{1}\) and the vector risk assessment array as \(F_{2}\). \(F_{1}\) and \(F_{2}\) are 3D arrays, with the first two dimensions being longitude and latitude, and the third dimension being time. The average risk value of the grid through which the route passes is taken as \(f_{1}\) by evaluating the scalar data from the ocean forecast, and \(f_{1}\) is often normalized to the interval [0, 1]. Traditional ship track planning in terms of risk control focuses on \(f_{1}\). The assessment methods are the analytical hierarchy process (AHP) [35,36] and fuzzy comprehensive evaluation (FCE) [37]. The main steps of the evaluation are: (1) Establish the FCE factor set \(U\) for risk indicators [36,37]. The indicators in this paper are selected as sea surface temperature, sea surface current velocity, and wave height. (2) Use the Gaussian membership function to perform single factor fuzzy evaluation on meteorological data and obtain a fuzzy matrix \(R\). (3) Use AHP combined with expert knowledge to determine \(A\)[35,37]. (4) Obtain the fuzzy vector \(B\) by \(B=A\circ R\), where \(\circ\) is the fuzzy synthesis operator and is taken as matrix multiplication in the general case. (5) Use the weighted average principle to determine \(F_{1}\), which can be expressed as \(F_{1}=B\cdot(0.2,0.4,0.6,0.8,1)^{T}\). Now we assume that the planned path is represented by the planned path array \(P~{}=~{}(p_{1},p_{2},\cdots,p_{n})\). \(p_{i}(1)\) is a linear index value representing a specific grid on the map. And \(p_{i}(2)\) is the time period when ships arrive at \(p_{i}(1)\). Linear index values and arrays of row and column coordinates are equivalent. Finally, \(f_{1}\) is calculated using Equation (1). \[f_{1}=\frac{\sum\limits_{i=1}^{n}F_{1}(p_{i}(1),p_{i}(2))}{n}, \tag{1}\]  
where \(n\) denotes the number of components in the planned path array \(P\). However, in actual navigation, wind and waves are particularly influential on surface ships, and both mainly affect the ship's speed through physical effects. For estimating the actual speed of a ship under wind and wave conditions, many scholars and scientific organizations have proposed their own theoretical formulas.