{'fraction_non_alphanumeric': 0.0353657136295786, 'fraction_numerical': 0.016859953305010143, 'mean_word_length': 4.319657945637789, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Calculation of the number of ship collision candidates using mesh-based estimation method for ship traffic data

Predicting and assessing the ship–ship collision possibility in waters are important for discussions on ship traffic safety. The geometric number of collision candidates is one of the most commonly used indexes for representing the frequency of multi-ship encounters that have potential collisions. It has often been estimated for ship traffic in a delimited area based on existing concepts. However, to discuss ship traffic safety in wide-congested waters where ships navigate along various courses and various ship encounters occur, a comprehensive understanding of potential collisions corresponding to all encounter characteristics, such as the encounter angle and location, is necessary. This paper proposes a method, called a “mesh-based estimation method,” to calculate the geometric number of collision candidates. It can deal with various encounter angles by introducing a computational mesh to comprehensively assess potential collisions in wide-congested waters. The validation of the method is conducted by applying it to simple ship traffic and comparing the calculated result with a result calculated based on a conventional approach. In addition, the method is applied to traffic data of AIS-equipped ships navigating in Tokyo Bay in Japan to show locations that have potential collisions based on the encounter angles.


Introductions
To discuss ship traffic safety, it is important to consider measures to predict and assess the possibility of ship-ship collisions, which are frequent maritime accidents. To assess the frequency and probability of collisions, Fujii et al. [1,2] and Macduff [3] proposed a collision frequency model during the 1970s, which is most commonly used and represented as the product of the geometric number of collision candidates and the collision causation probability. Thereafter, some researchers (e.g., Kristiansen [4] and Montewka [5]) estimated the collision frequency as the product of the geometric number of collision candidates if no evasive maneuvers are made and the probability of failing to avoid a collision. According to the model, it is important to first decrease the geometric number of collision candidates that have potential collisions to reduce the possibility of ship-ship collisions.
The geometric number of collision candidates is estimated statistically and quantitatively based on traffic data, such as the traffic volume, length, and velocity of two ship groups on a collision course. Fujii et al. [1,2,6,7] initially proposed the concept and formulations to estimate the geometric number of collision candidates based on the encounters, such as head-on and overtaking situations, without considering the precise encounter angle between two ship courses. Following this concept, Pedersen [8], Kaneko [9,10], and Friis-Hansen [11] proposed new concepts and formulations for estimating the geometric number of collision candidates when considering the encounter angles.
The geometric number of collision candidates estimated by the formulations is an important index for investigating and understanding potential collisions. It has often been estimated for ship traffic in a delimited area, such as traffic separation routes and narrow waters, where some ship groups navigate along relatively single courses (e.g., [9,[11][12][13][14][15]). By contrast, it was difficult to investigate potential collisions in wide-congested waters in which ship traffic is not separated, because the understanding of long-term ship behavior was a laborious task before the introduction of an automatic identification system (AIS). In coastal waters connecting to principal ports and traffic routes, however, ships navigate along various courses, and collisions occur, resulting in casualties (e.g., [16]). It has also become easier to observe ship behavior for the longer term and in a wider area owing to the recent introduction of an AIS, and ship behaviors can be comprehended even in smaller areas. Thus, ship traffic in waters is receiving increased attention for the prevention of ship potential collisions through safety measures [17][18][19].
Conventional formulations can be easily and freely applied to every encounter angle. However, the range of an assessed sea area needs to be delimited in conventional concepts, so that encounter angles and patterns need to be limited to the entire sea area. As encounter angles and navigating positions differ by location in wide-congested waters, it is difficult to estimate locations that have potential collisions at a detailed level based on conventional concepts. Furthermore, it is necessary to estimate the geometric number of collision candidates per unit time and area to compare and discuss safety in the waterways [19]. Therefore, a method is required for estimating the geometric number of collision candidates in every location by dividing a target sea area into smaller areas.
The objective of this study is to develop a method, which the authors call a "mesh-based method," to calculate the geometric number of collision candidates that can deal with various encounter angles introducing a computational mesh. This enables the geometric number of collision candidates considering encounter angles per evaluation time to be estimated for each evaluation area, which is small enough to apply a uniform distribution regardless of the probability distributions; thus, the geometric number of collision candidates in wide-congested waters can be assessed comprehensively. In this paper, conventional concepts used to estimate the geometric number of collision candidates are described, and a new method is proposed based on conventional concepts. Then, the proposed method is validated by applying it to simple ship traffic and by comparing it with a result calculated based on one of the conventional concepts. Finally, the proposed method is applied to traffic data of AIS-equipped ships navigating in Tokyo Bay in Japan to show locations that have potential collisions based on every encounter angle.

Ship collision frequency models
The ship collision frequency and probability model was initially proposed by Fujii et al. [1,6] and Macduff [3] during the 1970s. According to Fujii's concept, the ship collision frequency can be generally estimated as follows [1,2,6,7]: where F is the ship collision frequency, N G is the geometric number of ship collision candidates, and P C is the ship collision causation probability. In addition, N G indicates the potential number of ship collisions if two ships encounter each other and no evasive maneuvers are made to avoid a collision. An estimation method for N G has been developed by some researchers. It is based on ship geometric parameters that represent ship traffic conditions, such as ship traffic volume, length, and velocity. In addition, P C is the probability that ships on a collision course will fail to avoid a collision and depends on a variety of factors, such as human errors, equipment failures, maneuverability, and sea conditions. It can be estimated based on historical accident data for each area [9,20]. Another approach for estimating P C is the application to analytical models such as a Bayesian network [21], which represents probabilistic relations among the factors and results by setting up a graphical model for the former. From Eq. 1, it is possible to say that F is the collision frequency in cases in which ships with potential collision conditions ( N G ) have actual collision accidents based on certain causations ( P C ).
The value of N G is important for estimating the collision frequency based on the reality of the ship traffic. Fujii et al. proposed a concept and method for calculating N G based on ship traffic conditions, and N G for overtaking, crossing, and head-on situations was estimated based on ship traffic observations in waterways in the 1970s and the 1980s [1,2,6,7,12,13]. Owing to this method, N G can be represented by rough geometric parameters, such as the ship traffic volume, length, and velocity. Thereafter, some researchers followed Fujii's method, and renewed methods estimating N G have been proposed [5, 8-11, 20, 22, 23]. In the 1990s, Pedersen developed a method to calculate N G [8] following Fujii's idea. This model is more realistic in that ship encounter conditions can be represented by the use of conventional geometric parameters and new parameters such as the encounter angles between two ship courses and lateral traffic distributions based on the ship positions.
In this chapter, the concepts and calculations of representative models, i.e., Fujii's model and Pedersen's model, are presented to understand their characteristics. In addition, disadvantages when these models are applied to ships in congested waters are also discussed.  12,13]. That is, N G indicates the number of ship encounters during a collision course. Figure 1 shows the concept of the collision model, and Fig. 2 shows the geometry of collisions, in which a ship belonging to group i with velocity V i collides with the other ship belonging to group j with velocity V j within the shaded area shown in Fig. 2 per unit time. The number of collisions for ship j can be estimated as i ⋅ D ⋅ V ij ⋅ S ⋅ T , where i is the traffic density of group j, D is the geometric collision diameter shown in Fig. 2, V ij is the relative velocity, S is the area of the target waterway, and T is time. Therefore, the geometric number of collision candidates N G in which ship j collides with ship i with traffic density i is calculated using Eq. 2

Calculation procedure and an example using Fujii's model
Fujii et al. published some studies regarding the calculation of N G in some Japanese straits, most of which were written in Japanese [7,12,13]. In this section, the study in [12] is introduced, and N G in a waterway is calculated based on their model with past ship traffic observation data. Table 1 shows the ship traffic data observed in the East waterway in the Bisan-Seto Strait from 1970 to 1981, which were obtained by eye and radar observations [12]. It should be noted that the East waterway in the Bisan-Seto Strait is one of the waterways with the heaviest traffic volume in Japan. The data in Table 1 include the traffic volume, average velocity, and average ship length. First, the traffic volume Q, which is the average daily number of ships, was obtained visually for 3 days each year and was counted for each category of gross tonnage (GT): "mini" (less than 100 GT), "small" (100-500 GT), "medium" (500-3000   GT), "large" (3000-20,000 GT), and "huge" (over 20,000 GT). "Total Q" is total value of traffic volume of all GT categories for 4 years. There is no detailed description of the method used to count the traffic volume for each GT category in [12]. However, Fujii (1981) indicated that visual observations were usually conducted using binoculars or a telescope at the port entrance or cape with a clear view and unobstructed by buildings, and the number of ships passing through one location can be counted [7]. The ship length and gross tonnage were determined by reading the name of the observed ship and searching for information on the ship using a "Ship registry." As another approach, telescopes will also be helpful, having a fractional scale for measuring the viewing angle. If the horizontal viewing angle and distance between an observed ship and an observation position were determined, the ship length can be estimated. The gross tonnage (GT) was estimated using the reduction relation with the ship length (L), i.e., GT = L 3 /250 [7]. It should be noted that the suitable distance between an observed ship and an observation position when using a telescope is 2-3 km. Second, the "Velocity" was the average value for each GT category. The ship velocity when navigating in waterways was obtained based on radar observations, and the velocity distribution was created. The "Velocity" was calculated based on the distribution. Third, the "Length" was the average value estimated based on the concept of the equivalent length in [12]. Traditionally, the degree of congestion for different ship sizes is estimated by the conversion factor, C conv , as shown in Table 2. Then, the converted traffic volume Q L for the small-sized ships [C conv < 1.0 (ship size of "medium" is assumed as a standard)] is calculated as Q L = C conv × Q, where Q is the actual traffic volume. This means that the degree of congestion can be considered to be smaller if the ship size is smaller when the number of ships in a certain area is constant. This Q L concept is often used as an assessment index of the ship density and congestion in a conventional marine traffic engineering [12,[24][25][26][27].
In [12], Fujii et al. assumed that the equivalent length, L, for each category of gross tonnage can be estimated using L = C conv × 70.0 (m), where the standard size ("medium") of ships is regarded as 70.0 m. The length shown in the right column in Table 1 was calculated by this concept using C conv in Table 2, as detailed in [12]. In the following calculations, the data in Table 1 were used. The concept and procedures for calculating N G by Fujii et al. [7,12,13] are as follows: (1) The traffic density, , is obtained by Q (the number of ships per unit time (s)), V (m/s), and the width of the waterway, W (m), as follows: If Q is the total traffic volume in two ships of groups i and j in a waterway, and there is little difference in traffic volume between the groups, i and j are assumed as (2) In addition, D (m) is the geometric collision diameter, which is the width of the possible collision area between the ships of groups i and j and is taken perpendicular to the direction of V ij (see Fig. 2). Although a method for calculating D was not mentioned in Fujii's study [1,2,6,7,12,13], D takes a value of L i + L j ∕6 to L i + L j depending on the ship velocity and encounter angle between two ship courses. In most of their work, D is assumed to be L i + L j ∕2 , which is the average ship length. (3) Next, V ij is calculated using V i and V j , which are the average velocities of ship groups i and j, respectively. In Fujii's study, the average velocity of both ship groups is assumed to have the same value ( V = V i = V j ). Then, V ij is 2 V in the case of a head-on encounter, √ 2V in a crossing encounter, and ⋅ V in an overtaking encounter. Although should be calculated based on the velocity distributions and encounter situations, is usually assumed to be approximately 0.3 [7]. In [12], was assumed to be 0.25, and this value was used in the following calculation. (4) In addition, S (square meter) is calculated by multiplying the length and width of the waterways. (5) Finally, T (s) is the target time. Then, N G for a certain period can be obtained using Eq. 2.
In this paper, N G is calculated for the East waterway in the Bisan-Seto Strait based on the above procedure from (1) to (5), where V , i , j , D , and V ij are calculated according to the traffic data in Table 1. Because the method for calculating V in blank spaces in Table 1 was not mentioned in [12], V is assumed as the average of the observed data between 1970 and 1981 in this paper. As the East waterway in the Bisan-Seto Strait is almost a parallel waterway and most ships meet in head-on and overtaking cases, V ij is calculated under such situations. In addition, W is 1400 m and S is 518,000,000 m 2 (see the area enclosed by the line in Fig. 3).
Here, the results of the calculation example are shown. Figure 4 shows N G calculated by Fujii et al. in [12] ("N G in the reference*") and our calculation results ("N G by our calculation") in head-on and overtaking cases every  [12] are also shown in Fig. 4. Figure 4 shows that N G in the head-on situation from 1970 to 1973 does not differ much between the N G in [12] and N G in our calculation. By contrast, N G based on our calculation of the head-on situation from 1974 to 1977 and from 1978 to 1981 is much larger than that in [12]. This may be because the Maritime Traffic Safety Act was enforced in 1973 and traffic separation is applied in the strait, and thus, the ship traffic density distribution by traffic separation may have an effect on N G . Because Eq. 2 does not consider the density distribution, our calculation does not include the effect of the distribution. However, in the calculation by Fujii et al. [12], the density distribution for traffic separation was considered, although the method for calculating the distribution was not described in detail. Therefore, N G of the head-on case based on our calculation is much larger than N G in [12]. In addition, the value of N G for an overtaking situation through our calculation is smaller than N G in [12], but they do not differ much between the calculation results compared with the head-on situation. This means that the effect of traffic separation on N G under an overtaking situation is smaller, even if the density distribution for a traffic separation is not considered in our calculation. Although a method for calculating the density distribution is not described in their previous paper, the distribution effects on N G per year are shown in [12]. According to [12], the distribution effect on N G increased in the East waterway from 1973, which coincides with the start year of traffic separation enforcement. In a head-on situation, the value of the distribution effect on N G from 1973 was estimated to be approximately 0.2 [12]. If N G by our calculation from 1974 to 1977 and from 1978 to 1981 are multiplied by 0.2, respectively, it is almost equal to N G in [12]. In the overtaking case in 1973, the distribution effect on N G was estimated to be approximately 2.0 [12]. This is also almost the same value between the results of our calculations and [12].
It is concluded that N G in our calculation does not differ much from that in [12], and the density distributions influence the results of the calculated N G , particularly in waterways to which traffic separation is applied.

Points in Fujii's model for more adequate calculation
From the above calculation and discussion, some points in Fujii's model for a more adequate calculation can be summarized as follows: (a) The collision diameter D is not clearly described, because the equation for calculating D based on the encounter conditions was not established. (b) The detailed relative velocity V ij in such crossing situations was not calculated. (c) Although a rough estimation of N G for head-on and overtaking situations is possible based on Fujii's model, it is difficult to calculate N G accurately for a crossing situation. (d) Equation 2 is unsuitable for traffic separation waterways, because it is difficult to consider the density functions of separated ship traffic in all waterways.
As shown in the above points, it is necessary to calculate N G when considering the encounter conditions, such as the density distribution, collision diameter, and relative velocity, as well as the encounter angles between two ship courses, and thus, Fujii's model can only roughly estimate N G under certain situations. However, the basic idea of this model is to calculate the geometric number of collision candidates in an area by focusing on the density of ships.

Concept of Pedersen's model
Pedersen published a study on the calculation of N G [8], following the concept of Fujii's model. He presented a formulation for estimating N G when waterways 1 and 2 cross with angle ij , as shown in Fig. 5. In waterway 1 in Fig. 5, Q (1) i is the number of ships per unit time in class i, V (1) i is the average velocity of the ships in class i, f (1) i z (1) i is the lateral traffic distribution of ships in class i, and z i is the distance from the centerline of waterway 1. In the same way, , and z j are defined for waterway 2. It should be noted that superscripts (1) and (2) indicate each waterway, which is the direction of ship traffic, and subscripts (i, j) represent the ship class assuming that the ships navigating in the waterway are classified by the ship type and ship size. Then, Pedersen's formulation to calculate N G becomes the following [8]: where A is the target sea area for the calculation, V ij is the relative velocity between the ships in waterways 1 and 2, D ij is the collision diameter, and Δt is the time for the assessment.
The derivation of Eq. 4 can be explained as follows: First, the number of ships per unit time in a small segment, dz j , of waterway 2 can be represented by Q (2) j ⋅ f (2) j z (2) j ⋅ dz j , which can be regarded as the number of ships in the area,dz j ⋅ V (2) j , because the movement distance of a ship in waterway 2 per unit time is V (2) j . The density of ships (the (4) number of ships per unit area) in waterway 2 can then be obtained by dividing the number by the area as follows: Then, the number of ships belonging to class j in waterway 2 on a collision course with one ship belonging to class i in waterway 1 per unit time is defined by Eq. 6, because the area where a ship in waterway 2 is on a collision course per unit time can be approximately represented by V ij ⋅ D ij , as shown in Fig. 6, assuming that the probability distribution of f (2) j z (2) j is constant within the area Because Eq. 6 is the number of ships along the collision course for only one ship of class i in waterway 1, and the total number of collisions in area A at time Δt can be computed by multiplying the density of ships of class i in water- , with Eq. 6, and integrating over the considered area and summing over ship classes i and j, as shown in Eq. 4. Although the concept of Pedersen's formulation is similar to that of Fujii's model, the improvements and differences between the two models are as follows: (1) Collision diameter D ij is defined by Eq. 7 derived from the conceptual figure shown in Fig. 6 [8], where V ij is the relative velocity computed using Eq. 8 In the formulation above, L (1) i and B (1) i ( L (2) j and B (2) j ) represent the average length and breadth of the ships in class i (or j) in waterway 1 (or 2). It should be noted that the angle ij between two ship courses is explicitly considered, and the relative velocity, V ij , is also calculated according to the angle between courses. It should be noted that Kaneko [9] pointed out that Pedersen's formulation does not consider the probability distribution of the appearance of ships in the collision area ( D ij ⋅ V ij ) and proposed a precise formulation to evaluate N G .
(2) The lateral distribution of ship traffic in the waterway be applied if the spatial distribution is understood [28]. Because the collision diameter, D ij , for two ship courses with arbitrary angles is explicitly defined, and the traffic distribution in the waterway ( f (1) i z (1) i and f (2) j z (2) j ) is also clearly defined, it is possible to say that the number of ship collision candidates can be estimated more accurately by Pedersen's model than by Fujii's model.
It should be noted that Eq. 4 might be rather an approximate formulation when compared with more accurate formulation [10]. However, it is thought that this equation is very simple to use and can be regarded as an effective evaluation formulation.

Calculation example of Pedersen's model
To show the characteristics of Pedersen's model and compare it with those of Fujii's model, a calculation example is described in this section. Here, the ship traffic data of the East waterway in the Bisan-Seto Strait in Table 1 is applied to the following equation introduced by Pedersen, which calculates N G for a parallel waterway in a head-on situation. This is derived from the integral of Eq. 4 with a simplification, where f (1) i z (1) i and f (2) j z (2) j are normally distributed [8] (7) where L w is the length of the parallel waterway, is the distance between the average positions of the two ship groups, and ij is the standard deviation of z (1) i and z (2) j . Note that the standard deviations of z (1) i and z (2) j , which are considered to be (1) i and (2) j , are assumed to be the same ( ij = (1) i = (2) j ). In this calculation, L w is the length of the East waterway, i.e., 3700 m (see Fig. 3), and Q ( Q (1) i , Q (2) j based on the number of ships per second) and j , m/s) are determined as indicated in Table 1. The average breadth of ships the, B ( B (1) i and B (2) j , m), is calculated using the approximation equation L/B = 6.0 in this paper, because B was not observed. According to Inoue [26], was estimated to be approximately 620 m and ij was estimated to be approximately 180 m in the East waterway in 1976. Although ij in 1976 can be defined as shown above, ij prior to 1973 may be much larger than in 1976, because the traffic separation rule was not applied before 1973. It is difficult to define an accurate value of ij , because there were no statistical data for the ship traffic before 1973. For this reason, N G is calculated for different values of ij in this paper, that is, ij is set as 180 and 300 m, whereas μ is fixed at 620 m for both cases.
In Fig. 7, the bar graph shows the results of N G calculated in this paper by Pedersen's formulation (Eq. 9), and it was observed that N G varies considerably according to the magnitude of ij . Because ij is an important parameter for representing the lateral traffic distribution ( f (1) and f (2) j z (2) j in Pedersen's formulation), it is possible to imagine that an accurate definition of f (1) i z (1) i and f (2) j z (2) j is important for accurately estimating N G . In addition, Fig. 7 shows that N G through Pedersen's formulation is smaller than that by Fujii's model in the head-on situation shown in Fig. 4. This is because the lateral traffic distribution is not considered properly assumed in Fujii's model, whereas a practical distribution, which is a normal distribution, is assumed in Pedersen's model. Another reason is the difference in collision diameter between the models ( D in Fujii's model and D ij in Pedersen's formulation). Here, D of the head-on situation in Fujii's model is calculated by the simple assumption of the ship length, L i + L j ∕2 . However, D ij of the head-on situation in Pedersen's formulation can be calculated by B i + B j , which is smaller than D in Fujii's model. Therefore, N G by Fujii's model seems to be overestimated and becomes larger than that of Pedersen's formulation.
To discuss the trend of the calculated N G for each model, N G of the head-on situation by Fujii's model in Fig. 4, " N G in the reference* (head-on)" in which a traffic separation (TS) is considered after 1974, and " N G by our calculation (head-on)" in which a TS is not considered, are also plotted by line graphs in Fig. 7. It should be noted that both line graphs of N G by Fujii's model refer to the vertical axis of the right-hand side of Fig. 7, and the trend of change of N G by year is similar between the results of Pedersen's formulation using each ij (180 and 300 m) and the result by Fujii's model when TS is not considered ( N G by our calculation (head-on)). In addition, when N G from 1970 to 1973 is regarded as the value calculated by the larger ij (300 m) and N G after 1974 is regarded as a value calculated by a smaller ij (180 m) (see ◆ in Fig. 7), the result is similar to the trend of change of N G by year by Fujii's model when TS is considered [ N G in the reference * (head-on)]. It can be stated that the lateral traffic distribution is important for accurately estimating N G and should be considered based on the actual ship traffic conditions.

Points in Pedersen's model for more general and adequate calculation
Pedersen's model improves the points of Fujii's model, which was described in Sect. 2.1.3, and it is possible to calculate a more detailed calculation of N G in an area. For a more general and adequate calculation, some points in Pedersen's model can be summarized based on the above calculation and discussion as follows: (a) Pedersen's concept can be applied only to ship traffic in a delimited area, and thus, encounter situations and patterns are limited. Estimating N G in wide-congested waters where many ships navigate along various courses and encounter various angles is unsuitable. (b) The lateral distribution of ship traffic in wide-congested waters cannot be assumed by a simple distribution profile such as a normal distribution [28] and differs by location.

Points to be improved for discussing ship traffic safety in every location
The models of Fujii and Pedersen are important for calculating N G in an area. Although both models are based on actual ship traffic, the model of Pedersen is more detailed than that of Fujii in that navigational situations such as the ship encounter angle and lateral traffic distribution are considered in a delimited area. However, in recent years after introducing AIS, ship traffic safety in wide coastal waters around ship-congested bays such as Tokyo Bay and Ise Bay in Japan has received attention [29][30][31]. In these waters, where ship traffic is not separated, many ships navigate along various courses and encounter various angles in various locations. It is difficult to consider the encounter angles and lateral traffic distributions for each location in water using these concepts. To discuss ship traffic safety in waters, a new method for estimating N G in every location should be developed by considering the concepts with certain modifications. The points to be improved are as follows.
(a) Consideration of various encounter angles between two ships in water, including wide-congested waters, to investigate locations that have potential collisions in detail. (b) Estimation of lateral traffic distributions for each location in wide-congested waters.

Proposal of mesh-based estimation method of NG
When Fujii and Pedersen proposed their concept to estimate N G , the observation and comprehension of ship behavior was laborious and was difficult to observe for a lengthy period of time. Their concepts, which express the characteristics of the ship behavior as a probability distribution, are effective in estimating N G in a delimited area based on a small amount of information. However, it has become easier to observe the ship behavior for the longer term and in a wider area owing to the recent introduction of an AIS. At present, when big data related to ship traffic can be used, it is not necessary to express the characteristics of the entire sea area as a probability distribution, and the ship behavior, such as the ship density, velocity, and size, can be comprehended even in smaller areas. If the area is sufficiently small, the characteristic number of ship behaviors can be assumed to be constant. In this paper, a new method based on the concept of Fujii and Pedersen is proposed to calculate N G in an area which is sufficiently small to assume a uniform distribution of the ship behavior by introducing a computational mesh, which we call a "mesh-based estimation method" [32][33][34][35]. This enables an improvement of the points discussed in Sect. 2.3 and deals with various encounter angles even in wide-congested waters. In this chapter, the concept, calculation process, and validation of the method are presented.
In addition, N G , which is calculated using this method, is based on ship traffic data, such as the ship traffic volume, position, velocity, course, and length. Thus, the method can be applied to any type of ship, such as ships equipped with an AIS ("AIS-equipped ships") and those not equipped with an AIS, if the traffic data are obtained. In this paper, the target was AIS-equipped ships, and AIS data were used to calculate N G .

Concept of mesh-based estimation method
First, to simplify the explanation of a "mesh-based estimation method" in this chapter, the formulation of the geometric number of collision candidates per unit area is simplified, as shown in Eq. 10, which is for the case in which the ships of course group i with direction i and course group j with direction j have an encounter, as shown in Fig. 8. The method focuses on dealing with the ship density, which is the number of ships per unit area, as shown in Q i ⋅ f i z i ∕V i and Q j ⋅ f j z j ∕V j in Eq. 10, without considering the direction of integration. Equation 10 follows Eq. 4 of Pedersen's model and is in the same form as Eq. 2 of Fujii's model, which estimates the geometric number of collision candidates in an area by dealing with the ship density. It should be noted that one ship class for each waterway in Eq. 4 is considered to be one ship course group in Eq. 10 In Eq. 10, Q i , V i , and f i z i represent the number of ships per unit time, the ship velocity, and the lateral traffic distribution of the ship course group i, respectively. In addition, V ij and D ij are the relative velocity and collision diameter, respectively, which can be estimated using Eqs. 7 and 8, respectively: The prerequisite and calculation process of the method for applying Eq. 10 to the ship traffic is shown in Fig. 9 and described Sects. 3.1.1 and 3.1.2.

Prerequisite process
We developed software to obtain AIS data, such as the position, velocity, course, and length of the ships, by setting the virtual gate lines in a sea area and obtaining the AIS data of ships passing through each gate line [36]. In the prerequisite process of the method, virtual gate lines are set in a target sea area in the software to obtain AIS data of ships passing through each virtual gate line. We previously arranged virtual gate lines almost perpendicular to the direction of ship traffic to make it easier to obtain AIS data [29,[31][32][33][34][35][36][37][38].
In the prerequisite process, as shown in Fig. 9, virtual gate lines are set parallel to the latitude lines (WE gate lines) for detecting ships navigating in a north-south direction, and are set parallel to the longitude lines ("NS gate lines") for detecting ships navigating in an east-west direction, or are set to any other lines, finely at regular intervals in a targeted sea area. This will make small square areas surrounded by four gate lines and enable the acquisition of AIS data for each square area.

Calculation process
During the calculation process, the three processes in (1)- (3) are conducted in each square area.
(1) Encounter angles between the two ship courses.
To estimate the N G corresponding to the encounter angles between two ship courses, the course over ground (COG) is divided into groups ("COG group") in each square area. Then, through a combination of two COG groups in each square area N G can be calculated by the following procedure.
(2) Lateral traffic distributions. Figure 10 shows the calculation of the lateral distributions based on this method. The lateral distributions of ship traffic can be assumed to have a uniform distribution in each square area if the gate lines are set at small intervals and each square area becomes sufficiently small (see the left part of Fig. 10). To apply Eq. 10 to each square area, the lateral traffic distribution f i z i for each COG group (heading angle) i can be assumed as shown in the right part of Fig. 10, and can be represented by Eq. 11, where z imax − z imin indicates the width of the square area when the width is considered perpendicular to the direction of i . The lateral traffic distribution f j z j for another heading angle j can also be calculated in the same way as Eq. 11 (3) Other parameters.
The other parameters in Eqs. 10 are calculated for each square area using the following method: (a) Ship traffic volume. The ship traffic volume Q ( Q i and Q i in Eq. 10) is assumed to be the number of ships with COG group ( i and j in Eq. 10), navigating each square area per second. The number of ships can be obtained from the traffic data by counting ships passing through four sides of each square area at time T . It should be noted that one ship passes the sides of the square area twice, as shown in Fig. 11, and thus, Q is defined by all counts passing through four sides of each area, N , in time T , as shown in Eq. 12 (11)  The relative velocity V ij and collision diameter D ij can be calculated using Eqs. 7 and 8, respectively. The ship velocity V ( V i and V j ), ship length L ( L i and L j ), and ship width B ( B i and B j ) are assumed to be the average values in each COG group ( i and j ) in each square area obtained from the traffic data.

Calculation of N G
With this method, the geometric number of collision candidates per unit area during the time, Δt , is estimated at the representative point of the square area by Eq. 10. Then, by multiplying area, A , of the square area, the geometric number of collision candidates in the area is calculated. It should be noted that Eq. 10 and the procedures shown in Sects. 3.1.1 and 3.1.2 are for one ship size class for each direction, and the geometric number of collision candidates is calculated by summing the calculation in each square area between two ship COG groups of i and j .
It should also be noted that Eq. 11 is used not to consider the direction in the integration but to consider the number of ships per unit area, as shown in Eq. 5, which is used only to calculate Eq. 12. This means that the number of ships per unit area can be calculated using Eqs. 11 and 12, because the number of ships navigating within the breadth of ( z (1) maxi − z (1) mini ) is counted to calculate Q. Based on the above, the geometric number of collision candidates per assessment time, Δt , and the assessment area, A, which we call "Encounter frequency E f ," is given by Eq. 13 Here, A is the square area calculated as L NS × L WE by the length of the sides of the square shown in Fig. 11, and n cog is the number of COG groups in the area. As shown in Eq. 4, Pedersen proposed the method to calculate N G by dividing ships into many classes, because the difference of ship length, type, and velocity are important elements which affect the geometric number of collision candidates. In this chapter, only the difference of COG is considered as shown in Eq. 13 to show validation of the proposed method. However, the proposed method can deal with these elements in the future when calculating the number of collision candidates.
It should be noted that the geometric number of collision candidates N G is the total sum of all values of E f in the target sea area based on this concept.

Validation of mesh-based estimation method
In this section, the validation of the mesh-based estimation method ("the proposed method" in this section) is carried out by comparing the calculated result of N G using the proposed method with the result obtained through a conventional method for a simple example problem with a normal distribution. The example problem is established based on the ship traffic data obtained from AIS data of ships passing through gate lines in Tokyo Bay, which is a congested sea area in Japan (see Fig. 12). It should be noted that the intervals of each gate line, which is the size of the mesh division, are taken as 0.2 min, where 1.0 min is 1/60° in latitude or longitude. For validation, we only considered the head-on situation, i.e., northbound (N/B) ships of group i = 1 at θ i = 0° and south-bound (S/B) ships of group j = 37 at θ j = 180°. The other information for the traffic data is as follows: -Target period: 92 days (From August 1, 2017 to October 31, 2017).  Figure 12 shows the ship trajectories on August 1, 2017 in Tokyo Bay, and the target sea area is surrounded by a rectangular line. It should be noted that there are over 1000 navigating ships every day in Tokyo Bay, and most ships navigating in this bay are north-or south-bound ships.
For the calculation of N G using the conventional method, the following equation for the head-on situation is used, which was introduced by Friis-Hansen and is a result of the integral of Eq. 4 without simplification [11]: where L w is the length of the segment (target waterway), P head−on Gi,j is the probability that two ships will collide in a head-on situation, and the other parameters are the same as in Eq. 13. It is possible for P head−on Gi,j to be expressed as Eq. 15, when the lateral distribution is a normal distribution with distribution parameters ( (1) i , (1) i ) and ( (2) j , (2) j ) [11] (14) where B ij is the average ship breadth, Φ(x) is the standard normal distribution function, ij is the mean sailing distance between two ships, which equals (1) i + (2) j , and ij is the standard deviation of the joint distribution, which is equal Using the above equation, N G is calculated on the lines of constant latitude in the target sea area, assuming that, along each latitude line, the traffic distribution of the N/B and S/B ships is approximated based on a normal distribution. This means that the mean values and standard deviations of the passing positions for N/B ships ( (1) i , (1) i ) and S/B ships ( (2) j , (2) j ) are used to evaluate Eq. 14. It should be noted that N G is calculated for all 59 lines of constant latitude from Lat 35.0° to 35.2° N.
By contrast, with the proposed method, N G is calculated in each square area, which is surounded by WE gate lines and NS gate lines with intervals of 0.2 min. The distributions of the ship traffic volume Q ( Q i and Q i ) in each square area are assumed to be uniform, which is determined from the approximated normal distributions used in the calculation with the conventional method. For the ship velocity V ( V i and V j ), the relative velocity V ij and the collision diameter D ij are calculated from the AIS data in each square area. Figure 13 compares the calculation procedure of the conventional formulation shown in Eq. 14 with that of the proposed method. In the procedure using Eq. 14, to calculate N G , the parameters are calculated along a latitude line, and the length of target waterway L Ew is set in accord with the length of the side of the square area, L Ew = 0.2 min (the left part of Fig. 13). By contrast, with the proposed method, the square areas of the latitude line were considered in the calculation (the right part of Fig. 13).
The bar graphs in Fig. 14 show the values of N G calculated using the proposed method and the conventional method (Eq. 14). It should be noted that the actual traffic distributions are occasionally different from a normal distribution. In such cases, it is reasonable to use a proper distribution to compute the actual N G . However, in this section, to check the validity of the proposed method, we calculated N G and E f for a comparison with the calculation results by the conventional method using an approximated normal distribution. In addition, the ratio of N G by the conventional method to the proposed method is shown as a line graph in Fig. 14, which refers to the vertical axis of the right-hand side. The horizontal axis represents the latitude (unit, degree). It was found that the values calculated by both methods almost coincide, and the average ratio between them is 1.006 and the average standard deviation is 0.0076. It can be concluded that the calculation procedure and mesh size of the proposed method are validated. It should be noted that this section and Fig. 14 show the validation for head-on situation, but N G for crossing situation whose encounter angle is 10° to 170° has been also validated by the authors by calculating N G using the proposed method for virtually generated data of crossing traffic flow.

Characteristics of encounter situation in Tokyo Bay
This chapter shows the analysis results of E f and N G for Tokyo Bay in Japan using a mesh-based estimation method to discuss the characteristics of the types of encounters in this bay. In this paper, the method was applied to AIS data during the first stage of the method development. The initial settings for the size of the mesh division, number of COG groups (n cog ), and target period are the same as those in Sect. 3.2.
-Size of mesh division: 0.2 min mesh.
It should be noted that all traffic data in all directions during the target period in Tokyo Bay were used in this analysis.

Calculation example for one square area using mesh-based estimation method
In this section, the difference in the calculated value of E f between some COG groups in one square area using Eq. 13 is shown as a calculation example. The upper left coordinate point of the target square area is "Lon 139.78° E, Lat 35.2° N," as shown in the left part of Fig. 12, which is the south entrance of Uraga Channel. The calculation condition is the encounter between the ship group i = 2 (θ i = 5°) and the other COG group, θ j , whose encounter angles with the group of θ i = 5° are less than 10° (j = 1, 3, 4, 72: θ i = 0, 10, 15, 355), is calculated. Table 3 shows the values of the parameters of the ship group of θ i = 5 in the target square area, and Table 4 shows the values of the parameters of the ship groups of θ j = 0, 10, 15, 355, and the calculated E f between ship group θ i = 5° and each ship group θ j within the area. It should be noted that E f , whose encounter angle is less than 10°, can be regarded as an overtaking situation. In addition, it notes that E f shown in Table 4 is calculated as the value of E f per day within the square area. It can be seen from the table that E f between θ i = 5° and θ j = 10 (group 2-3) under an overtaking situation is the highest, which means that there are many ships entering the Uraga Channel with such COGs and encounter angles. It should be noted that, in the following sections, E f is calculated in the way described above.

Color map of E f
The color map of E f obtained from the value of E f for each square area is suitable for understanding the perspective of E f in an entire sea area. Using a color map, it is also easy to see how high or low E f is in each square area. Figure 11 Figure 18 shows that E f in Tokyo Bay is higher than that outside the bay, and it was found that there is a difference in traffic volume between in and outside the bay. This is because Tokyo Bay has some principal ports and harbors, and many ships gather from various locations. Therefore, it can be stated that there might be a correlation between the traffic volume andE f . In general, when E f is estimated using the models of Fujii and Pedersen for a certain area, it is thought that E f usually becomes high if the traffic volume (Q) is large. This can be seen from Table 1 and Figs. 4 and 7, in that the number of ships (traffic volume) from 1970 to 1973 is the largest among the other 4-year periods (1974-1977 and 1978-1981) in Table 1, and that E f from 1970 to 1973 calculated by both models is the highest (Figs. 4 and 7). From this viewpoint, the calculated E f by the mesh-based estimation method also shows the same trend, that is, there is a correlation between traffic volume and E f . By contrast, some wide fairways can be seen outside the bay in Fig. 18. It was found that the sea area around the bay   is congested with ships entering or leaving the bay in various courses, and that there are some encounter routes, as shown in Fig. 18a-c. In the western sea area in Fig. 18, the encounter route is shown as (a) in the figure, and is wide in the north area which is close to the bay. In addition, the encounter route is as shown in (b) in the figure, whose value of E f is smaller than E f in other areas. It is thought that various ship encounters with various angles occur in this area. In the eastern sea area shown in Fig. 18c, ship encounters are relatively high in the waters off Sunosaki and Nojima-saki, where ships are used as waypoints to alter the ship course. Fig. 18 Color map of number of collision candidates per day using new method  Figures 19,20,21 show that the calculated value of E f for each encounter situation has its own characteristics. In the overtaking and head-on situations shown in Figs. 19 and 20, some encounters can be seen along some principal fairways outside the bay, as shown in Fig. 18a-c, which is the area in the western sea area in the figure and in the waters off Sunosaki and Nojima-saki. In the western sea area shown in Figs. 19 and 20 almost the same encounter routes are present. However, the encounter sea area for a head-on situation is narrow, and the encounter sea area for an overtaking has certain routes and is relatively wide. On the other hand, Fig. 21 shows that there are a large number of encounters for crossing situations at the entrance of the bay, because ships enter and leave the bay crossing in this area. Using the color

Calculation of E f using mesh-based estimation method
It was concluded from the above results that it is possible to estimate E f for congested waters by calculating E f for each divided small square area based on the data of actual ship traffic, which was AIS data in this paper, through a mesh-based estimation method. The mesh-based estimation method considers the encounter angle between two ship courses and assumes the lateral traffic distributions as a uniform distribution if a square area divided by the mesh is sufficiently small; thus, E f can be calculated regardless of the sea area, the encounter angle, and the lateral traffic distribution. Using this method, high and low values of the actual E f in each square area can be observed. In addition, the comparison of E f for different encounter situations is shown, and the characteristics of each situation can be discussed. Using a mesh-based estimation method, it might become easier to forecast hazardous areas for each encounter situation.
In addition, when collision frequency F in Eq. 1 is estimated for a wide sea area such as Tokyo Bay, the total E f in a wide area should be calculated. To calculate the total E f in a wide target area, the calculated E f values for all small square areas in the area are summed. By applying this calculation, it is possible to quantitatively assess the collision occurrences for arbitrary large sea areas.

Conclusion
In this paper, the authors proposed a new idea and method for calculating the geometric number of collision candidates, which can deal with various encounter angles by location in waters including wide-congested waters. The models of Fuji and Pedersen were presented to understand its characteristics, and the proposed method was based on these models. We reached the following conclusions: (1) It is difficult to calculate the geometric number of collision candidates using the conventional models when arbitrarily wide-congested waters are considered, where various encounter angles between two ship courses occur and various distributions of positions of ship passing should be considered based on actual ship traffic. In this paper, we proposed a new method by introducing a computational mesh, which estimates the geometric number of collision candidates corresponding to the encounter angles in each divided area when considering each lateral traffic distribution. This is called the "encounter frequency," and the method is called a "mesh-based estimation method." (2) The method was validated by applying simple ship traffic with a normal distribution. The results calculated using the proposed method mostly coincide with the results calculated through the conventional model, and thus, the proposed method was validated. (3) The proposed method was applied to traffic data of AISequipped ships navigating in and around Tokyo Bay, which is a congested water area in Japan. Using this calculation, high and low encounter frequencies were estimated in each location, where the entire target sea area was divided into sections, and some characteristics of the encounter frequency were demonstrated through encounter situations such as head-on, overtaking, and crossing situations.
It can be concluded that the proposed method can be used to discuss the ship traffic safety regardless of the sea area, encounter angle, and lateral traffic distributions, and can be used as a tool for navigational support that can show hazardous areas to navigating ships in advance.