###### Abstract  
Vehicular ad hoc networks (VANETs) are a fundamental component of intelligent transportation systems in smart cities. With the support of open and real-time data, these networks of inter-connected vehicles constitute an 'Internet of vehicles' with the potential to significantly enhance citizens' mobility and last-mile delivery in urban, peri-urban, and metropolitan areas. However, the proper coordination and logistics of VANETs raise a number of optimization challenges that need to be solved. After reviewing the state of the art on the concepts of VANET optimization and open data in smart cities, this paper discusses some of the most relevant optimization challenges in this area. Since most of the optimization problems are related to the need for real-time solutions or to the consideration of uncertainty and dynamic environments, the paper also discusses how some VANET challenges can be addressed with the use of agile optimization algorithms and the combination of metaheuristics with simulation and machine learning methods. The paper also offers a numerical analysis that measures the impact of using these optimization techniques in some related problems. Our numerical analysis, based on real data from Open Data Barcelona, demonstrates that the constructive heuristic outperforms the random scenario in the CDP combined with vehicular networks, resulting in maximizing the minimum distance between facilities while meeting capacity requirements with the fewest facilities. v 202323499 12 December 202224 December 202224 December 202224 December 202224 December 20222  
VANETs can help smart cities by improving vehicle mobility and implementing an efficient system for communicating and managing warning messages. For instance, efficient traffic alerts and up-to-date traffic incident information will reduce traffic congestion, improve road safety, prevent car accidents, and enhance city driving. Additionally, real-time traffic alerting will reduce travel distances, fuel consumption, and, as a result, emissions of CO\({}_{2}\)[4]. Furthermore, due to the increasing need for communication, computation, and storage resources, emerging vehicular applications, and exponentially growing data, Vehicular Edge Computing (VEC) has great potential to improve traffic safety and travel comfort by bringing communication, computing, and caching resources closer to vehicular users. It could also be able to meet the growing demand for low latency and bandwidth in edge devices [5]. Figure 1 shows VANETs communication in smart cities, where communication can take place between infrastructure-to-infrastructure (I2I), vehicle-to-vehicle (V2V), vehicle-to-infrastructure (V2I), and vehicle-to-everything (V2X) such as people, mobile phones, RFID readers, traffic lights, and so on. The direct communications between devices and vehicles are based on wireless access standards such as 4G, 5G, DSCR, etc. Small sensors installed beneath the asphalt can measure traffic density, generate data, and send it to the open repositories. The RSU is fixed and consists of a transceiver that transmits and receives data. These mobile devices and vehicles are linked to edge devices such as RSUs and share the edge layer. The edge serves as a bridge between the cloud and devices, vehicles, and people. Servers with computational and storage capabilities are deployed close to vehicular networks, and data processing and analysis are performed close to end devices. As computing and storage services are provided close to the user (on the edge), edge computing services provide a better quality of service (QoS). Since people are consuming more information with their mobile devices, vehicles are equipped with edge devices and RSUs technologies in the road transport network, and the popularity of new mobility services such as ridesharing and carsharing has increased communication between vehicles, people, and everything else [6; 7].