This section introduces an adaptive DE algorithm model that incorporates the analytic hierarchy process. Initially, an elite archive strategy [
39] is integrated into the mutation operation of the DE, and the control factors
F and
are adaptively improved [
40], enhancing the population diversity and avoiding local optima. Simultaneously, a penalty mechanism is introduced to address new vectors that do not meet the boundary constraints, ensuring their effectiveness. Furthermore, the CRI, COLREGs, and the optimal collision avoidance distance are incorporated into the assessment of the fitness function, constituting an evaluation set with safety, economy, the COLREGs, and optimal collision avoidance distance as the evaluating factors, where the safety is determined using the CRI, and optimized for the traditional CRI model. Finally, the weights of these evaluation factors are determined using the AHP, further enhancing the rationality and accuracy of the fitness function.
3.2. Collision Risk Index
The CRI [
34] is typically calculated through a quantitative analysis of the relative positions, velocities, and headings of two or more ships, along with other environmental factors such as weather and visibility. This index is used to assess the probability of collisions between ships within a specified time and spatial range. When the value of the CRI is high, ships must take emergency avoidance actions to prevent collisions with other ships. This study selects
,
(the time to closest point of approach), the distance between two ships (
D), the relative bearing (
A), and the speed ratio (
K) as factors to construct the collision risk model. Establishment of the collision risk index factor set is
Define the membership functions for each factor:
- (1)
Membership function for
Establish a coordinate system with the own ship (OS) as the origin, where the positive x-axis points east and the positive y-axis points north. The coordinates of the own ship are , with a speed of and a heading of . The target ship (TS)’s coordinates are , with a speed of and a heading of . The true bearings from the OS to the TS and from the TS to the OS are and , respectively. The relative speed is .
Previously, when selecting the membership function for
, only the influence of the minimum safe encounter distance
and the safe passing distance
were considered, without taking into account whether the ship domain of the OS and the TS are intruded upon.
Figure 3 illustrates several scenarios where the ship domains are intruded upon. Therefore, an improvement is made to the membership function of
to address this issue.
Establish a coordinate system with the TS as the origin, with the direction of the bow serving as the positive y-axis and the direction perpendicular to the bow to the right as the positive x-axis. Perform a coordinate transformation for the position of the OS:
Based on the transformed coordinates
, derive the equation for the relative motion line of the OS with respect to the TS:
Due to the change in the coordinate system, the equation for the relative motion line also needs to be transformed:
As illustrated in
Figure 4, when the OS intrudes into the ship domain of the TS, the relative motion line of the OS with respect to the TS will intersect with the boundary of the TS’s ship domain. Therefore, it is possible to determine whether the OS has intruded into the TS’s domain by calculating if an intersection exists.
Similarly, by analyzing whether there are intersections between the relative motion line of the TS with respect to the OS and the boundary of the OS’s domain, it can be determined whether the TS has intruded into the domain of the OS.
The improved membership function is
Here, is the number of intersections between the relative motion line of the OS with respect to the TS and the boundary of the TS’s domain, and is the number of intersections between the relative motion line of the TS with respect to the OS and the boundary of the OS’s domain.
- (2)
Membership function for
Here, represents the latest distance at which the give-way ship must take evasive action, and is the distance within which a ship can take measures to avoid a collision.
- (3)
Membership function of the distance between two ships (D)
- (4)
Membership function of relative bearing (A)
- (5)
Membership function of speed ratio (K)
In the above formula, is the threshold of K, taking .
Establish a set of weights
W based on the importance of each factor in the calculation of the
.
3.3. Fitness Function
The CRI, COLREGs, and optimal avoidance distance are incorporated into the assessment of the fitness function, creating an evaluation set F defined by the factors of safety, economy, COLREGs, and optimal avoidance distance. Here, the safety of the path points is determined using the CRI, while the economy of the path points is determined using the voyage distance and the degree of turning. The COLREGs are used to assess encounter situations and determine whether the ship needs to take evasive action.
The objective function with respect to CRI is defined as follows:
During path planning, the total voyage is an economic evaluation index. Assuming that the coordinates of three adjacent points in the path are
,
, and
, respectively, where
is the current point. The total number of path points is m, and the destination point is
. When assessing the total voyage, it is evident that
is unknown. Therefore, the total voyage is evaluated by examining the relationship between the current point, the previous path point, and the destination point. The objective function with respect to the total voyage is defined as follows:
The objective function based on the degree of turning is
When the OS is a stand-on ship, it does not need to take evasive actions. However, when the OS is a give-way ship, it should take appropriate evasive measures to avoid collision risks. Based on the previously described encounter situations and responsibility allocations, the objective function constructed according to the COLREGs is as follows:
The optimal avoidance distance is crucial for determining when a ship should take evasive actions. Therefore, this paper employs a fuzzy evaluation method to calculate the optimal avoidance distance, making the decision-making process more accurate and efficient.
Establish a set of factors and a set of corresponding evaluation results , where , and . represents a group of judgment factors, i.e., the set of factors influencing the optimal avoidance distance. Specifically, , and represent the relative motion velocity judgment vector, bearing judgment vector, speed ratio judgment vector, ship density judgment vector, navigation water condition judgment vector, meteorological condition judgment vector, and ship size judgment vector, respectively. corresponds to the values of the optimal avoidance distance, where , , , , .
Construction and determination of the judgment matrix for the optimal avoidance distance is as follows:
In previous research and surveys [
41], the authors of the paper carried out further research and provided solutions. Therefore, the weight values of each influencing factor on the optimal avoidance distance are known under different conditions.
Determine the evaluation vector :
The greater the relative motion speed, the longer the time a ship takes to avoid a collision by decelerating or turning. Therefore, evasive actions should be taken as early as possible, and the avoidance distance should be correspondingly increased.
Determine the evaluation vector
:
Determine the evaluation vector
:
Determine the evaluation vector :
When there is less than one ship within two nautical miles,
When more than one ship is within one nautical mile,
Determine the evaluation vector
:
Determine the evaluation vector :
As meteorological conditions worsen, visibility at sea decreases, making ships more susceptible to external influences and impairing their ability to evaluate unknown risks, so the distance for collision avoidance should be increased.
When weather conditions are good,
When weather conditions are normal,
When weather conditions are poor,
Determine the evaluation vector :
The larger a ship’s size, the poorer its maneuverability, and thus a greater avoidance distance should be allowed.
When calculating the optimal avoidance distance, it is necessary to select appropriate evaluation vectors according to the actual conditions of each factor and to construct a judgment matrix E. Based on expert evaluations, the weights of each evaluation factor are obtained as . The evaluation result H is calculated as , and the optimal avoidance distance is determined according to the principle of maximum membership.
Construct an objective function based on the optimal avoidance distance:
where
,
,
,
, and
are the weights for safety, total voyage, degree of turning, COLREGs, and optimal avoidance distance, respectively.