Electric Vehicle Charging Scheduling Using Ant Colony System

In this work we consider the scheduling problem for charging a fleet of electric vehicles (EVs) within a station such that the total tardiness of the problem is minimized. The generation of a feasible and efficient schedule is a difficult task due to the physical and power constraints of the charging station, i.e., the maximum contracted power and the maximum power imbalance between the lines of the electric feeder. The ant colony optimization (ACO) metaheuristic is applied to coordinate the charging process of the EVs within the charging station by generating efficient schedules. The behaviour and performance of ACO is analyzed and compared against state-of-the-art approaches on a benchmark set inspired by real-world scenarios. The experimental results show that the application of ACO is highly effective and outperforms other approaches.


I. INTRODUCTION
Nowadays, there is a growing interest of using electric vehicles (EVs) instead of fuel-based vehicles due to their positive impact on the environment in reducing CO 2 emissions. However, their sustainable deployment requires new technologies (e.g., improving their battery capacity [1] and recharging batteries faster [2]), as well as new infrastructures to accommodate the charging of large fleets of EVs [3].
In this paper, we address a challenging scheduling problem, which is motivated by a charging station designed to be installed in a parking area where it can be used by a fleet of EVs both as a parking slot but also as a power source to recharge their batteries [4]. The aim of the problem is to coordinate the charging process of the EVs parked in the parking area by generating efficient schedules. In fact, several studies have shown that when the EVs' charging process is not properly coordinated in a charging station, several problems may occur, such as increase in the peak load period, decrease in service quality, degradation of the voltage profile, overload of circuits, and increase in energy losses [5], [6].
It is well known that EVs' bottleneck is their batteries that often require very high charging times and their capacity is relatively low for EVs to operate in large mileages. Therefore, deploying charging stations that can properly coordinate the charging process of EVs may contribute in addressing some of these issues. Apart from the EV issues regarding their battery technology, there are additional issues with the charging stations (e.g., they often have restrictions based on their power and physical constraints). Particularly, the distributed power within the charging station must be balanced because of the economical and electro-technical reasons mentioned previously [7]. These constraints must be encompassed in the scheduling problem.
The afformentioned scheduling problem is N P-hard [8], and, thus, the use of efficient scheduling algorithms is required to generate quickly schedules that maximize the utilization of the charging station resources while satisfying the charging demands of the EVs such that the total tardiness is minimized (in other words the total delay in charging EVs on time). A number of methodologies have been used to solve this problem including problem decomposition approches [4], simple dispatching rules (e.g., first come first serve [4] and latest starting time [8]) and metaheuristics (e.g., artificial bee colony [9] and genetic algorithm [10]). A comprehensive review of optimization techniques on relevant scheduling problems can be found in [11]. Among the approaches, metaheuristics have showed the best performance due to their ability to efficiently provide the optimal or near to the optimal solutions in realworld sized instances.
In this paper, we design and investigate the application of another metaheuristic, that is, ant colony optimization (ACO) [12], that has shown good performance in different scheduling problems [13]- [15] but also in similar EV charging scheduling problems [16]. Hence, it would be interesting to investigate the application of ACO in the aforementioned scheduling problem, which is much more challenging and realistic, and compare it with existing applications. The rest of the paper is organized as follows. Section II reviews existing charging scheduling models. Section III describes in detail the scheduling problem of the EV charging station considered in this work. Section IV describes the ACO application for the scheduling problem. The experimental results and analysis are presented in Section V. Finally, Section VI concludes this paper.

II. BACKGROUND
The coordination of EV charging within a station raises challenging scheduling problems. In the last few years, several charging scheduling models have been proposed (a comprehensive review of such charging approaches can be found in [17]). In general, two main architectures are used to coordinate EV charging in existing scheduling models: 1) decentralized control architectures, and 2) centralized control architectures. The former type of architectures offers great flexibility to EV owners, allowing them to decide the period to start charging their EVs. In the latter type of architectures, all the decisions are taken by the central control system of the charging station using information provided by the EV owners. Although the centralized architecture is not very flexible, it is more secure than the decentralized architecture. This is because with the centralized architecture the overall system can be controlled in such a way to prevent overloading of the power grid and to minimize power losses.
Depending on the characteristics and goals of each EV charging station different models and scheduling problems arise. For example, a number of objective functions have been considered in existing scheduling models such as minimizing the total tardiness [9], [10], total cost [18], [19], energy losses [4], [8], grid congestion [20] or optimizing more than one objectives simultanesouly [21]. Also some models consider variable charging rates of the EVs [20], variable charging power of the station [22], or variable electricity prices [23]. Other models, allow the control system of the charging station to decide the assignment of EVs to the charging (or parking) slots [6] whereas in other models the assignment is agreed in advanced (e.g., each EV owner reserves a specific slot in the charging station) [8].

A. EV Charging Station
Suppose that a charging station utilizing a centralized control architecture was designed to be installed in a private parking in which EVs have their own space to use as a parking slot and at the same time to charge their batteries [4]. A general structure of a charging station with a three-phase electric power source is shown in Fig. 1.
When EVs enter the charging station the control system of the station must create a feasible and efficient schedule for the charging process of the EVs, so that the total tardiness is minimized. There are two main constraints that the control system of the charging station must take into account. First, there is limited contracted power, and so there is a maximum number of charging points that can be active at the same time in any given line. Second, the power consumed by the lines must be balanced at any given time to avoid energy losses [7].
For example, in Fig. 1 the charging station uses a threephase electric power source, hence three lines connect the charging points. If we assume that each line is limited to a maximum four active charging points at the same time, then all the EVs that are currently parked in the station can start charging, while at the same time, the power distribution in the lines is balanced assuming that the power is transferred at a constant rate.

B. Problem Formulation
The charging station consists of n charging points (or parking slots) that are connected by L lines. Each line i connects P i charging points where each point is also the private parking of an EV. Even though the charging station has n charging points available, they cannot be all active at the same time. In particular, the maximum number of active charging points for each line must satisfy the following constraints: x i j = 1, if charging point j on line i is active; where Eq. (1) ensures that each line can only have N charging points active to charge N EVs at the same time, Eq. (2) controls the maximum imbalance ∆ (∆ ∈ [0, 1]) between the lines, and Eq. (3) defines a decision binary variable. For each EV j, using the charging station, there is an arrival time t j (t j ≥ 0), a charging time p j (p j > 0), and a due date d j (d j ≥ t j + p j ) denoting the departure time of the EV. The goal is to generate a sequence of EVs to coordinate their charging, satisfying the two constraints in Eq. (1) and Eq. (2), and minimizing the total tardiness defined mathematically as follows: where CT j is the completion time of EV j which is calculated as CT j = s j + p j where s j (s j ≥ t j ) is the assigned starting time for the charging of EV j.
It must be noted that no preemption is allowed (i.e., an EV cannot be disconnected before the completion time CT j is reached). Other assumptions imposed to simplify the model include: all EVs charging at the same constant rate and the contracted power in the charging station to be constant over time. Also we assume that the profiles of the EVs (i.e., t j , p j and d j ) are known in advance, since a static model is considered.

IV. ANT COLONY OPTIMIZATION
In the ACO metaheuristic a colony of ω (artificial) ants iteratively constructs solutions for the problem under consideration using (artificial) pheromone trails which are associated with appropriately defined solution components and heuristic information [24]. A skeleton of the ACO metaheuristic is presented in Algorithm 1. Ants modify the pheromone trails during the algorithm's execution based on the quality of the constructed solution. In this paper, we apply Ant Colony System (ACS) [12], one of the best performing ACO algorithms in minimizing the total tardiness for several scheduling problems [25]- [27], to the scheduling problem of the charging station described above.

A. Constructing Solutions
In ACS, each ant starts with an empty set of scheduled EVs and then incrementally appends unscheduled EVs to the partial set of the scheduled EVs so far, until all EVs are scheduled. A constructed solution is basically a sequence of EVs (i.e., a permutation of EV indices). It must be noted that a charging schedule is generated based on the order in which the EVs are placed in the permutation in the same way as the scheduler algorithm proposed in [10]. Specifically, to sequentially schedule all EVs in the permutation, assigning for each EV the earliest possible starting time, such that all constraints are satisfied with respect to the previously scheduled EVs.
Ant k selects the unscheduled EV j to be added in the permutation at position i according to the following decision rule: where τ il is the pheromone trail associated to the assignment of EV l in position i and η il is the heuristic information of assigning EV l in position i, S k is the partial set of scheduled EVs, α is a parameter that controls the influence of the pheromone trails, β is a parameter that controls the influence of the heuristic information, q is a random variable uniformly distributed in [0, 1], q 0 (q 0 ∈ [0, 1]) is a parameter that controls the exploration of the decision rule, and J is a random variable (representing an EV index) selected according to the following probability distribution: In other words, with probability q 0 the ant makes the best decision as indicated by the pheromone trails and the heuristic information (exploitation), while with probability (1 − q 0 ) the ant makes a random decision biased by the pheromone trails and the heuristic information (exploration). The heuristic information η ij of assigning EV j in position i in the schedule is computed by the earliest due date rule [28]. This dispatching rule sorts EVs in increasing order of their due dates d j (i.e., the requested departure times of the EVs). Hence, in our case η ij = 1/d j . In other words, the heuristic information will favour the EVs that need to leave earlier than other EVs. In the experiments in Section V the impact of using this heuristic information is further investigated.

B. Updating Pheromones
In ACS, two types of pheromone updates are applied, one at the global level and the other at the local level. In the global pheromone trail update after each algorithmic iteration only the best-so-far ant 1 is allowed to add pheromone to its solution components. In particular, the pheromone trails associated with the solution components represented by the best-so-far ant are updated as follows: where ρ (ρ ∈ (0, 1]) is the pheromone evaporation rate and ∆τ bs ij = 1/C bs , where C bs is the total tardiness value of the best-so-far solution. It must be noted that ACS terminates whenever the total tardiness of the best-so-far solution becomes zero (which is the minimum value according to Eq. (4)). Therefore, a division by zero is never allowed.
In the local pheromone trail update, ACS applies a stepby-step pheromone update rule immediately after an ant has added a new solution component (i.e., an EV j in position i). In particular, the pheromone trails associated with the aforementioned solution components are updated as follows: where ξ (ξ ∈ (0, 1]) is a parameter that controls the influence of the local pheromone update and τ 0 is the initial pheromone value. Note that a good value for τ 0 was found to be 1/rC edd , where r is the total number of EVs and C edd is the total tardiness value of the solution generated by the earliest due date rule [26]. All pheromone trails are uniformly initialized at the start of the execution. The effect of the local updating rule is to make the decision of assigning EV j in position i less desirable for the other ants to favour assignments of other EVs on that position. In this way, the exploration of the search is promoted. In the experiments in Section V these two pheromone update types (i.e., local and global) are further investigated.

A. Experimental Setup
In the experimental studies, we consider the real-world benchmark set proposed in [8], representing a charging station of three lines (as in Fig. 1), each one connecting 60 charging points. In total the charging station consists of 180 charging points (also parking slots). Specifically, the L and n parameters in Section III are defined as follows: L = 3 and n = 180. ACO performs 30 independent runs for each test case because of its stochastic nature and the averaged total tardiness (in hours) is recorded. The colony size of ACO was set to ω = 200 and the remaining parameters are further investigated in the next section.

B. ACO Parameter Settings
In order to achieve a good balance between the exploration and exploitation for ACO on this scheduling problem, several parameters, e.g., α, β, ρ, ξ and q 0 , require further investigation. The parameter tuning was performed on 24 test cases (i.e., the first instance of the benchmark set for each different test case in Table I).

1) Effect of Pheromone trails:
The value of the α parameter is set either to 0, indicating no pheromone bias, and to 1, indicating pheromone bias. The experimental results regarding the total tardiness with different α values are given in Fig. 2. It can be observed that when the solutions are constructed without any guidance from the pheromone trails (i.e., when α = 0) the total tardiness increases. This is because the solutions are constructed without utilizing the experience learned so far, which is stored in the pheromone trails. The pheromone trails have the effect of increasing the probabilities of the promising positions in the schedule for an EV (which is the solution component associated with a pheromone value).
2) Effect of Heuristic Information: The value of the β parameter is varied as follows: β ∈ {0, 2, 5, 10}. The experimental results regarding the total tardiness with different β values are given in Fig. 3. It can be observed that when heuristic information is utilized (i.e., when β > 0) the total  tardiness improves in almost all cases (except in test case 13). This shows that the heuristic information (based on the earliest due date of the EV) is beneficial in the construction of solutions because it favours EVs that must leave earlier than other EVs. In many Type 2 test cases, that promote the imbalance between the lines, when β = 10 the total tardiness is worse than when β = 0. This is because of the power and imbalance constraints in Eq. (1) and Eq. (2) that affect the validity of the information provided to the search by the earliest due date rule. On the contrary, in Type 1 test cases these constraints are less likely to be violated, hence, a stronger influence by the heuristic information (e.g., when β = 10) can guide the search in the promising areas of the search space. It must be noted that selecting higher values of β (not presented here) did not have significant improvements in Type 1 test cases, but significantly increased the total tardiness in most Type 2 test cases.
3) Effect of Decision Rule: The value of the q 0 parameter is varied as follows: q 0 ∈ {0.0, 0.5, 0.9, 0.95, 1.0}. The experimental results regarding the total tardiness with different q 0 values are given in Fig. 4. It can be observed that as the q 0 value increases the total tardiness improves. This is because the pheromone trail policy described in Section IV promotes exploration. For example, with the local pheromone update rule it is less likely for the ants to construct similar solutions. Therefore, a decision rule that further promotes exploration (i.e., when q 0 = 0.0) will not be beneficial. In particular, it can be observed that when q 0 = 0.9 or q 0 = 0.95 the total tardiness is better than when q 0 = 0.5 and q 0 = 0.0 in most test cases. However, an extreme value of q 0 (i.e., q 0 = 1.0) is not beneficial because it leads the search to no exploration at all.

4) Effect of Pheromone Evaporation:
The value of the ρ parameter is varied as follows: ρ ∈ {0.0, 0.1, 0.2, 0.4, 0.6}. The experimental results regarding the total tardiness with different ρ values are given in Fig. 5. It is interesting to observe that when no pheromone evaporation is used (i.e., when ρ = 0.0) the total tardiness increases. This is because the pheromone trails representing the best-so-far solution are never reduced. Hence, there is a potential risk of continuously increasing these trails and getting trapped in a (possibly poor) local optimum from the initial stages of the search, resulting in premature convergence. This can be easily observed in Fig. 5, when ρ > 0.0 the total tardiness significantly improves. On the contrary, the total tardiness does not show any significant improvement when the evaporation rate is higher than 0.2. It must be noted that higher values of ρ (i.e., ρ > 0.6) have been investigated with no significant improvements, and, thus, are not included in Fig. 5.

5) Effect of Local Pheromone Update:
The value of the ξ parameter is varied as follows: ξ ∈ {0.0, 0.1, 0.2, 0.4}. The experimental results regarding the total tardiness with different ξ values are given in Fig. 6. It can be observed that when local pheromone update is not used (i.e., when ξ = 0.0) the total tardiness is the worst especially in Type 2 test cases in which the imbalance constraint is promoted. For this type of test cases, it is easier for ACO to make several undesirable assignments because of the imbalance constraint. Hence, using the local pheromone update these assignments will be quickly ignored as their pheromone trails will be reduced, while the ants are selecting components during the construction of their solutions. It must be noted that higher values of ξ (i.e., ξ > 0.4) have been investigated with no significant improvements, and, thus, are not included in Fig. 6.

C. Comparison with Other Approaches
In this section we compare the proposed ACO (with its parameters set to α = 1, β = 5, ρ = 0.4, ξ = 0.1 and q 0 = 0.95) 2 with a problem decomposition (PD) approach [4], three dispatching rules: 1) first come first serve (FCFS) [4], 2) latest starting time (LST) [8], and 3) earliest due time (EDT) [28], and a state-of-the-art genetic algorithm (GA) [10], which is a metaheuristic method, on the full benchmark set. FCFS, EDT, and LST approaches sort in ascending order the EVs based on their arrival time t j , their due date d j and the rule given by (d j − p j ), respectively. Then, the schedule will be generated according to the ordering given by the corresponding dispatching rule. The PD approach decomposes the problem and aims to generate a schedule for each line separately. On the contrary, the GA generates a schedule for the entire system using search operators specifically designed for the scheduling problem described in Section III. Similar to the proposed ACO approach, the GA approach performs 30 independent runs for each instance and the average total tardiness (in hours) is recorded. The two metaheuristic approaches (i.e., ACO and GA) use the same number of individuals 3 (i.e., 200) and the same termination conditions (i.e., when the best solution is not improved for 25 consecutive iterations, or if zero total tardiness is reached). It must be noted that the parameters of the GA are also optimized in [10] under the same test cases as ACO was optimized in Section V-B and they are set as follows: crossover probability 0.8, mutation probability 0.1 and the size of the tournament selection was set to 8. Table I shows the results of the experiments. The values reported are the sum of the total tardiness of the 30 instances of each test case of the algorithms.
From Table I, it can be observed that all algorithms obtain a significantly lower total tardiness in Type 1 test cases (i.e., number 1-12) than Type 2 test cases (i.e., number 13-24). As described above, in Type 1 test cases, EVs are uniformly distributed whereas in Type 2 test cases they are not. Consequently, this feature imposes more challenges to the algorithms when solving Type 2 test cases because they have to control in many situations the power imbalance among the lines when building the schedule. Also, it can be observed that as the N and ∆ parameters increase the total tardiness of all algorithms decreases. In fact, for several Type 1 test cases the total tardiness is approaching 0, which is the minimum value according to the objective function in Eq. (4). This is because the values of the constraints in Eq. (1) and Eq. (2) are large enough, hence, they are less likely to be violated causing an increase in the total tardiness. In other words, the more times these constraints are violated the higher the total tardiness. Furthermore, from Table I it can be observed that FCFS, LST, and EDT are not performing as good as GA and ACO. This is natural because no optimization is performed within the three aforementioned dispatching rules. Also, it can be observed that both GA and ACO significantly outperform PD in all test cases as it was expected. This is because PD evaluates schedules for each line separately, and, thus, may overlook some situations of addressing the power imbalance without necessarily violating the constraint. As a result, the charging of the EVs will be unnecessarily delayed because the imbalance constraint is violated causing an increase in the total tardiness. On the other hand, this situation is less likely to occur in ACO and GA. These results validate that metaheuristics are suitable for the scheduling problem arising in the EV charging station.
Also, it is interesting to observe that ACO outperforms the GA approach in all test cases. The advantage of ACO against GA lies on its structural difference. In particular, ACO can be seen as an iterative constructive heuristic that generates new solutions in every iteration on the basis of learned data (i.e., the pheromone trails). Therefore, the risk of beginning with poor initial solutions (as with GA) or getting trapped in a (possibly poor) local solution later on is limited with ACO.

VI. CONCLUSIONS
EVs and their technologies have received increased interest due to their positive impact on the environment. In this work, we consider a scheduling problem arising in a charging station to address the coordination of the charging process for a fleet of EVs. The generated schedules need to satisfy the physical and power constraints of the charging station. These constraints make the scheduling problem harder to solve using simple dispatching rules (e.g., first come first serve [4] or latest stating time [8]). In this paper, we apply ACO to generate feasible schedules for EVs to minimize the total tardiness of the scheduling problem. Experimental results using a benchmark set with various real-world inspired scenarios showed that the ACO approach is more suitable for the scheduling problem, compared to simple dispatching rules and other approaches, mainly because of its intrinsic characteristics.
For future work, we plan to extend the model considered in this work with additional realistic constraints (e.g., variable charging rates) and integrate a local search operator to further improve the performance of ACO. In fact, the performance of other metaheuristics has been significantly enhanced with a local search in [29], [30] on the described scheduling problem. Recall that in Table I the metaheuristic approaches are not utilizing any local search operator. Therefore, for future work it would be interesting to compare the performance of the existing metaheuristics with local search against the proposed ACO with local search. Also, another interesting direction is to solve the problem dynamically, assuming that the information of the EVs is not known a priori as in [4], [10].
ACKNOWLEDGMENT This work has been supported by the European Union's Horizon 2020 research and innovation programme under grant agreement No. 739551 (KIOS CoE) and from the Government of the Republic of Cyprus through the Directorate General for European Programmes, Coordination and Development.