## 3 Route Determination for Ship Passage Using Capability Plots
### The Concept of the Algorithm  
The implemented algorithm aims to determine the route for a vessel equipped with a set of anchors, between its current position and the designated location for deploying the first anchor. Figure 5 shows a fragment of the anchor planning tool, together with the navigation scenario that will demonstrate the operation of the algorithm. Figure 4: Algorithm determining the maximum wind speed. Figure 5: The anchorage plan. The diagram above includes two points: A, the starting point, and B, the endpoint. It is assumed that the designated passage route should end at the location of the first anchor drop. The distance between the points is 2.4 NM. The first step in determining the ship's passage route is to define the area in which the ship can maneuver. For such an assumed area, a grid of waypoints is generated. The density of these points is defined by the user. Figure 6 shows the navigational situation from Figure 5 with the waypoints included. Each point in the matrix is represented by its latitude and longitude. When preparing the anchoring operation, the ship's crew arrives at the designated anchorage area and makes a preliminary assessment before analyzing anchor placement and maneuvering strategies. For this reason, the presented algorithm starts to determine the route from the point closest to the ship's current position. For the purpose of demonstrating the algorithm's function, a waypoint density of 10 was assumed, resulting in a matrix where each row and column contains 11 points (with numbering starting from 0). It was also assumed that the wind speed acting on the ship is 10 m/s, with a direction of 20 deg. The considered case of route determination is a classic graph search problem. One of the popular methods for solving such problems is the use of [PERSON]'s algorithm. [PERSON]'s algorithm finds the shortest path between two vertices in a weighted graph, where edges are assigned numerical values known as weights. As a greedy algorithm, [PERSON]'s approach makes locally optimal choices at each stage, leading to a globally optimal solution. However, for the algorithm to function correctly, the graph must not contain edges with negative weights. The individual transition weights between points in the matrix are obtained by converting the ship's CP into a series of coefficients based on the wind angle of attack on the ship's hull. This conversion is performed using Equation (27). \[\frac{\text{F}\alpha(\alpha)}{\text{F}_{\text{max}}} \tag{27}\]  
Figure 6: Navigational situation with the waypoint grid. where F\({}_{\alpha}\)(\(\alpha\))--resultant environmental force currently acting on the ship's hull at angle \(\alpha\); F\({}_{\max}\)--maximum resultant environmental force that can act on the ship's hull. The maximum value of the environmental force that can act on the ship's hull is determined during the creation of the CP. For the ship presented in Section 2, the maximum environmental force is 320 kN. Figure 7 illustrates the transition weights for individual points, depending on the wind impact angle. The next step after defining the table shown in Figure 7 is to define the transition matrix between individual points. This matrix specifies which neighboring points each current point is connected to and the cost of moving to each of them. To determine the relationships between points (each point to every other point), a matrix is created where the rows represent the current point being evaluated by the algorithm and the columns represent potential neighbors. In this case, the matrix has the following dimensions:  
\[\text{[number of waypoints $\times$ number of waypoints]}\]  
In the case of the navigational situation shown in Figure 5, the matrix has dimension [121 \(\times\) 121]. The individual points in the transition matrix have been defined according to the order shown in Figure 8.  
During the initialization of the table, all transition weights are set to a value of 10, indicating that there is no passage between the respective points.