Abstract

In order to solve the problem of ship route planning at sea, we reduce the economic cost of ship navigation planning and improve the efficiency of ship navigation. As a result, the goal of this work is to delve into the mathematical modeling and the best algorithm for marine ship route planning. To begin, a mathematical model of ship route planning is created, taking into account the impact of nonuniformity in the offshore wind field on ship route planning, with the shortest ship sailing time as the goal. Based on the mathematical model, the ant colony algorithm is used to optimize the initial route of the ship. Finally, through the optimization of the ant colony algorithm, the optimal route with the shortest total length and the smaller steering angle is obtained, and the optimal ship navigation planning scheme is obtained. The simulation results show that, when compared to artificial intelligence and genetic algorithms, the optimization algorithm suggested in this research produces the best ship route planning outcomes and has the lowest economic cost, which may effectively increase the efficiency of ship route work.

1. Introduction

Ship route planning is a research hotspot in the field of maritime transportation. If there is a collision accident in the process of transportation, the ship and its cargo are also prone to losses. At the same time, the pollution caused by the collision accident to the marine environment is also very serious. The main purpose of the research on route planning of ship collision avoidance is to reduce the probability of traffic accidents. Therefore, it becomes very important to plan the route of ship collision avoidance. Science and technology such as artificial intelligence and deep learning are frequently appearing in various domains of social public life as a result of the rapid growth of computer technology. New technologies such as artificial intelligence also have an important impact on marine transportation, effectively promoting the rapid development of ship unmanned technology and intelligent navigation technology. In the process of the gradual development of ship unmanned technology, the more important core technology is ship route planning technology, especially in complex sea areas.

In the transportation activities of real maritime traffic, the traffic environment faced by ships is very complex, and the probability of ship accidents increases greatly in complex and changeable sea areas. In recent years, frequent maritime traffic accidents have prompted people to pay attention to solve different problems faced in maritime transportation. How to reduce the probability of maritime traffic accidents and ensure the safety of staff and property to the greatest extent is an important problem that needs to be solved urgently. Ship navigation and autopilot are efficient ways to effectively solve the current problems. In the process of ship intelligent navigation, automatic route planning is an important link. To some extent, it is related to the labor intensity of ship drivers and the ship safety performance and will have a direct impact on the safety of social public life and property. Therefore, the research on ship route planning, especially the route planning of ships in complex waters, is of great significance.

The innovations of this paper are as follows:(1)Considering the impact of the heterogeneity of the offshore wind field on ship route planning, taking the shortest ship sailing time as the goal, this paper constructs the mathematical model of ship route planning. The ship’s initial route is optimized using the ant colony algorithm, and the optimum route with the shortest total length and the smallest steering angle is found.(2)The simulation results show that compared with other algorithms, the ship route planning result of the optimization algorithm proposed in this paper is the best, and the planning economic cost is the lowest, which can effectively improve the ship route work efficiency.

Maritime waters are areas where maritime traffic accidents occur frequently. Because of the complex and changeable characteristics of maritime waters, it is difficult for ships to plan their routes at sea. The planning and development of ship routes in special waters is the focus of current research in the field of ship routes, and there have been many literature research results. In order to improve the scientificity of ship route automatic driving, Pan et al. comprehensively considered the influencing factors of the ship route environment and put forward the route planning of the intelligent ship route. Based on the Delaunay triangulation algorithm, the environment model is constructed, and the area prohibited from ship navigation in the environment model is searched by using the ship navigation safety theory. The tangent diagram approach is used to construct the ship route network, the interference force of the ship route is modeled using ship mechanics principles, and a ship route correction algorithm based on the environmental interference force is provided. The intelligent ship route planning algorithm is applied to a sea area for simulation and analysis. The analysis results show that the algorithm can plan the ship route in different environments and make the ship adapt to ship route planning in various environments. Although the feasibility of this method is relatively high, work efficiency is poor due to the complex process [1]. Wang et al. designed an optimization planning method integrating ship navigation characteristics, comprehensively considered the constraints existing in ship maneuverability, obtained accurate ship route planning, and constructed a ship turning model. In order to complete the detection of the ship planned route and position at the sea, a detection algorithm based on quadtree and the irregular boundary was adopted to solve the planning problem of avoiding collision between static obstacles and dynamic obstacles. The path planning based on the quadratic genetic algorithm is designed to realize the efficient solution of marine ship route planning. The validation analysis is carried out on the simulated ship route platform. This method optimizes five route planning, which proves the effectiveness of the algorithm, but the feasibility of this method is poor due to the complex process [2]. Yao et al. designed a ship route planning method that integrates massive data through the ship navigation trajectory. Firstly, the ship navigation trajectory data is processed by the Doug Las Peucker algorithm, and then the ship trajectory data processed by the DBSCAN algorithm is clustered to extract the turning points of the ship route, it clarified the connection relationship between the turning points with the geographic data and corrected the navigation near the obstacles. The maritime network diagram was constructed, the ship route density was calculated, the density value was taken as the pheromone concentration, the optimal route of ship navigation was solved, and the navigation trajectory data of a bulk carrier was taken as the sample. Simulation experiments show that although the convergence speed of this method is fast, the process is complex, resulting in poor work efficiency [3]. Han et al. designed a ship route planning algorithm based on the depth network, it is proposed to provide simulated routes in the electronic sea area map, in order to form suitable ship route planning, in order to effectively solve the problems of traditional ship route planning for inexperienced reference routes and not meeting the actual navigation needs. This algorithm needs to use the two-layer neural network structure of the neural network and the target neural network, so as to achieve the purpose of disrupting the data, store the experience, and use the randomly sampled data to avoid local convergence, so as to complete the route planning of the untrained electronic sea area map. Computer simulation and actual planning are used to verify that this method has good practicability, but there is still a problem of poor efficiency [4].

3. Mathematical Model of Ship Route Planning at the Sea

3.1. Coordinate System

Ship navigation often uses satellite navigation’s geodetic coordinates for placement, as well as an electronic chart. A plane rectangular coordinate system is built based on the chart, and geodetic coordinates are translated into plane rectangular coordinates to make the calculation easier [5, 6]. The slow increasing rate of latitude is ignored while translating coordinates due to the high quantity of the navigation chart. Therefore, rectangular coordinates converted from geodetic coordinates to the plane are expressed as

In formula (1), represents the geodetic coordinates of a point where the ship navigates in the chart, represents the rectangular coordinates of the corresponding plane, and represents the mapping relationship between and . Formula (1) can also be expressed as

That is, the ratio between the longitude difference and the latitude difference of any two points within the scope of the chart. In the plane rectangular coordinate system, the ratio of the ordinate difference and the abscissa difference is equal [7, 8]. In formula (2), represents the geodetic coordinates of any point in the chart, and represents the rectangular coordinates of the corresponding plane.

3.2. Digitization of Wind Farm

Generally, the wind vector data at different locations cannot be accurately measured at the sea. Only the wind vector data of meteorological ships or meteorological buoy stations can be obtained [9, 10]. Table 1 shows the position coordinates of key points related to ship route planning and corresponding plane rectangular coordinates, as well as the data of the wind vector of the meteorological station.

Most of the objects on the sea surface have no shelter, and the wind field changes evenly. Therefore, the overall wind vector data is obtained by the interpolation method. Querying the wind vector data of the wind field can obtain the wind vector data of any point within the scope of the chart.

There are many interpolation methods. This paper mainly adopts the inverse distance weighted interpolation method. We find the meteorological station close to the interpolation point, and interpolate the data of the meteorological station according to the size of the area, which is expressed by the following formula:

In formulas (3) and (4), represents the wind speed value at the rectangular coordinates of the sea area plane, represents the horizontal distance between the ship’s navigation point and the ship’s navigation point , , represents a constant greater than 0, which can be called the weighted index. In this paper, is taken as 1.

After interpolation, the wind speed value of the offshore wind field can form matrix M. The local wind speed value and the navigation of the ship in the wind field are shown in Figure 1. In Figure 1, the curve represents the wind speed contour, represents the position of the turning point of the ship in the wind field, and the arrow between the turning points represents the navigation route.

3.3. Objective Function

Taking the overall ship navigation time as the objective function, the optimization model with the shortest time of the ship on the planned route as the objective is constructed, which is expressed as

In formula (5), represents the time taken for the ship to sail from the previous turning point to the next turning point . Because the wind field between points and changes unevenly, it is difficult to directly calculate the time used by the ship during this navigation [11, 12]. In this paper, the integral idea is used for calculation. Assuming that the wind field in l0 of the ship navigation section is uniform, the starting point of point is the ship navigation speed instead of the average ship speed of the ship in this navigation section, the wind direction and wind speed at this position are obtained by using the wind speed value matrix , and the ship navigation direction from point to point B is substituted into formulas (7) and (8) to calculate the ship speed, and the navigation time of leg is accumulated, which is approximately . In this paper, the value of is 0.5, and the sailing time from point to point is expressed as

In formula (6), represents the distance and the l0 ratio between two turning points of ship navigation, , represents the rectangular coordinates of any point plane in the wind field of ship navigation, represents the data of wind vector at this point, and represents the calculation of apparent wind speed.

As shown in Figure 2, the vector relationship between true wind speed and ship speed and apparent wind speed is expressed as apparent wind speed = true wind speed - ship speed. The apparent wind speed can be calculated as

In formulas (7) and (8), represents the apparent wind speed of ship navigation, represents the direction of the apparent wind speed of the ship, represents the speed of the ship, represents the sailing direction of the ship, represents the true wind speed of the ship, and represents the true wind speed direction of the ship.

4. Mathematical Modeling and Optimization of the Initial Ship Route Based on the Ant Colony Algorithm

Combined with the ship navigation mathematical model constructed above, the ant colony algorithm is used to optimize the ship navigation mathematical model.

4.1. Discretization of Workspace

If represents the link line of free space and and represent the two endpoints of , other points on the link line are represented as

In formula (9), represents any point on the navigation link line of the ship, represents a random number from 0 to 1, which is mainly used to represent the parameter of the proportion between the two endpoints, and represents the number of nodes through which the link passes.

Before using the ant colony optimization algorithm to optimize the ship route planning model, we must make the working space discrete, we can divide the link line and adopt the fixed length division method. In order to meet the requirements of the constraint distance of ship route planning and the minimum distance of the dangerous area, each link line is divided into scores:

In formula (10), function represents the rounding function. When is an odd number, in order to ensure that the midpoint of the link line is an equidistant point, after discretization, there will be navigation routes that can be selected from the ship route link line Li−1 to the adjacent ship navigation link line .

4.2. Ant Path Search and Pheromone Update

After searching the planned route from the beginning to the end of each ship’s navigation, the corresponding parameter set of the ship navigation route will be generated. In the process of the ship movement, when the ant is on the navigation link line , the method of selecting the heading node on the next navigation link line is to calculate the probability selected from the node to the next ship route node in turn. According to the selected probability , the roulette method is used to find the next ship route node , and the calculation of is expressed as

In formula (11), represents the heuristic value and represents the pheromone. The higher the concentration of the pheromone, the greater the probability of selection. When a node is selected during the movement of the ship route, the node will release the pheromone and update the pheromone of the node, which is expressed as

In formula (12), represents the initial value of the pheromone and represents the parameter of the interval. When all ants complete the search, the shortest path length is saved and the pheromone of each point is updated [13, 14]. Update can be called pheromone volatilization update, and the pheromone volatilization formula of the ship route is expressed as

In formula (13), represents the volatilization parameter of the ship route pheromone, and the value of is 0.003.

4.3. Ant Colony Algorithm for Optimizing Ship Route Turning Angle

When ants search for the next node on node , if the selected route node and is in the straight line, and the angle between the starting point and the ending point of the ship’s route is small, the point is the priority point, as shown in Figure 3.

In Figure 3, and represent the two endpoints of the link, point is the starting point of the ship’s route, point is the ending point of the ship’s route planning, point is the ant’s current position, and are the alternative node locations for the next search location of the ship’s route, and 1 and represent the current position of the ship’s route, the connection between the alternative node locations, and the angle between the starting point and the ending point . When using the ant colony algorithm to optimize the ship route, in order to ensure that ants will select node with a greater probability, is introduced into the pheromone update formula when the ship route pheromone is updated to complete the ants’ selection of the next node which constitutes smaller route node with a greater probability, and the modified ship route pheromone update is expressed as

Formula (14) is the updated formula of the ship pheromone after correction. represents the correction factor of the newly introduced ship’s route pheromone update. Formula (15) is the calculation formula of the ship’s route pheromone correction factor. Among them, is the angle between the current position of the ship’s route and the alternative position and the starting and ending position, which eliminates the positive and negative influence of the angle.

When using the ant colony algorithm to optimize ship route planning, 10 ants will search the optimal path in each iteration. In order to effectively observe the convergence process of the ant colony algorithm in searching the optimal ship route, as shown in Figure 4. The following Figure 4 shows the convergence process of the initial solution of the optimization of the ship route planning model by the ant colony algorithm [15,16].

5. Analysis of Experimental Results

In order to verify the effectiveness of the ship route planning optimization algorithm based on the ant colony algorithm [17] proposed in this paper, the simulation experiment is carried out, and the simulation experiment environment is established according to the needs of the experimental test. Combined with the application characteristics of visual control in MATLAB software, GUI control is selected as the visual program design of the simulation experiment. In order to test the planning effect based on ant colony algorithm, artificial intelligence algorithm, genetic algorithm, and ant colony algorithm proposed in this paper are selected to solve the mathematical model of the marine ship route, and the number of iterations of the three methods is counted. The test results are shown in Table 2.

From the test results in Table 1, it can be seen that the number of iterations of the methods mentioned in this paper is significantly lower than that of the artificial intelligence algorithm and the genetic algorithm, which can effectively reduce optimization time and improve the efficiency of optimization. Therefore, the optimization performance based on the ant colony algorithm in this paper is better. To further verify the optimization performance of the algorithms presented in this paper, three algorithms are optimized, repeated five times, and the time-consuming results are compared. The average time-consuming results of different algorithms are compared as shown in Figure 5.

Through the analysis of Figure 5, it can be seen that the average ship route based on the ant colony algorithm proposed in this paper takes less time, indicating that the route planning effect is good, while the initial time based on the artificial intelligence algorithm is relatively long. With the increase of times, although fluctuates slightly, the overall time-consuming is more. The genetic algorithm is roughly the same as the artificial intelligence algorithm, and the time-consuming is relatively long. This shows that the algorithm proposed in this paper can effectively reduce the redundancy of ship route planning and calculation, so as to reduce the time-consuming of the ship route mathematical model. The success rate of ship route planning and the planned path length of the optimal ship route are selected as the rating indicators of the ship route planning performance, as shown in Table 3.

As can be seen from Table 3, the success rate of the ship route planning algorithm proposed in this paper is 96.3%, which is significantly higher than the ship route planning algorithm based on the artificial intelligence algorithm and the genetic algorithm. Compared with the other two algorithms, the path length of the optimal ship route planning algorithm proposed in this paper is shorter, which can effectively reduce the economic cost of ship navigation planning. Figures 6 and 7 show the fuel consumption of three mathematical models of ship navigation planning under the conditions of sailing distance of 1200 nm and 2400 nm. The smaller the value, the better the performance of the mathematical model.

It can be seen from the data in Figures 6 and 7 that if the planned route of the ship is to avoid obstacles, it can be regarded as a failed route. Under the condition of different sailing distance, the mathematical model of ship route planning in the figure can avoid obstacles at the sea and plan the optimal route. With the increase of sailing distance, the fuel consumption of the method proposed in this paper is always the least of the three methods, which shows that the method proposed in this paper can effectively reduce the economic cost of ship route operation and improve the efficiency of ship navigation.

6. Conclusion

Planning the ideal ship route, when combined with the above contents, may effectively increase ship navigation safety and reduce ship risk, which is critical, as well as improve the degree of ship route planning. Therefore, this paper designs a ship route planning model based on the ant colony algorithm, and the simulation results show that the iteration times of the method proposed in this paper are relatively small, which can effectively shorten the optimization time of the mathematical model, so as to increase work efficiency and has a high reference value.

Data Availability

Data are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there are no conflicts of interest for the publication of this work.