# Fast Path Planning for Autonomous Ships in Restricted Waters
## 3 Results
### Simulations in Complex Environment  
On the basis of five kinds of static obstacles in Figure 12b, four dynamic TSs are added to the restricted waters. Additionally, four typical encounter situations are designed in this simulation. The start point of the own ship, waypoints of the prior path, and the final goal are \((-2,\,-0.5)\), \((4.5,\,2.5)\), \((10.4,\,9.7)\) and \((9.8,\,11.2)\), respectively, and the speed of the own ship is \(15\) kn. The initial input of test data for each TS, such as \(p_{ls}\) (start point), \(v_{ls}\) (speed), and \(R_{ls}\) (domain radius), as well as the encounter situation with the own ship, the CA actions taken by the own ship, and the final DCPA, are represented in Table 9. Screenshots of important situations in the simulation are shown in Figures 14-17a,b and Video S1 (see Supplementary Materials). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Method** & **Length of Trajectory [nm]** & **Time Steps** & **Run Time [s]** \\ \hline Original & 15.5 & 311 & 0.11–0.12 \\ New & 15.1 & 302 & 0.10–0.12 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Results comparison for the two methods. Figure 13: Comparison of the simulations for two methods regarding emergency scenarios. (**a**) and (**c**) show the simulation results before the improvement, where the own ship can alter course 33\({}^{\circ}\) to starboard (at time step 37, range is more than 6 nm to TS1) and take a further 30\({}^{\circ}\) right turn when TS1 suddenly turns left 35\({}^{\circ}\) and heads toward the own ship (at time step 80). However, at time step 127, the own ship takes an extra right turn when there is no collision risk. The total distance of the own ship in this simulation is 15.5 nm with 311 time steps. (**b**) and (**d**) show the simulation results of the improved algorithm. Before time step 89, the actions of the own ship are consistent with the original algorithm. However, based on the criteria of DCPA and TCPA, the own ship then determines that there is no collision risk with the TS1 and begins to head for the goal (at time step 89), reaching there without additional course alteration. The final trajectory is smoother than before, and the length is optimized to 15.1 nm within 302 time steps. The total running time of the two simulations is almost the same. Figure 14: **(a)** Three-dimensional potential field diagram of all static obstacle environments, including the parameter setting of each obstacle; **(b)** there is a low speed ship TSI 1.7 nm ahead of the own ship. The own ship, whose initial course is \(060^{\circ}\), is coming up with TSI from a direction more than \(22.5^{\circ}\) abaft the TSI’s beam, which is deemed an overtaking situation. The own ship should keep clear of TSI and take account of the influences of Obs1, Obs2 and TS2 in this narrow channel. Figure 15: **(a)** The own ship takes a right turn \(20^{\circ}\) to starboard due to Obs1 to overtake and pass TSI at a range of 0.3 nm. After that, the crossing situation with TS2 requires the own ship to give way, so that the own ship alters course \(30^{\circ}\) to starboard and passes clear Obs1 by at least 0.7 nm. **(b)** TS2 has been passed clear at a range of 1.6 nm. Without the influence of TS3, the own ship would alter course to port to approach WPT1 due to the large distance between the own ship and WPT1 (more than \(r_{k}\)), but doing this could go against Rules 15 & 17 of COLREGS and cause immediate danger with TS3. Therefore, the own ship keeps course not to port and not further to starboard due to the existence of the area obstacle Obs1 on the starboard side and passes TS3 at a safe distance of approximately 1.0 nm. Finally, the own ship crosses the angular bisector composed of the successive path legs and approaches the next waypoint WPT2.