# Design of Multi-Modal Ship Mobile Ad Hoc Network under the Guidance of an Autonomous Ship
## 3 Ship Ad Hoc Network Construction
### Networking and Network Management
#### 3.3.1 Initialization of Own Ship Network  
In the initialization state, the ship does not establish a network and is in a dormant state. We start building the net when there are ships around that pose a navigational hazard to our ship. When the natural environment, human dispatch, etc. are not considered, the Collision Risk Index (CRI) is usually used to evaluate the probability and severity of the collision between ships and other nearby ships [34]. Therefore, we use CRI to describe the navigation risk posed by other ships to our ship. However, the most fundamental factor for judging the risk of collision between ships is Distance to Closest Point of Approach (DCPA) when the two ships meet, so TCPA is the Time to the Closest Point of Approaching.  
DCPA indicates whether there is a risk of collision between the two ships. If the DCPA is 0, the two ships will inevitably collide with speed and direction. The smaller the DCPA, the higher the risk. TCPA indicates the urgency of the collision risk. However, we hope to use one indicator to directly measure the collision risk, instead of using the two progressive indicators of DCPA and TCPA.  
\begin{table}
\begin{tabular}{l} \hline \hline Algorithm Networking and network management \\ \hline Input: Initiator OS establishes a ship MANET, selects a network mode, and acquires network member TSs position \\ Output: TSs are in the network or not and the state of the network \\
1. OS is listening \\
2. while \(CRI_{\text{TS}_{1}}\geq CRI_{\text{Hirschild}}\) \\ do the network is active \\
3. for TSs \\
4. if CRI \(\
eq 0\wedge u\)(DCPA) \(\
eq 0\wedge u\)(TCPA) \(\
eq 0\) then \\
5. TSs join the network \\
6. if TSs had finished an interactive task or out of communication \\ range then \\
7. TSs disconnect the network \\
8. else keep current network members \\
9. end if \\
10. if OS is sailing in another kind of water then \\
11. switch to another network mode \\
12. else keep the current network mode \\
13. end if \\
14. if all TSs disconnect the network then \\
15. the network is in silence \\
16. end if \\
17. end while \\
18. Destroy the network \\ \hline \hline \end{tabular}
\end{table}
Table 1: Networking and network management algorithm flow.  
International Regulations for Preventing Collisions at Sea (COLREGS) does not clearly define the numerical value of collision risk. At present, there are many methods in the field of navigation to evaluate the collision risk of ships. [PERSON] first proposed to calculate the collision risk by weighting DCPA and TCPA. [PERSON]. [35] summarizes three kinds of numerical models for collision risk calculation, including methods based on traffic flow theory, methods in the ship field, and methods based on DCPA and TCPA. In addition, [PERSON] [36] proposed an analytical formula of collision risk parameters based on the ship field, including Degree of Domain Violation (DDV) and Time to Domain Violation (TDV), which have certain advantages over TCPA and DCPA. This paper adopts a classic model that uses five different factors to build the CRI [14], as shown in Formula (1), including distance r and relative heading \(c_{r}\), relative speed \(v_{r}\), relative bearing B, ship speed ratio K.  
\[\text{CRI}=\{\text{DCPA},\text{TCPA},\text{r},\text{B},\text{K}\} \tag{1}\]  
Each factor has a corresponding membership function, which we use \(u\) to express. At the same time, the contribution of each factor to the collision risk is different, and different calculation methods will have different coefficients. Then the calculation of CRI is Formula (2), and the relationship between coefficients is Formula (3).  
\[\text{CRI}=\alpha u(\text{DCPA})+\beta u(\text{TCPA})+\gamma u(\text{r})+\delta u (\text{B})+\varepsilon u(\text{K}) \tag{2}\]  
\[\alpha+\beta+\gamma+\delta+\varepsilon=1 \tag{3}\]