**7. Conclusions**

This study proposes bottleneck based gridlock prediction on simulated GPS vehicles using spatiotemporal time series analysis based LSTM. The investigation shows that LSTM can predict the gridlocks with a long range of time dependencies by conducting the experiments on different time-lagged observation periods and time sampling. The sample size of 30% GPS vehicles is needed for geographic data coverage of bottleneck and gridlock analysis before using LSTM. The RMSE result of 0.02 with the 60 min time-lagged observation confirms that LSTM prediction with current hardware capacity has satisfying performance if the input time-lagged observations are sufficiently long. The time sampling interval of 5 min reports 0.4 for RMSE with the required sample of 5% GPS vehicles. The reported results sugges<sup>t</sup> the effect of time sampling using the data collection interval of 5 min. Our proposed LSTM model can predict the gridlock labels for effectively 5 min into the future with a 15 s computation time. Therefore, if our LSTM model has information on the previous time-lagged observation of a 5 min data collection interval, it can predict the future 5 min of the gridlock occurrences. The traffic signal controller can adapt to correct the signal timings to alleviate the gridlock effects in the loop. The reported RMSE and MAE values are decreased to as low as 0.03 and 0.001, with the 60 min time-lagged observation using the 3% sample with LSTM. Therefore, the results confirm that the required minimum sample size of 3% GPS vehicles traveling on each link of the loop is enough to predict the gridlock. Using the mean speed of this penetration ratio of GPS vehicles, in practice, can successfully and effectively detect the gridlock. The reported results sugges<sup>t</sup> that the percentage of simulated GPS vehicles using different random seed numbers can give the possibility of bottleneck and gridlock identification, as well as gridlock prediction using LSTM.

**Author Contributions:** Conceptualization, E.E.M., H.O., C.S., and C.A.; data curation, E.E.M.; formal analysis, E.E.M., H.O., and C.A.; funding acquisition, C.A.; investigation, E.E.M., H.O., and C.A.; methodology, E.E.M. and C.A.; resources, H.O., C.S., and C.A.; software, E.E.M.; supervision, H.O., C.S., and C.A.; validation, E.E.M. and C.A.; visualization, E.E.M.; writing, original draft, E.E.M.; writing, review and editing, H.O., C.S., and C.A. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported in part by the Collaborative Research Project entitled Road Traffic Monitoring and Prediction System to provide Intelligent Transportation System, in part by the JICA Project for AUN/SEED-Net, Japan, and in part by the Asi@Connect's Data-Centric IoT-Cloud Service Platform for Smart Communities (IoTcloudServe@TEIN) project with Grant Contract ACA 2016/376-562 under the umbrella of the Smart-Mobility@Chula demonstration site.

**Acknowledgments:** The authors gratefully acknowledge the AUN/SEED-Net Scholarship and all members of the smart mobility project at the Department of Electrical Engineering, Chulalongkorn University, Bangkok, Thailand.

**Conflicts of Interest:** The authors declare no conflict of interest.
