energies Article Edge Computing and IoT Analytics for Agile Optimization in Intelligent Transportation Systems Mohammad Peyman 1, * , Pedro J. Copado 1,2 , Rafael D. Tordecilla 1,3 , Leandro do C. Martins 1 , Fatos Xhafa 4, * and Angel A. Juan 1,2   Citation: Peyman, M.; Copado, P.J.; Tordecilla, R.D.; Martins, L.d.C.; Xhafa, F.; Juan, A.A. Edge Computing and IoT Analytics for Agile Optimization in Intelligent Transportation Systems. Energies 2021, 14, 6309. https://doi.org/10.3390/ en14196309 Academic Editor: Sergio Saponara Received: 2 August 2021 Accepted: 29 September 2021 Published: 2 October 2021 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affil- iations. Copyright: © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). 1 IN3—Computer Science Department, Universitat Oberta de Catalunya, 08018 Barcelona, Spain; pcopadom@uoc.edu (P.J.C.); rtordecilla@uoc.edu (R.D.T.); leandrocm@uoc.edu (L.d.C.M.); ajuanp@uoc.edu (A.A.J.) 2 Department of Data Analytics&Business Intelligence, Euncet Business School, 08018 Barcelona, Spain 3 School of Engineering, Universidad de La Sabana, Chia 250001, Colombia 4 Computer Science Department, Universitat Politècnica de Catalunya, 08034 Barcelona, Spain * Correspondence: mpeyman@uoc.edu (M.P.); fatos@cs.upc.edu (F.X.) Abstract: With the emergence of fog and edge computing, new possibilities arise regarding the data-driven management of citizens’ mobility in smart cities. Internet of Things (IoT) analytics refers to the use of these technologies, data, and analytical models to describe the current status of the city traffic, to predict its evolution over the coming hours, and to make decisions that increase the efficiency of the transportation system. It involves many challenges such as how to deal and manage real and huge amounts of data, and improving security, privacy, scalability, reliability, and quality of services in the cloud and vehicular network. In this paper, we review the state of the art of IoT in intelligent transportation systems (ITS), identify challenges posed by cloud, fog, and edge computing in ITS, and develop a methodology based on agile optimization algorithms for solving a dynamic ride-sharing problem (DRSP) in the context of edge/fog computing.These algorithms allow us to process, in real time, the data gathered from IoT systems in order to optimize automatic decisions in the city transportation system, including: optimizing the vehicle routing, recommending customized transportation modes to the citizens, generating efficient ride-sharing and car-sharing strategies, create optimal charging station for electric vehicles and different services within urban and interurban areas. A numerical example considering a DRSP is provided, in which the potential of employing edge/fog computing, open data, and agile algorithms is illustrated. Keywords: fog; edge computing; Internet of Things; intelligent transportation systems; smart cities; machine learning; agile optimization 1. Introduction In today’s modern society, urban centers are facing the so-called booming of infor- mation. Due to the population growth in many countries around the globe, and recent innovations in information and telecommunication technologies, several activities and related challenges have jointly arisen. People are increasingly consuming more information through their mobile devices, vehicles are equipped with different intelligent systems, de- vices are distributed around the cities for gathering and generating information, and urban areas are continuously taking advantage of these information technologies and big data. Consequently, so-called smart cities have emerged, whose scope combines sustainable development with the intelligent management of gathered data in order to enhance the operation of different services within urban areas, such as waste collection management [1], car-sharing/ride-sharing activities [2], the optimal location of recharging stations for elec- tric vehicles (EVs), among others. In this matter, during the past few years, the Internet of things (IoT) has become a popular term that plays a significant role to expand and produce a lot of data through sensors and allows citizens and things to be connected in any situation Energies 2021, 14, 6309. https://doi.org/10.3390/en14196309 https://www.mdpi.com/journal/energies