# A Novel Energy-Saving Route Planning Algorithm for Marine Vehicles
## 2 Formulation of the Energy-Saving Problem
### Energy Consumption Model  
Taking into account the influencing factors of the current on the ship's navigation, the route planning algorithm is improved by addressing the energy consumption of the ocean current. Firstly, the current distribution chart is rasterized. The hydrodynamic model of ocean currents takes into account the time-varying properties of ocean currents and simulates the changes of ocean currents. Since the ocean current varies slowly with time, for the sake of simplicity, the interval of time unit of the ocean current variation is set as 1 h, which is the constant current during this period. In addition, the grid method is applied to discretize the ocean current to improve the computational efficiency of route planning, as shown in Figure 1.  
Combined with the advantages of the grid method environment model, the ocean current information is rasterized to improve the efficiency of the search algorithm. During the modeling process, the number of rows and columns can be determined by selecting certain interval of sea area and grid precision, and the calculation formula is as follows.  
\[\left\{\begin{array}{l}Col.Num=\frac{Lon.Max-Lon.Min}{Grid.accurved}\\ Row.Num=\frac{Lat.Max-Lat.Min}{Grid.accuracy}\end{array}\right. \tag{4}\]  
where \(Lon.Max\) and \(Lat.Max\) are the upper boundary. \(Lon.Min\) and \(Lat.Min\) are the lower boundary. \(Grid.accuracy\) is the grid precision. We choose 0.01 \(\times\) 0.01 grid precision to build the model.  
During the voyage, when in different headings, the ship has various water-facing areas. The water-facing area is decomposed into \(x\) and \(y\) directions.  
\[S_{x}=d(L\sin\theta+B\cos\theta) \tag{5}\]  
\[S_{y}=d(L\cos\theta+B\sin\theta) \tag{6}\]  
where \(L\), \(B\), and \(d\) are the ship's length, breadth, and draft, respectively. \(\theta\) is the angle between the motion direction and the \(x\)-axis. \(S_{x}\) is the projected area in the \(x\) direction and \(S_{y}\) is the projected area in the \(y\) direction.  
Energy consumption depends on frontal areas in the \(x\) and \(y\) directions.  
\[E_{x}=\frac{1}{2}\rho C_{c}S_{x}(v\cos\theta-\mu)T_{s} \tag{7}\]  
\[E_{y}=\frac{1}{2}\rho C_{c}S_{y}(v\sin\theta-v)T_{s} \tag{8}\]  
\[E=E_{x}+E_{y} \tag{9}\]  
where \(C_{c}\) is the seawater resistance coefficient. \(\mu\) is the component of the current in \(x\). \(v\) is the component of the current in \(y\). \(v\) is the speed of the ship. \(E_{x}\) is the energy consumed by the ship in the \(x\) direction and \(E_{y}\) is the energy consumed by the ship in the \(y\) direction. \(E\) is the total energy consumed by the ship in the course. \(T_{s}\) is the time that the ship traveled in the course.  
As the ship travels from \(S_{0}\) to \(S_{1}\), the energy cost of the current is \(E(S_{1},S_{0})\), and the required energy as follows.  
\(T_{s}\) is the ship's sailing time from \(S_{0}\) to \(S_{1}\). The ship's speed, current setting, and magnitude are assumed to be constant in the grid. When the current speed of the \(x\) and \(y\) axis is higher than the ship speed, the ship speed is 0 and there is no energy consumption. Then, the energy and total energy consumption are as follows.  
\[E(S_{1},S_{0})=\int_{0}^{T_{s}}\bigl{(}E_{x}+E_{y}\bigr{)}dt \tag{10}\]  
\[E=\sum_{i=1}^{n}E_{i,j+1} \tag{11}\]  
Figure 1: Schematic diagram of the motion of grids with currents.