Weather Route Optimization Method of Unmanned Ship Based on Continuous Dynamic Optimal Control

: Intelligent weather route optimization method was an essential guarantee for safe and efﬁcient navigation of ships. In traditional methods, the multi-stage decision-making method was generally used to solve route dynamic optimization problems, in which it was impossible to achieve dynamic optimal routes, due to the temporal and spatial complexity of route design. In this paper, an unmanned ship weather route optimization model was established based on a method of continuous dynamic optimal control. Marine meteorological information was analyzed. Navigation safety, energy consumption, and sailing time were integrated considered. Dual-target route evaluation function of energy consumption and sailing time was established. The problem about the multi-stage decision was transformed into that of one-step optimal control, and an improved ant colony algorithm was adopted. Simulation results showed that compared with some traditional methods, the proposed method was better performed, which can be applied to dynamic route optimization of the unmanned ship in a large marine area under complex meteorological conditions.


Introduction
With the rapid development of the shipping industry, the intelligent weather route optimization method, by which the safe and efficient navigation of unmanned ships is ensured, has become important research content. The safety and economy of the route are two important indicators to measure the pros and cons of the route. In traditional weather route optimization methods, initial routes were optimized mostly based on static meteorological information. The route cannot be adjusted according to real-time weather information to ensure it is always sailing an optimal route, which will affect navigation safety and economy. The dynamic optimization of weather routes means that when sailing in the ocean, in order to reduce the impact of adverse meteorological factors on navigation, the route can be dynamically adjusted according to real-time meteorological information so that the ship would always travel along the optimal route. The impact of marine meteorological information on the route was fully considered in the route dynamic optimization method. Ship energy consumption and sailing time were dynamically optimized, and the cost of navigation was saved, which was in line with the actual needs of the voyage. Therefore, it is of great practical significance to further study the dynamic optimization method of unmanned weather routes, which can provide the basis for the unmanned ship navigation decision, and thus, safety and economy can be improved.
On the research of weather route dynamic optimization methods, Yang et al. [1] used an improved A* search algorithm to establish a route planning system. Continuous guide points can be rapidly generated from one waypoint to the final waypoint, and obstacle collision was avoided. Constraints of some specific routes were met. Nie et al. [2] introduced a method that the rapid retrieval of navigation information was realized by the spatial data index structure. He proposed an improved ant colony algorithm based on the navigation information space connectivity matrix to achieve dynamic optimization of maritime search and rescue routes. Experimental results showed that the algorithm could be used for the dynamic route design of search and rescue ships. Zhou et al. [3] proposed a solution to dynamic route generation based on model predictive control, and the decision-making process of the route was completed in the rolling prediction period. Sen and Padhy [4] proposed a basic framework of a practical ship weather route optimization method. The realistic data of the North Indian Ocean region was used for research. Andersson and Ivehammar [5] received meteorological information regularly by using AIS transmitters. The weather route was repeatedly planned based on meteorological data. The dynamic optimization route was realized. Krata and Szlapczynska [6] proposed a dynamic route optimization method to ensure ship stability. The equivalent eccentric height method was adopted to simulate the natural rolling period of waves. Ship resonance motion was deduced, and the proposed method can provide the basis for the dynamic optimization of the ship's route. Wang et al. [7] established a ship energy efficiency dynamic optimization model considering a time-varying environment. Based on real-time meteorological information, optimal sailing speed plans for different periods were formulated, ship energy consumption was reduced, and carbon dioxide emissions were effectively reduced. Zaccone et al. [8] decomposed the ship route optimization into a multi-stage decision-making process. The wave and wind conditions of each sailing segment were estimated according to the weather forecast. The ship's resistance caused by the waves was considered. The optimal route and speed for the ship were selected. Lin [9] divided the ship's weather route system into a ship motion module, marine environment module, navigation module, and path optimization module. A six-degree-of-freedom motion response database for different combinations of heading and speed was established in the ship motion module. In the marine environment module, according to weather forecast data, the state of sea conditions and ship performance were estimated. The reference route was determined in the navigation module. Optimization goals and constraints were set to achieve optimal routes in the route optimization module. A new modular structure for motion planning and task assignment was designed to enable underwater vehicles to adapt to dynamic changes in the environment, by Mahmoud-Zadeh et al. [10]. The validity of the proposed model was verified by the simulation method. Szlapczynska and Szlapczynski [11] proposed a preference-based evolutionary multi-objective optimization (EMO) method and applied it to weather route optimization; this was compared with a popular reference point method: r-dominance. Zis et al. [12] reviewed the research progress in weather route optimization in recent years. Considering environmental factors, calculation methods of wind and wave resistance were summarized in order to estimate power and fuel consumption. Gkerekos and Lazakis [13] proposed a data-driven framework that can provide optimal route support for ships. The method determines the optimal route by considering available weather information and the fuel consumption of different alternative routes. In order to improve the adaptability of unmanned surface vehicles (USV) to weather changes, Zhang et al. [14] classified and stored the perceived weather information. After that, different decision models were called according to the weather types to realize safe navigation of ships. The multi-stage dynamic inverse method was adopted by Wang et al. [15] to make decisions on waypoint positions. The impact of adverse meteorological and hydrological factors on ship navigation was reduced, voyage time and energy consumption were optimized, and the weather route of unmanned ships was obtained. Zhang, Y. and Shi, Y. [16] combined weather data with the D* algorithm to realize dynamic route planning based on an electronic chart. However, relatively few factors were considered and a necessary smoothing process was not carried out on the route.
The primary deficiencies of previous studies about weather routes were as follows: firstly, multi-stage repetitive planning was adopted by traditional weather route dynamic optimization methods. Route planning would take some time, and when it was completed, the ship had left its original position. Obstacle restrictions and weather conditions may have changed between the ship's current position and the endpoint. Thus, the route would not be an optimal one. Existing route dynamic optimization methods cannot solve the optimal route problem. Secondly, in previous research, static meteorological information was adopted to design the weather route. The consideration of route decisions under changing weather conditions was lacking. Due to changes in marine weather, it was difficult to ensure that the route obtained after once planning was always optimal in the overall navigation process. Meanwhile, when the ship yawed, the cost of sailing would be raised if the ship resumed the original route. Therefore, the existing static design methods of weather routes were difficult to meet the actual navigation requirements of ships.
Aiming at the above shortcomings, an unmanned ship weather route optimization model based on the continuous dynamic optimal control was proposed in this paper. Marine meteorological information was analyzed. The impact of factors, such as safety, energy consumption, and sailing time on ship navigation was comprehensively considered. The dual-target optimal route evaluation function of energy consumption and sailing time was established. The continuous optimal control method was adopted to transform the multi-stage decision problem into the one-step optimal control problem. Improved ant colony algorithm was combined. Unmanned ship weather route dynamic optimization was realized. Weather routes are the best recommended routes [17] for ships crossing the ocean, based on accurate marine environment forecasts, combined with ship performance, loading characteristics, technical conditions, and other factors. The dynamic optimization of weather routes means that when an unmanned ship is sailing in the ocean, the route will be adjusted according to the sailing time, real-time meteorological environment, and emergency conditions to reduce the impact of adverse meteorological factors so that the ship will always travel along the optimal route. The dual-objective dynamic optimization of the weather route refers to the optimization of energy consumption and sailing time of the route. The status of any point on the route is in line with the dual-objective optimal decision of sailing time and energy consumption. The set of optimal routes for each section of the ship from the ship's starting port to its final port is the dynamic optimal route. Static route planning algorithms were called repeatedly in traditional weather route optimization methods to acquire optimal real-time routes. Due to the time consumption of the route calculation, when the new route design was completed, the ship's position, meteorological environment, and obstacles might have changed, and the controlled process had greater uncertainty. Thus, the new route was not an optimal route in the current situation presented. The optimal control method was adopted to solve the unmanned ship weather route dynamic optimization problem. The route was interpreted as a continuous equation of state. Through the continuous transfer of the decision-making process, the traditional multi-stage decision-making problem was transformed into a one-step optimal control problem to avoid the delay of the route control, so that the dynamic optimization route was realized.

Mathematical Expression of the Dynamic Route Optimization
It was a continuous process of the ship, sailing from start port to end port. Thus, the route optimization model belonged to the dynamic planning of the continuous control system. The mathematical expression of the model was composed of two parts: route optimization target and route optimization constraint. Among them, the route optimization target was the optimization of the ship's navigation energy consumption and sailing time. The route optimization constraint included critical wind (wave) speed and critical ship speed, land, islands, shoals, reefs, and shipwrecks, which will affect the navigation safety of ships. The optimality principle shows that for the given optimization index and constraints when the ship departs from any point on the route, the optimal decision only depends on the environment at this point, and has no contact with the state of the environment before reaching the point. It shows that the performance index function of the route has Markov characteristics. Based on this, the equation for continuous routes can be set as: In Equation (1), u(t) was the weather situation of the navigation area in time t. Where x(t) was the ship's trajectory at time t., f (·) was continuously differentiable in the navigation area. The set of trajectories of the ship from the starting point to the ending point was the optimal route. t s was assumed to be the initial moment when the ship departs from the port of departure. t 0 was the time of the ship sailing to the current position. t f was the time of the ship sailing to the next position. Continuous route optimal performance index J t 0 , t f was: In Equation (2), h t 0 , t f was the route evaluation value from time t 0 to t f . t was the navigation time.
, t]dt was the sum of route evaluation value from t s to t 0 . Both energy consumption and sailing time are the two important factors that can affect the economy of the route. Thus, energy consumption and sailing time were taken as the optimization indicators of the route. The minimum energy consumption function was as follows: In Equation (3), f * a was the optimal solution of the minimum energy consumption route model from time t 0 to t f . f * a = min f a . T e was the main thrust. S was the route length from time t 0 to t f . The minimum sailing time function f b was as follow: In Equation (4), f * b was the optimal solution of the minimum sailing time route model v was the actual voyage speed. v max was the critical speed of the ship.
The energy consumption and sailing time double-objective route evaluation function was established as follows: In Equation (5), h was the route evaluation value. Weighting factors of energy consumption and sailing time were ω 1 and ω 2 . Transform factors were γ 1 and γ 2 , which was to convert energy consumption and sailing time into economic indicators for evaluating routes. γ 2 = γ 1 Av t . A was a constant. v t was the ship stall value at time t.
The route in which actual speed exceeds the critical speed should be avoided to be selected. Therefore, the formula put forward by literature [18] was used to calculate the critical speed of the ship.
In Equation (6), ship critical speed was v max , h was wave height, relative wave direction was q; q was the angle between the direction of travel of the ship and the direction of the wave.

Principle of the Model
Weather conditions change rapidly and are uncertain. The decision method should be flexible. Thus, the optimal control method was adopted to solve the unmanned ship global weather route dynamic optimization problems. The ant colony algorithm was a heuristic route search algorithm. Ants communicate and cooperate with each other to find the optimal route between food sources and nests, and ants release a pheromone in the route where they had walked. Ant colonies changed their directions through the perception of the pheromone. After a while, it showed a positive feedback phenomenon: when the number of ants walking through a path increased, the remaining pheromone also increased, which would increase the probability that other ants chose the path. Thus, the number of ants that chose the route was increased. Finally, the optimal route can be searched. Combined with the dynamic optimal control method, the unmanned ship global weather route dynamic optimization model based on the improved ant colony algorithm was established.

Model Building
Suppose in the navigation area of the ship, terrain area constraint set R G was a set of fixed non-navigable areas, and the meteorological threat area constraint set R W was a set of dynamic non-navigable areas. The route curve was expressed as f (Lon, Lat, t) = 0. Among them, Lon was the longitude of the ship. Lat was the latitude of the ship. (Lon, Lat) / ∈ (R G ∪ R F ). Constantly updated real-time meteorological information resulted in the adjusting of the route evaluation value. The pheromone concentration in the navigation environment was affected. Thus, the pheromone concentration was constantly changed during the process of ant k completing once route searching through time T.
Suppose the number of ants was m. The k-th ant turned from position u to the next position v in n-th step. The state transition probability was as follows: In Equation (7), j was indicated as the next position the ant reached. τ α uv (n) was represented the pheromone concentration on the route (u, v) when the pheromone concentration heuristic factor was α. η β uv (n) represented the visibility heuristic information variable on the route (u, v) when the visibility heuristic factor was β, which can reflect the heuristic level from u to v. The higher value of α and β, the higher probability that the ant k chose the route that most ants had ever chosen. Heuristic information formula was as follows: In Equation (8), Lon u and Lat u were represented as the value of longitude and latitude on position u. Lon v and Lat v were represented as the value of longitude and latitude on position v.
Further, allowed k(n) was represented as the position that the ant k can choose in the next step, which was expressed as follows: In Equation (9), R n was the set of the whole probable position the ant may choose; tab u k was used to store the route that the ant had ever walked.
The quantity of initial pheromone was the route evaluation value in the navigation environment. In the process of route searching, ant released an appropriate amount of pheromones. Supposed that ant k completed one cycle after time T. The pheromone concentration updating formula was as follows: In Equation (10), ρ was represented as the pheromone concentration volatility coefficient, of which the value range was 0 < ρ < 1. Where ∆τ uv was described as the pheromone increment on the route (u, v); m was the number of ant colonies.

Data Processing and Calculation
The average wind data of March was selected as the simulation experiment data. The data was obtained from the Scatterometer Climatology of Ocean Winds' website, published by the University Corporation for Atmospheric. The wind field data of 10 m above the ocean surface was obtained by NASA's sea wind scatterometer on a Quick Scatterometer (QuikSCAT). The monthly average wind power data was obtained by the regression model. The data format was the Network Common Data form.

Wind Field Data Processing
A raster map of latitude −69.875 •~6 9.875 • and longitude 0.125 •~3 59.875 • was obtained after the wind field data was read. On the map, data of wind direction and speed was recorded. In order to understand the distribution of the wind field, the data needs to be pre-processed to provide a foundation for route design.
As shown in Figure 1, the horizontal axis of the graph was represented as longitude, and the vertical axis was represented as latitude. The gay region was represented as the constraint set R G . The number under the horizontal color bar of the picture was represented as wind speed, of which the unit was m · s −1 . The wind speed in the marine region corresponded to the color in the horizontal bar. The distribution of wind fields throughout the marine environment can be observed in the figure. The area of land and islands was expressed by "−9999".
The direction opposed to the earth's rotation was taken as the positive direction of the horizontal axis, and the direction in which the latitude was increased was taken as the positive direction of the vertical axis. The wind direction at a grid point was calculated from the wind direction data on the longitude and latitude components. The formula for the wind direction calculation was: In Equation (11), wind direction angle was α, longitude direction wind value was Lon, latitude direction wind value was Lat, the range of angles obtained by this formula was [−π, π].

Calculation of Hull Windward Angle
The wind direction was set to the positive direction of the x-axis, with an angle range of [− , ). The ship's heading C was set to the positive direction of the y-axis, with an angle range of [0,2 ). Therefore, it was necessary to adopt a unified measure basis and method for the wind direction and heading. The conversion method is shown as Equation (12): The hull upwind angle refers to the angle between the ship's heading and the wind direction. The cartesian coordinate system was established, as shown in Figure 2. The positive direction of the y-axis was specified as the north. According to Figure 2, the formula for the upwind angle was: In Equation (13), the wind direction angle was , the ship's heading was . The range of angles was [0, ).

Calculation of Hull Windward Angle
The wind direction was set to the positive direction of the x-axis, with an angle range of [−π, π). The ship's heading C was set to the positive direction of the y-axis, with an angle range of [0, 2π). Therefore, it was necessary to adopt a unified measure basis and method for the wind direction and heading. The conversion method is shown as Equation (12): The hull upwind angle β refers to the angle between the ship's heading C and the wind direction. The cartesian coordinate system was established, as shown in Figure 2.

Calculation of Hull Windward Angle
The wind direction was set to the positive direction of the x-axis, with an angle range of [− , ). The ship's heading C was set to the positive direction of the y-axis, with an angle range of [0,2 ). Therefore, it was necessary to adopt a unified measure basis and method for the wind direction and heading. The conversion method is shown as Equation (12): The hull upwind angle refers to the angle between the ship's heading and the wind direction. The cartesian coordinate system was established, as shown in Figure 2. The positive direction of the y-axis was specified as the north. According to Figure 2, the formula for the upwind angle was: In Equation (13), the wind direction angle was , the ship's heading was . The range of angles was [0, ). The positive direction of the y-axis was specified as the north. According to Figure 2, the formula for the upwind angle was: In Equation (13), the wind direction angle was α, the ship's heading was C. The range of angles was [0, π).

Wave Data Processing
Wind and wave data can be obtained separately in the actual marine meteorological environment. Due to the different timeliness of data, wind, and wave data cannot be obtained accurately at the same time. In order to ensure the accuracy of the wave data, the following formula was used to calculate the wave height according to the literature [19]: In Equation (14), gravity acceleration was g, g = 9.8m/s 2 ; v wind was the wind speed. The length of the wind zone was F. The length of the wind zone refers to the area of the sea where the wind condition was almost the same.

Ship Loss-Speed Data Processing
In the course of navigation, the unmanned ship will be affected by meteorological and hydrological factors and will result in a loss-speed phenomenon. The ship was particularly affected by wind and waves. The resistance of the ship in navigation was much greater than that in still water. This phenomenon was known as loss-speed. The following formula was used to calculate the wave height according to the literature [19]: In Equation (15), the ship actual speed was v, the ship speed in still water was v 0 , the wind speed was v wind , wave height was h, ship upward angle was β, ship displacement was D, the undetermined coefficient was a 1 , a 2 , a 3 , a 4 . In order to simplify the calculation, the wave direction was assumed to be consistent with the wind direction. Therefore, the relative wave direction q was consistent with the hull upward angle β.

Model Solving
The start port and end port adopted in this paper were Japan Yokohama Port (34 • 40 N, 140 • E) and the US Long Beach Port (34 • 25 N, 120 • W). The average wind field data for March was used to solve the dynamic weather route model. The initial route was the static double-target route, and the longitude and latitude values of some of the waypoints are shown in Table 1. The navigation environment was modeled by the grid method. An ordinary container ship "Long Lin" was selected as the target ship of the simulation in this paper. The main ship parameters are shown in Table 2. According to the parameters of Table 2, the parameters in the ship loss-speed formula were solved by an iterative method. Then the calculation formula of ship loss-speed was expressed as Equation (16): The weights of energy consumption and sailing time were assumed equivalent. Ordered ω 1 = 0.5, ω 2 = 0.5, γ 1 = 1, γ 2 = 1.725 × 108. The grid points evaluation function h t 0 , t f was expressed as Equation (17): The performance of the algorithm would be affected by factors, such as ant's number m, heuristic factors α and β, and pheromone volatility coefficient ρ. In order to solve the parameter value that most conformed to the route optimization model, the simulation experiment was carried out, and the influence of different parameters was analyzed.
In Figure 3, we can find when the number of ants was small, the pheromone communication was lacking and the route search was blind. With the number of ants increasing, the search effect was improved. The algorithm output results turned out to be stable. From the simulation results, when the number of ants was 67, the global convergence of the ant colony algorithm was the best. According to the parameters of Table 2, the parameters in the ship loss-speed formula were solved by an iterative method. Then the calculation formula of ship loss-speed was expressed as Equation (16): The weights of energy consumption and sailing time were assumed equivalent. Ordered = 0.5， = 0.5， = 1， = 1.725 × 108. The grid points evaluation function ℎ( , ) was expressed as Equation (17): The performance of the algorithm would be affected by factors, such as ant's number m, heuristic factors and , and pheromone volatility coefficient . In order to solve the parameter value that most conformed to the route optimization model, the simulation experiment was carried out, and the influence of different parameters was analyzed.
In Figure 3, we can find when the number of ants was small, the pheromone communication was lacking and the route search was blind. With the number of ants increasing, the search effect was improved. The algorithm output results turned out to be stable. From the simulation results, when the number of ants was 67, the global convergence of the ant colony algorithm was the best. In Figure 4, we could find that when the value of pheromone concentration heuristic factor was small, ants' route searching had great randomness. The convergence speed of the algorithm was slow. When the value was high, the ants were too reliant on the pheromone. The optimal local route had a massive positive feedback effect. Thus, the algorithm was easy to fall into local optimum. The results of the simulation showed that the effect of the algorithm was the best when = 1.17. In Figure 4, we could find that when the value of pheromone concentration heuristic factor α was small, ants' route searching had great randomness. The convergence speed of the algorithm was slow. When the value α was high, the ants were too reliant on the pheromone. The optimal local route had a massive positive feedback effect. Thus, the algorithm was easy to fall into local optimum. The results of the simulation showed that the effect of the algorithm was the best when α = 1.17. In Figure 5, when the value of the visibility heuristic was small, the probability of an ant random route searching was high, which resulted in the slow convergence speed of the algorithm. When the value was high, the algorithm easily fell into local optimum, which was harmful to route searching. So = 5.9. In Figure 6, when the value of pheromone volatility efficient was small, the pheromone in the route remained for a long time. The global search ability of the algorithm was strong, but the convergence speed of the algorithm was slow. When the value was high, pheromones volatilized quickly in less or no searched routes so that the ability of global optimal route searching was weakened. Therefore = 0.36. In Figure 5, when the value of the visibility heuristic β was small, the probability of an ant random route searching was high, which resulted in the slow convergence speed of the algorithm. When the value β was high, the algorithm easily fell into local optimum, which was harmful to route searching. So β = 5.9. In Figure 5, when the value of the visibility heuristic was small, the probability of an ant random route searching was high, which resulted in the slow convergence speed of the algorithm. When the value was high, the algorithm easily fell into local optimum, which was harmful to route searching. So = 5.9. In Figure 6, when the value of pheromone volatility efficient was small, the pheromone in the route remained for a long time. The global search ability of the algorithm was strong, but the convergence speed of the algorithm was slow. When the value was high, pheromones volatilized quickly in less or no searched routes so that the ability of global optimal route searching was weakened. Therefore = 0.36. In Figure 6, when the value of pheromone volatility efficient ρ was small, the pheromone in the route remained for a long time. The global search ability of the algorithm was strong, but the convergence speed of the algorithm was slow. When the value ρ was high, pheromones volatilized quickly in less or no searched routes so that the ability of global optimal route searching was weakened. Therefore ρ = 0.36. The initial parameters of the ant colony algorithm are shown in Table 3. Table 3. Parameters of ant colony algorithm.

Name
Symbol value Ants number m 67 Pheromone concentration heuristic factor 1.17 Visibility heuristic factor 5.9 Pheromone volatility coefficient 0.36 The simulation results are shown in Table 4.

Model Verification
In order to verify the reliability of the model, further comparison and analysis with the results of the static dual-target weather route model and dynamic multi-stage decision weather route model were needed. So as to judge whether the model established could meet the design requirements of dynamic optimization route. The model was respectively compared with the model of a static dual-target route and dynamic multi-stage decision route.
Set the number of waypoints N = 100. Some of the waypoints' latitude and longitude of the static dual-target route and dynamic multi-stage decision route are shown in Tables 5 and 6.  The initial parameters of the ant colony algorithm are shown in Table 3. The simulation results are shown in Table 4.

Model Verification
In order to verify the reliability of the model, further comparison and analysis with the results of the static dual-target weather route model and dynamic multi-stage decision weather route model were needed. So as to judge whether the model established could meet the design requirements of dynamic optimization route. The model was respectively compared with the model of a static dual-target route and dynamic multi-stage decision route.
Set the number of waypoints N = 100. Some of the waypoints' latitude and longitude of the static dual-target route and dynamic multi-stage decision route are shown in Tables 5 and 6. The running results of the three models are shown in Table 7, and the comparison of simulation results was shown in Figure 7.  The running results of the three models are shown in Table 7, and the comparison of simulation results was shown in Figure 7.  From the results in Table 7, the total voyage, energy consumption, and sailing time of the static dual-target routes were the highest among the three models. The energy consumption and sailing time of the dynamic multi-stage decision route were 1.082 × 10 kJ and 7.33 h lower than those of the static dual-target route. The continuous dynamic optimal control route had the most significant optimization effect on the total range, energy consumption, and sailing time. Its total voyage, energy consumption, and sailing time were respectively 3.5798 km, 2.294 × 10 kJ, and 3.89 h lower than those of the dynamic multi-stage decision route. Simulation results showed that the model built in this paper had high reliability and applicability. From the results in Table 7, the total voyage, energy consumption, and sailing time of the static dual-target routes were the highest among the three models. The energy consumption and sailing time of the dynamic multi-stage decision route were 1.082 × 10 8 kJ and 7.33 h lower than those of the static dual-target route. The continuous dynamic optimal control route had the most significant optimization effect on the total range, energy consumption, and sailing time. Its total voyage, energy consumption, and sailing time were respectively 3.5798 km, 2.294 × 10 8 kJ, and 3.89 h lower than those of the dynamic multi-stage decision route. Simulation results showed that the model built in this paper had high reliability and applicability.

Comments
The unmanned ship weather route optimization model based on the continuous dynamic optimal control method was established in this paper. An improved ant colonies' algorithm was adopted to solve the model. Firstly, the economy of the route was impacted by energy consumption and sailing time. To realize, the dual-target optimal route was taken as the optimization criterion. When the route evaluation function was set up, it was assumed that the weight of energy consumption was equal to that of sailing time. In actual navigation, the weight can be changed according to different navigation tasks. Secondly, the route was expressed as a continuous state equation, and the state at any point of the route conformed to the optimal decision of energy consumption and sailing time. The Markov characteristics of the route indicated that the route adjusted according to the real-time weather condition was only dependent on the navigation environment at the waypoint and had no relation with the state before reaching that point. Thus, in the actual navigation environment, the energy consumption and sailing time of the dynamic optimization route may not be less than that of the initial route because of the variety of weather conditions. Thirdly, the route was searched by ants, which were regarded as the agent in route searching, through a process of repetitive random selection in accordance with the dual-target principle of navigation time and energy consumption. A higher number of ants ensured the reliability and stability of the route searching, improved the ability to acquire the global optimal solution, however had a great impact on the running speed of the algorithm. The smaller the number of ants, the faster the search speed, but the slower the algorithm convergence. Higher pheromone concentration heuristics, visibility heuristics, and faster pheromone volatility could improve search efficiency, but the algorithm was easy to fall into a local optimum. On the contrary, the ability of the global route search was strong, but the algorithm convergence was slow. Therefore, the selection of ant colony algorithm parameters was closely related to the quality and efficiency of route optimization. Finally, the solution of the ship loss-speed formula was based on a hypothesis that wind direction was consistent with wave direction. Although the parameters about waves in this paper were reckoned from the data of wind speed and direction, strictly speaking, the waves' direction depended not only on the wind direction but also on changes in air pressure and the inertia of the waves, which had little influence on waves' direction. Therefore, the wave direction was approximately expressed, which had little influence on the calculation of ship loss-speed.

Conclusions
In this research, the unmanned ship navigation environment was analyzed under complicated marine weather conditions, and the influence of wind and waves on navigation was considered in an integrated manner. An unmanned ship weather route optimization model based on the method of continuous dynamic optimal control was established. The problem with multi-stage decisions was transformed into that of one-step optimal control. An improved ant colony algorithm was adopted to solve the optimal route. Firstly, the dynamic optimization of the weather route was considered as the optimal control problem. The continuous route state equation was established. The route objective function and constraints were set. Secondly, the impact of wind and wave conditions was considered. The dual-target route evaluation function for energy consumption and sailing time was established. The weather route was dynamically optimized in combination with the improved ant colony algorithm. Finally, the model was compared with the static weather route model and the dynamic multi-stage decision route model to verify its dynamic optimization effect on the weather route. Simulation results showed that, compared with the dynamic multi-stage decision-making route optimization method, the unmanned ship weather routes' dynamic optimization method, based on continuous optimal control, had a more significant optimization effect on energy consumption and navigation time, and effectively saved shipping costs. The model was more effective in solving the weather route problem. The method can be used to solve the dynamic optimization problem of unmanned ships' weather routes, which can particularly provide a reference for the weather route planning and dynamic optimization of unmanned ships in large marine areas. Navigation safety and economy can be improved, and a decision basis for unmanned ship navigation can also be provided.