# A Novel Energy-Saving Route Planning Algorithm for Marine Vehicles
## 4 Computational Simulations
### Example 1  
To verify the effectiveness of the improved ant colony algorithm and compare the difference of the energy consumption of ocean currents between the improved algorithm as well as the traditional one, we chose the current model of Lianyungang with its adjacent sea areas as the test environment and ensured that the ship had the same starting and ending position as well as departure time. The initial speed of the ship was set as 18 km/h, which is the speed of the ship over the ground, and the draft of ship was 12 m. We set [119.28, 35.06] as the starting point (the yellow grid in Figure 5), and [119.67, 34.92] as the end point (the purple grid in Figure 5). To ensure that the improved algorithm and the traditional algorithm were tested under the same conditions, relevant parameters were set to the same initial value, as shown in Table 1.  
After the simulation test, the path planning results of the two algorithms were manifested, as shown in Figure 5. Three indicators, which are the ship's sailing time, path planning distance, and current energy consumption, were applied as evaluation criteria to compare the performance of the two algorithms. According to the path planning results in Figure 5, three performance indicators of the two algorithms are obtained, as demonstrated in Table 2. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Number** \\ \hline Pheromone factor \(\partial\) & 0.4 \\ Heuristic factor \(\beta\) & 5 \\ Pheromone evaporation \(\rho_{a}\) & 0.1 \\ Seawater density \(\rho_{w}\) & \(1.02\times 10^{3}\) \\ Seawater resistance coefficient \(C_{c}\) & 15.72 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Related parameter settings. Figure 5: (a) Energy consumption of improved ant colony algorithm, and (b) energy consumption of traditional ant colony algorithm. The post-smoothing process of the path consists of two parts. Firstly, through applying the improved ant colony algorithm and the improved Bresenham algorithm, the initial path is shortened and the number of vertices and polylines in the path is reduced. Then, the remaining vertices of the first smoothing are eliminated by implementing the principle of cubic B-spline curve. Different optimization results were obtained by changing the number of turns (number of vertices) of the improved ant colony algorithm, and the specific results are shown in Figure 5. From the simulation results in Figure 5a, it can be seen that the initial path searched out by the improved ant colony algorithm has a large number of broken points and broken lines. After the second-level smoothing of the cubic B-spline curve, the broken lines and broken points were eliminated. This is beneficial for realizing the continuity of speed as well as acceleration during the navigation of the ship and could also avoid the energy consumption when ship turns the rudder, so this design strategy matches our expectation. Both path planning methods chose the same start and end point during the simulation. The energy consumption of the traditional ant colony algorithm and the optimized one were obtained on the basis of the above environment as well as the speed of the ship. Using the cubic B-spline curve method, the above-mentioned path points were subjected to secondary smoothing, and we calculated the energy saving rate of the optimized ant colony algorithm compared to the traditional one. The formula of calculating the energy-saving rate is as follows. \[rate=\frac{ACO-EACO}{ACO}\times 100\% \tag{25}\]  
where \(EACO\) is the ocean current energy consumption of the improved algorithm. \(ACO\) is the ocean current energy consumption of the traditional algorithm. \(rate\) is the energy saving rate. The traditional ant colony algorithm is oriented by the path length, while the optimized ant colony algorithm considering the influence of the ocean current is oriented by the energy consumption cost. A path with low current energy consumption does not necessarily indicate a short path length, and, likewise, short path lengths do not imply low energy consumption.