Toward a Marine Road Network for Ship Passage Planning and Monitoring

Safety of navigation is essential for the global economy as maritime trade accounts for more than 80% of international trade. Carrying goods by ship is economically and environmentally efficient, however, a maritime accident can cause harm to the environment and local economies. To ensure safe passage, mariners tend to use already familiar routes as a best practice; most groundings occur when a vessel travels in unfamiliar territories or suddenly changes its route, e.g., due to extreme weather. In highly trafficked areas, the highest risk for ships is that of collision with other vessels in the area. In these situations, a network of previously traversed routes could help mariners make informed decisions for finding safe alternative routes to the destination, whereas a system that can predict the routes of nearby vessels would ease the burden for the mariner and alleviate the risk of collision. The goal of this project is to utilize Automatic Identification System data to create a network of “roads” to promote a route planning and prediction system for ships that makes finding optimal routes easier and allows mariners on the bridge and Autonomous Surface Vehicles to predict movement of ships to avoid collisions. This paper presents the first steps taken toward this goal, including data processing through the usage of Python libraries, database design and development utilizing PostgreSQL, density map generation and visualizations through our own developed libraries, an A* pathfinding algorithm implementation, and an early implementation of an Amazon Web Services deployment.


Introduction
The Automatic Identification System (AIS) is a maritime transceiver system developed to provide ship identification and positioning information to other vessels and shore stations. The system relays important information and parameters such as ship's unique identification number, position, draft, speed and course over ground. AIS improves situational awareness of vessels in vicinity and assists mariners in safely navigating their vessels, while historic AIS data provides a means for studying maritime traffic related issues. Aggregated AIS data is illustrative of global ship traffic; many research works have studied methods for deriving usable products from historic AIS data with creating class-specific heat maps of traffic (e.g., Falco et al., 2019), interpolating ship positions where data is missing (e.g., Mao et al., 2018), predicting ship trajectories (e.g., Liu et al., 2019), and extracting predominant routes in grid or vector format (e.g., Guyader et al., 2011;Filipiak et al., 2020), for applications such as identifying anomalous ship behavior (e.g., Zissis et al., 2020), mapping fishing efforts (e.g., Natale et al., 2015), establishing hierarchically related statistical models to simulate traffic and assess navigation risk (e.g., Calder & Schwehr, 2009), assessing shipping energy efficiency (Smith et al., 2013), creating new traffic safety corridors (e.g., ACPARS, 2016), and enhancing cetaceans-ship collision avoidance (e.g., McGillivary et al., 2009). While AIS data establishes the groundwork for creating a network of previously used routes that could aid mariners in safely traversing the seas, we lack a dynamic solution readily available on the bridge and to autonomous vessels to support route planning and monitoring. The Roads Of The Sea (ROTS) project (Kastrisios et al., 2021) aims to fill this gap by harvesting AIS information and chart data into a streamlined route suggestion and route prediction system with the goal to mitigate the dangers of traversing unverified routes and highly congested areas. In the following sections we discuss the first phase of this developing project which includes data discovery and filtration, and the development of a grid system for storing the aggregated AIS data, path finding algorithm, and the deployment of a preliminary Amazon Web Services interface.

Data Sources
Data for this work was acquired from MarineCadastre.gov for the year 2019 that has been filtered to two regions of interest: Lake Huron and New England.

Data Filtration
The generation of traffic density maps requires filtered AIS data with which ships transmit their location and characteristics every few seconds or minutes, depending on their speed and status. However, the transmitted data is not always accurate; ship characteristics were often found to be incomprehensible with outliers muddling the dataset. Furthermore, erroneous vessel speeds, headings, and locations are often encountered in the data. The AIS data is processed through the usage of available and customized Python libraries for outliers, i.e., to omit data that is deemed as faulty or out of range, to keep results representative of true maritime traffic. In curating data in this way, the route suggestion system can query geographical coordinate data from vessels traversing the open water.

Grid System
The grid system is the application of the filtered AIS data. It is made up of multiple uniform, fixed size grid squares overlaid onto a Lambert cylindrical equal-area projection. All WGS-84 coordinate pairs provided by the AIS data are converted into the Lambert coordinate system. The projected coordinates are then processed and placed within the respective grid square where they add to the count within that square. Each grid square records these counts by meter of draft to allow users to query by a specific draft range. By visualizing the ship counts within grid cells, the grid system shows routes of varying congestion and ship drafts. Being able to show routes of ships of varying characteristics allows for a more accurate representation of what routes different types of ship take. Examples of these grids are shown in Figures 1 and 2, where traffic density of grid squares is shown on a scale from black to red to white for low, medium, and high traffic density respectively. The grid system is the groundwork for creating a passage planning system.

A* Algorithm
The A* algorithm (e.g., Hart et al., 1968) is widely used in path finding related works. The A* algorithm's goal is to generate the path of least cost associated with the cumulative weight of potential paths from one point to another. In aims to create an efficient and safe passage planning system for mariners, implementing the A* pathfinding algorithm is a suitable option for utilizing the grid system generated by historical AIS data (or the anticipated directed graph). Regarding the developed grid system, the A* algorithm implementation takes a user defined start and end position, each corresponding to a grid square in the system. The script begins in the start grid square and progresses to an adjacent grid square based on cost. Cost in this situation is inversely proportional to the number of ship counts in the adjacent square. When the counts of ships are higher in the adjacent square the more likely the implementation of the A* algorithm to move there as this represents an area of higher maritime traffic. This script is designed to repeat this action of progressing to the next adjacent square until it has reached the end destination. By applying this method to the grid system, the script can generate the path that is most frequently used by other mariners. Paths are customizable by userspecified draft range. This dynamic system allows users to plan routes that ships of similar characteristics have taken to mitigate the risk of running aground.

Quad Tree
However, the current implementation is limited due to the grid-based system creating a fixed number of grid squares over all areas of interest. This has two main limitations: it is time consuming to generate paths over grids as the individual grid squares get smaller in area, and computationally cheap grids lose precision since the grid squares would be larger. Since much of the ocean and lakes are not commonly traversed this results in many areas sparsely populated with data. This became too computationally expensive because the pathfinding algorithm would waste time searching squares with no data. To remedy this, the quadtree data structure was investigated to allow for the creation of finer resolution grids while avoiding much of the increased processing power required with traditional grids using a static resolution. This new design only stores grid squares where data currently exists and the size of each individual square is based upon the amount of data in that location. Squares are split up into smaller squares as more data is added. This design allows large areas of empty space to be captured within a single square and commonly traversed areas to be finely defined. The implementation of this improved data structure is expected to decrease search complexity once fully implemented with A*.

AWS Deployment
This system is currently preliminarily deployed on Amazon Web Services (AWS) leveraging a serverless architecture. This implementation is designed to allow for flexibility and speed. The data storage and pathfinding components are accessible through an early web interface implementation. Figure 4 shows this architecture. The grids are stored as serialized object files in an AWS S3 bucket. The pathfinding script runs on an AWS Lambda that retrieves grid objects and returns the generated route to the user as shown in Figure 3.

Discussion and Future Work
The application and analysis of a year's worth of AIS data shows that there are multiple clearly defined high usage ship routes. With ample amounts of historical AIS data, a network of true ship routes should be able to be created as other works have shown. The aim of this early stage of implementation was to investigate the various parameters of the problem; in its current state is not fine-tuned enough to provide sufficiently accurate route suggestions. While AIS data provides geographic coordinate positions of ships at regular intervals it does not include non-vessel obstructions in the sea. When suggesting routes using the A* algorithm, there are times where it calculates the cost of an empty grid to be lower even though no ship has recorded transmitted AIS data there. Moreover, depending on the resolution of the grid, a potential danger for the specific vessel may remain unrevealed, something that could lead to the system suggesting moving through a potentially dangerous area. In the future, the design of the route suggestion system will incorporate relevant geographic data included in nautical charts to account for this issue. Another issue moving forward is disjointed data points. In the case of malfunctioning AIS transceivers or lack of data, some generated routes will show a random surge of data points unconnected to the other generated routes. It is impossible to know where or how exactly that surge connects to the other paths, but there comes the decision of what to do with that data. In the future, instead of disregarding disjoint paths, implementing a way to interpolate among reported locations is essential moving forward. Besides a grid-based system, we will investigate the development of a vector-based system. Proceeding the development of the route suggestion system, the development of a route prediction system will begin. By utilizing methods such as machine learning with the grid system, ship characteristics data, and live information provided by sonar, this project also aims to predict which route a ship would take. Machine learning techniques will be employed as they have the potential to recognize the patterns specific ships would take based on our grids. Overall, the project is also looking to be expanded upon with further data sets such as other years of historic AIS data and Satellite AIS as well as saving more ship characteristics data to be utilized when planning routes. This expansion will aid in creating a more thorough representation of maritime travel and a more accurate route suggestion and prediction system that would add control based upon more ship characteristics than just draft.

Conclusion
Overall, uniform marine navigational schemes and dynamic tools readily available to mariners and autonomous vessels is becoming a necessity in maritime travel especially with the autonomy efforts and the associated environmental concerns. Through utilizing historical data and automatically generating routes, we can create a holistic system for route planning to simplify the process and enhance the safety of maritime travel. We have made great progress toward this goal by designing a holistic system that filters raw AIS data and stores it in grid-based and quadtree-based objects that are then able to be traversed using the A* pathfinding algorithm to generate the shortest route between points following historic paths.

Acknowledgements
This work was supported by the National Oceanic and Atmospheric Administration under grant numbers NA15NOS4000200 and NA20NOS4000196.