# Optimized Dynamic Deployment of UAVs in Maritime Networks with Route Prediction
## 5 Simulation Results and Discussion
### Assessment of Route-Prediction Performance  
Figure 2 shows the performance of different algorithms in route prediction. From the figure, we can see the difference between the actual trajectory and the predicted trajectory of each model, as well as the prediction accuracy of each algorithm. Figure 2a compares the performance of the Multilayer Perceptron algorithm (MLP), LSTM, and SSA-LSTM in actual trajectory prediction. The MLP model has a larger prediction error, whereas the LSTM is the next closest, and the SSA-LSTM has the closest prediction result to the actual trajectory, which demonstrates significant accuracy and stability. Since MLP cannot process time-series data, it is unable to capture the time dependence and dynamic changes in the trajectories. As a result, the deviation between the predicted and actual trajectories of MLP is large, as shown in Figure 2b. With the change of trajectory, the error of MLP gradually increases, which has some limitations in complex trajectory prediction. Compared with MLP, LSTM can capture the long and short-term dependencies in the time series through the memory unit and gating mechanism, which is adaptive to the trajectory data, but still has deviations in the rapidly changing regions. As shown in Figure 2c, the performance of LSTM without hyper-parameter optimization is improved but not stable enough. SSA optimizes the hyper-parameters of LSTM to work in the best configuration, which significantly improves the prediction accuracy. As shown in Figure 2d, the prediction results of SSA-LSTM almost completely overlap with the actual trajectories with small errors, showing excellent performance. Overall, the SSA-optimized LSTM model outperforms the MLP and the unoptimized LSTM in terms of prediction accuracy and stability and can better adapt to complex trajectory dynamics and achieve higher accuracy.  
As shown in Figure 3, the figure demonstrates the trend of the mean square error (MSE) of different algorithms with the number of training rounds (epochs) during the training process. In the initial phase, the MSE of all algorithms decreases rapidly. LSTM has a higher initial error but converges quickly after a few epochs. SSA-LSTM has the fastest decrease in MSE in the starting phase and stabilizes at a low level quickly, indicating that SSA-LSTM can find better model configurations at an early stage and converges quickly. In the intermediate stage, the MSE of MLP changes relatively smoothly, but with small fluctuations and slower accuracy improvement. LSTM is affected by noise or training data when capturing nonlinear variations in the data, which results in larger fluctuations in its MSE. In contrast, SSA-LSTM is more adaptive to the data after hyperparameter optimization, significantly reduces the error, and remains stable; thus, SSA-LSTM has the lowest and smoother MSE at this stage. After 100 epochs, all the algorithms tend to be stable. SSA-LSTM has the smallest MSE and almost closes to zero, and has higher prediction accuracy after training. The MSE of MLP and LSTM is still higher than that of SSA-LSTM in the later stage, and the MSE of LSTM is slightly higher than that of MLP. Overall, SSA-LSTM algorithms have the lowest error in all stages and are suitable for subsequent ship prediction, which is suitable for the subsequent prediction of ship routes.