A Real-time Energy-Saving Mechanism in Internet of Vehicles Systems

Emerging technologies, such as self-driving cars and 5G communications, are raising new mobility and transportation possibilities in smart and sustainable cities, bringing to a new echo-system often referred to as Internet of Vehicles (IoV). In order to efficiently operate, an IoV system should take into account more stringent requirements with respect to traditional IoT systems, e.g., ultra-broadband connections, high-speed mobility, high-energy efficiency and requires efficient real-time algorithms. This paper proposes an energy and communication driven model for IoV scenarios, where roadside units (RSUs) need to be frequently assigned and re-assigned to the operating vehicles. The problem has been formulated as an Uncapacitated Facility Location Problem (UFLP) for jointly solving the RSU-to-vehicle allocation problem while managing the RSUs switch-on and -off processes. Differently from traditional UFLP approaches, based on static solutions, we propose here a fast-heuristic approach, based on a dynamic multi-period time scale mapping: the proposed algorithm is able to efficiently manage in real-time the RSUs, selecting at each period those to be activated and those to be switched off. The resulting methodology is tested against a set of benchmark instances, which allows us to illustrate its potential. Results, in terms of overall cost –mapping both energy consumption and transmission delays–, number of active RSUs, and convergence speed, are compared with static approaches, showing the effectiveness of the proposed dynamic solution. It is noticeable a gain of up to 11% in terms of overall cost with respect to the static approaches, with a moderate additional delay for finding the solution, around 0.8 s, while the overall number of RSUs to be switched on is sensibly reduced up to a fraction of 15% of the overall number of deployed RSUs, in the most convenient scenario.


I. INTRODUCTION
E ACH form of innovation aiming to achieve sustainability and to optimize the use of resources in responsible ways is defined as an eco-innovation form. The need for developing green-growth technological strategies in urban environments is raising day-by-day, and has the noble aim of improving citizens' quality of life, apart from ensuring that future generations will be able to meet basic and firstnecessity needs -e.g., clean air, water, and biodiversitythanks to adjustments like the reduction in traffic and in emission of greenhouse gases [1].
Modern technologies, like 5G and Internet of Things (IoT), can be employed to support the development of green cities [2]- [4]: a huge distributed cloud infrastructure made by thousands of smart devices (typically small and embedded ones), able to communicate with each other in real-time [5]. Among several application domains, the Internet of Vehicles (IoV) [6], [7], a sub-domain of IoT, can be described as a distributed and interconnected network that supports the need for sharing data created by vehicles -but could include also pedestrians, bikes, and other urban objects-in a realtime fashion with roadside units (RSUs). These are special facilities that act as edge computing nodes. They run different services and are able to jointly convey communications and process data, without requiring transfer to central cloud facilities [8].
As shown in Figure 1, one of the main challenges that arise when solving an IoV-related problem is to efficiently manage the RSUs, so that an optimal service coverage of vehicles is provided with respect to some target Quality of Service (QoS) parameters -e.g., service coverage, throughput, low latency, or energy consumption [9]- [11]. In addition, roads are very dynamic environments: cities may be congested in some areas at specific times of a day, with vehicles moving at a different speeds. This dynamism of the environment must be taken into account as well.
The problem addressed in this paper aims at considering the IoV scenario by including a dynamic behavior in the problem definition. The system is modeled as a series of consecutive periods, in which the RSUs configuration has to react and quickly adapt to the ever-changing traffic and connection requirements from the vehicles, while keeping the energy consumption low. Thus, every few minutes, an efficient configuration of RSUs might need to be re-computed in a short amount of time, typically within a few seconds. In Figure 2, the same city blocks are depicted in three different successive periods, where vehicles and pedestrians are in movement and share the same space. Despite the facilities are fixed, the users' and vehicles' connection are updated over time -according to the dynamism of this environment-in order to minimize connection costs.
In particular, we aim at optimizing the RSUs activation through a proper switch-on and -off, enabling their energy consumption minimization, under the datarate and mobility requirements of the vehicles. The system is modeled through a multi-period time-scale and, in the following, the problem to be solved is referred to as a Multi-Period Internet of Vehicle Problem (MPIoVP). To this aim, the MPIoVP is first introduced and modeled as a semi-dynamic Uncapacitated Facility Location Problem (UFLP). The UFLP is an NP-hard optimization problem in Operations Research, which covers a wide range of logistics and transportation applications. This classical problem was initially described in [12]. The goal of the UFLP is to find an optimal placement for a given set of facilities, dictated by an objective function and some constraints. Despite its original formulation has fixed inputs over time and does not have real-time constraints, the UFLP can be adapted for modeling the MPIoVP, by assuming that the inputs change over time. Hence, the MPIoVP becomes an optimization problem where we assume that the RSUs are first mapped on selected locations and then managed; the solutions need to be found frequently and quickly over time, giving the very dynamic nature of these environments. In addition to this we developed and proposed a suitable mobility model able to catch in a simple way the collective movement of vehicles within an urban area, by properly modeling vehicles with different mobility patterns.
In order to solve the MPIoVP, an extremely fast biasedrandomized (BR) algorithm [13] is proposed. This solution method, which incorporates stochastic components, is then embedded into a multi-start framework. In this way, the resulting approach is able to periodically generate high-quality alternative solutions in real-time, i.e., in a few seconds. A series of computational experiments allow us to validate the efficiency of the proposed methodology.
The rest of the paper is organized as follows: Section II offers a review of some related works. In Section III, the first formal introduction of the MPIoVP is given. The biasedrandomized algorithm, and the framework in which the algorithm is embedded into, is described in Section IV. Numerical results are presented and discussed in Section V, where both experimental setup and results are considered. Finally, Section VI presents some final considerations on our results and elaborates on how this research may be continued in the future.

II. RELATED WORKS AND MAIN CONTRIBUTIONS
This section reviews previous publications in the context of Telecommunication Networks and IoV systems, with a particular focus on their optimization in dynamic scenarios. A brief background on BR algorithms is also given. It also discusses the main contribution of our work with respect to the literature.

A. TELECOMMUNICATION NETWORKS AND INTERNET OF VEHICLES
Dynamic scenarios in telecommunication systems require optimization algorithms capable of solving complex problems in short computing times. Telecommunication networks are one of the most important representative scenarios, where real-time resource allocation is of primary importance when implementing new services, leading to very challenging problems.  Among other models, used for modeling telecommunication problems, the Facility Location Problem (FLP) [14] has been extensively used in the past, showing its flexibility when considering realistic scenarios. As an example, the authors in [15] studied an FLP in the 5G cellular networks communication. They shown how to maximize the Wi-Fi coverage given a demand, and how to connect Wi-Fi equipment in order to ensure that the wireless connection is always available in an open city scenario. The authors in [16] aim at optimizing the resource utilization in a fog computing environment for respecting the tasks execution deadlines via assigning them to an optimal fog server using Software Defined Networking (SDN). Moreover, local and global load balance techniques are proposed. The simulation results revealed that the proposed system decreases the amount of tasks to be moved to the cloud and, as a result, there is a reduction in latency and in bandwidth consumption. In [17], the authors have modeled a video streaming system with QoS thresholds as a stochastic single-allocation p-hub median problem, by considering a simheuristic algorithm. A huband-spoke network is analyzed, in which numerous nodes exchange real-time multimedia data, and where the quantity of data sent from one node to another is a random variable.
Among several modern telecommunication systems, IoV systems represent one of the most challenging, due to their stringent time-scale and real-time service requirements. The IoV scenario has been introduced in [6], where the authors suggest IoV as a joint view of IoT and vehicular communications, a new system where the vehicles represent the things of the road environment. In [18], a hierarchical architecture for IoV scenarios is proposed, where the complexity of the scenario is highlighted through the design of different layers, each one managing a specific aspect. The interested reader could refer to [7], where the most important network architectures and applications for IoV are surveyed. It is indeed clear that IoV embraces several aspects. Among others we focus in this paper on the RSU operation [11], [19], which is usually faced in the literature through two main approaches. On the one side, the optimal RSU placement, involving the optimization of the RSUs position and their deployment in a given scenario [9], [20]- [24] [25], [26]. On the other side the optimal RSU selection, among a multitude, for the service implementation [27]- [32]. In particular our work focus on the second aspect aiming at investigating the possibility of optimally selecting the RSUs to be used by each vehicle while moving within the road scenario. In addition to this, an efficient energy saving mechanism is introduced aiming at switching off some of the RSUs while respecting the system constraints.
The RSU selection has been considered in [28], where the authors employ a simplified one-way road model to study the connectivity probability with a predefined set of RSUs placed along the way. In [32], the RSU selection is performed in a heterogeneous network scenario, where each vehicle has to select the best RSU for performing the computation offloading. The problem is solved through a multi-armed bandit algorithm, where the goal is to minimize the cell handover for avoiding service disruption. Often, the RSU selection is studied jointly with other key performance indexes. As an example, in [27] the authors consider the energy efficiency as a measure for optimizing the RSU selection, while in [31] the authors exploit full-duplex communications for optimally selecting the RSUs to be used by each vehicle. In [29], the authors proposed a Vehicle-to-Vehicle aided approach for optimizing the task offloading selection in an urban scenario where multiple RSUs are supposed to be scattered along the roads. Likewise, in [30] the authors extended the previous approach to consider mobile nodes acting as relay and/or processing nodes for implementing on-demand vehicular services. VOLUME 4, 2016 Focusing instead on the energy efficiency aspects some works in the literature considered such a problem within an IoV scenario. Among other works, in [8], the authors focus on the energy consumption control issues of MECenabled RSUs by introducing an energy-efficient scheduling framework for MEC-enabled IoVs to minimize the energy consumption of RSUs under task latency constraints. In [27], the authors addressed a low-complexity RSU and time slot assignment in vehicular networks with multiple RSUs. The goal is to minimize energy consumption across the RSUs. Another approach was considered in [33], where the authors provide an energy efficient offline downlink scheduling algorithm for store-carry-forward vehicles to satisfy the residual data requirement of the target vehicle moving in the uncovered area. A cluster-based approach is proposed to identify vehicles in energy favorable locations and multihop distance to relay vehicles. In [23], the authors propose a joint placement and sleep scheduling of RSUs in a VANET environment. In the paper the author formulate an optimization problem able to capture the behavior of a realistic scenario and propose an energy efficient candidate location selection algorithm to jointly perform placement and sleep scheduling of grid-connected solar powered RSUs. In [34], the authors considers the RSU ON/OFF scheduling problem in a sparse VANET. The proposed multi-level greed algorithm can significantly reduce the energy consumption of RSUs deployed and can provide a reference basis for energy efficient scheduling in VANETs.
One should notice that the optimal assignment of vehicles to RSUs in IoV scenarios has been barely studied. In [35], the authors studied an IoV scenario using UFLP modeling, but they did not considered the vehicular mobility or the impact of switching on and off the RSUs as the system evolves. As introduced in [36], RSUs alongside roads are used as wireless access points in an IoV network, providing communication services to vehicles inside its coverage area. Relating this problem to FLPs, the vehicles' demands for communication represent the inputs of our FLP. Since vehicles are in movement, these inputs are, henceforth, dynamic, and the outputs need to be periodically recomputed. Dealing with input uncertainties means dealing with real-world scenarios, which leads to the search for more robust or reliable solutions. In [37] the authors deal with uncertainties using random variables in its model: cost, demands, and distances. One of the few studies that addresses an optimization model to solve the RSU deployment problem is presented in [11]. A linear programming (LP) clustering algorithm, composed of three steps, was proposed. Their approach employs a utility function to measure and evaluate the total benefit from the RSU deployment. The stages are based on clustering, problem instance reduction -formulated as a single-node capacitated facility location problem-, and tasks assignment.

B. BIASED-RANDOMIZED ALGORITHMS
Biased-randomized algorithms constitute a relatively recent approach for fast generation of alternative solutions to com-plex optimization problems [38]. This methodology employs skewed probability distributions, such as the geometric and triangular ones, to extend the constructive behavior of deterministic heuristics [39]. Many applications of biasedrandomized heuristics can be found in the literature [40]. The first use of a non-uniform probability distribution to induce a biased random effect into a constructive heuristic was given in [41], where the authors solved a capacitated vehicle routing problem. In their work, a savings-based heuristic was biased by introducing a geometric probability distribution during the constructive stage. From this study, BR heuristics have been proposed to solve a vast number of optimization problems in different applications, as well as to enhance some metaheuristic frameworks such as the ILS [42], the greedy randomized adaptive search procedure (GRASP) [43], [44], or the multi-start one [45], [46]. They have also been combined with learning mechanisms [47], and with parallel computing [48].

C. MAIN CONTRIBUTIONS
After discussing the emerging interest in IoV systems, their real-time requirements, and the need for developing fast optimization algorithms for the UFLP, this paper proposes an original framework for real-time energy-efficient management of RSUs in a dynamic urban environment. To this aim, the main achievements of our paper can be summarized as follows: • A dynamic urban scenario has been modeled by considering the presence of multiple RSUs and vehicles. Each RSU is able to implement an energy saving mechanism, modeled as a two-state system. Differently from other papers in the literature, our model considers multiple geographical subareas, each one associated with a demand factor parameter that represents the amount of vehicles located in that subarea at a given time, as well as their service requests. This allows to create a model that can be easily manged when we have to select the RSUs to be switched off, and allowing to map the cells to each active RSUs. • To the best of our knowledge, this is the first paper formulating the problem as an UFLP, where the minimization of both energy consumption and data-rate are considered in the cost function, through a proper management of the RSUs. The traditional UFLP approach has been extended towards a multi-period framework, characterized by a variable demand, by introducing a closing and an opening fee for modeling the cost to be paid for switching on and off each RSU. • Based on a graph model, a random shift rule has been defined, allowing to properly map a realistic scenario where vehicles move preferably towards the downtown area at some time periods (e.g., in the morning). A suitable heatmap representation located in Rome (Italy) is also considered, helping to better understand the demands evolution.
• An original fast constructive savings-based heuristic is proposed. The heuristic has been also enriched with biased-randomization techniques, and embedded into a multi-start framework. • Finally, simulation results have been carried out, comparing five possible strategies, including both static and dynamic approaches.

III. SYSTEM MODEL AND PROBLEM FORMULATION
This section provides details on the model we have used to represent the IoV system.

A. SYSTEM MODEL
We focus on an urban scenario composed of several RSUs. These are distributed across the city, and identified through the set R = {RSU 1 , . . . , RSU i , . . . , RSU I }, whose positions (x R i , y R i ) are fixed. We also consider a multitude of vehicles, identified through the set V = {v 1 , . . . , v m , . . . , v M }, whose positions (x m (t), y m (t)) are changing over time. While the RSUs can provide IoV services to the users (e.g., Internet access, edge processing, etc.), vehicles are likely to choose one of the RSUs within their coverage range to access to the requested service. The set of vehicles that can be connected to the ith RSU at time t is defined as: is the distance between the ith RSU and any of the M vehicles, while d R is the coverage range of the RSUs, which are assumed to be the same for all the RSUs and which depend on the communication technology (e.g., IEEE 802.11p, C-V2X [49]). The distance between RSUs and vehicles drives the connection availability and the link quality by setting the expected data-rate. Given the Shannon capacity formula, the data-rate is a function, among other factors, of the distance, i.e.: where B im represents the bandwidth of the link between the ith RSU and the mth vehicle, P i tx is the transmission power of the ith RSU, L(d im ) is the path loss at a distance d im between the ith RSU and the mth vehicle, and P Nm is the noise power at the receiver side. Noise power can be defined as P Nm = N T B im , where N T is the thermal noise. A similar formula can be considered for the reciprocal link.
To reduce the impact of the energy consumption, we assume that each RSU can be switched on (active) or in stand-by state. When active, a RSU is able to service a certain number of vehicles. On the contrary, no vehicle can be serviced for a RSU in stand-by mode. Based on some previous works [50], [51], the power consumption of the ith RSU can be modeled as follows: where P 0 i is the basic circuit power consumption, µ i is a proportionality coefficient dependent on the number of vehicles connected to the ith RSU and P active i is the power consumed by the ith RSU for managing the vehicles 1 . In the following, let us assume that: is the additional power consumed when the RSU is operative with respect to the stand-by mode. Additionally, a switching cost, corresponding to the power spent when switching from the stand-by to active mode, can be defined as [50]: where E sw i is the energy spent during the switching process, and N sw stands for the number of switches during a time period τ .
In order to reduce the transmission latency, each vehicle will always be assigned to the closest active RSU. Also, in order to minimize energy consumption, the algorithm decides which RSUs have to be activated or set in stand-by mode at each period. From the vehicle perspective, the selection of the RSU can be modeled through a proper cost function, aiming at considering the behavior of each link by focusing on distance. From the RSUs perspective, the operation of a RSU is driven by its energy consumption, while aiming at servicing all the vehicles in the area and switching on only the needed RSUs. Hence, while the distance parameter drives the link capacity, where a higher distance corresponds to a lower link capacity, the energy parameter refers to the amount of energy consumed in order to keep both the link and the RSU operative.
However, the RSU management problem cannot be modeled with a static assignment of RSUs and vehicles, due to the mobility of the latter. Thus, in order to take into account the dynamism of the system we divide the entire area A into J geographical subareas, named cells, where the jth cell is identified as C j , and A = ∪ j C j . Within each cell, multiple vehicles are located at a given time t, where: is the set of vehicles within the jth cell at time t. In order to map the overall requests of the vehicles within a cell, we introduce a demand factor, d t j , which corresponds to the demand of the vehicles within the jth cell at time t. The demand can be considered as an overall factor mapping together the requested data-rate, the amount of services, and the connection quality. The higher the demand, the more resources should be reserved to the vehicle by a certain RSU. We consider to have a random demand in each cell, whose value is changing in time. Henceforth, the system must be re-optimized taking in consideration the vehicle mobility.
With this in mind, an assignment cost, based on the distance between a cell and a RSU, is taken into consideration, 1 P active i is a value that is supposed to include all the transmission, reception and processing power cost of a given RSU. VOLUME 4, 2016 together with the demand of the cell itself. The total demand in a cell is the sum of all the individual demands of the vehicles currently located in that cell. Since the vehicles are continuously in motion, the demand in each cell varies over time. Considering an initial setting of demands, the goal is to determine which is the lowest-cost configuration of RSUs, i.e., which RSUs need to remain operative in order to minimize the sum of energy and delay costs.

B. PROBLEM FORMULATION
In the problem under study, we consider a dynamic evolution of the vehicular traffic over time. In particular, we are interested in taking into account changes in the vehicles' location, which might affect the aggregated demand associated with each cell.
We consider in the following that the time is organized in slots. Hence, t ∈ N represents the index of the time slot starting at t · τ , and having duration τ , while T = {0, . . . , t, . . . , T − 1} is the whole time-span of the scenario under consideration. The problem is formulated so that the solving methodology is applied to multiple periods, i.e., to multiple slots having length τ .
Let us define the maximum amount of energy that can be consumed by the ith RSU as corresponding to the energy in the operational mode (with respect to the stand-by mode) in eq. (2), plus the energy for switching on the RSU in eq. (3). We can introduce a parameter, λ t i , defining a weight factor mapping the RSU i state at time slot t, and depending on its mode (i.e., switchedon or in stand-by) in the previous time slot, i.e., t−1. If the ith RSU was in stand-by state at t − 1, the cost at t is considered equal to λ t i r i , with λ t i = 1. Otherwise, only a partial cost λ t i r i (i.e., a maintenance cost) is paid, where 0 < λ i < 1. By this definition of λ t i , we are able to map a higher cost for switching on the RSU rather than maintaining it operative. We can set a decision vector Y t , whose ith element is the variable y t i . This element is associated with the selection of a certain RSU i at time slot t, defined as: Then, it is possible to define the overall cost related to the activation of the RSUs in any time period: The cost in (5) is related to a fixed cost to be paid for either keeping operative or activating the RSUs. It has to be noticed that the number of switches is indirectly considered through the sum performed over all the RSUs. If not active, a RSU can be switched ON; hence, the overall number of switches corresponds to the sum of all the RSUs that are switched ON.
We assume that the time slot is the minimum amount of time between two consecutive switches. Also, in order to take into account the load to be managed by each RSU -in terms of vehicles-an additional cost term should be introduced. It will consider the distance between the RSUs and the cells, thus modeling the link availability and quality between RSUs and vehicles. Notice that this value is fixed over time, while the vehicles and their related demand will be changing within each cell.
Let us consider a cost matrix C, where a generic element c ij stands for the cost between RSU i and a cell j in terms of distance, so that c ij ∝ d ij , where d ij is the distance between the ith RSU and the jth cell (i.e., the higher the distance, the higher the cost).
Since each cell represents the geographical subarea in which the vehicles are positioned, we have to map the vehicle density and their communication needs for each cell. In order to do this, we introduce a demand vector, identified as D, which indicates the aggregated demand per cell 2 . To be more specific, in order to consider the dynamic behavior of the system we identify with D (t) the demand vector at time slot t. The elements of this vector, d t j , represent the demand of a cell j at time slot t. The higher the number of vehicles in that cell, the higher the associated demand. The total demand of a cell j within the time slot t is the sum of the individual demands of the vehicles in that cell, i.e.: whered t m is the individual demand of the mth vehicle at time slot t.
Let us introduce now a decision matrix X t , where the (i, j)-th element is the variable x t ij standing for the connection between the ith RSU and the jth cell in the time slot t: This corresponds to the possibility of connecting all vehicles in the set V C j (t) (i.e., belonging to the jth cell at time slot t) with the ith RSU. Therefore, for a given time slot t ∈ T , we can define our problem as: subject to the following constraints:

C1 :
Cj ∈A where: correspond to the values minimizing the cost function in (7) for having minimized both RSU activation and cell to RSU allocation. As previously introduced, the cost term c ij is used for modeling the cost between a group of vehicles in a given C j and the RSU i . The cost can be considered as proportional to the distance (i.e., considering the Shannon law as a reference, higher is the distance, lower is the data-rate, hence, higher is the cost for that link). Since the cost is associated with the connection between one cell and one RSU we have to multiply it with the number of vehicles, i.e., the demand, in that cell for taking into account the potential numerosity of vehicles in that cell. • C1 in (8) ensures that, inside each period, a cell j can be associated with only one RSU i; • C2 in (9) guarantees that, if there is a link between a cell j and an RSU i, then the RSU is operative; • C3 in (10) indicates that the two decision variables are binary • C4 in (11) stands that r i , c ij , d t j are integer variables. The minimization in (7) is performed at each time slot. The aggregated effect contributes to the minimization of the whole time scale on which it is evaluated.

C. DEMANDS FORMULATION
The higher the number of vehicles in a cell, the higher the weight of a connection between that cell and the closest RSU will be. We model such condition through the demand D, representing the amount of connections required by all vehicles in that cell. However, the urban environment is dynamic. Hence, the demand varies over time, introducing the necessity of a fast heuristic algorithm that can easily adapt the RSUs configuration over time. The second member of the objective function in (7) takes into account the demands vector D associated with the cells of the system. At the beginning of every time interval, the demand is supposed to change with a probabilistic pattern, modeling the overall vehicles behavior within an urban area. More details on how this occurs are provided next.

1) The Mobility Model
With the purpose of modeling the movement of vehicles inside a city, we considered a graph representation of the area, G = {E, V }, where the vertexes represent the cells, and the edges represents the demand shift among adjacent cells (i.e., the mobility model of the vehicles). We also took into account the following hypotheses: • the demand vector has the same cardinality as the number of cells in the topology; • demands can shift only among adjacent cells, including the perimeter of the region being considered; • the total demand is constant over time, meaning that when part of the demand leaves the system (i.e., crosses the perimeter), an identical quantity of demand enters from the opposite border, i.e.: Cj ∈A where ∥D∥ 1 corresponds to the sum of all the demands in all the cells, assumed to be constant during the whole time scale 3 . In particular we assume that starting from a certain number of vehicles at time slot t only a portion of them can move to one of the adjacent cells. Therefore, the model assumes that some of the road users can be fixed or slowly moving, i.e., parked cars, vulnerable road users. The vehicle selected at the previous step can potentially move to another cell; among them only a portion really moves, modeling the fact that for some reasons a vehicle can decide to stop. Finally, among those vehicles selected to move a portion is supposed to go towards the usual destination (e.g., downtown) while the remaining go back for other reasons. We think this model, based on three probabilistic parameters, allows us to efficiently map the behavior in an urban scenario.
Although our methodology can be applied in any other scenario, in the computational experiments we will assume the existence of a high-density area, namely downtown area, which attracts vehicles (i.e., demands) in certain periods of the day (e.g., business hours) and from which vehicles departure in other periods, e.g., once most business close. Let us define the cell identifying the downtown area as C DT , having coordinates (x DT , y DT ).
Algorithm 1 presents the mobility model. Given a certain number of demands, i.e., vehicles, at time slot t, (line 1), by focusing on the jth cell (line 3) we assume that only a portion of them, ξ t j ∈ [0, 1], can move to one of the adjacent cell (line 4). Hence, the vehicles that can potentially move towards adjacent cells from the jth cell at time t correspond to ⌈ξ t j · d t j ⌉, where the ceiling is considered in order to have always an integer number of potential moving vehicles different from 0. Therefore, the model assumes that some of the road users can be fixed or slowly moving, i.e., parked cars, vulnerable road users, while others can move to a different cell. The selected ⌈ξ t j · d t j ⌉ demands are assumed to move with a given probability, that we set to be equal to χ t j ∈ (0, 1] (line 5). In other words, we assume that ⌈ξ t j · d t j ⌉ vehicles move with probability χ t j , while they remain in the same cell with probability (1 − χ t j ). As explained before, in our computational experiments we assume the existence of an attracting cell, named downtown area (line 2). At certain hours of the day, vehicles will move towards that area. In order to properly model this feature, we assume that α t j is the probability that the selected vehicles move towards the downtown cell when in jth cell at time t, while (1 − α t j ) is the probability that they move in the opposite direction (line 6) 4 . Based on two random values (lines 7-8), the demands for each cell are shifted following the shifting probability and the probability to move towards the destination area. In particular, based on the comparison between a random variable and the probability to move towards the downtown area, one of the two functions SHIFTTOWARD() and SHIFTFARTHER() are executed (lines 9-17).
Algorithm 1 Pseudo-algorithm of the Mobility Model 1: D (t) is a list of demands at time t 2: C DT is the destination cell 3: Cj is the j-th cell 4: ξ t j ∈ [0, 1] is the quantity of demand that shifts across adjacent cells 5: χ t j ∈ (0, 1] is the probability that the quantity of demand shifts 6: α t j ∈ (0, 1] is the probability that vehicles move toward the destination area 7: randShif t is a random number between (0, 1] 8: randAlpha is a random number between (0, 1] 9: for all d t j ∈ D (t) do 10: if randShif t ≤ χ t j then

17: end for
In Algorithms 2 and 3 the SHIFTTOWARD() and SHIFTFARTHER() functions are detailed. We assume that C ψ is a cell located closer to the destination area than C j , while C ω is a more distant cell. Hence, in SHIFTTOWARD() the demands at t + 1 are properly updated by increasing the quantity of demands of the closer-to-the-destination cell, and accordingly decreasing for the originating cell C j . Similarly, when SHIFTFARTHER() is executed the demands are increased at t + 1 for the more distant cell(s), and decreased for the originating cell.
Algorithm 2 Pseudocode of the SHIFTTOWARD function

2) A Numerical Example
In order to verify the effectiveness of the mobility model, we have carried out a numerical experiment using the parameters in Table 1, where the cells are organized as a 4 × 4 square. For simplicity, we assume that the parameters remain fixed throughout the whole numerical example for all the cells, while the demand changes following the mobility model previously discussed.
Let us assume that the initial demands in period t = 0 are given by the matrix: that is a more effective representation of the demands in the geographical area, organized in a matrix corresponding to their geographical mapping, in which the bold element represents the downtown area 5 . Based on this initial configuration and the aforementioned parameters setting in Table 1, a potential shifting during the next period is: Similarly, after successive shifting processes, a potential configuration at t = 19 is: Notice that the sum of all demands remains constant throughout the whole time span, while the downtown area, placed at (x DT , y DT ), ends up being the most populated.
To better understand the concept shown in a matrix form, Figure 3 displays a geographical heatmap of a neighborhood belonging to the city of Rome (Italy). The heatmap in Figure 3a represents the initial scenario, where all the demands are well distributed all over the considered area. As time evolves, the demands shift towards the downtown area. 5 We can hypothesize that demands in D and ∆ are mapped so that

IV. SOLVING METHODOLOGY
The problem addressed in this paper considers a time variability of the input demands, thus leading to a dynamic and challenging problem. Since the UFLP is NP-hard, the use of exact methods is not an efficient strategy to solve large-scale instances in short computing times. Moreover, our scenario requires a real-time approach for a practical implementation. Therefore, we propose a fast constructive heuristic to solve the UFLP applied to the dynamic scenario previously identified. This heuristic is latter enriched with biased-randomization techniques, and embedded into a multi-start framework [52].

A. CONSTRUCTIVE HEURISTIC
The heuristic we propose is based on the concept of switching off facilities according to a balance factor, called savings, which is used to guide the search for feasible solutions. The procedure is shown in Algorithm 4. The procedure considers the configuration of RSUs in the previous time slot, as well the demand for the new time slot, where sol t = [X t , Y t ] is the solution of the cost minimization problem in (7), i.e., the switched-on RSUs and the assignments of cells to RSUs. At the beginning of a time slot, the heuristic starts from a virtual scenario in which all the facilities are switched-on, which is hypothetical and highly expensive (line 2). The idea behind starting from this all-active configuration relies on the fact that switching off RSUs is computationally less expensive than activating them -this is because when a RSU is switched off, only the cells previously assigned to it have to be reallocated to another RSU. The cost of this scenario is then calculated and used later as a reference (line 3). First, the cost of each facility is updated based on their state in the previous time slot (i.e., if it was switched on, in stand-by, or remains in the on state, lines 4-11). The savings are then updated based on the COMPUTESAVINGSLIST() function (line 12), which is detailed in Algorithm 5. Based on the new savings value, the solution is updated. The process is repeated until all RSUs in the list have been checked (lines 13-19). The list of savings is sorted in descending order, and the RSU with the highest positive savings is selected to be switched off. Once a RSU is switched off, the affected cells are re-assigned to alternative RSUs, which implies a re-computation of the individual savings given the new allocation scenario. Once re-calculated, the savings list is re-sorted, and this process is repeated until the end of the sorted list. Considering that the sort function adopted in our algorithm is O(n log(n)), being n the number of elements in the savings list, we can assume that the worst-case bound for the running time is O(n) + O(n log(n)) = O(n log(n)).

21: end function
In Algorithm 5 the selection of the operative RSU is described by creating a savingsList. In case a RSU is switched-on (line 3), its savings is computed (line 4). If this savings is positive (line 5) the RSU is added to the savingsList (line 6). Since negative savings values imply VOLUME 4, 2016 a higher cost in allocation settings, they are discarded. The savings computation is performed for every operative RSU, as detailed in Algorithm 6: the cost of switching on / maintaining a RSU, plus the cost of assigning vehicles multiplied by their demand, minus their reallocation cost to alternative facilities multiplied by their demand.

2:
allocationCosti ← Sum of the demand weighted allocation cost for all the nodes assigned to RSUi

3:
reallocationCosti ← Sum of the demand weighted allocation cost of when nodes assigned to RSUi are assigned to their best-alternative RSU 4: The described heuristic is sequentially applied in each single period. Notice that the final status at each period (demands and RSU configuration) constitutes the inputs of the new optimization problem in the subsequent period. The heuristic algorithm considers as the most expensive scenario the one in which demands are scattered homogeneously across the whole topology: in this situation, the algorithm activates a large number of RSUs, which increases the total operation cost. On the contrary, a situation in which vehicles' demands are concentrated around a specific area allows the algorithm to put in stand-by status many RSUs in remote areas with a low demand. This way, the algorithm is able to automatically adjust the RSU configuration to the actual requirements in each period.

B. BIASED-RANDOMIZATION
The proposed heuristic is a deterministic procedure which will always switch off the RSU with the largest savings value. In order to incorporate a random behavior to guide the search and, hence, provide a balanced exploration of the solution space, a biased-randomized heuristic has been implemented [13]. By extending the deterministic heuristic into a probabilistic algorithm through biased-randomization techniques, the logic behind the original heuristic is respected [45]. In our case, a geometric probability distribution is employed to smooth the selection of elements from the savings list. Consequently, the RSUs to be switched off are selected from the savings list according to a specific probability. In the case of the geometric distribution, a single parameter β ∈ (0, 1) is considered. When β approaches to 1, the behavior is similar to the greedy one of the deterministic heuristic. On the contrary, when β takes values close to 0, the behavior is similar to that of a uniform randomization process. The notable results can be obtained for intermediate values of this parameter. Given this particularity, different solutions are generated as more iterations of the biasedrandomized algorithms are executed.
To exploit this particularity, this heuristic is embedded into a multi-start framework. Such a strategy relies on the generation of multiple solutions until a stop criterion is met. As a result, the best-found solution is returned at the end of this iterative process.
if cost(sol t+1 ) ≥ cost(sol t ) then return cost 4: end function One should notice that, in a real-life scenario, demands may be refreshed at each time interval. This can be achieved in different ways, e.g., (i) by exploiting an external database that is periodically queried; (ii) by using RSU sensing capabilities to estimate the demands in real-time; and (iii) by employing a predictive model that forecasts the new values. Herein, we assume that demands change following the mobility model introduced in Section III-C1.

C. BENCHMARKING APPROACHES
Apart from the proposed solution methodology, other static approaches have been also considered as benchmarks to test the effectiveness of our algorithm. To this aim, the following five approaches have been defined: 1) The single-open static approach: in this approach, a single RSU, usually one located at the downtown area, is always operative.

2)
The all-open static approach: in this approach, every RSU is switched-on at any time period. Hence, cells will always be assigned to their closest RSU (which will be always on). Of course, this approach offers a high cost, since all the RSUs are operative in every period.
3) The keep-the-first static approach: in this approach, the system will be optimized only once, in the first period. Thereafter, the first configuration of RSUs is kept for the rest of the periods, while the cost of this fixed configuration in each period is updated according to the new demands and the cost of keeping operative the selected RSUs. In principle, this approach will be less costly than the previous one. However, it does not adapt to variations in the vehicles' demands. 4) The partially-dynamic approach: as an enhancement of the previous approach, in this one, we re-optimize the system configuration after a series of k consecutive periods, with k > 1. In order to apply this approach in practice, it becomes necessary to provide a good balance between computational time and the quality of the recommended configuration. 5) The fully-dynamic approach: this approach is similar to the previous one, while k = 1. For achieving this, a multi-start strategy is needed in order to find a near-optimal configuration in each period and in real time. We can expect this approach to provide better results than the previous ones, although it requires a considerable effort in terms of quickly re-optimizing the system after periods that might span just a few minutes apart from each other.

V. NUMERICAL RESULTS
This section describes a series of computational experiments that, together with the analysis of the associated results, show the efficiency of the proposed approach.

A. EXPERIMENTAL SETUP
With the goal of testing the proposed approach, we have used the MED benchmark instances, which were originally introduced for the p-median problem [53]. The MED benchmark instances have been also employed in the UFLP context [54], being them largely studied thenceforth. Each instance is labeled with two numerical values, where the first identifies the amount of possible node locations, while the second is related to the cost for switching on each RSU. Despite not directly related with the IoV scenario, their usage has several advantages. First of all, MED instances are widely used in the UFLP evaluation, allowing us to compare our approach with the best-known / optimal values for the UFLP. Moreover, due to their generic definition, they can be used for testing different application scenarios including the previously described ones.
In the following, each instance will be identified as n-sw, where n is the number of location in that instance and sw is the switching-on cost scheme. Mapped to our problem, each location represents a potential RSU to be switched on. According to [53], we assume that the number of possible RSUs are 500, 1000, 1500, 2000, 2500, or 3000. We also assume that the switching cost scheme sw is equal to 10, 100, or 1000. Notice that the higher the switching-on cost scheme, the cheaper the switching-on of a RSU. Indeed, the switching cost of a generic ith RSU, can be related to the instances values n and sw through the rule [53]: where sw represents the switching-on cost scheme, and n is the number of RSUs in the system. For example, the instance VOLUME 4, 2016 500-10 considers that each RSU has a switching cost Since r i depends on both the opening cost and the switching cost, we assume that r i , as derived from the values n and sw, represents the cost expressed in milliJoule. In the case of the previous example, and considering that τ is equal to 10 seconds, we have that both energy terms are of the order of 10 J. In the following, we have considered that the scenario is composed by n RSUs, that the demand for each potential RSU location d t j is equal to 50 at t = 0, and that this demand is supposed to change following the mobility model introduced in Section III-C1. For the computational experiments, we have set ξ t j = 0.4, χ t j = 0.5, and α t j = 0.75, as indicated in Table 1. In addition to this, the λ t i value used for evaluating the maintenance cost in (5) has been set to 0.5 ∀t ∈ T . For the sake of clarity, the parameters used in the following experimental results, and previously introduced, are summarized in Table 2.

B. EXPERIMENTAL RESULTS
The computational environment employed for evaluating our approaches is an Intel Core i7-8550U processor with 16 GB of RAM. The goal of our experiment is twofold. On the one hand we want to verify the effectiveness of the proposed saving-based heuristic in terms of computational speed. This is of primary importance since the solution method has to work in a highly dynamic scenario, hence a real-time algorithm is necessary. On the other hand we want to verify the performance of the proposed solution in terms of cost reduction. Moreover, since the cost is composed of two terms, one modeling the data-rate and the other the energy consumption, both are verified separately for understanding their impact on the considered solution.
The first set of computational experiments relies on measuring the performance of our deterministic approaches when incorporating the demands shifting model into the problem. As introduced in Section IV, the savings-based procedure has been tested in different benchmarking approaches. Since the single-operative and all-operative static approaches consider a single operative RSU and all the RSUs operative over time, respectively, they do not include the savings-based heuristic as a guide. Table 3 shows the computational results for the five different approaches. At this stage, the planning horizon is set to 20 periods, i.e., T = 20. For each test instance and approach, we can see: the average objective function value (OF) of all periods, the average number of operative RSUs (|R|) across all periods, and the average computational time required to generate the results, in seconds. The average OF cost were divided by 1e6 in order to provide easier-to-read results. The gap columns present the comparative performance of the different scenarios according to their respective average OF values.
In Table 3, we consider the keep-the-first approach as the naive approach against which other scenarios are compared. In this approach, the system is optimized at the beginning of the planning horizon, and the resulting configuration of operative RSUs and assigned vehicles is kept for the remaining periods. Due to the high variability of the switching-on cost, given by each scheme, it is convenient to analyze the results accordingly.
When activating RSUs is an expensive operation (i.e., instances with the suffix -10), the all-on approach has a higher cost than the keep-the-first approach -see column gap (3)-(2), where it is noticeable that the cost is increased up to 142.3% for the all-on approach. By activating all the RSUs in the system, the assignment cost becomes null, since each node is assigned to itself. However, there are still demands to be supplied, which generates additional variable costs into the system. Since the activation cost is too large in this scenario, the higher the difference between the number of operative RSUs, the higher the gap among the respective instances will be (e.g., in instance 3000 − 10 the activated RSUs are 329 out of 3000, i.e., around 11% of the total). By analyzing the performance of both dynamic approaches against the keepthe-first approach, it is clear that both of them outperform this naive approach, being the fully-dynamic approach the one offering a better overall performance. This behavior is expected, since the system is re-optimized in each period. It is worth to be noticed that the fully-dynamic approach with respect to the static keep-the-first approach allows a gain up to 11% in terms of overall cost, while the active RSUs remain of a similar amount. It has to be noticed that despite the number of activated RSUs is the same in average, in case of dynamic approaches they are selected on a period-by-period basis.
Another extreme scenario is the one in which the activation cost of RSUs is cheap (i.e., instances with the suffix -1000). In this case, there are no significant differences among the approaches, since the number of open RSUs exceeds 95% of all facilities in all cases. Hence, the main differences among the cost of these approaches rely on how the assignment of nodes is set -specially those which are not activated as RSUs. Particularly, the keep-the-first performs slightly better than the all-on approach, since a fraction of the fixed cost can be saved for not opening a few RSUs -and, then, the assignment of those RSUs that are not activated does not imply expensive variable costs; in this case a moderate gain around 3% can be  achieved. Regarding the dynamic approaches, they present similar performance, since the majority of their RSUs are operative, which generates minimal differences in their variable costs.
The last scenario refers to the case in which the activation cost is moderate (i.e., the instances with the suffix -100). Unlike previous scenarios, the all-on approach presents better performance, on average, than the keep-the-first approach. Since the cost of activating a RSU is not too expensive, a large number of RSUs is frequently deployed. However, there are some cases in which the difference between the number of potential RSUs to be activated and the number of already operative RSUs is reasonably large (e.g., instances 2000−, 2500−, and 3000 − 100). In these cases, the cost is mainly generated by the many assignments, implying higher variable costs. Therefore, for this cost scheme, the magnitude of both the activation and assignment costs results in better performance for the all-on approach against the keep-thefirst. Nevertheless, when analyzing the performance of the dynamic approaches, both of them present a better average performance than the remaining approaches, showing a gain of 8.1% in the 2500-100 scenario. Now, considering the complete benchmark instancesfrom the different activation schemes-we can assert, from column gap (3)-(1) to gap (3)- (5), that the fully-dynamic approach shows overall the best performance. Since this approach re-optimizes the solution in every period, it is expected to be more efficient. However, it is noticeable how its efficiency worsens as the activation cost of RSUs decreases. Regarding computational times, the time required by the fully-dynamic approach is still low, being only 0.8 seconds slower than the keep-the-first approach. When comparing our two dynamic approaches, in column gap (4)-(5), the fully-dynamic approach outperforms the partially-dynamic in 0.5%, on average. However, it requires 0.4 additional seconds to obtain these results. It is also to be noticed that the results are achieved by reducing the number of switched-on RSUs, that in some cases are just a fraction of around 15% of the overall number of RSUs deployed in the system. Figure 5 presents, for all solving approaches, a box-plot of the corresponding results. The single-on approach is not included due to its numerical scale being too high. As we can notice, the all-on approach is clearly inefficient, mainly when the activation cost of RSUs is expensive. Moreover, we can notice that both the fully and partially-dynamic approaches are able to generate better results than the keep-the-first. Therefore, for this set of benchmark instances, the fullydynamic is considered the best approach to cope with the MPIoVP, since it is able to generate better results on the average.
For the problem instance composed of 500 RSUs, Figure 6 presents the convergence of the OF value over the periods.  Similarly to what we did in Table 3, the comparisons are performed by considering the keep-the-first as the reference approach.
As we can see in Figure 6a -which represents the results obtained for the expensive activation scenario-, the fullydynamic approach does not only provide better overall performance, but it is also able to generate better configurations for all the periods over time, achieving up to 17% of improvement in periods 18 and 20. Similarly, when comparing the partially-dynamic with the keep-the-first approaches, the same behavior is noticed, with up to 16% of improvement in periods 18 and 20. These conclusions support the efficiency of the dynamic strategies when demands vary over time. In addition, by analyzing Figure 6c one can conclude that, for the cheapest activation scenario, the performance of some approaches does not present any significant difference, since almost all the RSUs are deployed in any case. Notice, however, that the fully-dynamic approach presents a better performance again, mainly in the last period of the planning horizon. Finally, when analyzing the results under moderate activation cost (Figure 6b), one can observe that the dynamic strategies are able to properly react to the system changes, according to the demands shift.
In Figures 7 and 8, the solution costs over the periods are depicted in terms of energy consumption and transmission costs, respectively. As for the previous figures, the single-on approach is not included due to its high numerical scale. In our case, the energy consumption relates to the fixed costs, since it refers to the activation and deactivation of RSUs. Similarly, the transmission costs refer to the variable costs, representing the connection of vehicles to active RSUs.
The following analysis aims at measuring the efficiency of the proposed approaches in terms of energy consumption costs. For the first scenario (Figure 7a), when the activation of RSUs has a higher cost, the all-open approach is certainly the less efficient approach -since all the RSUs are kept activated over time. Besides, it is noticed that its fixed cost is reduced from the first period on, since only the cost for keeping them active is incurred -rather than the activation cost-when they are previously activated. The same reduction cost is noticed for the remaining strategies. Regarding the dynamic approaches, both of them present a similar pattern. In terms of fixed cost, the keep-the-first presents the best performance in this scenario. However, the transmission costs incurred by this configuration result in a less efficient approach, considering the complete panorama. For the remaining opening cost schemes (Figures 7b and 7b), the methodologies result into very similar fixed costs solutions. However, the dynamic approaches offer a better performance, in general. This is particularly the case for the moderate opening schema (Figure 7b).
Regarding the transmission costs, in the case of the expensive activation cost of RSUs (Figure 8a), one can notice how the dynamic approaches are capable to adapt to changes in demands. Despite being the cheaper approach in transmission costs -since all the RSUs are constantly activated-, the allopen approach is the more expensive approach in fixed costs. The keep-the-first approach presents, in the first periods, a performance which is similar to the one associated with the dynamic strategies. However, its transmission costs are continuously degraded, since this static approach does not adapt to the system changes by adjusting the decisions on the placement of RSUs made during the first period -when the demands are well distributed over the city. On the other hand, the transmission costs for both partiallyand fully-dynamic approaches present similar convergence behavior, showing the fully-dynamic a better performance than the partially-    dynamic over time, in general.
In the case of the moderate activation cost of RSUs (Figure 8b), the all-open and keep-the-first approaches present the best performance. However, the costs for all strategies are of similar magnitude. Also, when considering energy consumption costs under the same scenario, the dynamic strategies overcome the other strategies. In this way, the fixed counterpart of the solution costs pays-off the variable ones. Finally, when the opening cost is cheap (Figure 8c), transmission costs are approximately the same for all approaches. This is due to the fact that, for each approach, the majority of available RSUs are activated.
By analyzing both the fixed and variable costs separately, it is noticeable how conflicting they are, especially for the    cheapest activation cost scenario, where the proposed approaches present the opposite behavior. In this case, for instance, while the all-open is the best approach regarding the variable costs -since all the RSUs are activated and, therefore, transmission costs are low-, the same approach requires the largest amount of fixed costs. Hence, the selection of the best approach is based on the analysis provided for Figure 6.

VI. CONCLUSIONS AND FUTURE RESEARCH
In the context of smart cities, this paper has analyzed the RSU activation problem in IoV scenarios when a dynamic behavior is considered. The goal was to optimize the configuration of the RSUs in each period, as a response to the time-evolving vehicles' communication needs. The underlying optimization problem has been modeled as a rich version of the UFLP, in which both RSUs activation (i.e., energy consumption) costs and transmission costs (between the RSUs and the vehicles) are considered. Since this is an NP-hard and large-scale problem for which new solutions need to be re-computed in real-time, the paper proposes the use of a fast optimization algorithm. This algorithm makes use of an efficient heuristic, which is then extended to a biased-randomized algorithm and, finally, embedded into a multi-start framework. This allows us to generate multiple high-quality solutions in just a few seconds. A series of numerical experiments are carried out to illustrate the benefits of the proposed algorithm. Our approach, which is dynamic, outperforms other more static approaches. The obtained results show how noticeable reductions in cost can be obtained by adopting a biasedrandomized multi-start methodology as the one presented here. The proposed algorithm is fast and easily parallelizable. In addition, it only requires the fine-tuning of one single parameter.
Future works include extending the proposed solution method into an agile optimization strategy. The idea behind agile optimization techniques refers to the parallelization of biased-randomized algorithms. When embedded into a parallel framework, several solutions -with different characteristics-can be generated in the same wall-clock time as the one required by the original algorithm. Therefore, the best-found solution is returned.