Coordinated Anti-Collision Path Planning Algorithm for Marine Surface Vessels

This article presents a coordinated anti-collision path planning algorithm for marine surface vessels in complex multi-ship encounter. Unlike previous research that follows the optimization sequence one step after the other from the prospective of single ship, a multi-stage anti-collision strategy from the overall perspective is established based on the principles of Synergetic theory and Queueing theory, which guarantees the compliance with navigation practice and the coordination among ships’ avoidance actions. The concept of an optimization echelon is proposed to help categorize the optimization priority. Then a Multilayer Coding Genetic Algorithm enables all ships belonging to the same optimization echelon participate in the decision-making process simultaneously. Furthermore, the quantitative model of encounter situation is refined through the sensibility analysis. Finally, simulation examples consisting different traffic scenarios are analysed to demonstrate the effectiveness and practicality of the proposed scheme.


I. INTRODUCTION
In the past decades, the development of autonomous vehicles, either on land, air or sea, has seen great progress. This progress mainly benefits from the advances of technologies, which enable the perception of surrounding environment, path planning and vehicle control in real time. Considering the demanding manoeuvring schedules for officer on watch (OOW) as well as the severe consequences resulted from maritime accidents, the Decision Support System (DSS) or what some researchers call Autonomous Navigation System (ANS) has been frequently proposed to increase the maritime safety in technical methods. For example, simulations of DSS NAVDEC and HICASS have been proposed [1]. Analogous to the decision process of mariners, the DSS is composed of three main modules: Environment awareness, Ship motion control and Path planning, as shown in Figure 1. The environment awareness module fuses the multiple sensors' data of different types and extras the relevant information on the ship's surroundings [2]. In fact, the mandatory installation The associate editor coordinating the review of this manuscript and approving it for publication was Emre Koyuncu . of navigational equipment, such as Automatic Identification System (AIS), Electronic Chart Display and Information System (ECDIS), Global Positioning System (GPS), Automatic Radar Plotting Aid (ARPA) etc., has provided abundant environment data. The path planning module could be classified into the global path planning and local path planning (anti-collision path planning), the former is responsible for VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ generating a path from departure to the destination, via predefined waypoints, while avoiding the static obstacles perceived by environment awareness module; the second is responsible for generating anti-collision manoeuvres when the degree of collision risk between ships is beyond the boundary. Finally, the ship motion control module takes appropriate control algorithm to manipulate the ship based on the optimization results from the path planning module no matter the action is course alteration or speed changing. Path planning for collision avoidance through an environment containing static obstacles and moving target ships is a complicated task and can be viewed as a multi-optimization, nonlinear programming problem. This optimization scheme should be executed by considering several aspects including safety, economy, precision and the COLREGs constraints. Up to now, lot of research work and progress both theory and simulation has been demonstrated in this field since the 1990s, with the early studies mostly focused on the collision risk assessment or the deterministic approach to acquire the anti-collision manoeuvres in immediate encounters. These studies have been reviewed and discussed in detail [3], [4]. Iijima et al. [5] developed a collision avoidance manoeuvring model using a knowledge-based expert system. Grack et al. [6] proposed the use of a potential collision threat area to plan a safe manoeuvre. Lisowski and Smierzchalski [7] modelled a nonlinear task based on the kinetics of own ship to derive a safe course deviation. Churkin and Zhukov [8] employed both continuous and discrete methods to generate evasive manoeuvres. Wilson et al. [9] avoided collision by reversing the idea of traditional missile proportional navigation and recognizing that the goal is to avoid the strange ship. Hwang [10], Kao et al. [11] and Su et al. [12] determined anti-collision routes using fuzzy set theory to assess collision risk. Liu and Shi [13] used fuzzy set theory and neural network to determine an evasive action for specific encounter situations. Szlapczynski [14] applied a maze-routing method with additional turn penalties, time-dependent forbidden zone and speed reduction ability to generate a corresponding evasive route. In recent years, heuristic approaches, especially swarm intelligence algorithms such as Genetic Algorithm (GA) and Ant Colony Algorithm (ACO) etc., have received considerable attention from researchers and practitioners in the field of intelligent decision making [15]- [22]. In essence, heuristic approaches only search within a subspace of the search space to derive an acceptable solution with predefined constraints. These approaches are characterized by high mathematical abstraction and global optimization, and could deal with complex computations.
It is remarkable that the performance of the path planning depends heavily on the following aspects. First, the anticollision decision should be closely integrated with the International Regulations for Preventing Collision at Sea (COLREGs) [23] especially on the responsibility, action time, action manner, the amplitude of action etc., which are formulated by International Maritime Organization to help navigation. Second, the kinematic and dynamic constraints of the vessel should be taken into account, so that the planned manoeuvres can be executed accurately. For example, the turning angle allowed for the optimization path if limited by the turning radius of the vessel. Third, there are no specific rules and regulations in COLREGs especially for multi-ship encounter. Therefore, how to establish an appropriate path planning model in this situation to keep each ship safely pass each other remains further research. In fact, there are mainly two kinds of anti-collision path planning for multi-ship encounters. The former performs path planning from the 'single vessel' perspective [24]- [27]. Each ship performs the anti-collision path planning in a certain optimization sequence and carries them out one after another. Usually, the action sequence is determined by comparing the ship manoeuvrability [25] or the degree of threats [24], [27], even judging whether a certain distance between ships is being approached [26]. Nevertheless, these criteria are worth discussing because the last ship in the sequence has no need to take any action, which may violate the rights and responsibilities of the give-way vessels based on the COLREGs. In addition, it is assumed that anti-collision action of each ship is known by the other ships in time. However, this formulation covers many instances of decision making, once a mistake appears in any ship's decision making, there may cause a confusion and pose a dilemma for other ships. Meanwhile, this ant-collision strategy takes insufficient account of the coordination among different ships' actions. The latter performs path planning from global perspective [16], [17]. The search is made for an optimal set of safe trajectories of several ships involved in an encounter rather than find just own ship's trajectory for the unchanged courses and speeds of targets. This optimization scheme guarantees the coordination among different ships' anti-collision actions. However, this approach takes the anti-collision as a one-time activity, which is not reasonable and practical that the ships make a series of decisions from origins to their destinations at once and carries out them one after another. In real situations, the OOW makes decisions stepwise in real-time based on their observations and judgements on whether there is collision risk with ships within a certain range.
Motivated by the above observations, a multi-stage anticollision strategy for the encounters with multiple give-way vessels is proposed in this article. The main idea is to take the multi-ship anti-decision process as a random service system. The input is involving several ships approaching each other. Then, the concept of an optimization echelon is established to construct the queueing rule help determine the avoidance priority based on the quantified model of encounter situation based on the qualitative provisions in COLREGs, which is refined through the sensibility analysis. In order to guarantee the coordinated anti-collision actions and the consistency with navigation practice, a Multilayer Coding-Multiple Population Genetic Algorithm is adopted to take all the ships within the same optimization echelon as the optimized objects. The dynamic mathematical model of ship manoeuvring and the PID controller are combined to calculate the fitness function, which considers the influence of ship manoeuvrability on the motion status when taking actions. Furthermore, a course coding technique based on a one-dimensional real number is employed to ensure the consistency of the transitive parameters between the path planning system and the PID controller.
The paper is organized as follows: Section 1 introduces the motivation behind the work. Section 2 first introduces several assumptions for the anti-collision path planning. Then, the calculation of the optimization parameters, the concept of an optimization echelon as well as the quantitative determination model of the encounter situation are described. Finally, the multi-stage anti-collision strategy that is suitable for all the involved ships is designed. In section 3, the simulations are carried out using the multi-stage anti-collision strategy by considering encounter situations with multiple give-way vessels to demonstrate the validity of the output. Section 4 concludes the paper with a discussion of the achievements and limitations.

II. COORDINATED ANTI-COLLISION PATH PLANNING A. ASSUMPTIONS
Before introducing the multi-ship anti-collision decision scheme, some assumptions are assumed to reduce the complexity of the procedure as follows: 1) In this article, a vessel in direct control is referend as 'own ship' (OS), the other vessels are referred as 'target ship' (TS)'. Moreover, considering the application field is in the open water and the distance between ships are normally large enough, all ships are treated as moving points.
2) The ship domain is treated as a circle with a radius of D s and any intrusion of other vessels must be avoided. From the standpoint of security, the domain size, D s , is enlarged to be approximately 1.24 nm based on statistical results in the open sea [28]. In fact, the domain size can be adjusted based on the real-time situation and the OOWs' experience.
3) In a multi-ship encounter, the anti-collision path planning is realized in a coordinated way. The actions of each vessel with give-way responsibility are all coded in a single chromosome by the multilayer coding technology. Driven by the fitness function and genetic operators, the optimal solutions (coordinated paths) are finally obtained. 4) Based on the SCR and TCR, the optimization echelon is established to determine the action priority, which ensures the rationality of anti-collision path planning. Note that the ship will not make another avoidance manoeuvre until finishing the previous one.
5) The applicable distance means the distance between ships when an encounter situation forms. Based on the definition of an encounter situation in the COLREGs, the applicable distance is mainly based on the visibility of lights. Therefore, the applicable distance is set to be 6 nm for a head-on and crossing encounter, and 3 nm for an overtaking encounter. In addition, the monitoring range is set to be 12 nm in this article, which could be adjusted by the OOWs in real application.
6) The availability of navigational information regarding the surrounding traffic (including the position, velocity, bearing, etc.) and mechanical and hydrodynamical data of each vessel involved (i.e., the dynamic properties of a ship for different desired heading change values) are assumed. In fact, all the vessels in the simulation are assumed to have the same dynamic properties in this study. 7) Assume that there is a universal communication coordination mechanism so that once any ship with this anticollision path planning system obtains the optimal solution, all the ships involved could receive and confirm the optimal solution in time.

B. MANOEUVRING MODEL
In order to follow the optimization trajectory when taking course alteration, a reliable anti-collision path planning system requires precise knowledge of the manoeuvring behaviour of the ship. Therefore, the mathematical model of the ship manoeuvring motion, the PID controller and the dynamic calculation model of relevant optimization parameters are combined to take into account the dynamic properties of the ships [29]. Considering the practical application, a manoeuvring ship is regarded as a rigid-body motion on the horizontal plane with three degrees of freedom (surge, sway and yaw).

1) THE DYNAMIC PROPERTY
In this article, the first-order Nomoto model [30] is adopted to express the relationship between the rudder angle, δ, and the ship's heading angle, φ, as expressed in Equation (1). Assume that the ship is not affected by winds, waves and other environmental conditions.
where K is the steering quality index and T is the steering quality time constant. The expression of H (φ) is a nonlinear function respect toφ, which can be approximately represented as follows.
where a i (i = 1, 2, 3, . . .) is the nonlinear constant coefficient. The velocity of ship manoeuvering can be expressed as follows [31]: where n is the rational speed of the main engine, V is the velocity, a nn and a nv are the propulsive coefficients, and a vv , a rr and a δδ are the damping coefficients.
It should be noted that the characteristics of the steering engine described in Equation (4), should not be ignored.
where δ E is the desired rudder angel, δ is the actual rudder angle, T E and K E are the time constant and gain control of the steering engine, respectively. The range of rudder angle is 0∼35 • .

2) PID CONTROLLER
A proportional-integral-derivative controller (PID controller) is a control loop feedback mechanism to achieve more accurate and rapid course-changing manoeuvres. According to Rule 8 in the COLREGs, if there is sufficient sea-room, alteration of course alone may be the most effective action to avoid a close-quarters situation, provided that it is made in good time, substantial and does not result in another closequarters situation. Therefore, the design of the PID heading controller is adopted. The rudder deflection angle δ E is controlled by PID control law based on the heading error e = φ r − φ is the desired heading angle, as expressed in Equation (5).
where K p is the proportional gain constant, K d is the derivative time constant and K i is the integral time constant. Assume that the ship respectively alters 090 • to the left and right by the interval of 010 • . The principal dimensions and manoeuvring characteristics of the exemplary ship are shown in Table 1. For a specific value of ship velocity, the heading control effect is illustrated in Figure 2(a). Similarly, a family of characteristics showing the relationships of the manoeuvring time as a function of the course, velocity and the rudder angle for the corresponding desired heading change values is introduced in Figure 2(b)(c)(d), which are marked by different colors. In order to help to improve convergence speed, the corresponding heading angle and velocity data are saved and stored in a table, which is read from the table for the fitness evaluation.

3) CALCULATION OF THE RELEVANT OPTIMIZATION PARAMETERS
The safety criterion of anti-collision path planning is determined by judging whether the ship domain is intruded during manoeuvring. Therefore, the calculation of distance variation  between ships is crucial for the fitness evaluation. The coordinate system, XOY, is established in Figure 3. The X -axis is the true East, and the Y -axis is due North. Assume that OS is located at the origin of coordinates. The initial distance between two ships Ro, the initial velocities and headings of the OS and TS are V 0 , φ 0 and V T , φ T , respectively.
If OS and TS give way to each other by altering course. The velocity and heading of OS and TS at time t are (V 0 , φ 0 ) and (V T , φ T ) respectively, as determined in manoeuvring model. Then, the position of OS and the relative position of the TS are determined as follows.
Then, the distance variation d(t) between ships is calculated as follows: The purpose of collision risk index (CRI) is to provide a scientific basis for decision making regarding anti-collision path planning. When two vessels in sight of each other are approaching with a risk of collision, the give-way ship is required to remain out of the way of the other ship. In general, the CRI is quantified into four stages related to the permitted or required action for each vessel [32], as shown in Figure 4.
Stage 1: At a long range, the encounter situation is not formed, and both vessels are free to take any action they wish.
Stage 2: The encounter situation is formed when the risk of collision first begins to emerge, then the give-way vessel is required to take early, and substantial action to achieve a safe passing distance and the other ship must maintain her course and velocity.
Stage 3: The close-quarters situation is formed when the give-way vessel does not take an appropriate action in compliance with the rules. The stand-on vessel is required to give a warning signal and is permitted to take action to avoid a collision by manoeuvring. The give-way ship is not relieved of her obligation to stay out of the way.
Stage 4: The immediate-danger situation is formed when a collision cannot be avoided by the give-way vessel alone, and the stand-on vessel is required to take such actions that will best aid avoiding a collision.
In fact, the evasive action should be taken in Stage II to avoid the close-quarters situation in Stage III. As a consequence, the action time is a range rather a point. In this article, the CRI is divided into Space Collision Risk (SCR) and Time Collision Risk (TCR) [33] based on the distance to the closest point of approach (DCPA) and time to the closest point of approach (TCPA). The reason why the terms DCPA and TCPA are still used, is that it is unambiguous and consistent with navigational practice. Unlike previous research, the critical state, r s = r 0 and r t = r 0 , are explicitly defined in this article, and the corresponding membership function is given by the asymmetrical Gaussian function.
For a given position vector of an own ship and a target object, the space scale factor at time t is calculated as follows: where R(t) is the distance between ships at time t. Similarly, the time scale factor at time t is determined as follows.
where TCPA R is the TCPA when the distance between ships is R; TCPA Ra corresponds to the TCPA when the distance is the applicable distance for a specific encounter type (Ra); t f 0 is a threshold value corresponding to the smaller value of TCPA Ra and 25 min. The space collision risk, r s , can be defined by the following fuzzy set where the membership function is given by the asymmetrical Gaussian function as follows: where r s ∈ [0, 1] is used to indicate the danger level in space in the process of ships approaching each other. Usually, we set r s = r 0 as the threshold value to take actions. The time space collision risk is calculated as follows: where r t ∈ [0, 1] is adopted to indicate the danger level in time. Similarly, we set r t = r 0 as the threshold value to take actions.
Borrowing from the concept of a ship domain, r 0 = 0.5 is defined as the critical state by setting DCPA = D s . The reasons for adopting the smaller value of TCPA Ra and 25 min for t f 0 are listed below. (1) It is in accordance with provision (a) of Rule 8 'Every vessel which is directed to keep out of the way of another vessel shall, so far as possible, take early and substantial action to keep well clear.' (2) This arrangement gives the closed-loop decision-making system a substantial buffer space, which can effectively prevent the ships without in the first optimization echelon from causing a serious disruption to the ships that are performing evasive action. (3) As a matter of fact, f t plays an important role in the activation of the anti-collision decision-making scheme. In order to avoid the influence of ships' speed on the performance of system, the limitation for the value of t f 0 is adopted in this article. It should also be noted that the consideration of TCR is meaningful only when the SCR is larger than the corresponding threshold value.

D. QUANTITATIVE MODEL OF AN ENCOUNTER SITUATION
The determination of encounter situation is a precondition of path planning. The identifying model for types of ship encounters is illustrated in Figure 5 [34]. The boundary values for different regions (P 1 , P 2 , P 3 , P 4 , P 5 , or P 6 ) are determined based the light's arc of horizon in the COLOREGs, except that the region of P 1 is slightly larger than the visibility of the masthead light defined in Annex I 9(a) of the COLREGs. This is because the encounter situation is classified from the perspective of coordinated collision avoidance and reduction of uncertainties between the head-on and other situations. By analyzing the qualitative provisions from COLREGs, the authors proposed a quantitative model of an encounter situation through the criteria including the orientation of OS, the crossing angle, the relative bearing of TS as well as the collision risk [29]. Then, a detailed description of the possible encounter types is listed in Table 2.
In order to validate the effectiveness of the quantitative model, the quantified criteria are further analyzed through sensibility analysis. Assume that there is collision risk between the ships, the spatial structure for different encounter situation is built based on the abovementioned criteria. Considering the determination of encounter situation is from the perspective of OS, the orientation of OS is indispensable in the judging process. Therefore, there is need to further analyze the effects of parameters crossing angle and the relative bearing of TS on the determination of types of encounter situation, respectively. It should be noted that different encounter situation is marked by rectangles with same height. The HO, CR 1 , CR 2 , OT 1 and OT 2 are respectively labelled with green (z ∈ [0, 1]), pink (z ∈ [1, 2]), red(z ∈ [2, 3]), blue (z ∈ [3,4]) and yellow (z ∈ [4,5]).
The spatial structure determined by the orientation of OS and the crossing angle, and the corresponding planform are illustrated in Figure 6. However, there is overlapping area for the rectangles of different types of encounter situation. This phenomenon may cause a confusion to the encountering ships and lead to inappropriate actions. Conversely, the spatial structure determined by the orientation of OS and relative bearing of TS, and corresponding planform are demonstrated in Figure 7. The rectangles of different types of encounter situation are uncorrelated, which meets the requirements of integrality and uniqueness for the division of encounter situation in COLREGs.
As a consequence, the quantitative model of an encounter situation the encounter type is refined based on the abovementioned analysis, which is determined based on the orientation of OS, the mentioned relative bearing of TS and the collision risk. These quantified criteria summarized as follows.

E. QUEUEING MODEL FOR ENCOUNTERING SHIPS
The multi-ship anti-collision path planning can be considered as a multistage sequential decision-making process, which can be divided into a number of interrelated stages in a chronological order. Meanwhile, the decisions made by each ship at any phase are linked organically and have great influence upon the overall effect. Thus, a queueing model subject to identical path planning algorithm is adopted to analyze the expected avoidance actions of each ship illustrated in Figure 8. Which essentially is a random service system consisting of input process, queueing rule and service mechanism [35]. The input process is the multiple ships approaching each other gradually. In order to make the encountering ships safely pass each other rather than predict the average waiting time or queue state, a reasonable queueing rule is established VOLUME 8, 2020 on the basis of synergetic theory, and a multi-layer coding genetic algorithm is adopted in the service mechanism to realize the multi-objective co-evolution.

1) ANT-COLLISION PRIORITY DETERMINATION
Synergetics is an interdisciplinary field of research originated by Hermann Haken in 1970s, which deals with material or immaterial systems, composed of, in general, many individual parts [36]. From the systematic evolvement point of view, it focuses on its attention on the spontaneous, i.e. selforganized emergence of new qualities which may be structures, processes or functions. The term synergetics derives from the Greek 'working together', indicating the cooperation of different parts in a system or different system. The fields of applications of synergetics range from biology to economy, chemistry, cosmology, thermodynamics, and up to sociology: countless self-organization phenomena have been explained through synergetic theory [37].
Assume that all the ships within a certain range jointly form a complete system. Correspondingly, the evasive behaviors of each ship can be considered a subsystem. Thus, the state vector q of the system could be expressed as follows: where q i corresponds to the state vector of ship i related to time and space, N indicates the number of ships in the system reflecting the queueing rule. Considering the anti-collision action is not a one-time activity especially in multi-ship encounter. It is not reasonable and practical that all the ships make a series of decisions from origins to their destinations at once and carries out them one after another. Meanwhile, if each ship determines the evasive behavior only from her own prospect, the actions among ships may conflict with each other and lead to collision. As a consequence, the Synergetic theory is adopted to construct a reasonable queueing rule, that is a multi-stage anti-collision strategy.
In essence, this queueing rule is the action priority classification. Therefore, the concept of an optimization echelon is constructed. An optimization echelon is constructed in the following way, s is the number of vessels in the monitoring range. When there is collision risk between any two ships, the action priority determination model is activated. The ships in the first optimization are determined by judging whether the collision between any pair of ships meets the predefined threshold value. Then the ships in the first echelon can perform the path planning at the same time based on the optimization model of cooperative coevolution. The other ships are put into the second optimization echelon, which keep their initial states unchanged. After the previous anticollision actions have been executed, the optimization objects are redetermined and the searching process of an optimal set of safe trajectories is repeated until all the ships involved safely pass each other.
Keep on moving until any SCR ij ∈ [r 0 , 1] Start the priority categorization to conduct conflict resolution For i = 1 and i ≤ s(i ∈ N + ) For j = (i + 1) and j ≤ s(j ∈ N + ) if SCR ik ∈ [r 0 , 1] ∩ TCR ik ∈ [0, r 0 − r] (k indicates a specific ship) Ship i and ship j are in the first optimization echelon else Ship k is in the second optimization echelon j + + i + + In conclusion, this method is characterized by making the optimization objects transform from single ship into multiple ships situated in the first optimization echelon, so that the ships in the first echelon can perform the path planning at the same time, then perform another one after the previous anti-actions are completed and the ships in the first echelon are also updated. This queueing rule not only conforms to the navigation practice but also considers the coordination among different ships' actions.

2) THE OPTIMIZATION MODEL OF COOPERATIVE COEVOLUTION
In a traditional coding scheme, a certain ship's anti-collision action is represented as a chromosome which is subject to genetic operations such as selection, recombination and mutation etc., the path with better fitness will be found. For a two-ship encounter, this coding scheme is appropriate to express the potential solutions of the problem from the 'single vessel' perspective. As for the multi-ship encounter, it is difficult to express the solutions of the problem accurately.
To overcome the limitations of the traditional coding techniques, the Multilayer Coding technique is adopted to realize coordinated anti-collision path planning. The main idea is to divide a chromosome into multiple layers, each representing a ship's anti-collision manoeuvre, including diverting the velocity vector away from the obstacle and returning it back to the initial heading. The combination of these multilayer codes expresses a complete solution. Meanwhile, the authors have recently reported a trajectory planning model using the Multiple Population Genetic Algorithm (MPGA) [38], which successfully solves the problems of premature convergence and the parameter settings of genetic operators. The flow chart is shown in Figure 9. The essence of this searching scheme is to apply multiple populations with different combinations of parameters' values of genetic operators to evolve simultaneously. By establishing an immigrant operator, the worst chromosome in any population is replaced by the best chromosome in the adjacent population to achieve communication between the populations. By establishing an elite-individual operator, the individuals with better fitness values will be chosen to enter the elite population so that the superior individuals will not be lost, making it possible to find the global optimal solution. It is noticeable that SGA refers to Single Genetic algorithm, which is the basic framework of Genetic Algorithm. Therefore, the Multilayer Coding-Multiple Population Genetic Algorithm (MC-MPGA) is employed to realize the cooperative coevolution in the service mechanism. The steps for applying the MC-MPGA to determine the optimal paths are illustrated in Figure 10.
Each ship keeps on monitoring the navigational environment and the nearby ship's dynamics. If there is any combination of SCR and TCR meets the threshold value, the coordinated anti-collision path planning algorithm is activated. The ships are classified into different optimization echelons. The objects of path planning are these ships in the first optimization echelon. The other ships continue navigating under their initial states before these optimized ships return to their initial headings. Then, the ships that belong in the first optimization echelon are determined again. If so, the anticollision path planning will be executed again. Thus, the procedure is a closed-circuit and is carried out continuously until the vessels are finally free and clear. Coding Technique. In practice, most evasive manoeuvres are performed with single course deviation even when multiple vessels are involved. Meanwhile, a give-way vessel usually returns to its initial heading rather than the initial track when finishing the anti-collision actions. Therefore, each participating ship veers and keeps on a new course for some time and returns to its initial course afterwards. The behaviour of each ship is represented by a turning angle and the duration between the turning to collision avoidance and the turning to navigational restoration, as shown in Figure 11. If a collision-avoidance manoeuvre is needed, the vessel will first perform a turning manoeuvre, which diverts the velocity vector of the vessel away from the obstacle. After staying on this new course for a period of time, the vessel performs a second turning manoeuvre to return the velocity vector back to the initial heading.
In this study, all the give-way vessels' avoidance manoeuvre is represented by a real number encoding method in a chromosome, as illustrated in Figure 12. The encoding layers corresponds to the number of ships (N ) in the first optimization echelon. It also should be noted that the turning angle should be larger than 15 • and smaller than 30 • (φ i ∈ [π/12, π/6]) to keep the evasive manoeuvres obvious [39], and the duration should be larger than 5 minutes and smaller than 25 minutes (t i ∈ [5,25]) corresponding to the limitation for t f 0 . In addition, this course coding method guarantees the consistency of the transitive parameters between the output of anti-collision path planning and the input of PID controller.

a: CROSSOVER
The one-point crossover approach is shown in Figure 13. A random gene point is selected to divide the two parents into two parts. The two (parent) paths are then recombined into two offspring. The first offspring is generated by combining the first part of the first parent with the second part of the second parent, and the second offspring is generated by combining the first part of the second parent with the second part of the first parent. Every two chromosomes of the original population are crossed with each other and then the new chromosomes are put into the two empty populations. Therefore, the population size is tripled. This change allows for sufficient exploitation of the local searching ability and preparation for the tournament selection strategy.

b: SELECTION
The tournament selection strategy is applied. The specific alteration is described as follows: • In each iteration, three adjacent individuals from the population are compared, and the individual with the lowest fitness value is reserved.
• The abovementioned operation is repeated N times, where N is the original population size.

c: MUTATION
This study employs the Gaussian mutation operator defined by Equation (15)- (17). This operator generates a random number conforming to the normal distribution to replace the value of a specific gene.
where a (i,j) is the value of j'-th gene in the chromosome i; l b (i, j) is the lower limit of j'-th gene in the chromosome i, u b (i, j) is the upper limit of j'-th gene in the chromosome i,P is the mean value and P 2 is the variance.

d: FITNESS FUNCTION MODEL
The fitness value represents the survivability of a chromosome in competition. Usually, there are three different optimization factors for anti-collision path planning: safety, smoothness and distance. The main optimization goal in multi-ship encounters is to ensure that the ships safely pass each other. As a consequence, the safety and travelled distance criteria are adopted to construct the fitness function as illustrated in Equation (19)- (20).
where {(x j i , y j i )|i = 12, 3, . . . , n, j = 1, 2, 3, . . . , N } represents the two-dimensional coordinate arrays that record the optimal paths of all the ships, N is the number of ships in the first optimization echelon, D t is the minimum distance during the movement between any two ships, D is the total travelled distance, and α is a weight coefficient.

III. SIMULATION RESULTS AND ANALYSIS
In this section, the simulations are carried out to evaluate the effectiveness of the path planning algorithm. Considering that the research subject is the encounter situation with more than one give-way vessel, the traffic configuration aims at multiship encounters. The MATLAB software platform is used to run the anti-collision computation simulations. After careful consideration of the traffic scenarios, the relevant parameters of the algorithm are set as follows: population size, 50; population number, 3; mutation rate, 0.1∼0.3, and termination condition, 20. The simulation tests are run on a computer with a 3.4 GHz processor and 8 GB memory. The average computation calculation time is approximately 10 s. When the algorithm reaches the termination condition, the search is terminated and the optimal path is supposedly found. The ships are assumed to have identical manoeuvrability, and the principal dimensions and manoeuvring characteristics are shown in Table 1.
In fact, these tests primarily aim to evaluate the effectiveness and operability of the optimal path. The simulation results consist of the optimal paths of each ship and the distance, velocity and rudder angle variation curves. A two-dimensional Cartesian coordinate system represents the distance in nautical miles (nm); the vertical axis in the positive direction shows North 000 • , and the horizontal axis in the positive direction is 090 • . The following symbols and color codes are applied to enhance the visualized results.
• Each ship is numbered with a label starting from 1. The dotted lines indicate the planned path, and the solid lines indicate the optimal path.
• In the initial traffic configuration, the non-filled ellipses are the initial positions of the vessels, and the filled circles are the projected positions of the vessel based on its initial velocity.
• The optimal paths of each ship are identified by different colours. The number on each position indicates the corresponding time in minutes.
• The rudder angle and velocity variation curves are displayed to indicate the dynamic properties of the ships when manoeuvring.
A. SIMULATION SCENARIO 1 The first traffic scenario is composed of three ships approaching each other as shown in Figure 14(a). All vessels have similar hydrodynamic properties and are approaching each other. The relevant collision-avoidance parameters and the optimal solutions are illustrated in Table 5. It can be seen intuitively seen from Figure 14(b) that the three ships safely pass each other. S1 and S2 take evasive actions while S3 did not take any action. At the initial moment, all ships are in the Stage I and free to take any action. As these ships approach each other, the threshold values of SCR and TCR for any pair of ships are reached, the priority classification scheme is activated. Table 4 demonstrates the result of optimization echelon judgement, only when all the logical values are equal to 1, are the corresponding combination of ships put into the first optimization echelon. Therefore, S1 and S2 are in the first optimization echelon and a head-on situation is formed based on the quantified criteria (the relative bearing, collision risk and relative bearing of TS) in Table 2. According to Rule 14 of the COLREGs, each ship shall alter her course to starboard so that each shall pass on the port side of the other. Therefore, the multi-stage anti-collision mechanism is activated to make path planning for S1 and S2, and the number for a single chromosome layer is 2.When S1 and S2 completed the avoidance operation and returned to the original heading, it was found that there was no risk of collision between S1, S2 and S3, so no more avoidance measures were required. It is clearly seen in Figure 14(c) that the distance between the ships is beyond the safety reference line at all times. Finally, the rudder angle and the corresponding velocity variation    are described in Figure 14(d), which reflect the dynamic properties of the ships in the anti-collision manoeuvres.

B. SIMULATION SCENARIO 2
This traffic scenario for discussion is a complex configuration that involves multiple vessels. The initial positions, velocities and courses for the six ships are shown in Table 7. The corresponding initial traffic configuration is illustrated in Figure 15(a). All the vessels are supposed to navigate on the optimal paths and take actions proactively. To see the collision-avoidance behaviours in a more specific way, the details on the ship's manoeuvres, including the time of taking actions, and the heading change information, are also provided in Table 7. At the beginning, the distance between the ships is large, and the collision risk is in a low level, there is no need to take action. The path planning procedure will not be activated until any two ships form an encounter situation. When t1 = 332 s, the TCR between ship 1 and ship 3 first reaches the threshold value. Based on the analysis in section 2.5, the ships in the first optimization echelon need to be determined and the anti-collision path planning is performed for these ships. To reveal the priority classification process, the comparative results are shown in Table 6. Therefore, ships S1, S2, S3 and S4 are in the first optimization echelon, and ships S5 and S6 are in the second optimization echelon. Therefore, the number of layers in a chromosome is 4, which is equal to the number of vessels in the first optimization echelon. With respect to the ships in the first optimization echelon, S1 should give way to S3, S3 should give way to both S2 and S4, S2 should give way to S4 while S4 should give way to S1. It is clearly seen that the actions of these ships influence each other. Therefore, the anti-collision path planning should be in a coordinated manner. The optimized paths and corresponding ship positions at several typical time points are shown in Figure 15(b).
In the simulation, the anti-collision actions are divided into two phases. In the first phase, the objects of path planning are S1, S2, S3 and S4. When these ships return to their initial headings, the multi-encounter situation is transformed into two large angle crossing situations between ships S3 and S6 and ships S4 and S5. Therefore, the objects of the path planning are for these two combinations of ships in the second phase. When t = 332 s, the coordinated collision-avoidance manoeuvres of S1, S2, S3 and S4 are performed by steering to starboard and keeping on the new course for a period of time. When t = 1120 s, S4 returns to its initial course, and the large angle crossing situation forms, S4 gives way to S5 by steering to starboard for 30 • and keeping this course for 1320 s. Similarly, when t = 1420 s, S3 returns to the initial course and S3 also gives way to S6 by altering course to starboard for 30 • and keeping this course for 1200 s in another large angle crossing situation. It should also be noted that the give-way vessels S3 and S4 are crossing from behind the stand-on vessels, S6 and S5 and pass by each other from port to port.
In addition, it can be seen intuitively in Figure 15(c) that the ships' manoeuvres succeed in keeping the distance between the ships larger than the radius of the ship domain and the collision is avoided successfully. The corresponding rudder angle and velocity in the collision-avoidance manoeuvres are illustrated in Figure 15(d).

IV. CONCLUSION
The main research subject is the encounter situations with multiple give-way vessels. A multi-stage anti-collision strategy is designed based on the Synergetic theory and Queueing theory. Unlike previous research that determines the action priority for single vessel, this article proposed the concept of an optimization echelon based on SCR and TCR, which transformed the service object of priority categorization from a single ship to a kind of ships satisfying the prerequisites. Based on the Multilayer Coding technique, the vessels in the same optimization echelon are given equivalent rights and responsibilities, thus coordinated anti-collision path planning is realized. The proposed formulation can provide the OOWs with good reference to deal with complex ship encounter situations. In addition, the determination of an encounter situation is refined through sensibility analysis. To provide accurate and reliable anti-collision paths, the calculation model of the relevant optimization parameters in the fitness function based on the mathematical model of ship motion and ship manoeuvring control mechanism is adopted. This proposed multi-stage strategy not only guarantee the coordination among different ships' actions conforming to the navigation practice but also consider the effect of ship manoeuvrability on the performance of evasive manoeuvres. Thus, the formulation can also be treated as a foundation and part of an autonomous collision avoidance system. However, the application scope of proposed anti-collision path planning is in the open water and the anti-collision action is alteration to starboard. When there are static obstructions in the restricted area such as narrow channels, congested water etc., this proposed anti-collision strategy may be futile. In addition, the proposed algorithm just solves the conventional anti-collision problem in the stage II during the entire encountering process. If any ship does not take appropriate action, the close-quarters situation may emerge and bring much difficulties for other ships. Therefore, an emergency mechanism for the mentioned situation should be established in the future research, which guarantees the completeness of anti-collision mechanism. Accordingly, the critical states for the SCR and TCR should be determined based on the different stages during the entire encountering process, the uncertainty of environment disturbances as well as the area-based obstructions. Finally, the variability of the model output should be further considered via Global Sensitivity and Uncertainty Analysis (GSUA) considering the non-linear variability of system's drivers.