A Lagrangian Relaxation Method for an Online Decentralized Assignment of Electric Vehicles to Charging Stations

This article addresses the issue of assigning electric vehicles to charging stations, minimizing the maximum completion time. It envisions the interaction between electric vehicles and the charging infrastructure to match supply and demand in a decentralized and collaborative fashion. For this reason, the assignment issue is regarded as a linear integer programming problem and a Lagrangian relaxation heuristic is proposed to solve it. Thus, each electric vehicle selects the charging station and the most convenient path to minimize its own completion time. The completion time of each electric vehicle is composed of the travel time (TT), the waiting time (WT) at the station, and the charging time. The Lagrangian relaxation heuristic results are more effective compared to other local heuristic procedures performances and demonstrate a fair allocation of the electric vehicles to the charging stations. The analysis of the time components of the solution on a real urban network highlights that the TT is negligible with respect to the WT and charging time, that are comparable. Therefore, a reservation policy is also considered.


I. INTRODUCTION
N OWADAYS, the road transport system is still dominated by traditional vehicles and pollution has become a major issue: 73% of all oil consumed in Europe is used in transportation and road transport accounts for 25% of CO 2 emissions of the overall transportation activities. Although smart decisionmaking systems have been proposed to properly dispatch traffic to reduce the level of pollution [1], [2], there is still room for improvement.
A major shift is represented by electric vehicles, which have been proved to be eco-friendly. Even if electric vehicles are already popular in many countries [3], some technological barriers limit their usage. The major issues are related Manuscript  with battery recharge that may result in vehicles congestion at charging stations. On the one hand, the network of recharging stations is limited; on the other hand, even super-fast chargers spend a significant amount of time compared to the refueling of traditional vehicles. Although the customers can top up their battery at any level of charge [4], a complete recharging at slow rate (3.5 kW) can last between 4 and 30 h depending on the battery capacity of the vehicle. A faster dc charge typically takes less than 1 h for a full recharge [5]. The main drawback related to faster dc charger is the degradation of the batteries, since the number of charge cycles is reduced. Therefore, this recharging technique is generally avoided, due to the large cost of the battery. The battery swapping (i.e., the replacement of an exhausted battery with a fully charged new one) takes only 5 min [6]. However, there are several concerns related to battery swapping. The main one is the cost of the necessary infrastructure [7]. Moreover, swapping raises additional issues regarding battery design and compatibility, battery degradation, and ownership. Several solutions have been proposed in the literature to cope with these issues. In [8], [9], and [10] the problem of the deployment of the charging network is addressed. In [11], the problem of vehicle-to-grid charging is addressed by considering cost-aware solutions; in [12], the vehicle-to-vehicle energy trading is addressed and the eco-g is considered. These solutions are promising, but cannot be viable in short-time, since they foresee the exploitation of smart grid technologies that are either not mature or not always available. Another way to cope with the recharging time problem is represented by the possibility of casting it into optimization problems. To this aim, the optimization of the time to reach the charging station (routing problem), the optimization of the scheduling of the charging stations tasks (scheduling problem), and a combination of them are considered. It is worth noticing that the routing of electric vehicle in a real network considering all the technological constraints and the scheduling of charging tasks is complex and can be regarded to NP-hard problems. Therefore, the solution proposed in the literature is mostly represented by heuristics.
The method proposed in this article provides an online decentralized assignment of the electric vehicles to the charging stations. The scope is reached by optimizing the routing of each electric vehicle in terms of energy efficiency and time consuming. Consequently, due to the online nature of the problem, the assignment and the routing of each electric vehicle to a station result in a schedule for each charging station.
With this objective, we develop a navigation system able to compute which station should be visited by the electric vehicle and when and how it should be reached also taking into account traffic conditions. The envisioned navigation system foresees the interaction between the network of charging stations and electric vehicles. The network of charging stations provides the vehicle with the waiting time (WT) and availability of resources. By providing this information, each vehicle is able to properly select the charging station and to compute the route to reach the station. This decision is delivered by the electric vehicle to update the network. Moreover, this decision results in a dynamic vehicles assignment to charging stations. It is worth noticing that we consider an eco-routing. The computation of the route takes into account dynamic traffic congestion (according to both real-time and historical data) and autorecharging mechanisms, such as availability of vehicular energy networks [13] or the presence of suitable slopes on the path. Indeed, the electric vehicles engines can switch in generators while going downhill or while braking significantly increasing the battery level [14] and producing energy that can be stored and used later.
To further reduce the congestion at the charging station, a reservation policy for the electric vehicles is also introduced. In more details, the main contributions of this article with respect to the state of the art are the following. 1) We formalize the problem of assigning electric vehicles to charging stations as a linear integer programming. In the system model, we consider some parameters tightly related to electric vehicles, such as the state of the charge, the final desired recharge level, the autorecharge along the path, and the WT at the charging station. 2) We envision an assignment system based on Lagrangian relaxation. It matches the requirements of the electric vehicles and the availability of the charging stations in a decentralized and collaborative fashion by minimizing the maximum completion time of the charging stations. As a side effect, the proposed solution is able to balance the charging stations load, thus reducing the overall WT. 3) We solve an online problem. At each time instant, we collect information about the electric vehicles entering the system that request to be recharged in that instant. Moreover, the information exchanged between each vehicle and the stations is the one known at the requesting time and therefore before the requesting vehicle is assigned to the station. Once the assignment problem is solved using the Lagrangian decomposition, all the problem parameters and variables are updated. The assignment step and the following updating operations are repeated each time a new set of requesting vehicles enter the system. 4) We test the proposed approach against data from a real complex urban network using historical information about traffic congestion to simulate a time-dependent traffic network. To prove the effectiveness of the proposed method, we compare it to several centralized heuristics proposed in the literature.
This article is organized as follows: in Section II the literature is reviewed, in Section III, the problem is formally set; in Section IV, the solution method is detailed; and in Section V, the Lagrangian decomposition approach is presented. Section VI is devoted to introducing the compared assignment heuristics; Section VII reports the numerical results of the simulation; finally, in Section VIII, some conclusions are drawn.

II. RELATED WORKS
As previously stated, the proposed solution envisages an online decentralized assignment of a set of electric vehicles (from now on EVs or EV) to charging stations.
The goal is reached by optimizing the routing of each EV in terms of energy efficiency and time consumption. Consequently, due to the online nature of the problem, the routing and the assignment of each EV to a station result in a schedule for each charging station. To this aim, we consider appropriate to report the scientific literature about routing optimization of EVs and scheduling optimization of charging stations.
Many research efforts concerning the routing problem are focused on energy optimization and/or time efficiency. It is worth noticing that the routing problems by itself is complex, therefore most of the solutions proposed in the literature consider either energy-optimized or time-efficient routing. Moreover, the majority of the authors proposes heuristic methods, such as [15], where an algorithm based on ant colony is proposed or in [16], where a particle swarm optimization is adopted. A complex vehicle routing problem performed by a fleet of hybrid vehicles is described in [17]. The proposed solution combines a genetic algorithm with both local and large neighborhood search. In [18], a genetic algorithm is used to optimize the routing of shared EVs to minimize the user time and rental costs. In [19], the problem of routing EVs to minimize both energy consumption and total travel time (TT) is addressed. The problem is modeled using a graph representation and a multiobjective heuristic algorithm is proposed. In [12], a navigation system that actively interacts with the charging station is also considered; however, it assumes that all the vehicles are fully recharged and the recharging time is the same, despite of the initial level of charge and the type of batteries. It does not consider the possibility of reserving a recharging slot. The routing problem is also cast into programming problem. An integer programming formulation is adopted in [20]. Algorithms based on the graph theory are proposed to solve the problem of energy-efficient routing by considering both technological constraints and user preferences. In [21], a dynamic programming approach is adopted to route EVs through deterministic and stochastic networks. Although some of the proposed solutions consider a tradeoff between energy-efficient and time-efficient routing, the major concern of these approaches is related to the assumptions made on the road network. Specifically, the road models adopted in most of the literature assume that the EVs always travel on flat surfaces, which is not realistic. Indeed, both energy consumption and time requirement are different when traveling up or downhill. An energy-efficient routing has to take into account this issue and select the path consuming the least amount of energy, i.e., an eco-routing.
The vehicles assignment to charging problem is addressed as optimal problem and several route guidance and information systems are currently available on the market. The assignment problem has been extensively addressed by Clemente et al. [9], where a solution method to reduce the overall WT at the charging station, cost, distance, and a penalty for incomplete recharging has been presented.
To the best of our knowledge, an interesting paper on scheduling problem at charging station is [22]. However, the most promising papers consider both routing and scheduling optimization problems. The scheduling problems addressed regard either the EVs or the charging stations operations.
The problem of routing EVs and scheduling the operations at the charging station is addressed in [23] and [24], where mixed-integer programming is exploited to minimize the EVs TT and the charging costs.
A centralized approach to solve routing and scheduling problems is adopted in [25] and [26]. The proposed algorithm requests a huge amount of data exchange between the central coordinator and the EVs (e.g., the source and the destination, the initial charge level, the selected route). This approach results heavy with regard to the information management and raises privacy concerns.
To reduce the complexity of the problems, many authors decompose the problem: in this way the routing and scheduling problems are split into more tractable problems. In [27] the pick-up and delivery problem performed by a EVs fleet is addressed. The problem minimizes both costs (i.e., charging costs and usage fees) and times (i.e., charging time and TT). The problem is formulated by means of mixed-integer programming and decomposed into several linear programming problems.
A different way to reduce the complexity of routing and scheduling problem consists in solving them separately, as serial steps. In [28], a routing problem with a concurrent request of the charging stations by a fleet of EVs is addressed. The authors provide a nonlinear model and then introduce a two-stage solution methodology by separating routing and scheduling issues.
In [29], a routing optimization problem combined with a scheduling charging problem in a urban network is analyzed. The authors propose a mixed-integer nonlinear programming and an approximate distributed algorithm to minimize the energy charging cost and the EVs TT.
In this article, we consider the problem of assigning EVs to charging stations. Unlike the approaches in the literature, we propose an online decentralized solution able to optimize the assignment of the EVs to the charging stations and, at the same time, able to find an eco-routing for the EVs. Since the assignment results in a schedule for each charging station, we solve routing and scheduling problems in a parallel fashion. Moreover, the online solution is able to cope with different release date, i.e., the EVs can enter in the system and ask for service at any time.

III. PROBLEM DESCRIPTION
In this section, we report a detailed description of the system model and a formal definition of the urban network. Furthermore, we provide a linear integer formulation of the problem. The list of the symbols used in the notation is reported in Table I.
We consider the scenario where a small number of charging stations is available for a large number of EVs. The addressed problem is to assign the EVs to the charging stations to reduce congestion on the road and queue at the charging stations. For this reason a smart navigation system is envisioned. It is able to compute which station can be visited by the EV and when and how it can be reached by taking into account traffic congestion.

A. System Model
To tackle this problem, we model the urban road network U as a directed graph U = (V, A). Each edge a ∈ A represents a urban street, while the vertices v ∈ V the cross points. Since the graph is directed, also the direction of travel is considered. Each edge a ∈ A is labeled with three parameters.
1) The edge length d a (i.e., the geographical distance between the vertices connected by a).
2) The edge TT tt a (i.e., the time needed to travel the edge in a time instant, depending on the traffic conditions).
3) The edge energy consumption ec a (i.e., the energy used to travel on the edge, depending on the traffic conditions and slopes). Concerning the edge energy consumption ec a , it is worth noticing that it can be either positive or negative, since it represents the energy lost (consumption) or gained (auto recharge) by an electric vehicle when traveling along the edge a.
Let us consider the set S of the charging stations, having S = n. Each charging station s is placed in a vertex of the network U. It is characterized by its position (i.e., the position of the associated cross points in the network U, v s ∈ V) and its WT w s (i.e., the WT in line before the charging operation starts) and its unit rate R e,s to charge the EV e.
Each e ∈ E has the following attributes: the starting position v e (i.e., the position of the associated cross points in the network U), the starting battery charge level L e , the final desired recharge level F e , and the release time r e (i.e, the time e starts the travel to s). Each s ∈ S can be reached by each e ∈ E traveling along different paths, that can be modeled as ordered sequences of edges of the network. It is worth noticing that, in a given time slice δ, for each e, only a subset of the paths between v e and v s are feasible. The set of the feasible paths from v e to v s in the time slice δ is denoted as P(e, s) δ . To slimline the notation we refer to P(e, s) δ as P(e, s). A path p e,s belongs to P(e, s) if: 1) it starts in v e and ends in v s and 2) e has enough starting charge level to reach s traveling along p e,s . Accordingly, a path is feasible in relation to the release date r e of e, that is depending on the traffic condition in a specific time slice. The traffic congestion and the time an EV leaves its position impact the total TT and the autorecharge during the path. As a consequence, the selection of a path p e,s effects both the time to reach the station and the time to charge. Concerning an EV e, a charging station s, and a path p e,s , the following parameters are considered: the consumption of energy where the charging time can be computed as follows: The completion time C p e,s depends on the departure time, the TT along the path p e,s , the time spent in the queue at the charging station s, and the charging time. The charging time depends on the starting and final levels of charge (L e and F e ), the consumption and the autorecharge of energy to reach the station traveling along path p e,s (c p e and a p e ) and the unit rate R e,s of station s to charge e. Notice that the value of C p e,s is a lower bound, since the current requesting vehicles charging times are not included in the value of w s . Further details about this approximation are given in Section V.

B. Problem Formulation
The problem of selecting a charging station by an EV can be regarded as an assignment problem. Therefore, it can be modeled as a linear integer programming problem that we denote by P. According to this approach, the decision variables are Hence, problem P can be formulated as reported below, where the maximum completion time C max is minimized and the constraints are expressed by min C max Subject to: Specifically, the set of (3a) bounds the charge completion time of each station to the maximum completion time; the set (3b) imposes that each EV is recharged only by one station; the set (3c) limits the energy consumption from v e to v s to the starting charge of e; finally, the sets of (3d) and (3e) define the variables domain.

IV. METHODOLOGY
The proposed method is sketched in Fig. 1. The solution of the problem P is achieved by applying a divide and conquer strategy. A preprocessing phase is devoted to precompute all The preprocessing phase takes the urban network U, the set of vehicles E and the set of charging stations S and computes the set of paths for each e toward each reachable station. The urban network U is time-dependent, that is the TT of each edge can change with respect to the time slices, depending on the traffic conditions. Hence, all the values of the problem which depend on the path are consequently time dependent. It is worth noticing that to reduce the computational load, for each pair (e, s), a subnetwork U e,s is considered. The subnetwork U e,s covers only a limited area that involves the origin v e of the paths and its destination v s . As a consequence, the system does not compute all the possible paths among e and s, but only a subset containing the most convenient ones in terms of distance. Once the paths in P e,s are defined, it is possible to compute the power consumption p e,s and the TT t p e,s . The former can also be negative since it considers the autorecharge of the EV due to the slopes along the path. The latter depends also on the EV release date and on the traffic congestion in the network.
We addressed the selection of the subnetwork and the computation of P e,s in [30]. One of the main novelty of the proposed approach consists in solving the assignment problem in a decentralized way. Information output by the preprocessing routing phase is exploited by the EV decision module that runs on the navigation system of the vehicle. It selects the station in order to minimize its own completion time. This result is achieved by solving the problem P in a decentralized fashion. A Lagrangian relaxation is derived from the problem P, so it can be decomposed into m subproblems, that can be solved by each EV decision module. The decomposition approach based on the Lagrangian Relaxation was adopted by several researchers [31], [32], [33] to solve complex assignment problems and to make them easier to address. Each vehicle interacts with each charging station to compute the solution of its own subproblem. Specifically, each charging station s provides e with the WT w s and the Lagrangian multiplier λ that indicates the load level. The EV solves the subproblem and selects the charging station. Each EV computes its estimated completion time C p e,s as specified in (1) and communicates it to the selected charging station.
It is useful to spend a few words to break down what type of information is associated with w s . When a station transfers to an EV the information about the WT w s , such a value represents a lower bound with respect to the time that the EV will actually spend at that station in line. In fact, at each time instant, the value of w s is equal to the difference between the maximum completion time among all the (already) assigned EVs to s and the current time instant. Its value does not take into account the simultaneous requests of other EVs and their possible assignment to s, that is the EVs that are computing their own assignment. Once the assignment of the EV e to s is set, w s is updated by adding to the current w s the estimated charging time of e, and the eventual idle time induced by the arrival of e to s. Such a computation is iteratively repeated for each EV that has selected the charging station s, according to their increasing arrival times. This value will be communicated to future assignment requests. As a consequence, also the time the EV e completes the recharging task at the station s, reached by taking the path p e,s , C p e,s as in (1) is a lower bound, since the current requesting vehicle charging time is not included in the value of w s .
Notice that at each iteration, the Lagrangian multiplier takes into account the number of vehicles that select a certain station, indeed an overloaded station will have a larger multiplier than an unloaded one. The Langrangian multipliers are updated, that way the EV will select the station that minimizes the following product: λ s τ p e,s , as specified in (4).
Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.

V. LAGRANGIAN RELAXATION HEURISTIC
In this section, the Lagrangian relaxation of the problem P is described. The Lagrangian decomposition is well known in the literature as a useful technique to approach large scale mixed-integer linear programming problems. In [34], [35], and [36], the Lagrangian technique is adopted to decompose centralized problems into subproblems that can be solved locally by exchanging a minimum amount of information. Lagrangian relaxation has been successfully employed in the design of heuristic methods aimed at finding appropriate feasible solutions. Research on distributed decision paradigms is gaining momentum because of the wide range of applications, from biology to computer science, from logistics to manufacturing. Several studies show that a distributed decision system is competitive compared to a centralized system in terms of robustness, modularity, and simplicity. On the other hand, the major drawbacks are the communication congestion and suboptimality of the solution [30]. Here, the main idea is to model the problem as a parallel machines job-shop scheduling problem where the set E represents the set of jobs and the set S corresponds to the set of machines. The aim is to minimize the maximum completion time, that also implies the achievement of a certain load balancing (LB) among the machines as side effect: the maximum completion time is lower when all the machines work in parallel. Accordingly, the problem addressed in this article is NP-hard since it can be considered as a generalization of the scheduling problem P2||C max the NP-hardness of which was demonstrated by Lenstra et al. in [37]. In order to decompose the problem P, the set of constraints in (3a) is relaxed and the following Lagrangian problem P R (λ) is derived: where λ s ≥ 0, s = 1, . . . , n, are the Lagrangian multipliers associated with the relaxed constraints. When solving P R (λ), we notice that the variable C max is constrained to be not negative and it is multiplied in the objective function by the coefficient 1 − n s=1 λ s . The relaxed problem P R (λ) can be decomposed into m subproblems P R e (λ), each one associated with an EV e P R e (λ) = min Hence, P R (λ) is treated in a decentralized way; in fact, each EV selects the charging station by solving its own P R e (λ).
Given the values of λ s , the problem P R (λ) provides a lower bound on the original problem P, and, since any assignment obtained by solving P R (λ), corresponds to the assignment of a subset of EVs to the stations, it also provides a feasible solution for P. We assume a limited information exchange among the stations and the EVs (see Fig. 1). Clearly, a more detailed information exchange would lead to a more accurate estimate of the parameters computed in the assignment algorithm (see step [2] of Algorithm 1). The steps of the assignment algorithm are reported in Algorithm 1. Its input is the WT of each station w s and the charging times τ p e,s . The output is the final assignment, that is the set of vehicles assigned to each stations x a s , the updated WTs w s , and the maximum completion time C max . Notice that the final assignment of the vehicles to the stations is the outcome of a cyclic procedure that exploits the convergence property of the Lagrangian decomposition of the problem [35].
In practice: the preprocessing phase computes the paths P e,s for each EV e toward each reachable station s, the charging times τ p e,s , and the completion times C p e,s . Notice that the completion times C p e,s are calculated only in this phase before the assignment algorithm.
Step (0): Each station communicates to the requesting EVs its current w s and the value of the Lagrangian multiplier λ iter s .
Step (1): Each EV selects a station [selecting the station that minimizes λ s τ P e,s , that is solving problem (4)] and sends the resulting decision to the selected station, communicating its C p e,s .
Step (2): Each station estimates its completion time The processing time of each EV e is estimated as the completion time C p e,s minus the WT w s at the station s. This is an upper bound of the charging time since the completion time C p e,s could depend on the TT instead of the WT at the station s. Notice that, among all the vehicles requiring the same station, only the TT of the first EV could introduce an idle time on the station (in addition the TT is negligible compared to the waiting and charging time).
Step (3): The maximum completion time of the system is computed among all the stations Step (4) values. Each station updates its WT w s implementing a FIFO priority rule.
Concerning the computational complexity of the procedure, the overall load is O(n), given by step (1). In fact, in this step, each EV computes independently the charging time at each station s, so the computational load is, in the worst case O(n). It is worth noticing that each EV computes the charging time only for a subnetwork U e,s .

VI. COMPARISON OF ASSIGNMENT HEURISTICS
In this section, we describe four centralized heuristic procedures to assign the EVs to the charging stations with the aim of comparing their performance with that of the decentralized Lagrangian method. Their policies are summarized in Table II where the EV selection and the station priority rule are reported. The heuristic procedures consider the time instant in which each e requests the recharge and the constraints due to the release dates and to the initial charge level of each vehicle. For each heuristic, the EVs are ordered in relation to the increasing time of charge requests.
The closest station heuristic (CS) assigns to an EV the station that can be reached in the minimum time to the e. It takes into account the TT and ignores the waiting and charging times.
The minimum processing time heuristic (MPT) assigns the charging station which minimizes the sum of the WT and charging time. If two stations are equivalent for any EV, the EV is assigned to the closest one. The first EV that reaches the station is the first to be processed (FIFO). When an EV starts its recharge operations, the station updates its WT.
In the minimum completion time heuristic (MCT), each EV is assigned to the charging station which minimizes its completion time that is computed by adding the TT, the WT and the charging time. The charging station implements a FIFO priority rule. Each station updates its WT once the charging of an EV starts.
The load balancing (LB) heuristic can be simplified in two phases that are iteratively repeated until all the EVs are assigned. In the first phase, for each EV, the completion time at each station is computed as the sum of the travel, the waiting and the charging times. Each EV selects the station that minimizes its completion time while the station processes only the EV with the longest charging time. The WT at each station is updated. In the second phase, the selection criterion of the EVs does not change. The EVs that have not started the recharge operations yet compute their completion time by considering the updated WT and request the station which minimizes their completion time. At this point, the stations give priority to the EVs which minimize the difference between the maximum and the MCT among all the stations, with the aim of balancing the station loads.

VII. SIMULATION AND RESULTS
The simulations have been performed by using MATLAB on a machine with 2 × 2.66-GHz 6-Core Intel Xeon processors, 32-GB 1333-MHz DDR3 RAM, and OSX Mountain Lion operative system. In the following the tested network and the instances are described. The computational results refer to

A. Urban Network Simulation Parameters
The real case of a portion of the urban network of Rome has been considered, namely, the slice involving the city center and the south part up to the Ring road.
The network has been modeled by a directed graph of 373 vertices and 766 edges. As already mentioned, each edge is weighted with its TT, that is time-dependent. Fig. 2(a) and (b) shows the TT trend of two different edges with respect to the simulation time interval, set to 120 min. The edge of Fig. 2(a) is congested for most of the time, while Fig. 2(b) refers to an edge that is congested only in the interval between the 50th and the 60th min. In Fig. 2(c), the average TT trend is reported, computed on all the edges of the network.
We remind that we assume that the charging stations location (v s ) and the EVs starting positions (v e ) are located on some of the network nodes.

B. Test Instances
The solution procedures have been tested on random instances with different numbers of EVs and charging stations. Test instances have been generated by randomly setting the locations of the charging stations and the positions of the EVs on the network. The computational time increases with the size of the instance, but the trend of the results does not depend on it but on the ratio between the number of EVs and of the charging stations, that is m/n. We tested different classes of instances with respect to the value of the ratio m/n, that is m/n ∈ {1.4, 2.8, 4.2, 5, 6}.
We have also considered different speeds of the charging stations and different battery models for the EVs. The combination of these two features generates different charging times associated with equal final recharge levels. We have considered 75, 40, and 13.8-kWh batteries and recharge speeds equal to 7 and 22 kW.
The starting battery charge is uniformly distributed in the interval [15%−25%].
We examine the cases of homogeneous and heterogeneous distribution of the desired final battery charge. In the two cases the desired final battery charge is uniformly distributed in the two intervals [60% − 80%] and [20% − 80%].
In this article, we report the results related to the heterogeneous case since it is also representative of other scenarios in which charging stations have different recharge rates and/or EVs have different battery models. In fact, these technological parameters only affect the charging time, like a fixed level of final recharge does if unvarying recharge rates and/or battery models are considered.
We have also differentiated the instances with respect to the distribution of the release dates in the simulation interval. Remember that the release date of an EV indicates the time the EV leaves from its position to reach a charging station. In the concentrated class of instances all the release dates fall in the first 20 min of the simulation interval. In the sparse class of instances the release dates of the EVs fall in the first 90 min of the simulation interval. In the latter case, the WTs are lower and the stations can be idle. For each class of instances the results related to 100 runs have been collected. We report the mean value of the maximum completion times calculated on the 100 runs. The trend of the results and the effectiveness of the algorithms with respect to all the parameters is similar. So we report and analyze only the results associated to the maximum value of the ratio, that is 6, since it requests an actual assignment optimization. Moreover we have considered a real network both in terms of topology and of traffic data.
In the following we will report the results related to the instances with the following parameters.
3) Concentrated and sparse release dates. 4) Real network. In any case, the average computational time of each procedure (both the LRH and the centralize heuristics) is less than 1 min.

C. Computational Results
This section provides both a comparison of the performance of the LRH and of the Assignment heuristics described in Section VI and focuses on the LRH tested together with different preprocessing procedures and a procedure to optimize the WT.
For each class of instances, the results related to 100 runs have been collected. We report the mean value of the maximum completion times calculated on the 100 runs.
1) Heuristics Comparison: In Fig. 3, a comparison between the heuristics is reported. In all the cases the LRH gives the best performances. The trends of the maximum completion time (CMAX) and of the average completion time (AC) are displayed for the concentrated and sparse release dates cases. The average completion time is calculated on all the charging stations.
In Fig. 4, the trend of the objective function is extracted by the previous results. The aim is to show that the trend is similar if we consider concentrated or sparse EVs release dates, with the exception of the LRH which demonstrates a   slight improvement in the concentrated case. Fig. 5 shows the difference between the completion times of the two charging stations with lowest and highest loads for the concentrated and sparse cases. In both cases, the LRH gives the best results by providing an effective balance of the loads in the charging stations.
Due to this similar trend for the concentrated and sparse cases, from now on, we will focus only on the concentrated class of instances.
Figs. 6 and 7 show the time components of the completion time output by the heuristics for the heterogeneous and   The mean completion time is mostly affected by the WT and by the charging time, while TT is quite insignificant. The LRH performs better in the heterogeneous case (compared to the homogeneous one) since they can balance the load among the charging stations. In the homogeneous instances case, the total improvement performed by the LRH with respect to the other heuristics is significant and varies between 8% and 33%.
In Table III, the relative performance decrease of the heuristics results in relation to the LRH are reported. The relative performance decrease ( ) is calculated by comparing the heuristic solution (Sol(H)) with the Lagrangian solution (Sol(L)) as in the following equation: The second and the third columns of Table III report the results related to the heterogeneous and homogeneous instances. It is evident that the LRH gives the best performances with a relative performing improvement ranging from 2.3% to 33.5%.
2) Detailed Results of the Lagrangian Relaxation Heuristic: In this section, the LRH has been tested and combined with different algorithms that further improves the solution. The two approaches are: 1) the preprocessing routing phase that proposes different paths to reach the stations; 2) the reservation policy that reduces the WT at the station. We remind that a feasible path for an EV is a path that can reach the station considering the starting battery charge, the consumption of energy during the path and traffic conditions. The preprocessing routing phase has been developed by implementing the following heuristics.
1) Maximum recharge (MR) which outputs the feasible path that provides the MR and minimizes its own completion time, limiting the increasing of the idle time of the station as much as possible. 2) Shortest distance (SD) which outputs the feasible shortest path in terms of distance (ignoring the total TT). 3) Shortest time (ST) which outputs the feasible shortest path in terms of time, considering traffic conditions. Although the previous results highlight that the TT is negligible compared to the two other completion components, it will become critical once the charging time decreases thanks to the technological improvement.
The completion time of each vehicle is affected by the technological characteristics of the batteries. Even a few vehicles in line lead to a remarkable WT. For this reason, we have introduced a reservation policy that reduces the WT at the charging stations. Therefore, EVs can reserve the charging time interval and postpone the departing time that, in this case, cannot coincide with the release date. The reservation time coincides with the recharge starting time provided by the LRH solution. To guarantee that each EV arrives at the station at the reserved time, the algorithms fix a buffer time and evaluate the effects of traffic conditions to estimate the departure time.
The previous three algorithms are, then, improved to MR RES , SD RES and ST RES where the suffix _RES stands for "reservation." In Fig. 9, the results of the heuristics with reservation is compared to those without reservation. In all cases, WT is highly reduced and can be now compared to the TT.
In Table IV, the percentage improvement due to the reservation with respect to the same preprocessing heuristic without reservation is reported. Column Cmax(%) refers to the objective function while AC(%) refers to the average  The preprocessing heuristic MR gives the best performances, since it outputs the solution that maximizes the autorecharge during the path and consequently reduces the charging time. This heuristic also outputs the departing time and the path that do not increase the idle time of the charging station. This improvement is more evident as the completion time decreases. In fact, the MR reduces the charging time by about 7-10 min, leading to a total reduction of about 2%-4% that reaches 10%-12% when the reservation is applied. If the completion time is reduced by applying a reservation policy, then the MR should give more advantages. When a further reduction of the charging time is possible thanks to the evolution of technology the three time components of the objective function will be comparable. The completion time will substantially decrease and the effect due to a smart selection of the path will be more evident, over 10%.

VIII. CONCLUSION
This article addresses the optimal assignment of a set of electric vehicles to a set of charging stations, with the objective of minimizing the maximum completion time.
We have implemented an online decentralized assignment heuristic based on the Lagrangian relaxation of a mathematical formulation of the problem. Then we have compared its performance to other assignment heuristics. The LRH gives the best results in all cases, considering different classes of instances; it also induces the side effect of balancing the charging stations workload. We have decomposed the time spent by each EV into three components, namely, the TT, the WT at the charging station, and the charging time. We have observed that the TT component is negligible with respect to the other two. Moreover, we have proposed some solution procedures which aim to reduce the maximum completion time by opportunely affecting the three time components and we have integrated them into the LRH, with the effect of improving its performance. The best performance is given by a heuristic which assigns a path to each EV which provides the maximum autorecharge (during the path) and implements a reservation policy that drastically reduces the WT at the charging station. The heuristics have been tested on a real network.
Future work will be addressed to investigate the improvement given by the information sharing among EVs and stations. We have assumed a limited information exchange among the stations but an higher amount of information flow would lead to a more accurate estimate of the parameters computed in the assignment algorithm. For example, the system could become crowdsensing [20], [27] if the EVs communicated spatial and temporal details about their routes that can affect the traffic conditions of the network. Moreover, a more sophisticated reservation policy could provide pricing reduction policy and penalties for on-time and late EVs, respectively. She has been an Assistant Professor with the University of Roma Tre since 2005, where she is currently an Associate Professor. Her research interests include wireless sensor networks, indoor localization, cyber-physical systems, industrial control systems, and critical infrastructure protection.
Open Access funding provided by 'Università degli Studi Roma Tre' within the CRUI CARE Agreement